Skip to content
hengxin edited this page Oct 2, 2016 · 3 revisions

Packaging

Because the chameleon project is managed by maven, the key to success in packaging is letting maven do all these stuffs for you. You are not encouraged to do it manually with or without the help of your favorite IDE.

The chameleon project contains a maven configuration file named pom.xml. The simple command mvn:install would suffice.

  • More details about packaging

Deployment

We describe three ways of deployment, from the easiest one on a local host to the hardest one in cloud. They all use the docker technology.

Deploy chameleon in dockers on a local host

  1. Choose a working directory.
  • chameleon-kvs-master.jar, chameleon-kvs-client.jar, and ``
  • put them under the same directory $JAR_DIR, for example, ~/eclipse-mars-projects/chameleon-docker/
  1. Create a network for docker (cf. bridge-network).
  • create: docker network create chameleon-network
  • inspect: docker network inspect chameleon-network
  1. Launch a master container for the master.
  • launch a container for oracle-jdk on the chameleon-network and mount the $JAR_DIR directory to it.
    • launch and amount: docker run --net=chameleon-network -itd --name=master -v ~/eclipse-mars-projects/chameleon-docker:/var/lib/java airdock/oracle-jdk:1.8
  • inspect its ip
    • docker network inspect chameleon-network
  • update the master ip to the ip of the master container in the membership.properties file
  1. Run chameleon-kvs-master.jar in the master container
  • execute bash in the master container
    • docker exec -ti master bash
  • run
    • first cd /var/lib/java
    • then ./chameleon-kvs-master.jar
  1. Start a collection of slave#id containers for the slaves.

  2. Start a client container for a client.

  • docker run --net=chameleon-network -itd --name=client -v ~/eclipse-mars-projects/chameleon-docker:/var/lib/java airdock/oracle-jdk:1.8
  1. Run chameleon-kvs-client.jar in the client container
  • docker exec -ti client bash
  • cd /var/lib/java
  • ./chameleon-kvs-master.jar

Deploy chameleon in dockers on multiple hosts

This deployment needs

Clone this wiki locally