Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
defaults
imgs
meta
tasks
vars
.gitignore
README.md
sample-1-minishift.yml

README.md

Ansible Role: minishift

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:

Prerequisites

  • 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.

Dependencies

None

OSX

Mounting /Users to the Minishift VM

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.

Linux

  • KVM installed and working. The role installs the Docker Machine driver for KVM, but it assumes KVM is already installed, and working.

Fedora

  • Install packages python2-dnf and libselinux-python.

Known Issues

Follow the Minishift's issues for further information: https://github.com/minishift/minishift/issues

Default Role variables

The default variables are in defaults/main.yml.

Example Playbook

See sample-1-minishift.yml to install an Openshift in a VM.

Using the Ansible Role

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

Creating and running multiples Minishift instances

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.

https://github.com/minishift/minishift/issues/1843

License

MIT / BSD

Author Information

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.