lava-server official docker images

26 Jul 2018
Posted by stylesen

Linaro Automated Validation Architecture a.k.a LAVA project has released official docker images for lava-server only containers followed by the recent release of lava-dispatcher only docker images. This blog post explains how to use these lava-server docker images in order to run LAVA instances via docker.

Before getting into the details of running these images, let us see how these images are organized and what are the packages available via these images.

The lava-server only docker images will be officially supported by the LAVA project team and there will be regular releases of these images whenever there are updates or new releases. As of this writing there are two images released - production and staging. These docker images are based on Debian Stretch operating system, which is the recommended operating system for installing LAVA.

lava-server production docker images

The production docker image of lava-server is based on the official production-repo of LAVA project. The production-repo holds the latest stable packages released by LAVA team for each of the LAVA components.The production docker image will be available in the following link:

https://hub.docker.com/r/linaro/lava-server-production-stretch-amd64/

Whenever there is a production release from the LAVA project there will be a corresponding image created with the tag name in https://hub.docker.com/r/linaro/lava-server-production-stretch-amd64/tags/ The latest tag as of this writing is 2018.7-1. In order to know what this production docker images are built with, have a look at the DockerFile in https://git.linaro.org/ci/dockerfiles.git/tree/lava/server/production/stretch-amd64/Dockerfile

lava-server staging docker images

The staging docker image of lava-server is based on the official staging-repo of LAVA project. The staging-repo holds the latest packages built everyday by LAVA team for each of the LAVA components, which is also a source for bleeding edge unreleased software. The staging docker image will be available in the following link, which is built daily:

https://hub.docker.com/r/linaro/lava-server-staging-stretch-amd64/

Whenever there is a successful daily build of staging packages available, a docker image will be made available in https://hub.docker.com/r/linaro/lava-server-staging-stretch-amd64/tags/ with the tag name 'latest'. Hence, at any point of time there will be only one tag, i.e., latest in the staging docker image location. In order to know what this staging docker images are built with, have a look at the DockerFile in https://git.linaro.org/ci/dockerfiles.git/tree/lava/server/staging/stretch-amd64/Dockerfile

Having seen the details about the lava-server only docker images, let us now see how to run these docker images to create a LAVA server instance.

running production lava-server docker image

$ sudo docker run -p 8080:80 --privileged --name lava-2018.7-1 linaro/lava-server-production-stretch-amd64:2018.7-1
Starting postgresql...
Starting PostgreSQL 9.6 database server: main.
Starting lava-coordinator...
Starting lava-coordinator : lava-coordinato.
Starting apache2 server...
Starting Apache httpd web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
.
Creating admin account
Superuser created successfully.
Set initial password for admin account as: changeit
spawn lava-server manage changepassword admin
Changing password for user 'admin'
Password:
Password (again):
Password changed successfully for user 'admin'
Starting lava-server-gunicorn...

Once the docker image is started visit the instance using the url http://localhost:8080/ or http://172.17.0.2 from the host machine. The IP address 172.17.0.2 is obtained from the output above.

running staging lava-server docker image

$ sudo docker run -p 8080:80 --privileged --name lava-latest linaro/lava-server-staging-stretch-amd64:latest
Starting postgresql...
Starting PostgreSQL 9.6 database server: main.
Starting lava-coordinator...
Starting lava-coordinator : lava-coordinato.
Starting apache2 server...
Starting Apache httpd web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
.
Creating admin account
Superuser created successfully.
Set initial password for admin account as: changeit
spawn lava-server manage changepassword admin
Changing password for user 'admin'
Password:
Password (again):
Password changed successfully for user 'admin'
Starting lava-server-gunicorn...

Thus we have our lava-server docker image up and running in docker container. In order to login to this instance use the default user 'admin' and the password 'changeit'. The admin user has administration privileges, hence ensure you change the password to keep your instance secure.

Have a look at https://git.linaro.org/ci/dockerfiles.git/tree/lava/server/entrypoint.sh which accepts and executes commands which will be handy to tackle advanced use-cases that you want to envision using these lava-server based docker images.