Managing Docker Containers on Bluemix from RHEL 6.6
Hickmat 100000QA3T Visits (8487)
Over the last month and a bit (slighly interrupted by a very welcome Christmas and New Year break) I have started to tinker with Docker containers in Bluemix. My initial experiments have been based around using my Mac and I found the set up of Docker and ICE (the command line tool for managing containers) fairly simple there but today I decided to start to look at how I might be able to use UrbanCode Deploy to drive ICE and the first step was to get Docker and ICE running on a RHEL 6.6 Virtual Machine I use as an agent end point to interact with Bluemix.
Installing docker was simple as just required the following commands (as my virtual machine is for developement work I logon a root so all actions in the blog entry are based on running with root access):
Runnig a simple test of docker -t -i fedora /bash/bin proved all was well in the world of docker so I then looked as gettig ICE installed. This is where I ran into an issue in that the core version of Python installed in my version of RHEL 6.6 is Python2.6 where as ICE needs v2.7 or above.... Hmmmm.... Given messing around with the base Python version is a path to pretty much gauranteed destruction of an RHEL system I needed to create a virtual Python environment. The best way to do this (at least based on my experience) is to use the virtualenv tool to create a run a virtual enviroment providing the necessary version of Python (v2.7 in this case).
The steps I took to set up the virtualenv and the necessary Python version where:
securely download get-pip.py.
Then run the following from the directory where the file was downloaded to :
Download the Python Wheel file from here http
Install virtualenv using the following command (again you should cd to the dir where you downloaded the whl file to)
pip install virt
virtualenv ve -p /<user home path
To run under this virtual environment you must activate it as follows:
Your shell should now be running Python v2.7 (check by entering python -V) and the next step is to install ICE.
This is documented in the Container Docs but here are the steps
Install IBM Containers Extension:
Before I could logon using the ice login -k <key> command I needed to run the following export to set the TLS verify for Docker.
Once this was done I could run ice and access / manage the containers I had created via my Mac
Now I've got this running I plan to look at the integration with Urbancode but just now that'll have to wait for another day.