Clocker creates and manages a Docker cloud infrastructure. Clocker support single-click deployment and runtime management of multi-node applications that can run on containers distributed across multiple hosts, using the Weave SDN. Application blueprints written for Brooklyn can thus be deployed to a distributed Docker Cloud Infrastructure.
This repository contains the required Brooklyn entities, locations and examples.
To get started, you just have to download Clocker, deploy the Docker Cloud blueprint to the cloud or machines of your choice, and then use Clocker to deploy your applications. This will automatically create the required Docker containers.
You can create a Docker based cloud infrastructure on your favourite cloud provider or on a private cloud using any of the jclouds supported APIs. Alternatively you can target one or more existing machines for running Docker.
If you are keen to peek under the covers, you can find the Docker cloud infrastructure blueprint at docker-cloud.yaml.
The latest version of Clocker is 0.7.0. You can deploy this Docker Cloud Infrastructure by running these commands:
% wget --no-check-certificate --quiet \
-O brooklyn-clocker-dist.tar.gz http://git.io/w8jsYQ
% tar zxf brooklyn-clocker-dist.tar.gz
% cd brooklyn-clocker
% ./bin/clocker.sh location
Where location specifies the destination to deploy to. For example this can be a jclouds provider
like jclouds:softlayer:sjc01, a group of machines byon:(hosts="10.1.2.3,10.1.2.4") or a named
location from your brooklyn.properties
file.
For all cloud locations you must first configure the ~/.brooklyn/brooklyn.properties
file with any
necessary credentials and security details, and select an SSH key (defaulting to ~/.ssh/id_rsa
).
A basic brooklyn.properties
file should look like the following:
brooklyn.ssh.config.privateKeyFile = ~/.ssh/id_rsa_clocker
brooklyn.ssh.config.publicKeyFile = ~/.ssh/id_rsa_clocker.pub
brooklyn.location.jclouds.softlayer.identity = user.name
brooklyn.location.jclouds.softlayer.credential = softlayersecretapikey
brooklyn.location.named.Softlayer\ California = jclouds:softlayer:sjc01
brooklyn.location.jclouds.aws-ec2.identity = ACCESS_KEY
brooklyn.location.jclouds.aws-ec2.credential = awssecretkey
brooklyn.location.named.Amazon\ Ireland = jclouds:aws-ec2:eu-west-1
For more information on setting up locations, including supplying cloud provider credentials, see the Setting up Locations section of Brooklyn Getting Started, and the more detailed locations guide. The Brooklyn documentation also covers setting up security for the web-console, and configuring users and passwords.
The Brooklyn web-console, which will be deploying and managing your Docker Cloud, can be accessed at http://localhost:8081 - this URL will have been written to standard out during startup. A preview of the new Clocker web-console, which shows a summary of the deployed Docker Clouds, is also available on the same server, at http://localhost:8081/clocker/.
Once the DockerCloud
application has started, a new location named my-docker-cloud
will be
available in the Locations drop-down list when adding new applications. Simply start a new application in this location
and it will use Docker containers instead of virtual machines.
For more information on deploying applications from the Brooklyn catalog, see Getting Started - Policies and Catalogs. You can also paste a YAML blueprint into the YAML tab of the Add Application dialog, as follows:
location: my-docker-cloud
services:
- type: brooklyn.entity.webapp.jboss.JBoss7Server
brooklyn.config:
wars.root:
- "https://s3-eu-west-1.amazonaws.com/brooklyn-clocker/hello-world.war"
The master branch of Clocker is at version 0.8.0-SNAPSHOT. Build and run this version of Clocker from source as follows:
% git clone https://github.com/brooklyncentral/clocker.git
...
% cd clocker
% mvn clean install
...
% tar zxf examples/target/brooklyn-clocker-dist.tar.gz
% cd brooklyn-clocker
% ./bin/clocker.sh location
...
If you just want to test the latest code, then our Travis CI build runs for every commit and the resulting distribution files are archived and made available for download on Amazon S3.
Clocker is Apache 2.0 licensed, and builds on the
Apache Brooklyn project. Please get involved and join the
discussion on Freenode, IRC #brooklyncentral
or the Apache Brooklyn
community mailing list. We also maintain a
Trello board with the current roadmap and active tasks.
Please visit the Wiki for more details.
Copyright 2014 by Cloudsoft Corporation Limited.