Developing through containers is not only a fashion wave for coding in your PC/MAC (aka devbox) using library limitless, but a real opportunity to operate from dev to production environemnts without system administration knowledge. With vcloud air and docker, any developers will get all application controls in your devbox.
Sometimes people things: << vcloud director and vcloud air are only cloud infrastruscture as a Service... Platform as a Service is another thing>>. Well! It's time di think different stating with a little vcloud vdatacenter and docker-machine (Suggest to use docker-toolbox which contains docker environment, docker-machine, kitematik...)
Setup vCloud Air (vchs)!
The first thing is: start pay vdatacenter and wait for activation: VMware vcloud air personell could help you to acheive it without blocks or fears!
One of the important thing to do is to write down available ip, because there is a 1:1 relationship between docker host and public ip and 1:many between public ip and containers. From behind docker machine will works by ip: in some scenarios the use of routed ip's could be enough to start using containers without the need of public ip.
In summary these parameters are mandatory to deliver a docker host in cloud:
- vcloud id (or tenant id)
- public ip (be sure that edge gateway has a vaild dns)
- vcloud tenant with vm creation permissions:
...and after user confirmation don't forget to assign vDC resource: http://pubs.vmware.com/vca/index.jsp?topic=%2Fcom.vmware.vca.ug.doc%2FGUID-A6EDBE95-24CA-4AA6-9C1E-AF0A3D8CE57A.html
Install docker toolbox (with kitemitik)
This is the devbox side, and I don't wont to tell how to double click the install file and follow the clear installation instruction provided in the official website. I leave your play with https://www.docker.com/products/docker-toolbox.
Another things to do is the creation of a docker-hub and a git-hub accounts (if you don't have one of these):
Deploy and use docker-host
Finally this is the coolest part of the show: run your first container host.
To acheive this simply run this command from your cmd (or shell) in the devbox machine:
docker-machine create --driver vmwarevcloudair --vmwarevcloudair-username=xxxxxxxxxx \--vmwarevcloudair-password=xxxxxxxx --vmwarevcloudair-vdcid=mxxxxxxx-xxxx \--vmwarevcloudair-publicip=aa.bb.cc.dd docker-vchs-01
After few minutes system must go on (you could check vm operations simply opening vchs console via vcloud director portal)
In some cases default catalog could be return many errors generated during docker installation problem... this is due a ubuntu catalog problem.
To solve this you shoud ssh into machine using docker-machine ssh command... then remove (or better move out) vchs repository under /etc/apt/sources.list.d/
then launch the provision command:
... well system is up and running with this effort:
- 1 user creation and or login in vcloud air
- a piece of notepad
- 1 command
- 1 problem that hope could be solved by waiting vchs team or changing catalog.
- no sysadmin intervention
Simplify application delivery from dev to prod
Now it's time to devel your first application in devbox and in production simply using docker-machine command and moving between these 2 environment:
& "C:\Program Files\Docker Toolbox\docker-machine.exe" env default | Invoke-Expression
then deliver your first application like drupal:
docker run --name druapl-dev -p 8080:80 -d drupal
& "C:\Program Files\Docker Toolbox\docker-machine.exe" env docker-vchs-01 | Invoke-Expression
then deploy drupal in production
docker run --name druapl-prod -p 80:80 -d drupal
Now it's time to enjoy these 2 apps and start developing components, modify something and working with containers without limits, without vpn, and from your dev machine!
...and wow!!! No sysadmin has aided you during these operations! Dear devops welcome to your new working environment.