This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
wiki:oar-docker [2014/09/04 10:25] – [Logs] neyron | wiki:oar-docker [2015/05/06 20:51] – [Logs] neyron | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== | ====== | ||
- | OAR-docker is a set of docker images especially configured for deploying your own OAR cluster. The main idea is to have a mini development cluster with a frontend, a server and some nodes that launch in just a few seconds on a simple laptop. | + | oar-docker is a set of docker images especially configured for deploying your own OAR cluster. The main idea is to have a mini development cluster with a frontend, a server and some nodes that launch in just a few seconds on a simple laptop. |
+ | |||
+ | OAR-docker' | ||
+ | It's currently in active development, | ||
====== | ====== | ||
Line 12: | Line 15: | ||
* Synced volume : allowing you to continue working on your host machine, but use the resources in the guest machine to compile or run your project. | * Synced volume : allowing you to continue working on your host machine, but use the resources in the guest machine to compile or run your project. | ||
- | ====== | + | ====== |
+ | Requirements: | ||
+ | * python 2.7 | ||
+ | * docker >= 1.3 | ||
- | [[https:// | + | You can install, upgrade, uninstall oar-docker with these commands: |
+ | <code console> | ||
+ | $ pip install oar-docker | ||
+ | $ pip install --upgrade oar-docker | ||
+ | $ pip uninstall oar-docker | ||
+ | </ | ||
- | ====== Download ===== | + | Or from git (last development version): |
- | OAR-docker' | + | <code console> |
- | It's currently an alpha-release, | + | $ pip install git+https:// |
+ | </ | ||
- | < | + | Or if you already pulled the sources: |
- | $ git clone https:// | + | |
+ | < | ||
+ | $ pip install path/to/sources | ||
</ | </ | ||
- | Please send us any feedback | + | Or if you want to install in the python user context (in your home directory), add the '--user' option to all pip commands: |
+ | < | ||
+ | pip install --user oar-docker | ||
+ | </ | ||
- | ====== | + | Or if you don't have pip: |
- | * A minimal Ubuntu base image modified for Docker-friendliness_ | + | <code console> |
- | * Got a Minute? Spin up a Spark cluster on your laptop with Docker_ | + | $ easy_install oar-docker |
+ | </ | ||
+ | ====== Usage ===== | ||
+ | Usage: oardocker [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]... | ||
- | --- //[[salem.harrache@imag.fr|Salem Harrache]] 2014/05/22 10:05// | + | Manage a small OAR developpement cluster with docker. |
+ | |||
+ | Options: | ||
+ | | ||
+ | | ||
+ | --cgroup-path TEXT The cgroup file system path [default: / | ||
+ | --docker-binary TEXT The docker client binary | ||
+ | --version | ||
+ | -h, --help | ||
+ | |||
+ | Commands: | ||
+ | build Build base images | ||
+ | clean | ||
+ | connect | ||
+ | destroy | ||
+ | init Initialize a new environment. | ||
+ | install | ||
+ | logs Fetch the logs of all containers. | ||
+ | ssh | ||
+ | ssh-config | ||
+ | start | ||
+ | status | ||
+ | stop Stop and remove all containers | ||
- | docker-oarcluster now takes a OAR tarball as parameter. You can use either | + | ====== |
- | < | + | |
- | docker-oarcluster$ ./build.sh http:// | + | To get started with oar-docker, the first thing to do is to initialize a project: |
- | ... | + | |
+ | < | ||
+ | $ oardocker init | ||
</ | </ | ||
- | Or a freshly generated tarball, from your GIT clone of OAR's repository, e.g. (assuming | + | |
- | < | + | If you already |
- | oar$ make tarball | + | |
- | ./misc/ | + | < |
- | Using the Git repository '/ | + | $ cd path/to/oar/src |
- | Using the Git tree-ish | + | $ oardocker init |
- | ../tarballs/ | + | |
- | oar$ cd ../ | + | |
- | docker-oarcluster$ ./build.sh ../ | + | |
- | ... | + | |
</ | </ | ||
- | --- // | ||
- | We renamed | + | You have to do this only once. It allows you to import the Dockerfiles and other configuration files. |
+ | |||
+ | <code console> | ||
+ | $ oardocker build | ||
+ | </ | ||
+ | |||
+ | Now, we have to install OAR. To do this, several options are available. If you already have the OAR sources: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker install . ## ou . est le chemin vers les sources de OAR | ||
+ | </ | ||
+ | |||
+ | Or if you want to install from tarball: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker install http:// | ||
+ | </ | ||
+ | |||
+ | You can also launch the installation from a git repository: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker install git+https:// | ||
+ | </ | ||
+ | |||
+ | We start a OAR cluster with 5 nodes: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker start -n 5 | ||
+ | </ | ||
+ | |||
+ | It is possible to share directories between host machines and all containers with the '' | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker start -v $PWD:/ | ||
+ | </ | ||
+ | |||
+ | To manage the cluster: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker connect frontend|server|nodeXX | ||
+ | $ oardocker logs [frontend|server|nodeXX] | ||
+ | </ | ||
+ | |||
+ | To clean: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker stop ## stops and removes all containers | ||
+ | $ oardocker clean ## removes all stopped containers (failed) and the untagged images < | ||
+ | $ oardocker destroy | ||
+ | </ | ||
+ | |||
+ | With oar-docker, it is possible to chain all commands to go faster: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker init -f build install | ||
+ | </ | ||
+ | |||
+ | For instance, to develop on OAR, we often need to install OAR, start the cluster and connect to it: | ||
+ | |||
+ | <code console> | ||
+ | $ oardocker install $PWD start -n 10 -v $PWD:/home/docker/oar_src connect frontend | ||
+ | </ | ||
+ | |||
+ | One last thing to know. The '' | ||
+ | |||
+ | |||
+ | ====== | ||
+ | |||
+ | oar-docker is a development project and a testing one. It is in no way secure. | ||
+ | Besides, the private ssh key used is also insecured since it is public (you can | ||
+ | find it in the sources). | ||
- | --- // |