Use newer docker packages

Currently we install and use docker.io which is outdated. We should
switch to newer docker-ce, docker-ce-cli and containerd.io.

Change-Id: I951ced816466a0aed3db7313d475773c324ad71c
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Closes: #657
This commit is contained in:
Ruslan Aliev 2021-10-19 21:14:53 +00:00
parent db16837902
commit 55f04e7394
2 changed files with 44 additions and 2 deletions

View File

@ -11,15 +11,57 @@
# limitations under the License.
---
- name: Ensuring docker and support packages are present
- name: Ensure older docker versions are removed
become: yes
package:
name:
- docker
- docker-engine
- docker.io
- containerd
- runc
state: absent
- name: Ensure docker support packages are present
become: yes
package:
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg
- lsb-release
update_cache: yes
state: latest
- name: Add Docker GPG apt key
become: yes
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
keyring: /usr/share/keyrings/docker-archive-keyring.gpg
state: present
- name: Get DEB architecture
shell: dpkg --print-architecture
register: deb_architecture
- name: Add Docker Repository
become: yes
apt_repository:
repo: deb [arch={{ deb_architecture.stdout }} signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
filename: docker
state: present
- name: Ensure docker packages are present
become: yes
package:
name:
- docker-ce
- docker-ce-cli
- containerd.io
update_cache: yes
state: latest
- name: Ensure docker group exists
group:
name: docker

View File

@ -35,7 +35,7 @@ envsubst <"${AIRSHIPCTL_WS}/tools/gate/config_template.yaml" > "$PLAYBOOK_CONFIG
# use new version of ansible, Ubuntu has old one
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt -y install software-properties-common python3-pip curl wget ca-certificates
sudo DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install docker.io make
sudo DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install make
PACKAGES="ansible netaddr yq"
if [[ -z "${http_proxy}" ]]; then