GithubHelp home page GithubHelp logo

tomzhang / clocker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brooklyncentral/clocker

0.0 2.0 0.0 3.45 MB

Brooklyn managed Docker containers

License: Apache License 2.0

CSS 0.45% HTML 1.51% JavaScript 1.04% Java 95.05% Shell 1.97%

clocker's Introduction

Clocker

Clocker creates and manages a Docker cloud infrastructure. Clocker supports single-click deployment and runtime management of multi-node applications that can run on containers distributed across multiple hosts. Plugins are included for both Project Calico and Weave to provide seamless Software-Defined Networking integration. Application blueprints written for Apache Brooklyn can thus be deployed to a distributed Docker Cloud infrastructure.

This repository contains all of the required Brooklyn entities, locations and examples.

Build Status Latest Builds ![Gitter](https://badges.gitter.im/Join Chat.svg)

Getting started

To get started, you just have to download the Clocker distribution archive, deploy one of the Docker Cloud blueprints 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 will find the Docker Cloud infrastructure blueprints at either docker-cloud-weave.yaml or docker-cloud-calico.yaml depending on your choice of SDN provider.

Using the latest Clocker release

The latest version of Clocker is 0.8.2. You can deploy your own Docker Cloud with a Weave SDN by running these commands with the network argument st to weave, to use Project Calico as your SDN provider, change the last argument to calico instead:

% wget --no-check-certificate --quiet \
    -O brooklyn-clocker-dist.tar.gz http://git.io/vkVBD
% tar zxf brooklyn-clocker-dist.tar.gz
% cd brooklyn-clocker
% ./bin/clocker.sh location network

The location argument specifies the destination to deploy to.

For example, you can specify the jclouds provider for SoftLayer in San Jose by using jclouds:softlayer:sjc01, a group of machines as byon:(hosts="10.1.2.3,10.1.2.4") or a specific location from your brooklyn.properties file as named:alias.

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 Docker Cloud 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"

A blueprint for an application using a Docker image would look like this:

location: my-docker-cloud
services:
- type: docker:redis:2.8.19
  openPorts:
  - 6379
  directPorts:
  - 6379

Building from source

The master branch of Clocker is at version 0.9.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 network
    ...

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.

Getting involved

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.

Documentation

Please visit the Wiki for more details.


Copyright 2014-2015 by Cloudsoft Corporation Limited.

clocker's People

Contributors

grkvlt avatar andreaturli avatar brooklyn-images avatar aledsage avatar csabapalfi avatar mattunderscorechampion avatar neykov avatar ahgittin avatar duncangrant avatar cpuguy83 avatar

Watchers

mingfeng.zhang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.