62 lines
1.9 KiB
Django/Jinja
62 lines
1.9 KiB
Django/Jinja
#!/bin/bash
|
|
|
|
set -eux
|
|
|
|
### --start_docs
|
|
## Prepare the undercloud for deploying the containerized compute node
|
|
## ===================================================================
|
|
|
|
## .. note:: In progress documentation is available at https://etherpad.openstack.org/p/tripleo-containers-work
|
|
## ::
|
|
|
|
## Prepare Your Environment
|
|
## ------------------------
|
|
|
|
## * Populate the docker registry
|
|
## ::
|
|
|
|
openstack overcloud container image prepare \
|
|
--images-file {{ working_dir }}/overcloud_containers.yaml \
|
|
{{ prepare_service_env_args }} \
|
|
--namespace {{ docker_registry_namespace }} \
|
|
--tag {{ docker_image_tag }} \
|
|
--pull-source {{ docker_registry_host }} \
|
|
--exclude ceph \
|
|
--push-destination {{ local_docker_registry_host }}:8787
|
|
|
|
openstack overcloud container image upload --verbose --config-file {{ working_dir }}/overcloud_containers.yaml
|
|
|
|
{% if delete_docker_cache|bool %}
|
|
## * Delete Docker Cache
|
|
## ::
|
|
|
|
# This is the most efficient way to wipe all of docker data
|
|
sudo systemctl stop docker
|
|
sudo rm -rf /var/lib/docker
|
|
sudo systemctl start docker
|
|
{% endif %}
|
|
|
|
## * Configure the {{ working_dir }}/containers-default-parameters.yaml, this is done automatically.
|
|
## ::
|
|
|
|
openstack overcloud container image prepare \
|
|
--env-file {{ working_dir }}/containers-default-parameters.yaml \
|
|
{{ prepare_service_env_args }} \
|
|
--namespace {{ local_docker_registry_host }}:8787/{{ docker_registry_namespace }} \
|
|
--tag {{ docker_image_tag }}
|
|
|
|
echo " DockerInsecureRegistryAddress: {{ local_docker_registry_host }}:8787" >> \
|
|
{{ working_dir }}/containers-default-parameters.yaml
|
|
|
|
echo "============================="
|
|
echo "Containers default parameters:"
|
|
cat {{ working_dir }}/containers-default-parameters.yaml
|
|
echo "============================="
|
|
|
|
## * Get the journal logs for docker
|
|
## ::
|
|
|
|
sudo journalctl -u docker > docker_journalctl.log
|
|
|
|
### --stop_docs
|