Home » DevOps » Configuring Minishift for use with Eclipse Che and Red Hat CodeReady Workspaces

About Nick Boldt

Nick Boldt

Configuring Minishift for use with Eclipse Che and Red Hat CodeReady Workspaces

Number 4 in my Che series… a quick guide for using Minishift, in order to test drive Che 7 or Red Hat CodeReady Workspaces.

If you’re not running Windows as your host OS, your mileage may vary in terms of memory requirements and preferred virtual machine driver, but the suggestions below should work on most OSes… even the one with an incomplete sed implementation.

Get Minishift and oc

Download and unpack the latest 
minishift v1.34.1 binary from here:

https://github.com/minishift/minishift/releases

You’ll also want the Openshift Origin Client Tools (oc) 4 or 3.11 from:

Once downloaded and unpacked, put the minishift and oc executables in your ~/bin or some other folder that’s on your PATH.

Configure Minishift

On Windows, I use  Git bash shell for most shell commands.

# To prevent rate limiting when starting minishift, use a personal 
# access token.
# You can create new one at https://github.com/settings/tokens
export MINISHIFT_GITHUB_API_TOKEN="f00cafebabel33t"

# Grant enough memory to run CRW 1.2 / Che 6 and workspaces
# 6G min for one workspace, plus 2G for each additional workspace
minishift config set memory 12G

# Grant enough disk for downloading container images
minishift config set disk-size 25G

# if not using default virtualization engine, eg., want Virtual Box, use
minishift config set vm-driver virtualbox

# enable cluster admin user
minishift addons install --defaults
minishift addons enable admin-user

On Windows, you might need to touch a file that your shell can’t find.

touch /c/Users/YOUR_LOGIN_HERE/.minishift/machines/minishift_kubeconfig
Note      If it fails with error Checking if requested OpenShift version 'v3.11.0' is valid …​ v3.11.0 is not a valid OpenShift versionFAIL, try WSL bash.
# start minishift oc cluster
minishift start

Once minishift starts successfully, you’re ready to deploy Che or CRW to the server.

If minishift fails to come up, try killing and starting it again:

minishift stop
minishift start

Or delete it and try again:

minishift stop
minishift delete
minishift start

When successful, you should see something like this (use your actual IP address in place of 192.168.$YOUR_IP):

OpenShift server started.

The server is accessible via web console at:
    https://192.168.$YOUR_IP:8443/console

You can log into the above console URL using user = system and password = admin – full cluster admin privileges required to deploy an operator:

oc login 192.168.$YOUR_IP:8443 -u system -p admin

If you prefer to use a different user, you can grant that user cluster admin privileges:

oc adm policy --as=system:admin add-cluster-role-to-user cluster-admin admin # for admin user
oc adm policy --as=system:admin add-cluster-role-to-user cluster-admin developer # for developer user

Deploy something!

If you want to install CodeReady Workspaces 1.2, download the Operator Installer from here:

Set up your authentication with the new Red Hat Container Catalog’s registry, registry.redhat.io:

Run the installation as follows:

./deploy.sh -d

Or, if you’d like to install Che 7, see Deploying Che 7 to Minishift.

You can also use the built-in Che add-on in Minishift, but that approach is deprecated. Enable it as follows:

minishift addons enable che; minishift addons apply \
  --addon-env CHE_DOCKER_IMAGE=eclipse/che-server:nightly \
  --addon-env OPENSHIFT_TOKEN=$(oc whoami -t) che

# switch to Che 7.0.0.RC3 plugin registry format (fixed in minishift v1.34.1) 
# see https://github.com/minishift/minishift/commit/4c0a0c0b9cfb92798fef53e5c54e80ca71c5f715
minishift --profile che addons apply --addon-env PLUGIN__REGISTRY__URL=https://che-plugin-registry.openshift.io/v3 che
Published on .System Code Geeks with permission by Nick Boldt , partner at our SCG program. See the original article here: test

 

Opinions expressed by .System Code Geeks contributors are their own.

(0 rating, 0 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a sysadmin Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. Introduction to NGINX
2. Apache HTTP Server Cookbook
3. VirtualBox Essentials
4. Nagios Monitoring Cookbook
5. Linux BASH Programming Cookbook
6. Postgresql Database Tutorial
and many more ....
I agree to the Terms and Privacy Policy

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of