An Ansible Role that creates an OpenShift cluster locally using Minishift (https://www.openshift.org/minishift) like Minikube does with Kubernetes. This Role performs the following tasks:
Performs the following tasks:
- Downloads and installs the specified version or latest of Minishift binary and Docker Machine driver.
- Ables to copy to
$PATH
or uses the latestoc
binary from~/.minishift/cache/oc/<VERSION>/<OS>/
. - Creates a Minishift VM with a OpenShift cluster instance.
- Multiple Minishift VM instances running in the same host (minishift/minishift#1508 and minishift/minishift#1843).
- Ansible 2.3+
- Prior to running the role, clear your terminal session of any DOCKER* environment variables.
sudo
access in your host is required for installing packages.
None
When the Minishift VM is started, the /Users
volume will be mounted to the VM. This is done by setting the environment variable XHYVE_VIRTIO_9P=true
.
- KVM installed and working. The role installs the Docker Machine driver for KVM, but it assumes KVM is already installed, and working.
- Install packages
python2-dnf
andlibselinux-python
.
Follow the Minishift's issues for further information: https://github.com/minishift/minishift/issues
The default variables are in defaults/main.yml
.
See sample-1-minishift.yml
to install an Openshift in a VM.
Install the role:
$ sudo ansible-galaxy install chilcano.minishift
Copy the playbook from your roles path to the current working directory:
$ cp ${ANSIBLE_ROLES_PATH}/chilcano.minishift/sample-1-minishift.yml .
Create an inventory
file
$ echo $(hostname) > ./inventory
Run the playbook:
$ ansible-playbook -i inventory --ask-become-pass sample-1-minishift.yml
Although Minishift is an active project, there is a great work trying to improve several functionalities. Specifically, run multiple instances locally requires to follow below steps in order get that.
MIT / BSD
This role was created in 2017 by Roger Carhuatocto, author of HolisticSecurity.io Blog. It is inspired in the Ansible Role minishift-up created by @chouseknecht.