This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:oar-docker [2020/02/18 17:58] – [Getting started] auguste | wiki:oar-docker [2020/03/31 15:43] (current) – [Intallation and usage] neyron | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== | ====== | ||
- | oar-docker is a set of docker | + | OAR-docker is a tool to setup a cluster |
- | OAR-docker's repository | + | OAR-docker is the perfect tool for testing OAR developments. It also allows prototyping the use of other tools on top of OAR. |
- | It's currently in active development, | + | |
- | ====== | + | A deployment of a sandbox |
- | Various case scenarios may affect you: | + | ==== Intallation and usage ==== |
+ | * oar-docker is a python package available from the public repository, see: https:// | ||
- | * Quickly test OAR on a cluster | + | * oar-docker |
- | * Gain time: a ten-node cluster (or more) is launched in just a few seconds and is cleaned in less than a second. | + | |
- | * Save resources: | + | |
- | * Synced volume : allowing you to continue working | + | |
- | + | ||
- | ====== | + | |
- | + | ||
- | Requirements: | + | |
- | + | ||
- | * python 2.7 | + | |
- | * docker >= 1.3 | + | |
- | + | ||
- | 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 | + | |
- | </ | + | |
- | + | ||
- | Or from git (last development version): | + | |
- | + | ||
- | <code console> | + | |
- | $ pip install git+https:// | + | |
- | </ | + | |
- | + | ||
- | Or if you already pulled the sources: | + | |
- | + | ||
- | <code console> | + | |
- | $ pip install path/ | + | |
- | </ | + | |
- | + | ||
- | Or if you want to install in the python user context (in your home directory), add the ' | + | |
- | < | + | |
- | pip install --user oar-docker | + | |
- | </ | + | |
- | + | ||
- | Or if you don't have pip: | + | |
- | + | ||
- | <code console> | + | |
- | $ easy_install oar-docker | + | |
- | </ | + | |
- | ====== Usage ===== | + | |
- | + | ||
- | Usage: oardocker [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]... | + | |
- | + | ||
- | Manage a small OAR developpement cluster with docker. | + | |
- | + | ||
- | Options: | + | |
- | --workdir DIRECTORY | + | |
- | --docker-host TEXT The docker socket [default: | + | |
- | --cgroup-path TEXT The cgroup file system path [default: / | + | |
- | --docker-binary TEXT The docker client binary [default: docker] | + | |
- | --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 | + | |
- | + | ||
- | ====== | + | |
- | + | ||
- | To get started with oar-docker, the first thing to do is to initialize a project: | + | |
- | + | ||
- | <code console> | + | |
- | $ oardocker init | + | |
- | </ | + | |
- | + | ||
- | If you already have OAR sources, the best is to initialize directly the oardocker project in the OAR sources directory: | + | |
- | + | ||
- | <code console> | + | |
- | $ cd path/ | + | |
- | $ oardocker init | + | |
- | </ | + | |
- | + | ||
- | You have to do this only once. It allows you to import the Dockerfiles and other configuration files. We then launch the base image build: | + | |
- | + | ||
- | <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 oar-2.5.4+rc4.tar.gz start -n 4 connect -l root frontend | + | |
- | </ | + | |
- | + | ||
- | 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:/ | + | |
- | </ | + | |
- | + | ||
- | 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). | + | |
+ | See the **README** file either on [[https:// | ||
+ | ==== Examples ==== | ||
+ | * [[oardocker setup for Grid' |