Skip to content

Instantly share code, notes, and snippets.

@Tset-Noitamotua
Last active June 30, 2017 09:49
Show Gist options
  • Save Tset-Noitamotua/7c994c401c5b36422eb61300bbb35a32 to your computer and use it in GitHub Desktop.
Save Tset-Noitamotua/7c994c401c5b36422eb61300bbb35a32 to your computer and use it in GitHub Desktop.
SetUp & Run ReportPortal.io on Docker-CE

HOW-TO run ReportPortal.io on Docker-CE

Follow below steps if you like to have ReportPortal running on Ubuntu Zesty (17.04) with the latests Docker-CE version 17.05 and Docker-Compose 1.14

INSTALATION

NOTE: Steps 1 - 3 are only required because at the time of writing docker-ce was not on apt repo so that one could not just do sudo apt install docker-ce to install it. I guess in near future one can skip these steps and jump to step 4 right away.

1. Enable apt transport over HTTPS

   sudo apt-get install \
   apt-transport-https \
   ca-certificates \
   curl \
   software-properties-common

2. Get apt-key for Docker repo

   curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

3. add Docker's repo to sources.list

   sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty edge"

TODO: 3. check if there is a stable version of Docker-CE for Zesty

sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

4. Install Docker-CE

   sudo apt update
   sudo apt install docker-ce

PROXY SETTINGS for Docker (you'll probably need this @work)

   mkdir -p /etc/systemd/system/docker.service.d
   sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf

http-proxy.conf content

   [Service]
   Environment="HTTP_PROXY=http://proxyhost:port/" "NO_PROXY=localhost,127.0.0.1"
   # ALTERNATIV - if you are behind HTTPS proxy instead of just HTTP:
   # https-proxy.conf
   # Environment="HTTPS_PROXY=http://proxyhost:port/"

5. Restart Docker

   sudo systemctl daemon-reload
   sudo systemctl restart docker
   #  TEST: systemctl show --property=Environment docker
   # >>> Environment=HTTP_PROXY=http://proxyhost:port/

6. Check that Docker is installed correctly

   sudo docker run hello-world
   # hello-world images will be download and run
   # your will see output e.g. "Hello from Docker!  ... "

7. DOCKER-COMPOSE installation from PIP!

   sudo apt install python-pip
   sudo pip install docker-compose

NOTE: You can install docker-compose with sudo apt install docker-compose, too. But at the time of writing this installed an outdated version. So, go PIP!

8. REPORTPORTAL INSTALLATION

   mkdir reportportal
   cd reportportal
   # get the docker-compose file
   wget https://raw.githubusercontent.com/reportportal/reportportal/master/docker-compose.yml
   docker-compose up

This will take some time cause several images will be downloaded ... go grab a beer ... or a coffee :) After download is completed and containers started open another terminal and run docker ps to check that all containers from previous step are up and running.

9. Check that ReportPortal is running

In the VM opten browser to 0.0.0.0:8080 --> ReportPortal login page will open NOTE: If you are behind a proxy you need to add 0.0.0.0 to the NO_PROXY (no_proxy) ENV. After setting the port forwarding like explained in video PART 2 (link below) open browser on your host machine to localhost:8080 or 127.0.0.1:8080 --> ReportPortal loginpage will open

TODO: describe port forwarding here!

OPTIONAL

If you don't like to write 'sudo' before each docker-command do this but be aware of possible security issue with that!

   sudo groupadd docker
   sudo usermod -aG docker $USER

>>> RESTART VM!

Helpful links (video tutorial)

Part 1 Part 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment