Documentation
@ysandeep @akahat @bhagyashris
Please add your notes, bugs, to-do's here while attempting to setup a developer environment for the promotion server.
ATTENTION: Make sure dlrn-promoter-service is disabled so it does not consume dlrn hashes and does not conflict with production promoter.
When you run with molecule, you are safe with staging_setup
flag:
https://github.com/rdo-infra/ci-config/blob/master/ci-scripts/infra-setup/roles/promoter/templates/dlrn-promoter-service.sh.j2#L15
There is an automated way for deploying a test promoter server. This is an alternative for running manual steps.
The following steps run the provisioning playbook from your local machine and the target instance will deploy promoter plus staging env.
sudo echo 11.111.11.111 instance >> /etc/hosts
sudo vi /etc/ssh/ssh_config
Host instance
HostName 11.111.11.111
User centos
molecule test -s promoter
on ci-config dir to provision promoter on the instancemolecule prepare -s container_push
on ci-config dir to set up staging environment (mock registries) on the instancepromoter
by default, but will connect with centos
usersudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce iptables --nobest -y
sudo systemctl enable --now docker
sudo systemctl status docker
sudo usermod -aG docker $USER
sudo systemctl disable firewalld
sudo reboot
docker pull alpine
docker run -it --rm alpine /bin/sh
docker login
sudo dnf -y install git vim python3-virtualenv
python3 -m pip install --user tox
git clone https://github.com/rdo-infra/ci-config
virtualenv promoter_devel
source promoter_devel/bin/activate
cd ci-config/ci-scripts/dlrnapi_promoter/
pip install -r requirements.txt
python3 stage.py -h
(promoter_devel) [rdouser@localhost dlrnapi_promoter]$ python3 stage.py -h
usage: stage.py [-h] [--scenes SCENES] [--dry-run]
[--promoter-user PROMOTER_USER]
[--stage-config-file STAGE_CONFIG_FILE]
[--stage-info-file STAGE_INFO_FILE]
[--db-data-file DB_DATA_FILE]
[--promoter-config-file PROMOTER_CONFIG_FILE]
{setup,teardown}
Staging promoter
positional arguments:
{setup,teardown}
optional arguments:
-h, --help show this help message and exit
--scenes SCENES Select scenes to create in the environment scenes
available dlrn,overcloud_images,containers,registries
--dry-run Don't do anything, still create stage-info
--promoter-user PROMOTER_USER
The promoter user
--stage-config-file STAGE_CONFIG_FILE
Config file for stage generation (relative to config
dir)
--stage-info-file STAGE_INFO_FILE
Config file for stage results
--db-data-file DB_DATA_FILE
Data file to inject to dlrn server (relative to config
dir)
--promoter-config-file PROMOTER_CONFIG_FILE
Config file for promoter on which to base the stage
(relative to config dir)
python3 stage.py setup --stage-config-file stage-config.yaml --db-data integration-pipeline.yaml --promoter-config-file staging/CentOS-8/master.ini
With new promoter code use below command:
python3 stage.py --stage-info-file stage-config.yaml --db-data-file integration-pipeline.yaml setup --release-config CentOS-8/master.yaml
python3 stage.py teardown --stage-config-file stage-config.yaml --db-data integration-pipeline.yaml --promoter-config-file staging/CentOS-8/master.ini
Happy Hacking.
Please also go through https://github.com/rdo-infra/ci-config/blob/master/ci-scripts/dlrnapi_promoter/README.md
Issues caught while deployment
promoter server details
Promoter server requirements
centos8 vm with dnf update
Ansible installed and configured
Docker installed and Docker service up and running
Make sure git is installed
Clone the ci-config repo
virtualenv setup
place the secrets at proper place
Run the dlrn promoter service
Make sure
Maintain a list who has the access to promoter for manual interevin
File server on vm
Containers push on quey.io
we had a successful ussuri promotion
On http://10.0.148.74/ promoter
manual steps after infra-setup promoter executes for production
we'll test all the c8 branches
amol/bhagyashri continue to work on the container pull/push logging
setup another internal promoter for OSP 16.2 and 17
Below are the steps to do that.
- host: quay.io
namespace: "tripleo{{ lookup('env','RELEASE') }}"
username: "{{ lookup('env','QUAYDOTIO_USERNAME') }}"
password: "{{ lookup('env','QUAYDOTIO_PASSWORD') }}"
token: "{{ lookup('env','QUAYDOTIO_TOKEN') }}"
auth_url: "https://quay.io/api/v1/'"
schema: "v2_s1"
export QUAYDOTIO_USERNAME='replace-username'
export QUAYDOTIO_PASSWORD='replace-password'
export QUAYDOTIO_TOKEN='replace-token'
copy containers : https://review.rdoproject.org/r/c/rdo-infra/ci-config/+/32938
do the automation to change the criteria file for promotion
currently we are off the git pull from the dlrn-script so how can be get rid off this.
Pending work: