Last week, I had gone through couple of steps to
create an account (free - trial for 30 days) with IBM® Bluemix®, deploy my IBM Container (Docker based) and access my IBM Container running on Bluemix using Bluemix/CloudFoundry command line tools setup locally on my laptop. I have done it to prepare myself and also it's a kind of POC
for upcoming project work. I've decided to share these steps so that other people in the same situation can benefit from it. Below are steps:
Looks like you're really into Docker, see my other related blog posts below:
- Make sure you have your IBM Container deployed and running on IBM Bluemix. If you don't have one follow the below sub steps:
- Create a free account with IBM Bluemix (https://console.ng.bluemix.net/)
- Once the account is created, you can create an IBM Container. See below quick steps:
- Now it's time to setup the command line tools on your local desktop. I have used the Fedora v24.x running as a virtual machine.
- Download Bluemix_CLI_0.4.6_amd64.tar.gz from http://clis.ng.bluemix.net/ui/home.html and extract it to some directory:
$>tar -xvzf ~/Downloads/Bluemix_CLI_0.4.6_amd64.tar.gz
- Among others files, you'll see 'install_bluemix_cli' executable file under /Bluemix_CLI
$>sudo ./install_bluemix_cli
- Once it's installed, download CloudFoundry tool:
$>sudo wget -O /etc/yum.repos.d/cloudfoundry-cli.repo https://packages.cloudfoundry.org/fedora/cloudfoundry-cli.repo
- Install CloudFoundry CLI:
$>sudo yum install cf-cli
...
Installed:
cf-cli.x86_64 0:6.26.0-1 - Check the version:
$>cf -v
cf version 6.23.1+a70deb3.2017-01-13 -
Install the IBM Bluemix Container Service plug-in (cf ic) to use the native Docker CLI. More details about it can be found here.
$>cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64
-
Verify the plugins:
$>cf plugins
Listing Installed Plugins...
OK
Plugin Name Version Command Name Command Help
IBM-Containers 0.8.964 ic IBM Containers plug-in -
It's time to login to CloudFoundry and run you container command to manage your container.
-
Login to Bluemix/CloudFoundry:
$>cf login -a https://api.ng.bluemix.net
Email> purna.poudel@gmail.com
Password>
Authenticating...
OK
-
Login to Container:
$> cf ic login
Deleting old configuration file...
Retrieving client certificates for IBM Containers...
Storing client certificates in /home/osboxes/.ice/certs/...
Storing client certificates in /home/osboxes/.ice/certs/containers-api.ng.bluemix.net/7b9e7846...
OK
The client certificates were retrieved.
Checking local Docker configuration...
OK
Authenticating with the IBM Containers registry host registry.ng.bluemix.net...
OK
You are authenticated with the IBM Containers registry.
...
-
Login to Bluemix/CloudFoundry:
-
It's time to manage your Container(s) from your desktop using command line
-
Let's check our running Container process(es)
$> cf ic ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d476a406-ba9 registry.ng.bluemix.net/ibmliberty:webProfile7 "" 2 days ago Running 169.46.21.44:9080->9080/tcp, 169.46.21.44:9443->9443/tcp sysgLibertyCont
-
Let's inspect the running Container
$> cf ic inspect d476a406-ba9
[
{
"BluemixApp": null,
"BluemixServices": null,
"Config": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": [],
"Dns": "",
"Env": [
"logging_password=",
"space_id=7b9e7846-0ec8-41da-83e6-209a02e1b14a",
"logstash_target=logmet.opvis.bluemix.net:9091",
"metrics_target=logmet.opvis.bluemix.net:9095"
],
"Hostname": "instance-002eacfa",
"Image": "registry.ng.bluemix.net/ibmliberty:webProfile7",
"ImageArchitecture": "amd64",
"Labels": {
"doc.url": "/docs/images/docker_image_ibmliberty/ibmliberty_starter.html"
},
"Memory": 256,
"MemorySwap": "",
....
-
Let's check our running Container process(es)
Looks like you're really into Docker, see my other related blog posts below:
- Using Docker Secrets with IBM WebSphere Liberty Profile Application Server
- Make your container deployment portable
- Experience sharing - Dock Datacenter
- Setting up CLI environment for IBM Bluemix (this post)
- Quick start with IBM Datapower Gateway Docker Edition
No comments:
Post a Comment