{"id":39930979,"url":"https://github.com/redhat-cip/dci-openstack-agent","last_synced_at":"2026-01-18T18:08:34.929Z","repository":{"id":34863635,"uuid":"147400326","full_name":"redhat-cip/dci-openstack-agent","owner":"redhat-cip","description":"DCI OpenStack Agent","archived":false,"fork":false,"pushed_at":"2024-07-16T15:52:31.000Z","size":2191,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-07-16T19:34:56.453Z","etag":null,"topics":["ansible","dci","openstack"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-cip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-04T19:18:09.000Z","updated_at":"2024-07-16T15:52:34.000Z","dependencies_parsed_at":"2024-07-16T19:29:40.742Z","dependency_job_id":null,"html_url":"https://github.com/redhat-cip/dci-openstack-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/redhat-cip/dci-openstack-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cip%2Fdci-openstack-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cip%2Fdci-openstack-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cip%2Fdci-openstack-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cip%2Fdci-openstack-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-cip","download_url":"https://codeload.github.com/redhat-cip/dci-openstack-agent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cip%2Fdci-openstack-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28547004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","dci","openstack"],"created_at":"2026-01-18T18:08:34.852Z","updated_at":"2026-01-18T18:08:34.922Z","avatar_url":"https://github.com/redhat-cip.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"⚠️ **Note:** This project has been migrated to a new repository.\nPlease visit the new location [here](https://github.com/distributedci/dci-openstack-agent).\n\n# DCI OpenStack Agent\n\n## Deprecation warning\n\nDCI OpenStack agent has been deprecated.\n\n## Overview\n\nThe following documentation will allow you to configure your OpenStack automated jobs with DCI.\nAt the end of this documentation, you should have a configured systemd service running DCI jobs with the latest versions of RHOSP or RDO.\ndci-openstack-agent is an ansible-playbook executed as a systemd service.\nThis service will run on a RHEL server called remoteci.\nIt will run Red Hat tests at the end of the process to ensure everything is working fine.\n\nThis documentation is divided into 4 parts.\n\n- Requirements\n- Integrate your automation with DCI\n- Test your integation and run your first job\n- Automate job's run\n\n## Requirements\n\n### OpenStack Automation\n\nTo be able to work with DCI you **must have** automation scripts for undercloud and overcloud deployments.\nYou should be able to automatically:\n\n- clean and redeploy the undercloud machine automatically\n- install the undercloud using repository and registry urls as parameters\n- deploy the overcloud on the node of the lab\n\n### Red Hat SSO\n\nDCI is connected to the Red Hat SSO. You will need a [Red Hat account](https://access.redhat.com/).\n\n### RHSM account\n\nOn each remoteci where the agents will run, you need a valid RHSM account.\nYou can type `subscription-manager identity` on your remoteci to see if it's the case.\nYou should also have access to the following channel with your RHSM account:\n\n- rhel-7-server-optional-rpms (remoteci)\n- rhel-7-server-rpms (remoteci|undercloud)\n- rhel-7-server-extras-rpms (remoteci|undercloud)\n- rhel-7-server-cert-rpms (undercloud)\n- rhel-7-server-rh-common-rpms (undercloud)\n- rhel-ha-for-rhel-7-server-rpms (undercloud)\n\n### Remoteci\n\nYou should check that your remoteci:\n\n- Is running the latest RHEL 7 release.\n- Has a static IPv4 address.\n- Has 160GB of free space in `/var` (components will be in /var/www/html and container images in /var/lib/docker).\n- Should be able to reach:\n  - `https://api.distributed-ci.io` (443).\n  - `https://packages.distributed-ci.io` (443).\n  - `https://registry.distributed-ci.io` (443).\n  - RedHat CDN.\n  - EPEL repository.\n  - The undercloud via `ssh` (22) for Ansible.\n\n## Integrate your automation with DCI\n\n### Install dci-openstack-agent\n\nTo be able to install the rpm of DCI Ansible Agent, you will need to activate some extra repositories and add EPEL and DCI repositories.\n\n```console\n$ subscription-manager repos '--disable=*' --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-extras-rpms\n$ yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n$ yum install -y https://packages.distributed-ci.io/dci-release.el7.noarch.rpm\n```\n\nYou can now install the `dci-openstack-agent` package:\n\n```console\n$ yum install -y dci-openstack-agent\n```\n\n### Remoteci creation\n\nDCI is connected to the Red Hat SSO. You need to log in `https://www.distributed-ci.io` with your redhat.com SSO account.\nYour user account will be created in our database the first time you connect.\n\nAfter the first connection you have to create a remoteci. Go to [https://www.distributed-ci.io/remotecis](https://www.distributed-ci.io/remotecis) and click `Create a new remoteci` button. Once your `remoteci` is created, you can retrieve the connection information in the 'Authentication' column. Edit the `/etc/dci-openstack-agent/dcirc.sh` file with the information displayed.\n\nAt this point, you can validate your credentials with the following commands:\n\n```console\n$ source /etc/dci-openstack-agent/dcirc.sh\n$ dcictl remoteci-list\n```\n\nIf you see your remoteci in the list, everything is working great so far.\n\n### DCI hooks\n\nHere is the structure of the configuration files for dci-openstack-agent\n\n```console\n/etc/dci-openstack-agent/\n...\n├── hooks\n│   ...\n│   ├── pre-run.yml\n│   ├── running.yml\n│   ...\n└── settings.yml\n```\n\nDCI hooks are ansible tasks that will be run by the agent. You need to call your clean and provisioning script in the pre-run.yml task.\n\n```\n# /etc/dci-openstack-agent/hooks/pre-run.yml\n---\n- name: clean\n  shell: ansible-playbook clean.yml\n  args:\n    chdir: /var/lib/dci-openstack-agent\n- name: provision\n  shell: ansible-playbook provision.yml\n  args:\n    chdir: /var/lib/dci-openstack-agent\n```\n\ndci-openstack-agent will start a job by downloading the lastest component based on the topic version set in `/etc/dci-openstack-agent/settings.yml`\n\n```console\n$ cat /etc/dci-openstack-agent/settings.yml\ndci_topic: OSP16\n```\n\nThen the dci-openstack-agent will create a local repository (`http://\u003cdci_mirror_location\u003e/dci_repo/dci_repo.repo`) with the rpm downloaded and will create a local registry (`\u003cdci_mirror_location\u003e:5000`) for containers.\n\n`running.yml` hooks should install undercloud and overcloud using local repository and registry.\n\n```\n# /etc/dci-openstack-agent/hooks/running.yml\n---\n- name: install undercloud\n  shell: 'ansible-playbook -e repo=\"{{ dci_mirror_location }}/dci_repo/dci_repo.repo\" install_undercloud.yml'\n  args:\n    chdir: /var/lib/dci-openstack-agent\n- name: install overcloud\n  shell: 'ansible-playbook -e registry=\"{{ dci_mirror_location }}\" -e registry_port=\"5000\" install_overcloud.yml'\n  args:\n    chdir: /var/lib/dci-openstack-agent\n```\n\nAt the end of the running tasks, you **must** set the undercloud_ip variable using [set_fact module](https://docs.ansible.com/ansible/latest/modules/set_fact_module.html).\n\n```\n- name: Set undercloud_ip fact\n  set_fact:\n    undercloud_ip: \"{{ undercloud_ip }}\"\n```\n\nIf your undercloud ip is fixed, just add `undercloud_ip: ....` in `/etc/dci-openstack-agent/settings.yml`\n\n### Topic access\n\nBefore testing the integration, we need to check that you have access to the topic (version of OpenStack) present in `/etc/dci-openstack-agent/settings.yml`\n\n```console\n$ cat /etc/dci-openstack-agent/settings.yml\ndci_topic: OSP16\n```\n\nCheck with dcictl if you have access to this topic\n\n```console\n$ dcictl topic-list --where 'name:OSP16'\n```\n\nIf you don't have access to this topic then **you should contact your EPM at Red Hat** which will give you access to the topic you need.\n\n## Test your integation and run your first job\n\nNow that everything is configured, we will run the dci-openstask-agent playbook to see if everything is fine\n\n```console\n$ su - dci-openstack-agent -s /bin/bash\n$ cd /usr/share/dci-openstack-agent\n$ source /etc/dci-openstack-agent/dcirc.sh\n$ /usr/bin/ansible-playbook -vv /usr/share/dci-openstack-agent/dci-openstack-agent.yml -e @/etc/dci-openstack-agent/settings.yml\n```\n\n### Integration notes\n\nWhen you are on the undercloud machine or the overcloud ones, you should be able to reach the remoteci via `http` port 80 and 5000.\nThe undercloud should be able to reach the floating-IP network. During its run, Tempest will try to reach the VM IP on this range. If you don't use it disable the tests (see advanced documentation)\n\n## Automate job run\n\nYou are here? Good news, you have now a working automated agent running on your remoteci. Next step is to configure your jobs to be performed on a recurring schedule.\n\n### Configure your time source\n\nHaving a synchronized clock is important to get meaningful log files. This is the reason why the agent ensures Chrony is running.\nYou can valide the server is synchronized with the following command:\n\n```console\n$ chronyc activity\n200 OK\n6 sources online\n0 sources offline\n0 sources doing burst (return to online)\n0 sources doing burst (return to offline)\n0 sources with unknown address\n```\n\nIf Chrony is not running, you can follow [the official documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-using_chrony) to set it up.\n\n### Set tags\n\nEdit your settings to set the tags for your jobs\n\n```console\n$ cat /etc/dci-openstack-agent/settings.yml\ndci_topic: OSP16\ndci_tags: []\n# dci_tags: ['lab1', 'osp16', 'driver abc']\n```\n\nor directly in your job's hooks:\n\n```\n- name: Tag job with configuration used\n  dci_job:\n    id: \"{{ job_id }}\"\n    tags:\n      - \"{{ configuration }}\"\n```\n\n### Start the service\n\nThe agent comes with a systemd configuration that simplifies its execution. You can just start the agent:\n\n```console\n$ systemctl start dci-openstack-agent\n```\n\nYou can use journalctl to follow the agent execution:\n\n```console\n$ journalctl -ef -u dci-openstack-agent\n```\n\nFor debugging purposes if you need to connect as the dci-openstack-agent user, you can do:\n\n```console\n$ sudo su - dci-openstack-agent -s /bin/bash\n```\n\n### Keep your system up to date\n\nDistributed-CI is a rolling release.\nWhen the agent is started with the dci-openstack-agent systemd unit or timer, the DCI related packages are upgraded before executing the Ansible playbook.\n\nIf you don't start the agent with the dci-openstack-agent systemd unit or timer, please make sure to check for DCI packages upgrades before running the Ansible playbook.\n\nYou can for example keep your system up-to-date with the following setup:\n\n```console\n$ yum install -y yum-cron\n$ systemctl enable yum-cron\n$ systemctl start yum-cron\n$ sed -i 's,apply_updates = .*,apply_updates = yes,' /etc/yum/yum-cron.conf\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-cip%2Fdci-openstack-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-cip%2Fdci-openstack-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-cip%2Fdci-openstack-agent/lists"}