Fix setup-gate.yaml playbook

- Use roles from zuul-jobs
- Unpin docker python package version. It used
  to be pinned to 2.7 and it is incompatible
  with the latest docker api.
- Also do not build Ubuntu Bionic images which
  by default use Ussuri release (not supported).

Change-Id: I958677e3df88028d00ac0df812c0030419d517a7
This commit is contained in:
Vladimir Kozhukalov 2023-06-15 04:34:42 +03:00
parent c152ea081b
commit e09a032257
3 changed files with 33 additions and 70 deletions

View File

@ -1,8 +0,0 @@
# NOTE(SamYaple): CentOS cannot be build with userns-remap enabled. httpd uses
# cap_set_file capability and there is no way to pass that in at build as of
# docker 17.06.
# TODO(SamYaple): Periodically check to see if this is possible in newer
# versions of Docker
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd

View File

@ -1,7 +1,9 @@
- hosts: all - hosts: all
become: yes become: yes
roles: roles:
- ensure-python
- ensure-pip - ensure-pip
- clear-firewall
tasks: tasks:
- include_vars: vars.yaml - include_vars: vars.yaml
@ -18,49 +20,23 @@
- name: Install Docker - name: Install Docker
block: block:
- file:
path: "{{ item }}"
state: directory
with_items:
- /etc/docker/
- /etc/systemd/system/docker.service.d/
- /var/lib/docker/
- mount: - mount:
path: /var/lib/docker/ path: /var/lib/docker/
src: tmpfs src: tmpfs
fstype: tmpfs fstype: tmpfs
opts: size=25g opts: size=25g
state: mounted state: mounted
- copy: "{{ item }}" - include_role:
with_items: name: ensure-docker
- content: "{{ docker_daemon | to_json }}"
dest: /etc/docker/daemon.json
- src: files/docker-systemd.conf
dest: /etc/systemd/system/docker.service.d/
- apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
- apt_repository:
repo: deb http://{{ zuul_site_mirror_fqdn }}/deb-docker/{{ ansible_distribution_release }} {{ ansible_distribution_release }} stable
- apt:
name:
- docker-ce
allow_unauthenticated: True
- pip: - pip:
name: docker name:
version: 2.7.0 - docker
- docker_container: - docker_container:
name: registry name: registry
image: registry:2 image: registry:2
state: started state: started
published_ports: published_ports:
- 172.17.0.1:5000:5000 - 172.17.0.1:5000:5000
# Allow all connections from containers to host so the
# containers can access the http server for git and wheels
- iptables:
action: insert
chain: INPUT
in_interface: docker0
jump: ACCEPT
become: True become: True
- name: Setup http server for git repos - name: Setup http server for git repos

View File

@ -1,11 +1,6 @@
docker_daemon: docker_insecure_registries:
group: zuul - 172.17.0.1:5000
registry-mirrors:
- "http://{{ zuul_site_mirror_fqdn }}:8082/"
storage-driver: overlay2
debug: True
insecure-registries:
- 172.17.0.1:5000
# Setting reuse_requirements to True will use the most recent # Setting reuse_requirements to True will use the most recent
# requirements build from the gate registry. This can save bandwidth # requirements build from the gate registry. This can save bandwidth
@ -56,27 +51,27 @@ distros:
PROJECT: requirements PROJECT: requirements
PROJECT_REPO: http://172.17.0.1/git/openstack/requirements PROJECT_REPO: http://172.17.0.1/git/openstack/requirements
FROM: base:ubuntu_focal FROM: base:ubuntu_focal
- name: ubuntu_bionic # - name: ubuntu_bionic
image: ubuntu:bionic # image: ubuntu:bionic
release: ussuri # release: ussuri
buildargs: # buildargs:
base: # base:
UBUNTU_URL: http://{{ zuul_site_mirror_fqdn }}/ubuntu/ # UBUNTU_URL: http://{{ zuul_site_mirror_fqdn }}/ubuntu/
CLOUD_ARCHIVE_URL: http://{{ zuul_site_mirror_fqdn }}/ubuntu-cloud-archive/ # CLOUD_ARCHIVE_URL: http://{{ zuul_site_mirror_fqdn }}/ubuntu-cloud-archive/
CEPH_URL: http://{{ zuul_site_mirror_fqdn }}/ceph-deb-nautilus/ # CEPH_URL: http://{{ zuul_site_mirror_fqdn }}/ceph-deb-nautilus/
ALLOW_UNAUTHENTICATED: "true" # ALLOW_UNAUTHENTICATED: "true"
PIP_INDEX_URL: http://{{ zuul_site_mirror_fqdn }}/pypi/simple # PIP_INDEX_URL: http://{{ zuul_site_mirror_fqdn }}/pypi/simple
PIP_TRUSTED_HOST: "{{ zuul_site_mirror_fqdn }}" # PIP_TRUSTED_HOST: "{{ zuul_site_mirror_fqdn }}"
project: # project:
PROJECT: "{{ project }}" # PROJECT: "{{ project }}"
PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }} # PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
WHEELS: 172.17.0.1:5000/loci/requirements:ussuri-ubuntu_bionic # WHEELS: 172.17.0.1:5000/loci/requirements:ussuri-ubuntu_bionic
FROM: base:ubuntu_bionic # FROM: base:ubuntu_bionic
PROJECT_REF: "stable/ussuri" # PROJECT_REF: "stable/ussuri"
PROJECT_RELEASE: "ussuri" # PROJECT_RELEASE: "ussuri"
requirements: # requirements:
PROJECT: requirements # PROJECT: requirements
PROJECT_REPO: http://172.17.0.1/git/openstack/requirements # PROJECT_REPO: http://172.17.0.1/git/openstack/requirements
FROM: base:ubuntu_bionic # FROM: base:ubuntu_bionic
PROJECT_REF: "stable/ussuri" # PROJECT_REF: "stable/ussuri"
PROJECT_RELEASE: "ussuri" # PROJECT_RELEASE: "ussuri"