Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Latest commit

 

History

History
46 lines (28 loc) · 2.37 KB

REDHAT_CDK.md

File metadata and controls

46 lines (28 loc) · 2.37 KB

Red Hat CDK Guide

This document describes how to use this repository with Red Hat Container Development Kit (CDK).

Overview

Red Hat CDK is essentially a flavour of minishift suitable for OpenShift local development.

minishift binary is used to start a Red Hat Enterprise Linux (RHEL) VM that contains a single-node OpenShift instance.

This is particularly useful for working with Red Hat container images that require a subscribed RHEL operating system to function.

Install CDK

Red Hat offers a no-cost RHEL developer subscription which entitles you to subscribe one RHEL system. Before starting, sign up for this subscription at https://developers.redhat.com/products/rhel/download/.

Once ready, download CDK binary for your OS and follow the instructions to set it up.

Refer to Getting Started Guide if you get stuck.

Start CDK

Once the CDK is successfully installed, you start an instance by using minishift start command.

Here is the one I use on my MacOS:

minishift start --username <red hat username> --profile mule --vm-driver xhyve --openshift-version v3.11.43

--profile feature is handy if you work with a few different instances of minishift.

Tip: minishift --help and minishift <sub-command> --help are good ways of finding what options are available to you.

Use CDK

The Getting Started Guide has an extensive section on how to use CDK but here are some tips when working with this repo.

  • I tend to login as system:admin rather than developer to have unfettered access to OpenShift features during development.
  • On MacOS, eval $(minishift oc-env) can be used to use the correct oc version and log into the OpenShift instance.
  • On MacOS, eval $(minishift docker-env) can be used to point the Docker client to the Docker daemon running within the RHEL VM. This is particularly handy for doing docker build with Red Hat base images.