openstack-helm/tools/gate/playbooks/deploy-docker.yaml
Vladimir Kozhukalov 2024cc361e Use multinode nodeset for compute-kit jobs
For recent releases we use 32GB nodes for compute-kit
jobs. The number of such nodes is extremely limited.
So we'd better use multinode nodesets for compute-kit
jobs.

We deploy K8s using kubeadm and then we set labels to the
K8s nodes so charts can use these labels for node selectors.
We deploy L3 agent only on the node where we run test scripts.

This is because we want test virual router to be always created
on this node. Otherwise the L2 overlay needs to be created
to emulate provider network (will be implemented later).

Glance is deployed w/o backend storage (will be fixed later).

Change-Id: Id2eb639fb67d41006940a7d7b45a865b2f1124f7
2023-08-03 01:22:06 +03:00

73 lines
1.8 KiB
YAML

- hosts: all
become: true
gather_facts: true
tasks:
- name: Remove old docker packages
apt:
pkg:
- docker.io
- docker-doc
- docker-compose
- podman-docker
- containerd
- runc
state: absent
- name: Ensure dependencies are installed
apt:
name:
- apt-transport-https
- ca-certificates
- gnupg2
state: present
- name: Add Docker apt repository key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
keyring: /etc/apt/trusted.gpg.d/docker.gpg
state: present
- name: Get dpkg arch
command: dpkg --print-architecture
register: dpkg_architecture
- name: Add Docker apt repository
apt_repository:
repo: deb [arch="{{ dpkg_architecture.stdout }}" signed-by=/etc/apt/trusted.gpg.d/docker.gpg] https://download.docker.com/linux/ubuntu "{{ ansible_distribution_release }}" stable
state: present
filename: docker.list
- name: Install docker packages
apt:
pkg:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
state: present
update_cache: true
- name: Configure Docker daemon
copy:
src: files/daemon.json
dest: /etc/docker/daemon.json
- name: Remove /etc/containerd/config.toml
file:
path: /etc/containerd/config.toml
state: absent
ignore_errors: true
- name: Restart containerd
service:
name: containerd
daemon_reload: yes
state: restarted
- name: Restart docker
service:
name: docker
daemon_reload: yes
state: restarted