This project will display how we can automatically: Create Projects, Deploy an Image, assign external IPs and to remove them all also within the Openshift testing environment
- A deployed Openshift Environment
- Linux machine (we are using Ubuntu Server 17.04)
- Ansible installed on Linux machine
$ sudo apt-get install libssl-dev
$ sudo pip install ansible
$ pip list # Check to see it has successfully installed
Also we need to copy our SSH key over to the remote server node in order for our playbooks to actually work. Remember we should only copy our public key, so the one with the extension of '.pub'. We need to use the ssh-copy-id
function like:
ssh-copy-id -i ~/.ssh/my_key.pub [email protected]
For the file and folder structures, please see the Wiki section for further documentation:
Openshift allows the developer to use both Docker Hub and the RedHat container site. However Openshift prefers to use container images from the Redhat website itself:
- Docker Hub: https://hub.docker.com/
- Red Hat Container: https://access.redhat.com/containers/?tab=overview&platform=openshift#/
These playbooks are within the roles section, they are broken down into individual tasks so they can be re-used be a 'higher' playbook. This 'higher playbook' is on the root repository level, which allows us to add multiple roles within it to produce a singular task.