Search This Blog

Tuesday 28 April 2015

Auto Scaling Service within Bluemix

I decided to test out the Auto Scale service in IBM Bluemix following this example which shows how to also use the Blazemeter service to Load test the application to simulate extra memory requirement on the application.

https://developer.ibm.com/bluemix/2015/04/03/handle-unexpected-bluemix-auto-scaling/

The demo is quite straight forward to setup and the screen shots below show what the service output gives in terms of auto scaling history and of course metric statistics for the selected policy configuration.

Policy Configuration



Metrics Statistics



Scaling History


Monday 20 April 2015

Deploying a Python application to IBM Bluemix

The following simple example shows how to push the basic hello world Python application to IBM Bluemix. We use the buildpack below.

https://github.com/heroku/heroku-buildpack-python.git

1. Create a file called requirements.txt

pas@pass-mbp:~/bluemix-apps/python-demo$ cat requirements.txt
Flask==0.10.1


2. Create a file called runtime.txt to detail the Python version to use

pas@pass-mbp:~/bluemix-apps/python-demo$ cat runtime.txt
python-2.6.5


3. Push the application using the buildpack above.

pas@pass-mbp:~/bluemix-apps/python-demo$ cf push pas-phython-demo -m 128m -b https://github.com/heroku/heroku-buildpack-python.git
Creating app pas-phython-demo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

Creating route pas-phython-demo.mybluemix.net...
OK

Binding pas-phython-demo.mybluemix.net to pas-phython-demo...
OK

Uploading pas-phython-demo...
Uploading app files from: /Users/pas/ibm/bluemix/apps/python-demo
Uploading 1.9K, 7 files
Done uploading
OK

Starting app pas-phython-demo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
-----> Downloaded app package (4.0K)
Cloning into '/tmp/buildpacks/heroku-buildpack-python'...
-----> Installing runtime (python-2.6.5)
-----> Installing dependencies with pip
/app/.heroku/python/lib/python2.6/site-packages/pip-6.1.0.dev0-py2.6.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
       You are using pip version 6.1.0.dev0, however version 6.1.1 is available.
       You should consider upgrading via the 'pip install --upgrade pip' command.
       Collecting Flask==0.10.1 (from -r requirements.txt (line 1))
/app/.heroku/python/lib/python2.6/site-packages/pip-6.1.0.dev0-py2.6.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
         Downloading Flask-0.10.1.tar.gz (544kB)
       Collecting Werkzeug>=0.7 (from Flask==0.10.1->-r requirements.txt (line 1))
         Downloading Werkzeug-0.10.4-py2.py3-none-any.whl (293kB)
       Collecting Jinja2>=2.4 (from Flask==0.10.1->-r requirements.txt (line 1))
         Downloading Jinja2-2.7.3.tar.gz (378kB)
       Collecting itsdangerous>=0.21 (from Flask==0.10.1->-r requirements.txt (line 1))
         Downloading itsdangerous-0.24.tar.gz (46kB)
       Collecting markupsafe (from Jinja2>=2.4->Flask==0.10.1->-r requirements.txt (line 1))
         Downloading MarkupSafe-0.23.tar.gz
       Installing collected packages: markupsafe, itsdangerous, Jinja2, Werkzeug, Flask
         Running setup.py install for markupsafe
         Running setup.py install for itsdangerous
         Running setup.py install for Jinja2
         Running setup.py install for Flask
       Successfully installed Flask-0.10.1 Jinja2-2.7.3 Werkzeug-0.10.4 itsdangerous-0.24 markupsafe-0.23
You are using pip version 6.1.0.dev0, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
-----> Uploading droplet (25M)

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App pas-phython-demo was started using this command `python hello.py`

Showing health and status for app pas-phython-demo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

requested state: started
instances: 1/1
usage: 128M x 1 instances
urls: pas-phython-demo.mybluemix.net
last uploaded: Mon Apr 20 07:10:24 +0000 2015

     state     since                    cpu    memory          disk          details
#0   running   2015-04-20 05:12:23 PM   0.0%   40.8M of 128M   94.4M of 1G




A Meteor buildpack for Bluemix to simplify the deployment

I previously blogged about deploying a Meteor application to Bluemix as follows

http://theblasfrompas.blogspot.com.au/2015/04/deploying-simple-meteor-application-to.html

