redhatdemocentral / ocp-install-demo

OpenShift Container Platform installed in fully automated and repeatable fashion on your laptop. Get started with your containerized development with a private PaaS installed in just minutes.
82 stars 60 forks source link

Update: June 2018 moved to Gitlab.

OpenShift Container Platform Install Demo

If you are looking to develop containerized applications, the OpenShift Container Plaform (OCP) can help you by providing private PaaS (Cloud) environment you can install locally. It includes the same container development and run-time tools used to create and deploy containers for large data centers.

This project requires a docker engine, OpenShift command line tools and VirtualBox, but these checks happen when you run the installation and point you to what is missing. It also checks that you have the right versions running too.

Pro Tip: Pay close attention to console output, will guide you to dependencies you need if missing. These dependencies are listed here and the install provides pointers to downloads if missing:

   1. VirtualBox for Windows and OSX
   2. Hyper-V for Windows 10 (Windows Feature Install)
      a. Important - Use Hyper-V Manager to create "ocpNET" Virtual Switch. (name is used in script)
      b. Important - Set "ocpNET" to External Network physical/wireless interface (with DHCP) - Must have Internet.
   3. KVM for Linux
   4. Docker-machine tooling
   5. Ansible-playbook tooling
   5. OpenShift Client (oc) v3.9.14

Need more help? Follow a lab workshop on how to install OpenShift Container Platform step-by-step.

Install on your machine

  1. Download and unzip.

  2. Run 'init.sh', 'init.bat' or 'init-win10.bat' file, then sit back. (Note: 'init.bat' and 'init-win10.bat' must be run with Administrative privileges.)

  3. Follow displayed instructions to log in to your brand new OpenShift Container Platform!

  4. Still want more help installing? Try these instructions (part of an online workshop) that explain the installation in detail.

Notes

Installation reserves default of 6GB memory on your machine for OCP, see comments at top of init scripts to adjust variable used to limit memory usage based on your needs.


Log in to the OCP console with:

   Developer user:  openshift-dev
   Developer pass:  devel

   Admin user: admin
   Admin pass: admin

Persisitence is enabled, so to shutdown and restart the openshift cluster with your projects in place DO NOT run 'docker-machine rm -f openshift' or use init.sh / init.bat, instead:

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

   # 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

You can find these commands for unix based machines in the directory support/{ocp-stop.sh|ocp-restart.sh}.


Network errors? If you recieve the following error, on Linux:

   Error: did not detect an --insecure-registry argument on the Docker daemon

Then ensure that the Docker daemon is running with the following argument by:

   # Add the following to /etc/sysconfig/docker file and
   # restart the docker service:
   #
   INSECURE_REGISTRY='--insecure-registry 172.30.0.0/16'

Or this network error on osX:

   Unable to connect to the server: net/http: TLS handshake timeout

Then add the this IP to the Docker Deamon insecure registry list:

   172.30.0.0/16

This project has an install script that is setup to allow you to re-run it without worrying about previous installations. If you re-run it, it removes old 'openshift' machines and reinstalls for you.


Supporting Articles

Released versions

See the tagged releases for the following versions of the product:

OCP Video

OCP Login

OCP Catalog

Cloud Suite