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
become: yes
roles:
- ensure-python
- ensure-pip
- clear-firewall
tasks:
- include_vars: vars.yaml
@ -18,49 +20,23 @@
- name: Install Docker
block:
- file:
path: "{{ item }}"
state: directory
with_items:
- /etc/docker/
- /etc/systemd/system/docker.service.d/
- /var/lib/docker/
- mount:
path: /var/lib/docker/
src: tmpfs
fstype: tmpfs
opts: size=25g
state: mounted
- copy: "{{ item }}"
with_items:
- 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
- include_role:
name: ensure-docker
- pip:
name: docker
version: 2.7.0
name:
- docker
- docker_container:
name: registry
image: registry:2
state: started
published_ports:
- 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
- name: Setup http server for git repos

View File

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