The following Buildpack created by an Internal IBM employee streamlines the process of deployment and avoids the need for ENV variables with the pushed application, here;s how. It's also detailed in the GitHub buildpack URL below.

https://github.com/bancha001/bluemix-buildpack-meteor

1. Create .cfignore to exclude the path 'local' to be uploaded

pas@pass-mbp:~/ibm/software/meteor/simple-todos$ cat .cfignore
.meteor/local


2. Create a manifest.yml which includes an existing MongoDB service as shown below.

---
applications:
- memory: 256M
  domain: mybluemix.net
  path: .
  buildpack: https://github.com/bancha001/bluemix-buildpack-meteor
  host: pas-todo
  name: pas-todo
  disk: 512M
  services:
    - todo-mongo-db
  instances: 1


3. Push the application

pas@pass-mbp:~/ibm/software/meteor/simple-todos$ cf push
Using manifest file /Users/pas/ibm/software/meteor/simple-todos/manifest.yml

Creating app pas-todo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

Creating route pas-todo.mybluemix.net...
OK

Binding pas-todo.mybluemix.net to pas-todo...
OK

Uploading pas-todo...
Uploading app files from: /Users/pas/ibm/software/meteor/simple-todos
Uploading 9.5K, 12 files
Done uploading
OK
Binding service todo-mongo-db to app pas-todo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

Starting app pas-todo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
-----> Downloaded app package (216K)
Cloning into '/tmp/buildpacks/bluemix-buildpack-meteor'...
-----> Installing Node
-----> Installing Meteor
Downloading Meteor distribution
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
######################################################################## 100.0%
Meteor 1.1.0.2 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.
sudo: no tty present and no askpass program specified
Couldn't write the launcher script. Please either:
  (1) Run the following as root:
        cp "/home/vcap/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
  (2) Add "$HOME/.meteor" to your path, or
  (3) Rerun this command to try again.
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
-----> Building Meteor application

FAILED
Error performing request: Get https://api.ng.bluemix.net/v2/apps/3c2b4d96-688d-4024-b039-b8153c86c5cc/instances: dial tcp 75.126.70.44:443: i/o timeout

TIP: use 'cf logs pas-todo --recent' for more information
pas@pass-mbp:~/ibm/software/meteor/simple-todos$ clear
pas@pass-mbp:~/ibm/software/meteor/simple-todos$ cf push
Using manifest file /Users/pas/ibm/software/meteor/simple-todos/manifest.yml

Creating app pas-todo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

Creating route pas-todo.mybluemix.net...
OK

Binding pas-todo.mybluemix.net to pas-todo...
OK

Uploading pas-todo...
Uploading app files from: /Users/pas/ibm/software/meteor/simple-todos
Uploading 9.5K, 12 files
Done uploading
OK
Binding service todo-mongo-db to app pas-todo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

Starting app pas-todo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
-----> Downloaded app package (216K)
Cloning into '/tmp/buildpacks/bluemix-buildpack-meteor'...
-----> Installing Node
-----> Installing Meteor
Downloading Meteor distribution
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
Dropped log message: message too long (>64K without a newline)
######################################################################## 100.0%
Meteor 1.1.0.2 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.
sudo: no tty present and no askpass program specified
Couldn't write the launcher script. Please either:
  (1) Run the following as root:
        cp "/home/vcap/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
  (2) Add "$HOME/.meteor" to your path, or
  (3) Rerun this command to try again.
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
-----> Building Meteor application
-----> Installing dependencies
npm WARN package.json meteor-dev-bundle@0.0.0 No description
npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle@0.0.0 No README data
       > fibers@1.0.1 install /tmp/staged/app/.bluemix/app/programs/server/node_modules/fibers
       > node ./build.js
       `linux-x64-v8-3.14` exists; testing
       Binary is fine; exiting
       progress@1.1.8 node_modules/progress
       ip@0.3.2 node_modules/ip
       underscore@1.5.2 node_modules/underscore
       semver@2.2.1 node_modules/semver
       chalk@0.5.1 node_modules/chalk
       ├── escape-string-regexp@1.0.2
       ├── ansi-styles@1.1.0
       ├── supports-color@0.2.0
       ├── has-ansi@0.1.0 (ansi-regex@0.2.1)
       └── strip-ansi@0.3.0 (ansi-regex@0.2.1)
       source-map-support@0.2.5 node_modules/source-map-support
       └── source-map@0.1.29 (amdefine@0.1.0)
       fibers@1.0.1 node_modules/fibers
