Power Development Platform (PDP)
Please be advised that a planned production outage is scheduled for the IBM Virtual Loaner Program website only on Saturday, July 11, 2009, from 8 am CDT until 12 pm CDT Saturday, July 11, 2009.
User systems will continue to be available during this time.[Read More]
Jwestern 110000974Y 2,931 Views
Testing Docker on the IBM Power Development Cloud
By John Jacobson, IBM Cloud Technical Specialist
There have been a few other blog posts written about Docker on Power (see references at the end of this article) so while this is not the first article written about this topic, this is my account of leveraging the IBM Power Development Cloud (PDP) to test and gain familiarity with this container technology on IBM Power Systems....for free.
The Virtual Server Request
The PDP currently provides Virtual Server access for Power Systems. This is not a Container as a Service like they offer in Bluemix. However, this does not mean you cannot request a virtual server and get Docker running yourself.
To request Virtual Server access on the PDP, follow the easy steps in the Create reservation user guide https://public.dhe.ibm.com/partnerworld/pub/pdp/create_pdp_reservation_guide.pdf
When making your request, be sure to specify the 'Ubuntu Linux' as the Image category and 'Docker on Ubuntu 15.04' under Select an image.
Once the reservation is available, you can run a few commands to see that docker is installed
$ sudo docker version
$ sudo dpkg -l docker.io
Check to see if if the docker service is started
$ sudo service docker status
Jun 11 10:05:27 sys-5920 docker: time="2015-06-11T10:05:27-04:00" lev...)"
If docker is not started issue the following command and check the status again
$ sudo service docker start
$ sudo service docker status
The Docker installation creates a local private network on the virtual server instance. This means by default you won't be able to access your containers unless you expose the particular port. I found a couple different ways to do this. One using the Dockerfile (EXPOSE) as well as deploying the container with -p PORT:PORT. There is an example of this further down in this article.
docker0 Link encap:Ethernet HWaddr 56:84:7a:fe:97:99
eth0 Link encap:Ethernet HWaddr 52:54:00:8c:6a:18
If you did not request the Docker image above or you are testing in your own environment here are the steps to install Docker...
Looking at various blogs, I found two methods to install docker.
$ sudo dpkg -i docker.io-1.4.1-dev_ppc64el.deb
$ sudo echo deb http://ftp.unicamp.br/pub/ppc64el/ubuntu/14_10/docker-ppc64el/ utopic main >> /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get install docker.io
NOTE: As of Ubuntu 15.04 Vivid Vervet, Docker version 1.5 is included. Therefore the apt repository ftp.unicamp.br is not required.
Check the the installation and status of the docker status using the commands that were previously covered.
Create and Run your own initial base image
There are a couple different methods to get a base image up and running. I tested only the first one as it seemed to be the easiest to get things up and running.
$ cat ubuntu-core-14.10-core-ppc64el.tar.gz | sudo docker import - ubuntucore-ppc64le
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
NOTE: Other ubuntu-core images can be found here ubuntu-core images can be found here http://cdimage.ubuntu.com/ubuntu-core/
Since I didn't test Method 2, I don't have any notes to share. If you want to try it, its described in Step 2 here https://www.ibm.com/developerworks/library/d-docker-on-power-linux-platform/
Once I had the image created, I issued the following command to run it. This created the container and allows an interactive shell.
$ sudo docker run -t -i ubuntucore-ppc64le:latest /bin/bash
NOTE: flags -i interactive -t allocate pseudo tty
Container Images can be tagged with a label to help identify it. Tags are typically used to specify versioning.
$ sudo docker tag c2511a3aafad ubuntucore-ppc64le:14.10
$ sudo docker images
Run Registry images
One of the features of Docker is the portability of images. Docker hub and private registries are services that enable the sharing of images. So I went to http://hub.docker.com, clicked on Browse & Search and entered 'ppc64le'. This returned a number of images, so I thought I would download and test.
Here's a list of what I found!
Pull and run image
To test pulling and running an existing registry image, issue the following commands
$ sudo docker pull schabrolles/odoo_psql_ppc64le
$ sudo docker run -d -p 8069:8069 schabrolles/odoo_psql_ppc64le
To see that the container is running issue the command
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
We can see port 8069 is mapped/exported to the docker host IP:port so you can visit http://<IP_ADDRESS_OF_VIRTUAL_SERVER_RESERVATION>:8069
Create and run your own Container Image (Dockerize) So we've seen how an existing container image was pulled from the registry so let's look at how a container image is built. Container images are built using a Dockerfile. More details on Dockerfile can be found here https://docs.docker.com/reference/builder/
On the Virtual Server issue the following commands
$ mkdir -p ~/dockerize/mongodb
$ cd ~/dockerize/monogdb
$ touch Dockerfile
Then add the following to the Dockerfile
MAINTAINER John Jacobson firstname.lastname@example.org
RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ utopic universe" | tee /etc/apt/sources.list.d/ubuntu-utopic.list && \
sudo apt-get update && \\
mkdir -p /data/db
NOTE: Consider the use of $(lsb_release -sc) instead of hardcoding the ubuntu release name. This allows portability of your Dockerfile across different versions of the Distro.
i.e. RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc) universe" | tee /etc/apt/sources.list.d/ubuntu-$(lsb_release -sc).list
Build the container
To build the container, issue the following command from the directory ~/dockerize/monogdb
$ sudo docker build -t mongodb-ppc64:latest .
Sending build context to Docker daemon 2.56 kB
deb http://ports.ubuntu.com/ubuntu-ports/ utopic-updates universe
paring to unpack .../libpcap0.8_1.6.2-1_ppc64el.deb ...
Setting up mongodb-clients (1:2.6.3-0ubuntu5) ...
Adding system user `mongodb' (UID 101) ...
Processing triggers for libc-bin (2.19-10ubuntu2) ...
Step 3 : EXPOSE 27017
---> Running in 90b960218f64
Some of the bulid steps have been omitted but in the end you should see a message indicating that the container was successfully built
List new container image
To see our new container image issue the following command
$ sudo docker images | grep mongodb
NOTE: We use grep as to filter our the list of images to just ones containing mongodb
Run the container
To run the newly created mongodb container, issue the following command
$ sudo docker run mongodb-ppc64le
usr/bin/mongod --help for help and startup options
Additional Container Tasks
To remove an image, issue the following command
$ sudo docker rmi <image id or name>
NOTE: You may have an issue removing an image if you deployed a container. Even if the container is no longer running, you will get this error. You need to remove the container first OR use -f i.e. $ sudo docker rmi -f
To remove a container, issue the following command
$ sudo docker rm <container id or name>
Push a container image to a Repository
So once I had my mongodb container image, I thought I would try pushing it to Docker hub. However, when I tried to push it, I got a message about buffering to disk and then it failed. This was with version 1.4.1. Interestingly enough, I was able to push images with the prior version of 1.3.0 (but this is pretty old). Instead I created my own local registry to test the push capability. I used the local registry setup instructions documented in Step 3 here https://www.ibm.com/developerworks/library/d-docker-on-power-linux-platform/
Once my local registry was setup, I was then able to proceed to pushing my image
First you need to tag your current local image appropriately
$ sudo docker tag c608a51dc0ce localhost:5000/mongodb-ppc64le
Then you can push
$ sudo docker push localhost:5000/mongodb-ppc64le
$ sudo docker images | grep mongodb
Remove all exited containers
$ sudo docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs sudo docker rm
The Virtual Loaner Program now has a Group on the new My developerWorks. The VLP Group has Message Boards, Feeds and Links to help you get the most out of your VLP experience. So please join us and explore all that the new My developerWorks has to offer.
The VLP Group on My developerWorks
In VLP, there are two ways of backing up your reserved partition. You can save the state of the system immediately (save now) and you can save the state of the system automatically when the reservation ends (save on exit). In both cases, behind the scenes the VLP automation makes mksysb backups of AIX partitions, tarballs of Linux partitions, and backup images of IBM i reservations. I'm very fuzzy on IBM i things, so forgive/correct me if I got the IBM i-specific name for operating system backups wrong. We call operating system backups images in VLP. Once you've saved an image and your reservation that you used to save the image has ended, you can create a new reservation using that saved image. You can view your saved images by looking at the 'Images' tab in the VLP web application.
Now, I just told you how image saving/restoring is supposed to work. Please leave a comment with your image saving/restoring experiences. I'd like to know your opinions of how this works for you, how useful it is, and about any errors you have encountered.[Read More]
Test and develop on the JS22 POWER6 blade
Users are now able to reserve LPARs on JS22 Power6 blade hardware for development. If you prefer to develop on the blade hardware or simply want to test/validate your solution simply select the POWER Blade JS22 hardware architecture when filling out the resource reservation.
Learn more about IBM Bladecenters and Power blades:
What would you like to see in the VLP blog? What information would be the most helpful for you?[Read More]
New: Remote access for simplified solution porting and development on IBM PowerLinux.
The IBM Virtual Loaner Program (VLP) now offers ISVs a set of pre-installed tools, including the Advance Toolchain, the IBM PowerLinux Software Development Kit (SDK) as well as a C++ Compiler for easier solution porting to and development on IBM Power Systems servers running Linux.
The Advance Toolchain provides development products specifically tailored to make use of IBM hardware features.
Complementing the Advance Toolchain, the IBM Linux SDK is a an integrated development environment (IDE) that integrates C/C++ source development with the Advance Toolchain, post-link optimization, and classic Linux performance analysis tools, including OProfile and Valgrind.
This no-cost access to the latest IBM Power Systems hardware, development tools and IBM middleware helps ISVs save time and resources, enabling them to move their solutions off competitive platforms and develop their solutions on IBM Systems more quickly and successfully. To find out more, go to the VLP .
Toolchain - http://linuxpatch.ncsa.uiuc.edu/toolchain/at/at5.0/suse/SLES_11/release_notes.at5.0-5.0-0.html
SDK - http://www-304.ibm.com/webapp/set2/sas/f/lopdiags/sdklop.html
Dear VLP User,
We would like to take this opportunity to thank you for using the IBM Virtual Loaner Program during the last six months. You may have noticed a few changes during this time. Late last year the maximum memory allowed for a reservation changed from 4GB to 6GB, and then on March 18th, the disk allocation was upgraded so that AIX and Linux systems now have a 35GB base disk, instead of the previous 20GB allocation. The VLP will continue to make additional changes this year as we transition to the IBM Cloud provisioning infrastructure.
As part of the ongoing changes to the VLP, on May 31, 2011, we will discontinue providing the current 10GB shared user space currently mounted as your user /home/u000xxx directory. While we know some users utilize this space, most users do not. The significant increase in the base disk allocation should mitigate the removal of this space. If you currently have data stored in this mounted space, you will need to make a reservation (or use a reservation you created after March 18th, with the larger disk) and move the information currently in /home/u000xxxx to another place on the base disk. Then "save" your reservation. In the past, the 10GB space was automatically saved, but after April 30 it will no longer exist, and you will be required to request a save of your reservation, if you want your information to persist. If you need the information in this space on multiple reservations, you will need to copy it to the base disk in each system, as the automatic sharing will also no longer be provided.
Any reservation created after May 31, 2011 will not have this space mounted or available. Reservation created prior to April 30, will still have access to the space mounted until the end of that reservation, Restores of previous reservations will NOT have the space mounted.
If you have any questions or need assistance with this migration before May 31, 2011, please feel free to request support thru our web site, either via our e-mail support, or our interactive Live Chat function.
Virtual Loaner Program Administration
A new whitepaper, titled IBM Systems Director: Platform Management Backbone and Baseline for Integrated Service Management from IT industry analyst Jeff Cotrupe of Stratecast (a division of Frost & Sullivan) is now available for sellers and IBM Business Partners to download. Find out how IBM Systems Director is the backbone of IBM's Integrated Services Management portfolio, and helps companies achieve their goals of improving responsiveness, service, managing risk, while reducing costs and complexity. http://ibm.co/ekpWBe
Virtual Loaner Program: www.ibm.com/systems/vlp
The Partition Mobility function requires a promotional code - 213068. Please reference the VLP LPM User Guide to get started.
IBM Smart Business