Red Hat Container Development Kit
Hello World!
Build Something Today
Let's walk through everything you need to build your first application.
Thank you for downloading
Your download should start automatically. If you have any problems with the download, please use the direct link.
By downloading this product you have agreed with our terms and conditions on . You will be notified again in after your subscription ends.
Hello World!
-
1. Download and Prerequisites
5 minutes
BodyDownload Red Hat Container Development Kit (CDK). Please see Prerequisites for running CDK on Windows and Notes for Windows Users below.- CDK 3.6.0 for Windows (434 MB)
Prerequisites for running CDK
The prerequisites for running CDK are:
- A Red Hat Developer Program username and password are required to download CDK and to enable the Red Hat Enterprise Linux VM included with the CDK to download container images from Red Hat. Please make sure to accept the terms and conditions.
- A virtualization platform (hypervisor): Hyper-V or VirtualBox.
- 25 GB of free disk space.
Hypervisor
CDK includes a prebuilt Red Hat Enterprise Linux virtual machine with OpenShift and other container tools pre-installed. To run the VM a hypervisor is required. Please make sure that the virtualization hardware extensions (VT-x or AMD-V) are enabled in your system’s BIOS.
Hyper-V
Hyper-V is the default virtualization platform for CDK on Windows, but must be enabled as a Windows optional feature. Hyper-V isn’t available on some versions of Windows. VirtualBox is supported as an alternative on all versions of Windows.
In Hyper-V, you must create an external virtual network switch and attach it to your physical NIC (wired or wireless, which ever is connected) to enable internet access for downloading container images. You must set the environment variable
HYPERV_VIRTUAL_SWITCHwith the name of the virtual switch.C:\> setx HYPERV_VIRTUAL_SWITCH “External (Wireless)”
The above
setxcommand will permanently store the environment variable, but you must restart your shell for this setting to take effect. See Windows Shells and Environment Variables below for more information.For additional information on Hypervisor configuration see Set up hypervisor on Windows in the CDK Getting Started Guide.
VirtualBox
CDK supports VirtualBox 5.1.14 and later on all platforms. No additional downloads are required to use VirtualBox.
Since VirtualBox is not the default hypervisor, you will either need to pass the command line
--vm-driver virtualboxto theminishift startcommand or make the setting persistent with the following command:C:\> minishift config set vm-driver virtualbox
Verify the configuration setting with:
C:\> minishift config get vm-driver
Minishift persistent configuration is stored in the
.minishiftdirectory which is located in your home directory. If you delete%USERPROFILE%/.minishiftyou will need to run the commands to configure any persistent settings again. See Persistent Configuration in the CDK Getting Started Guide for more information.Notes for Windows users
Windows shells and environment variables
You can run CDK using cmd.exe or PowerShell. Working with CDK and minishift requires setting a number of environment variables. You may encounter CDK information that shows the syntax for the bash shell, as that syntax can be used with Linux or macOS. The syntax for setting environment variables is different for cmd.exe and PowerShell. There are also some differences in the quoting that is required for arguments that include spaces or special characters. If you run into problems, check that you’ve correctly set any required environment variables, verify that any variables contain the expected values with
set(for cmd.exe) orGet-ChildItem ENV:for PowerShell.When setting environment variables it is important to understand the scope of the change. Using
set VARIABLE=valuein cmd.exe or$env:VARIABLE = valuein PowerShell only affects the running shell and any processes started from that shell. When a new shell is started or the system is rebooted, the environment variable will no longer be set.Environment variable settings can be made persistent by storing them in the user’s profile as part of the registry. This can be done with the
setxcommand or by using Windows Control Panel. However, these methods will not affect any running processes. You must start a new command shell for those changes to become part of your runtime environment.
Adding a directory to your PATH
CDK includes two command line tools,
minishift.exeandoc.exethat need to be located in a directory that is part of your command search path in order to run those commands from the shell. ThePATHenvironment variable contains the list of directories to search for commands.You can temporarily add a directory to the command search path by setting the
PATHenvironment variable in the current shell. The change will only affect the running shell and any processes started from that shell. If you start a new shell, you will need to change the PATH environment variable again.To permanently change your PATH, it is recommended to use the Windows Control Panel instead of the
setxcommand described above. Environment variable settings are found under Control Panel -> System -> Advanced System Settings -> Environment Variables. You can also get there directly by searching for Environment Variables in the Start Menu and selecting Edit Environment Variables for Your Account. These changes will not affect any currently running shells. Close any open shells and start a new shell.Only the directory containing
minishift.exeshould be permanently added to the PATH. The directory containingoc.execan change and should be added dynamically to the running shell withminishift oc-env.Note: Only make changes to User Environment Variables. There is a PATH environment variable under both User Environment Variables and System Environment Variables. The User’s PATH will be used for shells running under your regular user account.User's home directory
CDK will store state and configuration in the
.minishiftsub-directory of the user’s home directory. On Windows, the path will be%USERPROFILE%/.minishift, which is typically inC:\user\username\.minishift. You may encounter CDK information that uses the Bash shorthand~/to refer to the user’s home directory, for example~/.minishift. The Windows equivalent for~/is%USERPROFILE%/. Note: Using PowerShell the environment variable syntax is$env:USERPROFILE. -
2. Setup CDK/Minishift
5 minutes
BodyThe CDK download is a single executable which includes a number of bundled components. You will use the
minishiftcommand to start, stop, and configure the Red Hat Enterprise Linux 7 VM and the Red Hat OpenShift Container Platform single-node cluster running inside of the VM. To run minishift commands, you will need to move the minishift download to a directory that is in your command search path.The oc command line tool which is used for interacting with OpenShift clusters will be downloaded when you run
minishift setup-cdk. The oc command must match the version of OpenShift running inside of the VM. Theminishift oc-envcommand provides the statements to add the correct version of oc to your PATH. The output ofminishift oc-envshows the commands to use in your shell to dynamically update the environment after runningminishift oc-env.The setup steps are:
- Copy
cdk-minishift-*into a directory that is in your path - Run
minishift setup-cdk. to set up your CDK environment in%USERPROFILE%/.minishift - Add your Red Hat Developer Program credentials to your environment
Setup
Adding minishift to your path
The
cdk-minishift-*file you downloaded in the first step is an executable. To run minishift commands, copy it to a directory that is in already in your PATH, or create a directory and add it to thePATHenvironment variable. The directory must be on your system (C:) drive. When copying, rename the downloaded file tominishift.exe.For cmd.exe
C:\> mkdir %USERPROFILE%/bin C:\> copy %USERPROFILE/Downloads/cdk-3.6.0-1-minishift* %USERPROFILE%/bin/minishift.exe
For PowerShell
PS C:\> mkdir $env:USERPROFILE/bin PS C:\> copy $env:USERPROFILE/Downloads/cdk-3.6.0-1-minishift* $env:USERPROFILE/bin/minishift.exe
if the directory isn’t already in your PATH, use Windows Control Panel to update your PATH environment variable. Note: You will need to start a new shell window for the change to take effect. See Windows Shells and Environment Variables above for more information.
Run setup-cdk
Run
minishift setup-cdkto setup the components needed to run CDK on your system. By default,minishift setup-cdkplaces CDK content in%USERPROFILE%/.minishift.C:\> minishift setup-cdk Setting up CDK 3 on host using '/home/user/.minishift' as Minishift's home directory Copying minishift-rhel7.iso to '/home/user/.minishift/cache/iso/minishift-rhel7.iso' Copying oc to '/home/user/.minishift/cache/oc/v3.9.31/linux/oc' Creating configuration file '/home/user/.minishift/config/config.json' Creating marker file '/home/user/.minishift/cdk' Default add-ons anyuid, admin-user, xpaas, registry-route, che, eap-cd installed Default add-ons anyuid, admin-user, xpaas enabled CDK 3 setup complete.
Note: If you would like to use a different directory see Environment Variables in the CDK Getting Started Guide.
If you delete
%USERPROFILE%/.minishift, you will need to run this step again.Add Red Hat Developer Program username and password to your environment
The VM will need to register with Red Hat to download and build container images. Add your Red Hat Developer Program username and password to your environment to avoid the need to enter it each time you start minishift.
The following commands will set the credentials in the environment of the running shell. When a new command shell is started you will need to enter these commands again.
For cmd.exe
C:\> set MINISHIFT_USERNAME <RED_HAT_USERNAME> C:\> set MINISHIFT_PASSWORD <RED_HAT_PASSWORD>
For PowerShell
PS> $env:MINISHIFT_USERNAME = '<RED_HAT_USERNAME>' PS> $env:MINISHIFT_PASSWORD = '<RED_HAT_PASSWORD>'
Optional: Permanently storing the credentials
You can permanently store environment variables in the registry using the
setxcommand or Windows Control Panel. After that, when you start a new command shell the environment variables will automatically be set. Note: thesetxcommand will not change the running environment. You will need to start a new command shell for the change to take effect. The syntax is the same for either cmd.exe or PowerShell.C:\> setx MINISHIFT_USERNAME “<RED_HAT_USERNAME>" C:\> setx MINISHIFT_PASSWORD “<RED_HAT_PASSWORD>”
- Copy
-
3. Build your first app
10 minutes
BodyStart CDK/minishift
You are now ready to start CDK. The
minishift startcommand will start a Red Hat Enterprise Linux VM with an OpenShift cluster running inside.Note: By this point you should have your hypervisor configured as per the hypervisor prerequisites in step 1:
- If you are using Hyper-V, make sure you've created a virtual switch and set the
HYPERV_VIRTUAL_SWITCHenvironment variable. - If you are using VirtualBox, configure minishift to use VirtualBox with
minishift config set vm-driver virtualbox
You should have also completed the CDK setup from step 2.
Run minishift start
C:\> minishift start -- Starting profile 'minishift' ... -- Minishift VM will be configured with ... Memory: 4 GB vCPUs : 2 Disk size: 20 GB -- Starting Minishift VM .......................... OK -- Registering machine using subscription-manager Registration in progress ..................... OK [42s] ... Extracting Image pull complete OpenShift server started. The server is accessible via web console at: https://192.168.42.60:8443 You are logged in as: User: developer Password: To login as administrator: oc login -u system:admin ...After
minishift startcompletes, make a note of:- The URL for the OpenShift cluster. Note: the IP address may change when you restart CDK.
- The developer username.
- the admin username and default password.
To check that everything is working and view the OpenShift console use the command:
C:\> minishift console
This will launch the OpenShift web console (for example: https://192.168.42.60:8443) with your default browser. You will likely get a security warning from the browser about the certificate being from an unknown certificate authority. This is expected. You will need to temporarily accept the certificate to proceed.
Note: If you prefer to use a different browser, you can get the URL with the following command:
$ minishift console --url
Login to OpenShift using
developeras the username. Enter any text for the developer password.Add the directory containing oc.exe to your PATH
After the CDK/minishift VM has been started, add oc to your path:
Note: The oc command must match the version of the OpenShift cluster that is running inside of the Red Hat VM. The following commands will set the correct version dynamically by running
minishift oc-envand having your shell parse the output.For cmd.exe:
C:\> @FOR /f "tokens=*" %i IN ('minishift oc-env') DO @call %iFor PowerShell:
PS C:\> & minishift oc-env | Invoke-Expression
Stopping CDK/minishift and the CDK life-cycle
You can stop the CDK/minishift VM with the command:
C:\> minishift stop
You can restart it again with:
C:\> minishift start
If necessary, you can delete the VM in order to get a fresh start with a clean VM using:
C:\> minishift delete
You won't need to run minishift setup-cdk again unless you delete the contents of %USERPROFILE%/.minishift. You can learn more in the CDK life-cycle section of the CDK Getting Started Guide.
Build your first app
Follow these instructions to create and deploy a Node.js "Hello, World" application on OpenShift running inside the CDK using the OpenShift Web Console.
Where to go next?
- Learn more about CDK from the CDK Getting Started Guide
- If you are new to OpenShift, try the online tutorials at learn.openshift.com
- Read the OpenShift documentation
- Follow the Red Hat Developers Blog for articles on OpenShift, CDK, containers, and many other topics.
- If you are using Hyper-V, make sure you've created a virtual switch and set the
-
1. Download and Prerequisites
5 minutes
BodyDownload Red Hat Container Development Kit (CDK). Please see Prerequisites for running CDK on macOS below.- CDK 3.6.0 for macOS (436 MB)
Prerequisites for running CDK
The prerequisites for running CDK on macOS are:
- A Red Hat Developer Program username and password are required to download CDK and to enable the Red Hat Enterprise Linux VM included with the CDK to download container images from Red Hat. Please make sure to accept the terms and conditions.
- A virtualization platform (hypervisor): Xhyve or VirtualBox.
- For Xhyve you will need to install the docker-machine-xhyve driver.
- 25 GB of free disk space.
Hypervisor
CDK includes a prebuilt Red Hat Enterprise Linux virtual machine with OpenShift and other container tools pre-installed. To run the VM a hypervisor is required.
Xhyve
Xhyve is the default hypervisor on macOS. You will need to install the docker-machine-xhyve driver. See Set up hypervisor on macOS in the CDK Getting Started Guide for installation details.
VirtualBox
CDK supports VirtualBox 5.1.14 and later on all platforms. No additional downloads are required to use VirtualBox.
Since VirtualBox is not the default hypervisor, you will either need to pass the command line option
--vm-driver virtualboxto theminishift startcommand or make the setting persistent with the following command:$ minishift config set vm-driver virtualbox
Verify the configuration setting with:
$ minishift config get vm-driver
Minishift persistent configuration is stored in the
~/.minishiftdirectory. If you delete~/.minishiftyou will need to run the commands to configure any persistent settings again. See Persistent Configuration in the CDK Getting Started Guide for more information. -
2. Setup CDK/minishift
5 minutes
BodyThe CDK download is a single executable which includes a number of bundled components. You will use the minishift command to start, stop, and configure the Red Hat Enterprise Linux 7 VM and the Red Hat OpenShift Container Platform single-node cluster running inside of the VM. To run minishift commands, you will need to move the minishift download to a directory that is in your command search path.
The oc command line tool which is used for interacting with OpenShift clusters will be downloaded when you run
minishift setup-cdk. The oc command must match the version of OpenShift running inside of the VM. Theminishift oc-envcommand provides the statements to add the correct version of oc to your PATH. The output ofminishift oc-envis intended to be evaluated by your shell after runningminishift start.The setup steps are:
- Copy
cdk-minishift-*into a directory that is in your path - Run
minishift setup-cdk. to set up your CDK environment in~/.minishift - Add your Red Hat Developer Program credentials to your environment
Setup
Adding minishift to your path
The
cdk-minishift-*file you downloaded in the first step is an executable. To run minishift commands, copy it to a directory that is in already in your PATH, or create a directory and add it to thePATHenvironment variable. When copying, rename the downloaded file tominishift.exe.Note: In the shell,~/is an expression that will automatically expand to your home directory, typically/Users/username. This guide uses that convention to refer to your home directory.Copy the downloaded
cdk-minishift-*file into~/binwhich is conventionally used as the location for executables in your home directory:$ mkdir -p ~/bin $ cp ~/Downloads/cdk-3.6.0-1-minishift* ~/bin/minishift $ chmod +x ~/bin/minishift
You can check if ~/bin is in your path with one of the following commands:
$ echo $PATH $ which minishift
If you need to add
~/binto your PATH, run the following commands to add it to your current and future login sessions:$ echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc $ export PATH=$PATH:$HOME/bin
Run setup-cdk
Run
minishift setup-cdkto setup the components needed to run CDK on your system. By default,minishift setup-cdkplaces CDK content in~/.minishift.$ minishift setup-cdk Setting up CDK 3 on host using '/Users/username/.minishift' as Minishift's home directory Copying minishift-rhel7.iso to '/Users/username/.minishift/cache/iso/minishift-rhel7.iso' Copying oc to '/Users/username/.minishift/cache/oc/v3.7.14/linux/oc' Creating configuration file '/Users/username/.minishift/config/config.json' Creating marker file '/Users/username/.minishift/cdk' Default add-ons anyuid, admin-user, xpaas, registry-route, che installed Default add-ons anyuid, admin-user, xpaas enabled CDK 3 setup complete.
Note: If you would like to use a different directory see Environment Variables in the CDK Getting Started Guide.
If you delete
~/.minishift, you will need to run this step again.Add Red Hat Developer Program username and password to your environment
The VM will need to register with Red Hat to download and build container images. Add your Red Hat Developer Program username and password to your environment to avoid the need to enter it each time you start minishift.
The following commands will set the credentials in the environment of the running shell. When a new command shell is started you will need to enter these commands again.
$ export MINISHIFT_USERNAME='<RED_HAT_USERNAME>' $ export MINISHIFT_PASSWORD='<RED_HAT_PASSWORD>'
Optional: Permanently storing the credentials
The following commands will add your credentials to your profile so they will be set on future logins.
$ echo export MINISHIFT_USERNAME=$MINISHIFT_USERNAME >> ~/.bash_profile $ echo export MINISHIFT_PASSWORD=$MINISHIFT_PASSWORD >> ~/.bash_profile
- Copy
-
3. Build your first app
10 minutes
BodyStart CDK/minishift
You are now ready to start CDK. The
minishift startcommand will start a Red Hat Enterprise Linux VM with an OpenShift cluster running inside.Note: By this point you should have your hypervisor configured as per the hypervisor prerequisites in step 1:
- If you are using Xhyve, make sure you've installed the docker-machine-xhyve driver.
- If you are using VirtualBox, configure minishift to use VirtualBox with
minishift config set vm-driver virtualbox
You should have also completed the CDK setup from step 2.
Run minishift start
Start the VM with
minishift start:$ minishift start -- Starting profile 'minishift' ... -- Minishift VM will be configured with ... Memory: 4 GB vCPUs : 2 Disk size: 20 GB -- Starting Minishift VM .......................... OK -- Registering machine using subscription-manager Registration in progress ..................... OK [42s] ... Extracting Image pull complete OpenShift server started. The server is accessible via web console at: https://192.168.42.60:8443 You are logged in as: User: developer Password: To login as administrator: oc login -u system:admin ...After
minishift startcompletes, make a note of:- The URL for the OpenShift cluster. Note: the IP address may change when you restart CDK.
- The developer username.
- the admin username and default password.
To check that everything is working and view the OpenShift console use the command:
$ minishift console
This will launch the URL listed above (for example: https://192.168.42.60:8443) with your default browser. You will likely get a security warning from the browser about the certificate being from an unknown certificate authority. This is expected. You will need to temporarily accept the certificate to proceed.
Note: The web console may not launch on some older versions of Safari. You can get the URL to use with a different browser using the following command:
$ minishift console --url
Login to OpenShift using
developeras the username. Enter any text for the developer password.Add the directory containing oc.exe to your PATH
After the CDK/minishift VM has been started, add oc to your path:
Note: The oc command must match the version of the OpenShift cluster that is running inside of the Red Hat VM. The following command will set the correct version dynamically by running
minishift oc-envand having your shell parse the output.$ eval $(minishift oc-env)
Stopping CDK/minishift and the CDK life-cycle
You can stop the CDK/minishift VM with the command:
$ minishift stop
You can restart it again with:
$ minishift start
If necessary, you can delete the VM in order to get a fresh start with a clean VM using:
$ minishift delete
You won't need to run
minishift setup-cdkagain unless you delete the contents of~/.minishift. You can learn more in the CDK life-cycle section of the CDK Getting Started Guide.Build your first app
Follow these instructions to create and deploy a Node.js "Hello, World" application on OpenShift running inside the CDK using the OpenShift Web Console.
Where to go next?
- Learn more about CDK from the CDK Getting Started Guide
- If you are new to OpenShift, try the online tutorials at learn.openshift.com
- Read the OpenShift documentation
- Follow the Red Hat Developers Blog for articles on OpenShift, CDK, containers, and many other topics.
-
1. Installation and Prerequisites
5 minutes
BodyThe prerequisites for running CDK on Red Hat Enterprise Linux are:
- A Red Hat Developer Program username and password are required to enable the Red Hat Enterprise Linux VM included with the CDK to download and build container images from Red Hat. Please make sure to accept the terms and conditions.
- A virtualization platform, either Linux KVM or VirtualBox. For KVM you should have libvirt permissions to allow you to start and stop a VM using your normal, non-root user ID.
- 25 GB of free disk space.
All of the commands in this section should be run as the root user.
For more information, see the CDK Gettting Started Guide.
1. Enable the Red Hat Developer Tools software repository
First, you need to enable the Red Hat Developer Tools and Red Hat Software Collections (RHSCL) software repositories using subscription-manager:
$ su - # subscription-manager repos --enable rhel-7-server-devtools-rpms # subscription-manager repos --enable rhel-server-rhscl-7-rpms
Note: Change -server- to -workstation- if you aren't using the server variant of Red Hat Enterprise Linux. For developers, we recommend using Red Hat Enterprise Linux Server for access to the widest range of development tools. For developers, a no-cost subscription is available from developers.redhat.com.Next, add the Red Hat Developer Tools key to your system. This will allow yum to verify the integrity of the download packages:
# cd /etc/pki/rpm-gpg # wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt # rpm --import RPM-GPG-KEY-redhat-devel
2. Install CDK/minishift
To install CDK/minishift, run the following command as the root user:
# yum install cdk-minishift docker-machine-kvm
Note: if you only intend to use VirtualBox instead of Linux KVM, you may skip the installation of docker-machine-kvm.
-
2. Setup CDK/Minishift
5 minutes
BodyThe CDK is a single executable which includes a number of bundled components. You will use the
minishiftcommand to start, stop, and configure the Red Hat Enterprise Linux 7 VM and the Red Hat OpenShift Container Platform single-node cluster running inside of the VM.The
occommand line tool which is used for interacting with OpenShift clusters will be downloaded when you runminishift setup-cdk. Theoccommand must match the version of OpenShift running inside of the VM. Theminishift oc-envcommand provides the statements to add the correct version of oc to your PATH. The output ofminishift oc-envis intended to be evaluated by your shell after runningminishift start.The setup steps are:
- Run
minishift setup-cdk. to set up your CDK environment in~/.minishift - Add your Red Hat Developer Program credentials to your environment
Note: All of the commands in this section should be run under your normal, non-root user ID.1. Run setup-cdk
Run
minishift setup-cdkto setup the components needed to run CDK on your system. By default,minishift setup-cdkplaces CDK content in~/.minishift.$ minishift setup-cdk Setting up CDK 3 on host using '/home/user/.minishift' as Minishift's home directory Copying minishift-rhel7.iso to '/home/user/.minishift/cache/iso/minishift-rhel7.iso' Copying oc to '/home/user/.minishift/cache/oc/v3.9.31/linux/oc' Creating configuration file '/home/user/.minishift/config/config.json' Creating marker file '/home/user/.minishift/cdk' Default add-ons anyuid, admin-user, xpaas, registry-route, che, eap-cd installed Default add-ons anyuid, admin-user, xpaas enabled CDK 3 setup complete.
Note: If you would like to use a different directory see Environment Variables in the CDK Getting Started Guide.
If you delete
~/.minishift, you will need to run this step again.2. Add Red Hat Developer Program username and password to your environment
The VM will need to register with Red Hat to download and build container images. Add your Red Hat Developer Program username and password to your environment to avoid the need to enter it each time you start minishift.
The following commands will set the credentials in the environment of the running shell. When a new command shell is started you will need to enter these commands again.
$ export MINISHIFT_USERNAME='<RED_HAT_USERNAME>' $ export MINISHIFT_PASSWORD='<RED_HAT_PASSWORD>'
Optional: Permanently storing the credentials
The following commands will add your credentials to your profile so they will be set on future logins.
$ echo export MINISHIFT_USERNAME=$MINISHIFT_USERNAME >> ~/.bashrc $ echo export MINISHIFT_PASSWORD=$MINISHIFT_PASSWORD >> ~/.bashrc
- Run
-
3. Build your first app
10 minutes
BodyStart CDK/minishift
You are now ready to start CDK. The
minishift startcommand will start a Red Hat Enterprise Linux VM with an OpenShift cluster running inside.Note: By this point you should have your hypervisor configured as per the hypervisor prerequisites in step 1:
- If you are using KVM, make sure you've installed the docker-machine-kvm driver.
- If you are using VirtualBox, configure minishift to use VirtualBox with
minishift config set vm-driver virtualbox
You should have also completed the CDK setup from step 2.
Run minishift start
Start the VM with
minishift start:$ minishift start -- Starting profile 'minishift' ... -- Minishift VM will be configured with ... Memory: 4 GB vCPUs : 2 Disk size: 20 GB -- Starting Minishift VM .......................... OK -- Registering machine using subscription-manager Registration in progress ..................... OK [42s] ... Extracting Image pull complete OpenShift server started. The server is accessible via web console at: https://192.168.42.60:8443 You are logged in as: User: developer Password: To login as administrator: oc login -u system:admin ...After
minishift startcompletes, make a note of:- The URL for the OpenShift cluster. Note: the IP address may change when you restart CDK.
- The developer username.
- the admin username and default password.
To check that everything is working and view the OpenShift console use the command:
$ minishift console
This will launch the URL listed above (for example: https://192.168.42.60:8443) with your default browser. You will likely get a security warning from the browser about the certificate being from an unknown certificate authority. This is expected. You will need to temporarily accept the certificate to proceed.
You can get the URL to use with a different browser using the following command:
$ minishift console --url
Login to OpenShift using
developeras the username. Enter any text for the developer password.Add the directory containing oc.exe to your PATH
After the CDK/minishift VM has been started, add oc to your path:
Note: The oc command must match the version of the OpenShift cluster that is running inside of the Red Hat VM. The following command will set the correct version dynamically by running
minishift oc-envand having your shell parse the output.$ eval $(minishift oc-env)
Stopping CDK/minishift and the CDK life-cycle
You can stop the CDK/minishift VM with the command:
$ minishift stop
You can restart it again with:
$ minishift start
If necessary, you can delete the VM in order to get a fresh start with a clean VM using:
$ minishift delete
You won't need to run
minishift setup-cdkagain unless you delete the contents of~/.minishift. You can learn more in the CDK life-cycle section of the CDK Getting Started Guide.Build your first app
Follow these instructions to create and deploy a Node.js "Hello, World" application on OpenShift running inside the CDK using the OpenShift Web Console.
Where to go next?
- Learn more about CDK from the CDK Getting Started Guide
- If you are new to OpenShift, try the online tutorials at learn.openshift.com
- Read the OpenShift documentation
- Follow the Red Hat Developers Blog for articles on OpenShift, CDK, containers, and many other topics.
Build Something Today
Let's walk through everything you need to build your first application.
Download