Skip to content

Instantly share code, notes, and snippets.

@macx
Last active October 27, 2017 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macx/44ede4c431cc7ec642ea05663d6bd14b to your computer and use it in GitHub Desktop.
Save macx/44ede4c431cc7ec642ea05663d6bd14b to your computer and use it in GitHub Desktop.
IBM BLuemix

Prequisits

Install the the following Bluemix CLI and follow the folling steps to setup and control IBM Bluemix Containers:

# Install Kubernets CLI and Shell Autocompletion
$ brew install kubectl bash-completion@2 cloudfoundry/tap/cf-cli

# Login to your bluemix account
$ bx login

Get started

To get use to a Docker file, you first have to login to the Bluemix Console, and create a Cluster (A virtual Maschine).

Now, install a container service and get access to your cluster:

$ bx plugin install container-service -r Bluemix
$ bx cs init

# Match the shell to the cluser and copy and paste the export order to your console:
$ bx cs cluster-config CLUSTERID
$ export KUBECONFIG=/Users/YOURUSER/.bluemix/plugins/container-service/clusters/CLUSTERID/kube-config-par01-CLUSTERID.yml

# Verify connection and run the proxy
$ kubectl get nodes
$ kubectl proxy

Now you can access your cluster dashboard locally.

Install a Docker file

Follow the following steps: https://console.bluemix.net/docs/containers/cs_apps.html#cs_apps_cli

$ bx cs clusters          # list clusters
$ bx cs workers CLUSTERID # check cluster status
$ bx cls cluster...       # repeat the MATCH step from above

# Specify the organisation and space. You can access them in the Bluemix console in the upper right corner
$ bx target -o "ORGNAME" -s "YOUR SPACE"

# Get all services
$ bx service offerings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment