Skip to content

Commit

Permalink
testbed-default: import stable images when using the OSISM CI image (#19
Browse files Browse the repository at this point in the history
)

Signed-off-by: Christian Berendt <berendt@osism.tech>
  • Loading branch information
berendt committed Dec 30, 2023
1 parent f940eba commit b36b37a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
22 changes: 22 additions & 0 deletions testbed-default/customisations/default_custom.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,32 @@ write_files:
- content: |
#!/usr/bin/env bash
if [[ -e /etc/osism-ci-image ]]; then
# import ceph-daemon images
for image in $(find /opt/images/node -maxdepth 1 -mindepth 1 -name "*ceph-daemon*"); do
sudo -u dragon skopeo copy dir:$image docker-daemon:osism.harbor.regio.digital/osism/$(basename $image)
sudo -u dragon docker pull osism.harbor.regio.digital/osism/$(basename $image)
done
# import all other images
for image in $(find /opt/images/node -maxdepth 1 -mindepth 1 -not -name "*ceph-daemon*"); do
sudo -u dragon skopeo copy dir:$image docker-daemon:osism.harbor.regio.digital/kolla/release/$(basename $image)
sudo -u dragon docker pull osism.harbor.regio.digital/kolla/release/$(basename $image)
done
fi
path: /usr/local/bin/osism-testbed-import-images.sh
permissions: '0755'
- content: |
#!/usr/bin/env bash
chronyc -a makestep
touch /var/lib/apt/periodic/update-success-stamp
echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
chown -R ubuntu:ubuntu /home/ubuntu
/usr/local/bin/osism-testbed-import-images.sh &>/dev/null & disown
path: /usr/local/bin/osism-testbed.sh
permissions: '0755'
runcmd:
Expand Down
16 changes: 16 additions & 0 deletions testbed-default/manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,26 @@ write_files:
- content: |
#!/usr/bin/env bash
if [[ -e /etc/osism-ci-image ]]; then
# import images
for image in $(find /opt/images/manager -maxdepth 1 -mindepth 1); do
sudo -u dragon skopeo copy dir:$image docker-daemon:osism.harbor.regio.digital/osism/$(basename $image)
sudo -u dragon docker pull osism.harbor.regio.digital/osism/$(basename $image)
done
fi
path: /usr/local/bin/osism-testbed-import-images.sh
permissions: '0755'
- content: |
#!/usr/bin/env bash
chronyc -a makestep
touch /var/lib/apt/periodic/update-success-stamp
echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
chown -R ubuntu:ubuntu /home/ubuntu
/usr/local/bin/osism-testbed-import-images.sh &>/dev/null & disown
path: /usr/local/bin/osism-testbed.sh
permissions: '0755'
- content: ${openstack_compute_keypair_v2.key.public_key}
Expand Down

0 comments on commit b36b37a

Please sign in to comment.