Skip to content

Commit

Permalink
Try to import images from the image cache (#1921)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Dec 28, 2023
1 parent c1fd495 commit c462195
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
24 changes: 23 additions & 1 deletion ansible/manager-part-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@
gather_facts: true

vars:
images_stable:
- ceph-ansible:5.3.0
- ceph-ansible:6.0.2
- "inventory-reconciler:5.3.0"
- "inventory-reconciler:6.0.2"
- kolla-ansible:5.3.0
- kolla-ansible:6.0.2
- netbox:v3.4.8
- osism-ansible:5.3.0
- osism-ansible:6.0.2
- osism:0.20230902.0 # 6.0.2
- osism:0.20231129.2 # 5.3.0

images:
- "{{ ara_server_image }}"
- "{{ ara_server_mariadb_image }}"
Expand All @@ -64,6 +77,15 @@
- /opt/configuration/environments/manager/images.yml

tasks:
- name: Try to import stable manager images
ansible.builtin.shell: |
if [[ -e /home/dragon/images/{{ item }} ]]; then
skopeo copy dir:/home/dragon/images/{{ item }} docker-daemon:osism.harbor.regio.digital/osism/{{ item }}
fi
loop: "{{ images_stable }}"
args:
executable: /bin/bash

- name: Pull images
community.docker.docker_image:
name: "{{ item }}"
Expand Down Expand Up @@ -122,7 +144,7 @@
docker logs netbox-netbox-1
changed_when: true

- name: Apply role manager
- name: Deploy manager service
hosts: testbed-manager.testbed.osism.xyz
connection: local
gather_facts: true
Expand Down
23 changes: 23 additions & 0 deletions environments/custom/playbook-import-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
- name: Preload stable ceph & openstack images
hosts: testbed-nodes
gather_facts: false

vars:
images_ceph:
- ceph-daemon:17.2.6

images_openstack:
- keystone:22.0.1.20230902 # 5.3.0
- keystone:23.0.1.20230919 # 6.0.2

tasks:
- name: Import stable ceph images
ansible.builtin.command:
cmd: "skopeo copy dir:/home/dragon/images/{{ item }} docker-daemon:osism.harbor.regio.digital/osism/{{ item }}"
loop: "{{ images_ceph }}"

- name: Import stable openstack images
ansible.builtin.command:
cmd: "skopeo copy dir:/home/dragon/images/{{ item }} docker-daemon:osism.harbor.regio.digital/kolla/release/{{ item }}"
loop: "{{ images_openstack }}"
11 changes: 11 additions & 0 deletions scripts/000-pull-images.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/usr/bin/env bash
set -x
set -e

export INTERACTIVE=false
source /opt/manager-vars.sh

echo
echo "# PULL IMAGES"
echo

if [[ $IS_ZUUL == "true" ]]; then
osism apply -e custom import-images
fi

kolla_services=(
barbican
Expand Down

0 comments on commit c462195

Please sign in to comment.