No warranty is offered or implied and use of these scripts may destroy your entire OpenShift environment.
-
Create VMs (1 master, N nodes) to which you have root access via SSH keys.
-
Run osc-sync-keys from your local machine to give master SSH access to Nodes
[me@localhost]$ ./osc-sync-keys --master="<master ip>" --nodes="<node1 ip>,<node2 ip>,...,<nodeN ip>"
-
Log into your master and clone the repository
[me@localhost]$ ssh root@<master ip> [root@<master>]# git clone [email protected]:rhtconsulting/rhc-ose.git
-
Run the installer.
[root@<master>]# ./osc-install --master="<master private ip>|<master public ip>" --nodes="<node1 private ip>|<node1 public ip>,...,<nodeN private ip|nodeN public ip>" --actions=prep,dns,install,post
You’ll need to create you openshift router and registry (see https://github.com/openshift/training/) once the installation finishes.
We now support full end-to-end Environment Provisioning.
Current implementations:
-
Openstack
-
Clone this repo.
-
Run osc-provision with no options to show Usage output and options
$ ./rhc-ose/provisioning/osc-provision Missing argument: --num-nodes <integer> Usage: ./provisioning/osc-provision --num-nodes=<integer> [options] Options: --master-is-node : Master will also be provisioned as a node (set to false if not passed) --no-install : Provision instances and sync keys, but do not run the OpenShift installer --key=<key name> : SSH Key used to authenticate to Cloud API --debug : Will add -x to all bash commands ...
-
To provision the most basic OpenShift environment, run the following command:
$ ./rhc-ose/provisioning/osc-provision --num-nodes=2 --key=laptop-key
You can use the --config=<file>
option to pass in a configuration file that can be used to further customize the environment. A sample configuration file might look like:
## Platform Configs CONF_ENV_ID= # Default: random 8 character string CONF_IMAGE_NAME=ose3_1-base # Default: ose3_2-base CONF_OS_FLAVOR=m1.large # Default: m1.medium CONF_SECURITY_GROUP_MASTER=ose3-master # Default: ose3-master CONF_SECURITY_GROUP_NODE=ose3-node # Default: ose3-node CONF_LOGFILE=~/openstack_provision.log # Default: ~/openstack_provision.log CONF_STORAGE_DISK_VOLUME=/dev/vdb # The disk path (within an instance) for the "extra" storage volume used by OSE/Docker (see below) # Default: /dev/vdb CONF_VOLUME_SIZE=25 # Allocate a 25 GB volume for a shared OpenShift / Docker disk (see "CONF_STORAGE_SIZE_OSE" and "CONF_STORAGE_SIZE_ETCD" below - OSE and ETCD uses the first X GB and leaves the rest for Docker storage) # Default: 10 GB CONF_STORAGE_SIZE_OSE=4 # Allocate 4 GB for the OpenShift partition (e.g.: /var/lib/openshift) # Default: 0 GB / not allocated CONF_STORAGE_SIZE_ETCD=4 # Allocate 4 GB for the etcd partition (e.g.: /var/lib/etcd) # Default: 2 GB CONF_STORAGE_SIZE_LOGGING=4 # Allocate 4 GB for logs (e.g.: /var/log) # Default: 0 GB - i.e.: shared with root (/) partition ## OpenShift Configs CONF_OPENSHIFT_BASE_DOMAIN=openshift.example.com # Default: ose.example.com CONF_OPENSHIFT_CLOUDAPPS_SUBDOMAIN=cloudapps # Default: apps (generates "apps.ose.example.com") CONF_PROVISION_COMPONENTS=openshift # Comma separated list. Supported values are: openshift,cicd. Default: openshift