CREATE AND USE A
DOCKERIZED ARUBA CLOUD SERVER
16th March 2017
Turin, Cloud Conference 2017
#cloudconf2017
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
ArubaCloud Solutions
• PRO Server (VMware, Hyper-V)
• flexible configuration
• cost per hour
• Smart Server (VMware with SSD storage)
• available in 4 sizes
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
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
What is ac_endpoint?
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
Attach and Reset Server
• Reset of Smart machines (ex. to change
OS)
• How to reset a dockerized smart server?
• Attach Docker to preexisting machines
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
Supported Commands
• Create
• Start
• Stop
• Restart
• Kill
• Remove
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)
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.
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
Verify Docker Engine (2/2)
In a web browser, go to http://<IP>:8000 to bring up the webserver home page.
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”
Aruba Cloud Platform
{api}
Docker
machine
Hypervisor
ssh
Aruba Cloud
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
References
• Cloud.it
• https://github.com/Arubacloud/docker-
machine-driver-arubacloud
• http://kb.cloud.it
Become a Contributor
• https://github.com/arubacloud
Thanks