LAB 1

Install OpenShift Container

Platform

LAB GOAL

To install and login to OpenShift Container Platform

ARCHITECTURE

Installing OpenShift Container Platform

INTERMEZZO

UNDER THE HOOD: WHAT'S IN AN OCP INSTALL?

  1. Checks for dependencies to support install (OCP, engine, oc client, VM)
  2. Pre-configures a specific docker-machine (VM)
  3. oc client pulls OCP image from Red Hat registry to install on previously specific pre-configured docker-machine (VM)

INTERMEZZO

UNDER THE HOOD: DEPENDENCY CHECKS?

  1. Checks for KVM or VirtualBox installed
  2. Checks for docker-machine tooling installed
  3. Checks for oc client tool installed
  4. Checks for version validations of above

INTERMEZZO

UNDER THE HOOD: PRE-CONFIGURED VM?

  1. Using docker-machine as tool for defining a VM
  2. Specify the VM driver, cpu allocation, memory allocation, identify our internal insecure VM registry
  3. Specify VM image boot2docker url, specify dependency on docker 1.13 for OCP in VM
  4. Name VM openshift, important to provide target to stop and start VM later...

INTERMEZZO

UNDER THE HOOD: INSTALL OCP ON THE VM?

  1. Using oc client to spin up OCP on previously defined VM
  2. Specifically, using: oc cluster up, but need OCP instead of community OpenShift) and persistence configuration for stop / restarting
  3. Specify Red Hat registry image to pull: registry.access.redhat.com/openshift3/ose
  4. Specify persistence configurations; data directory, ocp configuration and pv directory
  5. Specify use of openshift VM and specify version oc client

REQUIREMENTS

INSTALL VIRTUALBOX

Windows & OSX users need to install Virtual Box.

During OCP install, possible error:


Fix:
  • Download and install VirtualBox as indicated.

REQUIREMENTS

INSTALL DOCKER-MACHINE

All users need docker-machine tooling installed.

During OCP install, possible error:


Fix:
  • Install docker-machine as indicated.

REQUIREMENTS

INSTALL OC CLIENT

Everyone needs OpenShift CLI tool 'oc' installed.

During OCP install, possible errors:

Fix:
  • Download and install OpenShift 'oc' client.
  • Contact me directly for a trial if no login available Red Hat Portal

INSTALL OCP

  • Download ocp-install-demo and unzip
  • Run init.sh, init.bat or init-win10.bat (Windows needs admin privileges)
    • $ unzip ocp-install-demo-master.zip

    • $ cd ocp-install-demo-master

    • $ ./init{-win10}.{sh|bat}

INSTALL OCP

  • See previous slides for dealing with any issues that might arise, such as missing dependencies.
  • WATCHING INSTALL LOG

    OCP image downloaded and installed...

    WATCHING INSTALL LOG

    Starting OCP image and getting IP address...

    WATCHING INSTALL LOG

    Adding JBoss integration, S2I, decision, and process images...

    WATCHING INSTALL LOG

    Refreshing RHEL images to OCP...

    WATCHING INSTALL LOG

    Adding .Net images to OCP...

    WATCHING INSTALL LOG

    Final output with details to log in, note clean up commands....

    LOG IN TO OCP

    Your IP address may differ, see console output
    https://192.168.99.100:8443

    • user: openshift-dev

    • password: devel

    STOP / RESTART OCP

    GOOD NEWS, IT'S PERSISTENT...

    Persistence is enabled, so to shutdown and restart the openshift cluster with your projects in place DO NOT run the following commands:

    # This will remove the installation:
    $ docker-machine rm -f openshift

    # This will initialized OCP:
    $ ./init.sh


    Instead, see the following slide...

    SHUTDOWN OCP

    STOP OPENSHIFT CLUSTER

    Shutdown the openshift cluster with your projects in place as follows:

    # shutdown using:
    $ oc cluster down --docker-machine=openshift

    $ docker-machine stop openshift

    RESTART OCP

    RESTART OPENSHIFT CLUSTER

    Restart the openshift cluster with your projects in place as follows (remember, it takes time for containers to start up):
    # restart use the existing data and configuration:
    $ docker-machine start openshift

    $ oc cluster up --image=registry.access.redhat.com/openshift3/ose \
    --host-data-dir=/var/lib/boot2docker/ocp-data \
    --docker-machine=openshift \
    --host-config-dir=/var/lib/boot2docker/ocp-config \
    --use-existing-config=true --host-pv-dir=/var/lib/boot2docker/ocp-pv

    END LAB 1

    QUESTIONS?

    Eric D. Schabell
    Global Technology Evangelist Director
    @ericschabell
    http://schabell.org

    UP NEXT...

    Lab 2 - Install JBoss BRMS