-----> Building runtime environment
-----> Running extras
       MongoDB Service Binding
  #!/bin/sh
  export ROOT_URL=${ROOT_URL:-http://pas-todo.mybluemix.net}
  export MONGO_URL=${MONGO_URL:-mongodb://IbmCloud_r3baqpa6_2hft49g4_f78kb40a:Wb010LLGN9YHYbPR4DdK5JEpSvTt0GZ0@ds055200.mongolab.com:55200/IbmCloud_r3baqpa6_2hft49g4}
-----> Uploading droplet (14M)

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App pas-todo was started using this command `.bluemix/bin/node .bluemix/app/main.js`

Showing health and status for app pas-todo in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: pas-todo.mybluemix.net
last uploaded: Mon Apr 20 06:51:43 +0000 2015

     state     since                    cpu    memory          disk          details
#0   running   2015-04-20 04:56:09 PM   0.1%   70.6M of 256M   57.8M of 1G



Wednesday 15 April 2015

Deploying a simple Meteor Application To IBM Bluemix

In this post I show what is necessary to deploy a simple Meteor application to IBM Bluemix public instance. In this example we already have a simple Meteor application we have tested and verified using "meteor" itself , running on localhost at port 3000.

1. Lets remove the local DB files, be careful as this will remove the local DB so you should do this when your ready to deploy to Bluemix only.

pas@pass-mbp:~/ibm/software/meteor/myfirst_app$ meteor reset
Project reset.


2. Create a manifest.yml file for the deployed application, the ENV variable ROOT_URL is required and also a buildpack which supports Meteor runtime is being pushed with the application.

applications:
 - name: pas-meteor-firstapp
   memory: 256M
   instances: 1
   path: .
   host: pas-meteor-firstapp
   domain: mybluemix.net
   buildpack: https://github.com/jordansissel/heroku-buildpack-meteor.git
env:
   ROOT_URL: http://pas-meteor-firstapp.mybluemix.net/


3. Push the application as shown below.

pas@pass-mbp:~/ibm/software/meteor/myfirst_app$ cf push -f manifest.yml
Using manifest file manifest.yml

Creating app pas-meteor-firstapp in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

Using route pas-meteor-firstapp.mybluemix.net
Binding pas-meteor-firstapp.mybluemix.net to pas-meteor-firstapp...
OK

Uploading pas-meteor-firstapp...
Uploading app files from: .
Uploading 3.7K, 11 files
Done uploading
OK

Starting app pas-meteor-firstapp in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
-----> Downloaded app package (4.0K)
Cloning into '/tmp/buildpacks/heroku-buildpack-meteor'...

-----> Moving app source into a subdirectory
       Node engine:         0.10.36
       Npm engine:          unspecified
       Start mechanism:     none
       node_modules source: none
       node_modules cached: false
       NPM_CONFIG_PRODUCTION=true
       NODE_MODULES_CACHE=true
       PRO TIP: Use 'npm init' and 'npm install --save' to define dependencies
       See https://devcenter.heroku.com/articles/nodejs-support
       PRO TIP: Include a Procfile, package.json start script, or server.js file to start your app
       See https://devcenter.heroku.com/articles/nodejs-support#runtime-behavior
-----> Installing binaries
       Downloading and installing node 0.10.36...
-----> Building dependencies
       Skipping dependencies (no source for node_modules)
-----> Checking startup method
-----> Finalizing build
       Creating runtime environment
       Exporting binary paths
       Cleaning up build artifacts
       Build successful!
       /tmp/staged/app
       └── (empty)
-----> Fetching Meteor 1.0.3.2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 72.4M  100 72.4M    0     0  14.3M      0  0:00:05  0:00:05 --:--:-- 15.6M
-----> Unpacking Meteor 1.0.3.2
       Meteor 1.0.3.2 is installed
-----> Building Meteor App Bundle
-----> Installing App's NPM Dependencies
       npm WARN package.json meteor-dev-bundle@0.0.0 No description
       npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
       npm WARN package.json meteor-dev-bundle@0.0.0 No README data
       > fibers@1.0.1 install /tmp/staged/app/build/bundle/programs/server/node_modules/fibers
       `linux-x64-v8-3.14` exists; testing
       Binary is fine; exiting
       underscore@1.5.2 node_modules/underscore
       semver@4.1.0 node_modules/semver
       eachline@2.3.3 node_modules/eachline
       └── type-of@2.0.1
       chalk@0.5.1 node_modules/chalk
       ├── ansi-styles@1.1.0
       ├── escape-string-regexp@1.0.3
       ├── supports-color@0.2.0
       ├── has-ansi@0.1.0 (ansi-regex@0.2.1)
       └── strip-ansi@0.3.0 (ansi-regex@0.2.1)
       source-map-support@0.2.8 node_modules/source-map-support
       └── source-map@0.1.32 (amdefine@0.1.0)
-----> Uploading droplet (82M)

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App pas-meteor-firstapp was started using this command `node build/bundle/main.js`

Showing health and status for app pas-meteor-firstapp in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: pas-meteor-firstapp.mybluemix.net
last uploaded: Wed Apr 15 05:13:01 +0000 2015

     state     since                    cpu    memory           disk           details
#0   running   2015-04-15 03:18:18 PM   0.1%   149.2M of 256M   351.1M of 1G


4. Verify application is running

pas@pass-mbp:~/ibm/software/meteor/myfirst_app$ cf app pas-meteor-firstapp
Showing health and status for app pas-meteor-firstapp in org pasapi@au1.ibm.com / space dev as pasapi@au1.ibm.com...
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: pas-meteor-firstapp.mybluemix.net
last uploaded: Wed Apr 15 05:13:01 +0000 2015

     state     since                    cpu    memory           disk           details
#0   running   2015-04-15 03:18:18 PM   0.0%   149.2M of 256M   351.1M of 1G


5. Access as shown below.

http://pas-meteor-firstapp.mybluemix.net/


Finally if you need to use a data store which most applications will then you need to define an ENV variable for your MongoDB store as shown below. In this example below I am using a service in the Bluemix catalog for MongoDB itself and

   MONGO_URL: mongodb://zzzzzzzzz:yyyyyyyyyyy


More Information

https://www.meteor.com/install

Sunday 12 April 2015

Bluemix IBM Containers Simple NodeJS Demo

I decided to give the IBM Containers service a quick test drive today. I used this very simple example available at the following GitHub URL

https://github.com/Samze/ibm-containers-simple-node-example

1. Clone the source code as follows

pas@192-168-1-4:~/temp$ git clone https://github.com/Samze/ibm-containers-simple-node-example
Cloning into 'ibm-containers-simple-node-example'...
remote: Counting objects: 63, done.
remote: Total 63 (delta 0), reused 0 (delta 0), pack-reused 63
Unpacking objects: 100% (63/63), done.
Checking connectivity... done.


2. Build as shown below.

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ docker build -t simplenode:latest .
Sending build context to Docker daemon 921.6 kB
Sending build context to Docker daemon
Step 0 : FROM registry-ice.ng.bluemix.net/ibmnode:latest
 ---> e9991fa102c2
Step 1 : ADD . /node
 ---> e06d64586fcb
Removing intermediate container 115a1f348c9c
Step 2 : WORKDIR /node
 ---> Running in bbbbb3e2044c
 ---> 341de1dca2a2
Removing intermediate container bbbbb3e2044c
Step 3 : RUN npm install
 ---> Running in c5157b73d74a
npm WARN package.json ibm-containers-simple-node-example@0.0.0 No repository field.
npm ERR! fetch failed https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/on-finished/-/on-finished-2.2.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.7.tgz
npm ERR! fetch failed https://registry.npmjs.org/crc/-/crc-3.2.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/crc/-/crc-3.2.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/mime-db/-/mime-db-1.8.0.tgz
ejs@2.3.1 node_modules/ejs

express@4.12.3 node_modules/express
├── merge-descriptors@1.0.0
├── utils-merge@1.0.0
├── cookie-signature@1.0.6
├── methods@1.1.1
├── cookie@0.1.2
├── fresh@0.2.4
├── escape-html@1.0.1
├── range-parser@1.0.2
├── finalhandler@0.3.4
├── content-type@1.0.1
├── vary@1.0.0
├── parseurl@1.3.0
├── serve-static@1.9.2
├── content-disposition@0.5.0
├── path-to-regexp@0.1.3
├── depd@1.0.1
├── qs@2.4.1
├── proxy-addr@1.0.7 (forwarded@0.1.0, ipaddr.js@0.1.9)
├── debug@2.1.3 (ms@0.7.0)
├── send@0.12.2 (destroy@1.0.3, ms@0.7.0, mime@1.3.4)
├── type-is@1.6.1 (media-typer@0.3.0, mime-types@2.0.10)
├── etag@1.5.1 (crc@3.2.1)
├── on-finished@2.2.0 (ee-first@1.1.0)
└── accepts@1.2.5 (negotiator@0.5.1, mime-types@2.0.10)
 ---> 6a8303faa142
Removing intermediate container c5157b73d74a
Step 4 : EXPOSE 8080
 ---> Running in 2ef2338c54f0
 ---> 92fcbb0123ac
Removing intermediate container 2ef2338c54f0
Step 5 : ENTRYPOINT node /node/index.js
 ---> Running in 9abbc0dd1b10
 ---> 0c09d70174b1
Removing intermediate container 9abbc0dd1b10
Successfully built 0c09d70174b1


3. Log into IBM Containers

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS$ ice login
API endpoint: https://api.ng.bluemix.net

Email> pasapi@au1.ibm.com

Password>
Authenticating...
OK

Targeted org pasapi@au1.ibm.com

Select a space (or press enter to skip):
1. dev
2. apple
3. lemon
4. pas

Space> 1
Targeted space dev

API endpoint:   https://api.ng.bluemix.net (API version: 2.19.0)
User:           pasapi@au1.ibm.com
Org:            pasapi@au1.ibm.com
Space:          dev
Authentication with container cloud service at https://api-ice.ng.bluemix.net/v2.0/containers completed successfully
You can issue commands now to the container service

Proceeding to authenticate with the container cloud registry at registry-ice.ng.bluemix.net
Login Succeeded


4. Retrieve your current namespace

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS$ ice namespace get
apples01


5. Tag the image to point to your private registry.

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice --local tag -f simplenode:latest registry-ice.ng.bluemix.net/apples01/simplenode:latest
Target is local host. Invoking docker with the given arguments...


6. Push the image to your private registry.

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice --local push registry-ice.ng.bluemix.net/apples01/simplenode:latest
Target is local host. Invoking docker with the given arguments...
The push refers to a repository [registry-ice.ng.bluemix.net/apples01/simplenode] (len: 1)
Sending image list
Pushing repository registry-ice.ng.bluemix.net/apples01/simplenode (1 tags)
Image 511136ea3c5a already pushed, skipping
Image a1a958a24818 already pushed, skipping
Image d0955f21bf24 already pushed, skipping
Image 9fec74352904 already pushed, skipping
Image a3d3e588211d already pushed, skipping
Image 19a35b496c0d already pushed, skipping
Image 1adb38c035f4 already pushed, skipping
Image f3c84ac3a053 already pushed, skipping
Image bf94729cc072 already pushed, skipping
Image cbc052ac72f1 already pushed, skipping
Image 12433edaed33 already pushed, skipping
Image c4a2c78444b7 already pushed, skipping
Image 300247e5330a already pushed, skipping
Image e9991fa102c2 already pushed, skipping
e06d64586fcb: Image successfully pushed
341de1dca2a2: Image successfully pushed
6a8303faa142: Image successfully pushed
92fcbb0123ac: Image successfully pushed
0c09d70174b1: Image successfully pushed
Pushing tag for rev [0c09d70174b1] on {https://registry-ice.ng.bluemix.net/v1/repositories/apples01/simplenode/tags/latest}


7. Start a new container in IBM Containers from the image you just pushed.

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice run --name simplenode_1 -p 8080 apples01/simplenode:latest
2261936e-4324-4f28-b800-10099471a306


8.  Verify it's up and running

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice ps

Container Id                         Name                   Group      Image                          Created      State    Private IP      Public IP       Ports

2261936e-4324-4f28-b800-10099471a306 simplenode_1                      apples01/simplenode:latest     Apr 10 23:13 Running  172.17.200.2                    [8080]


9. The following commands assign a public IP address to my container

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice ip list
Number of addresses: 0
pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice ip request
Successfully obtained ip: "129.41.233.119"
pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice ip list
Number of addresses: 1

Ip Address

129.41.233.119

pas@Pass-MacBook-Pro:~/bluemix-apps/CONTAINERS/ibm-containers-simple-node-example$ ice ip bind 129.41.233.119 simplenode_1
Successfully bound ip


10. Access the container as shown below.

http://129.41.233.119:8080/



More Information

https://www.ng.bluemix.net/docs/#starters/index-gentopic3.html#containers