Openstack Ansible – prepare deployment host

For production environment, it is recommended to use separate deployment host that contains Ansible and orchestrates the OpenStack-Ansible (OSA) installation on the target hosts. Install Ubuntu and then configure SSH keys. Ansible uses SSH with public key authentication to connect the deployment host and target hosts. Configure the deployment host (where Ansible is executed) to be on the same layer 2 network as the network designated for container management. By default, this is the br-mgmt network  Then install source and dependencies for deployment host.

Configure Ubuntu
# apt update
# apt dist-upgrade
# sudo reboot
# apt install build-essential git chrony openssh-server python3-dev sudo
Install the source and dependencies

1. Clone the latest stable release of the OpenStack-Ansible Git repository in the /opt/openstack-ansible directory:

# git clone -b master https://opendev.org/openstack/openstack-ansible /opt/openstack-ansible

2. Change to the /opt/openstack-ansible directory, and run the Ansible bootstrap script:

# scripts/bootstrap-ansible.sh
Configure Docker with Alpine
  1. Prepare your OpenStack Ansible Dockerfile
    FROM alpine
    RUN apk add --no-cache bash build-base git python3-dev openssh-client openssh-keygen sudo py3-virtualenv iptables libffi-dev openssl-dev linux-headers coreutils curl
    RUN git clone -b master https://git.openstack.org/openstack/openstack-ansible /opt/openstack-ansible
    WORKDIR /opt/openstack-ansible
    RUN /opt/openstack-ansible/scripts/bootstrap-ansible.sh
    ENTRYPOINT ["bash"]
  2. Build and run your deploy host container
    # docker build . -t openstack-ansible:master
    # docker run -dit --name osa-deploy openstack-ansible:master
    # docker exec -it osa-deploy bash
  3. Configure NTP to synchronize with a suitable time source on the Docker host.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top