Ganger
Netease OpenSource Home

 Quick Info

Version:
Authors:Zhihui Jiao
Tags
java automatation

 Activities

  • update readme

    m README.md
    
    update readme
    2012-08-24 15:33:36
  • update readme

    m README.md
    
    update readme
    2012-07-24 16:48:55
  • update readme

    m README.md
    
    update readme
    2012-07-24 16:36:25
  • update readme

    m README.md
    
    update readme
    2012-07-24 16:31:27
  • update readme

    m README.md
    
    update readme
    2012-07-24 16:29:21
  • update readme

    m README.md
    
    update readme
    2012-07-24 16:27:43
  • update readme

    m README.md
    
    update readme
    2012-07-24 16:18:15
  • update readme

    m README.md
    
    update readme
    2012-07-24 15:45:45
  • update readme

    m README.md
    
    update readme
    2012-07-24 15:43:29
  • update readme and add some comments

    + AUTHORS
    + LICENSE.mit
    m README.md
    m src/main/java/com/netease/automate/exception/IllegalConfigException.java
    m src/main/java/com/netease/automate/master/AutoMaster.java
    m src/main/java/com/netease/automate/master/MasterConsole.java
    m src/main/java/com/netease/automate/master/SlaveActionWatcher.java
    m src/main/java/com/netease/automate/master/SlaveStatusWatcher.java
    m src/main/java/com/netease/automate/master/action/AbstractAction.java
    m src/main/java/com/netease/automate/master/action/Action.java
    m src/main/java/com/netease/automate/master/action/ActionFactory.java
    m src/main/java/com/netease/automate/master/entity/AbstractProcess.java
    m src/main/java/com/netease/automate/master/entity/Entity.java
    m src/main/java/com/netease/automate/master/entity/PackageSupervisor.java
    m src/main/java/com/netease/automate/master/entity/RootProcess.java
    m src/main/java/com/netease/automate/master/event/EventWatcher.java
    m src/main/java/com/netease/automate/master/task/AddTask.java
    m src/main/java/com/netease/automate/master/task/DeleteTask.java
    m src/main/java/com/netease/automate/master/task/Task.java
    m src/main/java/com/netease/automate/master/task/TaskFactory.java
    m src/main/java/com/netease/automate/slave/AutoSlave.java
    m src/main/java/com/netease/automate/slave/ProcessHolder.java
    m src/main/java/com/netease/automate/utils/JsonUtils.java
    m src/main/java/com/netease/automate/utils/LogUtils.java
    
    update readme and add some comments
    2012-07-24 15:40:38
  • bugfix for slave status and process event notify

    m src/main/java/com/netease/automate/master/AutoMaster.java
    m src/main/java/com/netease/automate/master/MasterConsole.java
    m src/main/java/com/netease/automate/master/SlaveStatusWatcher.java
    m src/main/java/com/netease/automate/master/action/RestartAction.java
    m src/main/java/com/netease/automate/slave/AutoSlave.java
    
    bugfix for slave status and process event notify
    2012-04-24 11:46:25
  • update readme

    m README
    
    update readme
    2012-04-11 16:12:09
  • init commit

    + .gitignore
    + MIT-LICENSE.txt
    + README
    + build.xml
    + doc/user manual.pdf
    + doc/user manual.tex
    + lib/event-0.0.1.jar
    + lib/jgrapht-jdk1.6.jar
    + lib/jline-0.9.94.jar
    + lib/zookeeper-3.3.4.jar
    + pom.xml
    + sample/xmpp.properties
    + src/main/bin/auto-slave.sh
    + src/main/bin/ganger.sh
    + src/main/bin/launch.sh
    + src/main/java/com/netease/automate/exception/AutomateException.java
    + src/main/java/com/netease/automate/exception/ExecuteOsCmdException.java
    + src/main/java/com/netease/automate/exception/IllegalConfigException.java
    + src/main/java/com/netease/automate/exception/PackageNotLaunchedException.java
    + src/main/java/com/netease/automate/exception/ProcessLaunchedException.java
    + src/main/java/com/netease/automate/exception/ProcessNotLaunchedException.java
    + src/main/java/com/netease/automate/exception/SlaveOfflineException.java
    + src/main/java/com/netease/automate/exception/ZooKeeperException.java
    + src/main/java/com/netease/automate/master/AutoMaster.java
    + src/main/java/com/netease/automate/master/MasterConsole.java
    + src/main/java/com/netease/automate/master/SlaveActionWatcher.java
    + src/main/java/com/netease/automate/master/SlaveStatusWatcher.java
    + src/main/java/com/netease/automate/master/action/AbstractAction.java
    + src/main/java/com/netease/automate/master/action/Action.java
    + src/main/java/com/netease/automate/master/action/ActionFactory.java
    + src/main/java/com/netease/automate/master/action/ActionOrder.java
    + src/main/java/com/netease/automate/master/action/DeployAction.java
    + src/main/java/com/netease/automate/master/action/LaunchAction.java
    + src/main/java/com/netease/automate/master/action/RestartAction.java
    + src/main/java/com/netease/automate/master/action/StatusAction.java
    + src/main/java/com/netease/automate/master/action/StopAction.java
    + src/main/java/com/netease/automate/master/entity/AbstractProcess.java
    + src/main/java/com/netease/automate/master/entity/Entity.java
    + src/main/java/com/netease/automate/master/entity/PackageSupervisor.java
    + src/main/java/com/netease/automate/master/entity/RootProcess.java
    + src/main/java/com/netease/automate/master/entity/RuntimeProcess.java
    + src/main/java/com/netease/automate/master/event/EventTypes.java
    + src/main/java/com/netease/automate/master/event/EventWatcher.java
    + src/main/java/com/netease/automate/master/event/ProcessEventContext.java
    + src/main/java/com/netease/automate/master/event/ProcessEventHandler.java
    + src/main/java/com/netease/automate/master/task/AddTask.java
    + src/main/java/com/netease/automate/master/task/CommonPackageTask.java
    + src/main/java/com/netease/automate/master/task/DeleteTask.java
    + src/main/java/com/netease/automate/master/task/Task.java
    + src/main/java/com/netease/automate/master/task/TaskFactory.java
    + src/main/java/com/netease/automate/master/task/ZKMessageTask.java
    + src/main/java/com/netease/automate/meta/ActionStatus.java
    + src/main/java/com/netease/automate/meta/Config.java
    + src/main/java/com/netease/automate/meta/Global.java
    + src/main/java/com/netease/automate/meta/MasterMeta.java
    + src/main/java/com/netease/automate/meta/MessageMeta.java
    + src/main/java/com/netease/automate/meta/PackageMeta.java
    + src/main/java/com/netease/automate/meta/ProcessMeta.java
    + src/main/java/com/netease/automate/meta/ProcessStatus.java
    + src/main/java/com/netease/automate/meta/ProjectMeta.java
    + src/main/java/com/netease/automate/meta/SlaveStatus.java
    + src/main/java/com/netease/automate/meta/SlaveTarget.java
    + src/main/java/com/netease/automate/slave/AutoSlave.java
    + src/main/java/com/netease/automate/slave/ProcessHolder.java
    + src/main/java/com/netease/automate/slave/SlaveMessageWatcher.java
    + src/main/java/com/netease/automate/utils/JsonUtils.java
    + src/main/java/com/netease/automate/utils/LogUtils.java
    + src/main/java/com/netease/automate/utils/Tree.java
    + src/main/java/com/netease/automate/utils/TreeNode.java
    + src/main/java/com/netease/automate/utils/Utils.java
    + src/main/resources/log4j.properties
    + src/test/java/com/netease/automate/test/master/ConfigMetaTest.java
    + src/test/java/com/netease/automate/test/master/PackageDependenceTest.java
    + src/test/java/com/netease/automate/test/master/ProcessTreeTest.java
    + src/test/java/com/netease/automate/test/master/TopologicalOrderTest.java
    + src/test/java/com/netease/automate/test/utils/JsonUtilsTest.java
    + src/test/java/com/netease/automate/test/utils/PatternTest.java
    + src/test/java/com/netease/automate/test/utils/WatcherTest.java
    
    init commit
    2012-04-11 14:48:07
 
 

