openshift-vagrant
openshift-vagrant copied to clipboard
Easy deployment solution for all-in-one Openshift cluster
openshift-vagrant
This project aims to provision a CentOS 7 with OKD all-in-one, using openshift-ansible with container storage, router, registry, metrics, logging and etc.
You can change in environment varibles Vagrantfile file or use os environment varibles. It defaults to origin, v3.11 and 10.0.0.111 respectively.
After vagrant up you'll be able to access your OpenShift instance at: https://okd.master1.10.0.0.111.nip.io:8443 with admin:admin
.
Brokers
List of work brokers
CLI for work with them
Switch container runtime
For switching container runtime you need change this setting to False
in OSEv3.yml (folder group_vars):
openshift_use_crio: true
openshift_use_crio_only: true
Then in inventory file (folder ansible) change node group to node-config-all-in-one
for okd-master1
:
okd-master1 openshift_node_group_name=node-config-all-in-one-crio ansible_connection=local
Hostname of VM
Hostname defines here:
hostname = project + "-master#{node_nr}"
Backup script
In folder templates
there is script backupimage.sh
which can re-tag images and push to your registry.
Openshift variables
All variables in vars file located in group_vars
in file OSEv3.yml
. Enjoy :) (For comments thanks to Asgoret)
Vagrant variables
All vagrant variables located in Vagrantfile
. Enjoy :)
Vagrant DNS
If you want to add Vagrant DNS use this plugin: Vagrant DNS And some examples:
- Vagrantfile:
#
# Create dnsmasq
#
config.dns.tld = "okd-vagrant.domain.com"
config.vm.hostname = "apps"
config.dns.patterns = [/^.*apps.okd-vagrant.domain.com$/]
- Vagrantfile (part deploy_cluster):
deploy_cluster.extra_vars = {
...
dns_name: "#{hostname}"
- OSEv3.yml:
# OKD URLs
openshift_master_cluster_hostname: "{{ dns_name }}"
openshift_master_cluster_public_hostname: "okd-vagrant.domain.com"
openshift_master_default_subdomain: "apps.okd-vagrant.domain.com"
LDAP
LDAP configuratine in vars file located in group_vars
in file OSEv3.yml
.
Dependency
- Vagrant
- vagrant-hostmanager plugin
- VirtualBox
Limitations
- Tested only on MacOS, Suse
- Only tested with VirtualBox