connect to blumix docker container with putty

27
© 2014 IBM Corporation Connect to Bluemix Docker Container with Putty Joseph Chang Senior IT Specialist IBM Cloud Group Document number

Upload: joseph-chang

Post on 23-Jan-2018

1.559 views

Category:

Technology


0 download

TRANSCRIPT

© 2014 IBM Corporation

Connect to Bluemix Docker Containerwith Putty

Joseph Chang

Senior IT Specialist

IBM Cloud Group

Document number

© 2014 IBM Corporation2

Take me to BluemixClick Here

If you are new to Bluemix Docker Container, please start from here:

https://www.ng.bluemix.net/docs/containers/container_index.htmlhttps://www.ng.bluemix.net/docs/containers/container_optional.html

© 2014 IBM Corporation

Create a Bluemix Container

3

© 2014 IBM Corporation

Create a Docker Container from Docker Image

4

To get a container. Click here to start.

The out-of-box Bluemix Docker Image includes built-in SSH daemon. So you can connect it with Putty just like using a VM.

© 2014 IBM Corporation

Fill in the container name and IP

5

1. Fill in Container name2. Select the size3. Assign an Public IP4. Expose public port. (22 for ssh, 9080 for websphere liberty)5. Click on Advanced Options.

© 2014 IBM Corporation

Fill in the SSH key

6

Fill in your SSH public key here. If you don’t’ have the key , refer the next page to get one.

© 2014 IBM Corporation

Generate SSH Key

7

• Launch a windows command prompt then use ssh-keygen to generate the key.

• You can enter a passphrase or leave it blank.

© 2014 IBM Corporation

Generate SSH Key

8

• The key has been generated.

• Check the generated key.

© 2014 IBM Corporation

Fill in the SSH key with cloud.key.pub

9

Copy the public to ..

© 2014 IBM Corporation

Convert the private key with PuttyGen

10

1. Load cloud.key

2. Save as cloud.key.ppk

© 2014 IBM Corporation

Create the container

11

Now click CREATE

© 2014 IBM Corporation

Wait for container created

12

The container should be created in less the 1 minutes.

Check if the public IP is shown then let’s connect to it.

© 2014 IBM Corporation

Ping the container with the public IP

13

Before connect with Putty, ping it to check if the server is alive.

© 2014 IBM Corporation

Connect to Bluemix Container with Putty

14

© 2014 IBM Corporation

Fill the public IP

15

© 2014 IBM Corporation

Fill in Auto-login username as “root”

16

© 2014 IBM Corporation

Import the cloud.key.ppk (refer to P.10 to see how to generate the key)

17

Open the terminal now !!

© 2014 IBM Corporation

Congratulation !! You have successfully login to container.

18

Feel like using a VM !!

© 2014 IBM Corporation

ls

19

© 2014 IBM Corporation

df -k

20

© 2014 IBM Corporation

ps -ef

21

© 2014 IBM Corporation

ip addr

22

© 2014 IBM Corporation

top

23

© 2014 IBM Corporation

Check the Resource Usage

24

© 2014 IBM Corporation

Cost estimation

25

What’s the difference?

It’s cheaper.

© 2014 IBM Corporation26

More reasons to use Docker containers M

ultip

licity

of S

tack

sM

ultip

licity

of h

ardw

are

envi

ronm

ents

QA serverDevelopment

VM

Contributor’s laptopCustomer Data

Center Production Cluster

Public Cloud

Static website User DB Analytics DBQueueWeb frontend

Can I migra te sm

oot hly and quickl y

…that can be manipulated using standard operations and run consistently on virtually any hardware platform

An engine that enables any payload to be encapsulated as a lightweight, portable, self-sufficient container…

Do service s and apps

interact ap propriate ly?What’s the next?

Start from the way you familiar. Explore the nice features of Docker Container.

© 2014 IBM Corporation

Thank you

27

Take me to BluemixClick Here