PROJECTS

 

Ganger

 
Ganger is a simple automate tool. It can automate deploy packages, launch target processes, update packages deployment(kill the old process and launch the new one), restart target processes and monitor the status of target process.
It saves your time for development, and make it easier to deploy your systems on many target machines simultaneously.

Features

Automatation: help you do some automate tasks, for example: deploy packages, start processes, stop processes and update deployments etc. (Note: deploy action ONLY support compressed binary executables(.tar.gz) currently.)

Lifecycle management: you can start, stop, restart or update the target process.

Dependence management: we organize the package as a directed graph with no cycles, when a process of a package crashed or started, the processes of the package which depend on it will be notified. Automate action will operate on packages as the topological order of the dependence graph(or reverse order for actions similar to stop).

Status monitor: monitor the target process's status.

Getting Started

Clone this repo

git clone git://github.com/netease/ganger.git

and run

ant release

this will create two files in directory target/release: auto-master-x.x.x.tar.gz for master node, auto-slave-x.x.x.tar.gz for slave node.

Before doing the actual work, you need to setup a ZooKeeper instance, and use the address to start master and slave nodes.

Start ganger in three steps: 1) start the ZooKeeper instance; 2) start the slave nodes by using bin/auto-slave.sh; 3) start the master node by using bin/ganger.sh.

Use ganger as following:

load ../sample/xmpp.properties  # load a project configuration file
deploy xmpp  # deploy the packages defined by this project 
launch xmpp  # and lauch them

See here for a sample configuration format for a project.

Document

See user manual here

Projects Links