Deploy an openQA in containers (Web UI part 1)

by ilausuch-suse
GNU/Linux ◆ xterm-256color ◆ bash 389 views

Follow these steps

$ git clone https://github.com/os-autoinst/openQA.git

$ mkdir -p data/factory/{iso,hdd,other,tmp} data/{testresults,tests,conf} data/certs/{ssl.crt,ssl.key} $ cp openQA/container/openqa_data/data.template/conf/* data/conf $ cp openQA/container/webui/conf/database.ini data/conf/

#NOTE: This two lines are missing from the original video $ cp data/conf/openqa.ini /tmp/ $ cat /tmp/openqa.ini | sed ‘s/method = OpenID/method = Fake/‘ >data/conf/openqa.ini

$ docker network create openQA

$ docker run -d –network openQA -e POSTGRES_PASSWORD=openqa -e POSTGRES_USER=openqa -e POSTGRES_DB=openqa –net-alias=db –name openqa_db postgres $ docker logs -f openqa_db

$ openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -subj ‘/CN=www.mydom.com/O=My Company Name LTD./C=DE’ -out data/certs/ssl.crt/server.crt -keyout data/certs/ssl.key/server.key $ cp data/certs/ssl.crt/server.crt data/certs/ssl.crt/ca.crt

$ volumes=”-v $(pwd)/data:/data” $ certificates=”-v $(pwd)/data/certs/ssl.crt:/etc/apache2/ssl.crt -v $(pwd)/data/certs/ssl.key:/etc/apache2/ssl.key”

$ docker build openQA/container/webui -t openqa_webui $ docker run -d –network openQA $volumes $certificates -p 80:80 –net-alias=openqa_webui –name openqa_webui openqa_webui $ docker logs -f openqa_webui

NOTE: I updated this script changing Fake as auth method instead of OpenID