chilcano.minishift

Ansible Role: minishift

This Ansible Role sets up an OpenShift cluster on your local machine using Minishift, similar to how Minikube works for Kubernetes. The Role does the following:

  • Downloads and installs the chosen version (or the latest) of the Minishift software and Docker Machine driver.
  • Can copy the oc binary to your system's $PATH or use the latest one from ~/.minishift/cache/oc/<VERSION>/<OS>/.
  • Creates a Minishift virtual machine (VM) with an OpenShift cluster running.
  • Supports multiple Minishift VM instances on the same host.

Prerequisites

  • You need Ansible version 2.3 or higher.
  • Before running this role, please clear any DOCKER* environment variables in your terminal.
  • You need sudo access on your machine to install packages.

Dependencies

There are no additional dependencies.

For macOS

Mounting /Users to the Minishift VM

When the Minishift VM starts, it will mount the /Users directory. This is done by setting the environment variable XHYVE_VIRTIO_9P=true.

For Linux

  • Ensure KVM is installed and working. This role will install the Docker Machine driver for KVM, but KVM must be set up beforehand.

For Fedora

  • Install the packages python2-dnf and libselinux-python.

Known Issues

For more information on known issues, check the Minishift GitHub page: https://github.com/minishift/minishift/issues

Default Role Variables

The default variables can be found in defaults/main.yml.

Example Playbook

Refer to sample-1-minishift.yml to install OpenShift in a VM.

How to Use the Ansible Role

To install the role, run:

$ sudo ansible-galaxy install chilcano.minishift

Copy the playbook from your roles folder to your current 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 Multiple Minishift Instances

Minishift is actively being developed, and improvements are ongoing. To run multiple instances on your machine, follow the steps outlined here: https://github.com/minishift/minishift/issues/1843

License

This project is licensed under MIT / BSD.

Author Information

This role was created in 2017 by Roger Carhuatocto, who also writes for HolisticSecurity.io Blog. It is inspired by the Ansible Role minishift-up created by @chouseknecht.

Informazioni sul progetto

An Ansible Role that creates an OpenShift cluster locally using Minishift (https://www.openshift.org/minishift) like Minikube does with Kubernetes.

Installa
ansible-galaxy install chilcano.minishift
Licenza
Unknown
Download
148
Proprietario
Crypto, PKI, DevSecOps, Cloud & Cyber Security, SOA, API & Service Mesh.