create and use a dockerized aruba cloud server - cloudconf 2017

20
CREATE AND USE A DOCKERIZED ARUBA CLOUD SERVER 16th March 2017 Turin, Cloud Conference 2017 #cloudconf2017

Upload: aruba-spa

Post on 07-Apr-2017

66 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

CREATE AND USE A

DOCKERIZED ARUBA CLOUD SERVER

16th March 2017

Turin, Cloud Conference 2017

#cloudconf2017

Page 2: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Docker-machine: What Is It?

• it is a tool to provision multiple Docker hosts

• dockerize local or remote hosts

• provision Swarm cluster

• ArubaCloud is driver to manage dockerized

servers on our platform

Page 3: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

ArubaCloud Solutions

• PRO Server (VMware, Hyper-V)

• flexible configuration

• cost per hour

• Smart Server (VMware with SSD storage)

• available in 4 sizes

Page 4: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

New ArubaCloud Server (1/2)

• ac_action: NewSmart/NewPro

• Configuration parameters

• ac_endpoint: dc1, dc2, …, dc6

• ac_template: Ubuntu, centOS, etc.

• ac_size: Small, Medium, Large, Extra

Large

Page 5: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

New ArubaCloud Server (2/2)

• Credential parameters

• ac_username: Aruba Cloud username

• ac_password: Aruba Cloud password

• ac_admin_password: root password,

required for recovery console

• ac_ssh_key: Key Path (optional)

• All parameters can be set as enviroment

variables

Page 6: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

What is ac_endpoint?

Page 7: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

docker-machine create

docker-machine create --driver arubacloud \ --ac_username "ARU-XXXX" \ --ac_password "xxxxxxx" \ --ac_endpoint "dc1" \ --ac_template "ubuntu1604_x64_1_0" \ --ac_size "Large" \ --ac_admin_password "yyyyyyyy" \ --ac_action "NewSmart" \ MyDockerHostName

Page 8: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Attach and Reset Server

• Reset of Smart machines (ex. to change

OS)

• How to reset a dockerized smart server?

• Attach Docker to preexisting machines

Page 9: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Attach and Reset Server

docker-machine create --driver arubacloud \ --ac_username "ARU-XXXX" \ --ac_password "xxxxxxx" \ --ac_endpoint "dc1" \ --ac_action "Attach" \ --ac_ip "xx.xx.xx.xx" \ --ac_ssh_key "private_key_path" \ MyDockerExistingHostName

Page 10: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Supported Commands

• Create

• Start

• Stop

• Restart

• Kill

• Remove

Page 11: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Supported Commands

docker-machine env MyDockerHostName export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://77.81.236.228:2376" export DOCKER_CERT_PATH="C:\Users\marco.barzaghi\.docker\machine\machines\MyDockerHostName" export DOCKER_MACHINE_NAME="MyDockerHostName" export COMPOSE_CONVERT_WINDOWS_PATHS="true" # Run this command to configure your shell: # eval $("C:\Program Files\Docker\Docker\Resources\bin\docker-machine.exe" env MyDockerHostName)

Page 12: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Supported Commands

docker-machine stop MyDockerHostName Stopping "MyDockerHostName"... Machine "MyDockerHostName" was stopped.

docker-machine start MyDockerHostName Starting " MyDockerHostName "... Machine " MyDockerHostName " was started. Waiting for SSH to be available... Detecting the provisioner... Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.

Page 13: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Verify Docker Engine (1/2)

docker run -d -p 8000:80 --name webserver kitematic/hello-world-nginx Unable to find image 'kitematic/hello-world-nginx:latest' locally latest: Pulling from kitematic/hello-world-nginx a285d7f063ea: Pull complete 2d7baf27389b: Pull complete ... Digest: sha256:ec0ca6dcb034916784c988b4f2432716e2e92b995ac606e080c7a54b52b87066 Status: Downloaded newer image for kitematic/hello-world-nginx:latest 942dfb4a0eaae75bf26c9785ade4ff47ceb2ec2a152be82b9d7960e8b5777e65

Page 14: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Verify Docker Engine (2/2)

In a web browser, go to http://<IP>:8000 to bring up the webserver home page.

Page 15: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Notes

• Command rm deletes the remote server

• With Pro machines command rm does not

delete ip address • don’t forget to remove the purchased IP address using the web

dashboard if you don't need it anymore

• With Pro machines it is possible to reuse

an ip Address with argument ac_ip • --ac_ip=“xx.xx.xx.xx”

Page 16: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Aruba Cloud Platform

{api}

Docker

machine

Hypervisor

ssh

Aruba Cloud

Page 17: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

How to Create an Account?

• Go to cloud.it • Get a free voucher at https://www.cloud.it/prova-

cloud-aruba.aspx

• Top up your account

• We’ll send your Aruba Cloud credentials

via email

Page 18: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

References

• Cloud.it

• https://github.com/Arubacloud/docker-

machine-driver-arubacloud

• http://kb.cloud.it

[email protected]

Page 19: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Become a Contributor

• https://github.com/arubacloud

Page 20: Create and use a Dockerized Aruba Cloud server - CloudConf 2017

Thanks