Here's a simple, concise, and maybe opinionated set of instructions for running the Red Hat CDK for the first time.
- Install Vagrant (If your environment supports Ruby, you should be good)
- Install VirtualBox or choose another provider if you prefer
- Download the CDK - yes, it really is that small, just a couple of scripts
- Download the machine image appropriate for your provider (e.g. RHEL 7.3 for VirtualBox)
- Import the image, for example:
$ vagrant box add --name cdkv2 ./rhel-cdk-kubernetes-7.2-32.x86_64.vagrant-virtualbox.box
- Unzip the CDK, and spin 'er up
$ unzip cdk-2.3.0.zip $ cd cdk/components/rhel/rhel-ose/ $ vagrant up
The Vagrant script will stop and ask you if you want to register. If you decide to register, you will be prompted for credentials. The credentials you should use are the same credentials that you use to log into https://access.redhat.com
Registering allows the virtual machine to pull packages from Red Hat repositories, which may be necessary if you are using OpenShift to build RHEL-based images.
Eventually you'll see this output:
==> default: You can now access the OpenShift console on: https://10.1.2.2:8443/console ==> default: ==> default: To use OpenShift CLI, run: ==> default: $ vagrant ssh ==> default: $ oc login ==> default: ==> default: Configured users are (<username>/<password>): ==> default: openshift-dev/devel ==> default: admin/admin ==> default: ==> default: If you have the oc client library on your host, you can also login from your host.
- Install the OpenShift CLI
- Log in to your local cluster (use the URL and admin credentials from the Vagrant output)
$ oc login https://10.1.2.2:8443