-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
hengxin edited this page Oct 2, 2016
·
3 revisions
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
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.
- 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/
- Create a network for docker (cf. bridge-network).
- create:
docker network create chameleon-network - inspect:
docker network inspect chameleon-network
- Launch a
mastercontainer for the master.
- launch a container for oracle-jdk on the
chameleon-networkand mount the$JAR_DIRdirectory 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
- launch and amount:
- inspect its ip
docker network inspect chameleon-network
- update the master ip to the ip of the
mastercontainer in themembership.propertiesfile
- Run
chameleon-kvs-master.jarin themastercontainer
- execute
bashin themastercontainerdocker exec -ti master bash
- run
- first
cd /var/lib/java - then
./chameleon-kvs-master.jar
- first
-
Start a collection of
slave#idcontainers for the slaves. -
Start a
clientcontainer 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
- Run
chameleon-kvs-client.jarin theclientcontainer
docker exec -ti client bashcd /var/lib/java./chameleon-kvs-master.jar
This deployment needs