Skip to contentSkip to conversation

Running a single teuthology job locally using containers

DISCUSSION Ivo Jimenez 3 participants 6 messages Sep 3, 2015 – Sep 11, 2015 2 messages not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

This describes how to run teuthology jobs using docker in three "easy" steps, with the goal of shortening the develop/build/test cycle for integration-tested code.

1. Write a file containing an entire teuthology job (tasks, targets and roles in a YAML file):

```yaml
sshkeys: ignore
roles:
- [mon.0, osd.0, osd.1, osd.2, client.0]
tasks:
- install.ship_utilities:
- ceph:
conf:
mon:
debug mon: 20
debug ms: 1
debug paxos: 20
osd:
debug filestore: 20
debug journal: 20
debug ms: 1
debug osd: 20
- radosbench:
clients: [client.0]
targets:
'root@localhost:2222': ssh-dss ignored
```

The sshkeys option is required and the install.ship_utilities should be the first task to execute. Also, ~/.teuthology.yaml should look like this:

```yaml
lab_domain: ''
lock_server: ''
```

2. Initialize a cephdev container (the following assumes $PWD is

    the folder containing the ceph code in your machine):

    ```bash
    docker run \
      --name remote0
      -p 2222:22
      -d -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" \
      -v `pwd`:/ceph \
      -v /dev:/dev \
      -v /tmp/ceph_data/$RANDOM:/var/lib/ceph \
      --cap-add=SYS_ADMIN --privileged \
      --device /dev/fuse
      ivotron/cephdev
    ```

3. Execute teuthology using the wip-11892-docker branch:

    ```bash
    teuthology \
      -a ~/archive/`date +%s` \
      --suite-path /path/to/ceph-qa-suite/ \
      ~/test.yml
    ```

Caveats:

* only a single job can be executed and has to be manually assembled. I plan to work on supporting suites, which, in short, implies stripping out the install task from existing suites and leaving only the install.ship_utilities subtask instead (the container image has all the dependencies in it already).
* I have only tried the above with the radosbench and ceph-fuse tasks. Using --cap-add=ALL and -v /lib/modules:/lib/modules flags allows a container to load kernel modules so, in principle, it should work for rbd and kclient tasks but I haven't tried it yet.
* For jobs specifying multiple remotes, multiple containers can be launched (one per remote). While it is possible to run these on the same docker host, the way ceph daemons dynamically bind to ports in the 6800-7300 range makes it difficult to determine which ports to expose from each container (exposing the same port from multiple containers in the same host is not allowed, for obvious reasons). So either each remote runs on a distinct docker host machine, or a deterministic port assignment is implemented such that, for example, 6800 is always assigned to osd.0, regardless of where it runs.

Cheers,
ivo

#2 lore raw

Hi,

Quoted 40 lines · Ivo Jimenez

This describes how to run teuthology jobs using docker in three "easy" steps, with the goal of shortening the develop/build/test cycle for integration-tested code.

1. Write a file containing an entire teuthology job (tasks, targets and roles in a YAML file):

```yaml
sshkeys: ignore
roles:
- [mon.0, osd.0, osd.1, osd.2, client.0]
tasks:
- install.ship_utilities:
- ceph:
conf:
mon:
debug mon: 20
debug ms: 1
debug paxos: 20
osd:
debug filestore: 20
debug journal: 20
debug ms: 1
debug osd: 20
- radosbench:
clients: [client.0]
targets:
'root@localhost:2222': ssh-dss ignored
```

The sshkeys option is required and the install.ship_utilities should be the first task to execute. Also, ~/.teuthology.yaml should look like this:

```yaml
lab_domain: ''
lock_server: ''
```

2. Initialize a cephdev container (the following assumes $PWD is

Quoted 14 lines
    the folder containing the ceph code in your machine):

    ```bash
    docker run \
      --name remote0
      -p 2222:22
      -d -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" \
      -v `pwd`:/ceph \
      -v /dev:/dev \
      -v /tmp/ceph_data/$RANDOM:/var/lib/ceph \
      --cap-add=SYS_ADMIN --privileged \
      --device /dev/fuse
      ivotron/cephdev
    ```

$PWD is ceph built from sources ? Could you share the dockerfile you used to create ivotron/cephdev ?

Quoted 10 lines

3. Execute teuthology using the wip-11892-docker branch:

    ```bash
    teuthology \
      -a ~/archive/`date +%s` \
      --suite-path /path/to/ceph-qa-suite/ \
      ~/test.yml
    ```
Quoted 7 lines

Caveats:

* only a single job can be executed and has to be manually assembled. I plan to work on supporting suites, which, in short, implies stripping out the install task from existing suites and leaving only the install.ship_utilities subtask instead (the container image has all the dependencies in it already).

Maybe there could be a script to transform config files such as http://qa-proxy.ceph.com/teuthology/loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml into a config file suitable for this use case ? Together with git clone -b $sha1 + make in the container, it would be a nice way to replay / debug a failed job using a single vm and without going through packages.

Quoted 7 lines

* I have only tried the above with the radosbench and ceph-fuse tasks. Using --cap-add=ALL and -v /lib/modules:/lib/modules flags allows a container to load kernel modules so, in principle, it should work for rbd and kclient tasks but I haven't tried it yet.
* For jobs specifying multiple remotes, multiple containers can be launched (one per remote). While it is possible to run these

Quoted 8 lines

on the same docker host, the way ceph daemons dynamically bind to ports in the 6800-7300 range makes it difficult to determine which ports to expose from each container (exposing the same port from multiple containers in the same host is not allowed, for obvious reasons). So either each remote runs on a distinct docker host machine, or a deterministic port assignment is implemented such that, for example, 6800 is always assigned to osd.0, regardless of where it runs.

Would docker run --publish-all=true help ?

Clever hack, congrats :-)

Cheers

Quoted 8 lines

Cheers,
ivo
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
#4 lore raw
In reply to a message not in the archive
Quoted 17 lines · Loic Dachary
Quoted 16 lines

2. Initialize a cephdev container (the following assumes $PWD is

    the folder containing the ceph code in your machine):

    ```bash
    docker run \
      --name remote0
      -p 2222:22
      -d -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" \
      -v `pwd`:/ceph \
      -v /dev:/dev \
      -v /tmp/ceph_data/$RANDOM:/var/lib/ceph \
      --cap-add=SYS_ADMIN --privileged \
      --device /dev/fuse
      ivotron/cephdev
    ```
Quoted 1 line

$PWD is ceph built from sources ? Could you share the dockerfile you used to create ivotron/cephdev ?

Yes, the idea is to wrap your ceph folder in a container so that it becomes a target for teuthology. The link to the dockerfile:

https://github.com/ivotron/docker-cephdev

Quoted 11 lines
Quoted 9 lines

Caveats:

* only a single job can be executed and has to be manually assembled. I plan to work on supporting suites, which, in short, implies stripping out the install task from existing suites and leaving only the install.ship_utilities subtask instead (the container image has all the dependencies in it already).

Maybe there could be a script to transform config files such as http://qa-proxy.ceph.com/teuthology/loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml into a config file suitable for this use case ?

that's what I have in mind but haven't looked into it yet. I was thinking about extending teuthology-suite so that you pass a --filter-tasks flag so that we can remove the unwanted tasks, in the similar way that --filter leaves some suites out.

Quoted 2 lines

Together with git clone -b $sha1 + make in the container, it would be a nice way to replay / debug a failed job using a single vm and without going through packages.

that'd be relatively straight-forward to accomplish, at least the docker-side of things (a dockerfile that is given the $SHA1). Prior to that, we'd need to have a script that extracts the failed job from paddles (does this exist already?), creates a new sha1-predicated container and passes the yaml file of the failed job to teuthology (which would be invoked with the hypothetical --filter-tasks flag mentioned above).

Quoted 17 lines
Quoted 16 lines

* I have only tried the above with the radosbench and ceph-fuse tasks. Using --cap-add=ALL and -v /lib/modules:/lib/modules flags allows a container to load kernel modules so, in principle, it should work for rbd and kclient tasks but I haven't tried it yet.
* For jobs specifying multiple remotes, multiple containers can be launched (one per remote). While it is possible to run these on the same docker host, the way ceph daemons dynamically bind to ports in the 6800-7300 range makes it difficult to determine which ports to expose from each container (exposing the same port from multiple containers in the same host is not allowed, for obvious reasons). So either each remote runs on a distinct docker host machine, or a deterministic port assignment is implemented such that, for example, 6800 is always assigned to osd.0, regardless of where it runs.

Quoted 1 line

Would docker run --publish-all=true help ?

That option doesn't work with --net=container, which is what we are using in this case since we remap sshd's 22 port of the container. In other words, for --publish-all to work we need to use --net=host but that disables the virtual network that docker provides. An alternative would be to configure the base image we're using
(https://github.com/tutumcloud/tutum-ubuntu/) so that the port that sshd uses is passed in an env var.

Quoted 3 lines

Clever hack, congrats :-)

thanks!

#5 lore raw
Quoted 17 lines · Loic Dachary
Quoted 17 lines
Quoted 16 lines

2. Initialize a cephdev container (the following assumes $PWD is

    the folder containing the ceph code in your machine):

    ```bash
    docker run \
      --name remote0
      -p 2222:22
      -d -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" \
      -v `pwd`:/ceph \
      -v /dev:/dev \
      -v /tmp/ceph_data/$RANDOM:/var/lib/ceph \
      --cap-add=SYS_ADMIN --privileged \
      --device /dev/fuse
      ivotron/cephdev
    ```
Quoted 7 lines
Quoted 1 line

$PWD is ceph built from sources ? Could you share the dockerfile you used to create ivotron/cephdev ?

Yes, the idea is to wrap your ceph folder in a container so that it becomes a target for teuthology. The link to the dockerfile:

https://github.com/ivotron/docker-cephdev

You may want to use install-deps.sh instead of apt-get build-dep to get the packages from sources instead of a presumably older from the source repositories.

Quoted 20 lines
Quoted 5 lines
Quoted 5 lines

Caveats:

Quoted 7 lines
Quoted 5 lines

* only a single job can be executed and has to be manually assembled. I plan to work on supporting suites, which, in short, implies stripping out the install task from existing suites and leaving only the install.ship_utilities subtask instead (the container image has all the dependencies in it already).

Maybe there could be a script to transform config files such as http://qa-proxy.ceph.com/teuthology/loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml into a config file suitable for this use case ?

that's what I have in mind but haven't looked into it yet. I was thinking about extending teuthology-suite so that you pass a --filter-tasks flag so that we can remove the unwanted tasks, in the similar way that --filter leaves some suites out.

Quoted 1 line
Quoted 7 lines
Quoted 1 line

Together with git clone -b $sha1 + make in the container, it would be a nice way to replay / debug a failed job using a single vm and without going through packages.

that'd be relatively straight-forward to accomplish, at least the docker-side of things (a dockerfile that is given the $SHA1). Prior to that, we'd need to have a script that extracts the failed job from paddles (does this exist already?), creates a new sha1-predicated

What do you mean by "extract the failed job" ? Do you expect paddles to have more information than the config.yaml file ( loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml for instance) ?

Quoted 3 lines

container and passes the yaml file of the failed job to teuthology (which would be invoked with the hypothetical --filter-tasks flag mentioned above).

It's probably more than just filtering out tasks. What about a script that would

dockerize-config < config.yaml > docker-config.yaml

and be smart enough to do whatever is necessary to transform an existing config.yaml so that it is suitable to run on docker targets. And fail loudly if it can't ;-)

Quoted 21 lines
Quoted 18 lines
Quoted 17 lines

* I have only tried the above with the radosbench and ceph-fuse tasks. Using --cap-add=ALL and -v /lib/modules:/lib/modules flags allows a container to load kernel modules so, in principle, it should work for rbd and kclient tasks but I haven't tried it yet.
* For jobs specifying multiple remotes, multiple containers can be launched (one per remote). While it is possible to run these on the same docker host, the way ceph daemons dynamically bind to ports in the 6800-7300 range makes it difficult to determine which ports to expose from each container (exposing the same port from multiple containers in the same host is not allowed, for obvious reasons). So either each remote runs on a distinct docker host machine, or a deterministic port assignment is implemented such that, for example, 6800 is always assigned to osd.0, regardless of where it runs.

Quoted 1 line

Would docker run --publish-all=true help ?

Quoted 7 lines

That option doesn't work with --net=container, which is what we are using in this case since we remap sshd's 22 port of the container. In other words, for --publish-all to work we need to use --net=host but that disables the virtual network that docker provides. An alternative would be to configure the base image we're using
(https://github.com/tutumcloud/tutum-ubuntu/) so that the port that sshd uses is passed in an env var.

Why not use --net=host then ?

Quoted 8 lines
Quoted 4 lines

Clever hack, congrats :-)

thanks!

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
#6 lore raw

Hi Loic,

Based on your feedback, a few action-items emerged for improving this containerized approach to running teuthology jobs:

1. use install-deps.sh for installing dependencies
2. modify the sshd configuration so that the ssh port is specified at runtime via an environment variable. This has the consequence of being able to use --net=host and thus more than one remote can run locally (for jobs with multiple remotes).
3. add an option to provide a sha1 so that the code gets checked out as part of the entrypoint of the container and gets built.
4. write a 'dockerize-config' script for taking a failed job's YAML file and modify it so that it can run with containers.
5. write a 'failed-devenv' script that given a url to a failed job
(a) fetches the YAML file (b) runs the dockerize-config script (c) checks out the corresponding sha1 version (d) compiles the code
6. write a 'run-failed-job' that (a) re-builds the code (b) instantiates one container for each specified remote and (c) executes the job.

I've implemented 1-3 and am working on 4-6. In short, the goal of all the above is to capture the dev/build/test loop and make it easier to go from 'failed job' to 'working on a fix'. The high-level sequence is
(1) run 'make-failed-devenv' so you get the dev environment for the failed job (2) work on a fix and (3) invoke 'run-failed-job' and inspect results (possibly going back to 2 if need it).

Thoughts on 4-6?

cheers,
ivo

Quoted 103 lines · Loic Dachary
Quoted 17 lines · Loic Dachary
Quoted 17 lines
Quoted 16 lines

2. Initialize a cephdev container (the following assumes $PWD is

    the folder containing the ceph code in your machine):

    ```bash
    docker run \
      --name remote0
      -p 2222:22
      -d -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" \
      -v `pwd`:/ceph \
      -v /dev:/dev \
      -v /tmp/ceph_data/$RANDOM:/var/lib/ceph \
      --cap-add=SYS_ADMIN --privileged \
      --device /dev/fuse
      ivotron/cephdev
    ```
Quoted 7 lines
Quoted 1 line

$PWD is ceph built from sources ? Could you share the dockerfile you used to create ivotron/cephdev ?

Yes, the idea is to wrap your ceph folder in a container so that it becomes a target for teuthology. The link to the dockerfile:

https://github.com/ivotron/docker-cephdev

You may want to use install-deps.sh instead of apt-get build-dep to get the packages from sources instead of a presumably older from the source repositories.

Quoted 20 lines
Quoted 5 lines
Quoted 5 lines

Caveats:

Quoted 7 lines
Quoted 5 lines

* only a single job can be executed and has to be manually assembled. I plan to work on supporting suites, which, in short, implies stripping out the install task from existing suites and leaving only the install.ship_utilities subtask instead (the container image has all the dependencies in it already).

Maybe there could be a script to transform config files such as http://qa-proxy.ceph.com/teuthology/loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml into a config file suitable for this use case ?

that's what I have in mind but haven't looked into it yet. I was thinking about extending teuthology-suite so that you pass a --filter-tasks flag so that we can remove the unwanted tasks, in the similar way that --filter leaves some suites out.

Quoted 1 line
Quoted 7 lines
Quoted 1 line

Together with git clone -b $sha1 + make in the container, it would be a nice way to replay / debug a failed job using a single vm and without going through packages.

that'd be relatively straight-forward to accomplish, at least the docker-side of things (a dockerfile that is given the $SHA1). Prior to that, we'd need to have a script that extracts the failed job from paddles (does this exist already?), creates a new sha1-predicated

What do you mean by "extract the failed job" ? Do you expect paddles to have more information than the config.yaml file ( loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml for instance) ?

Quoted 3 lines

container and passes the yaml file of the failed job to teuthology (which would be invoked with the hypothetical --filter-tasks flag mentioned above).

It's probably more than just filtering out tasks. What about a script that would

dockerize-config < config.yaml > docker-config.yaml

and be smart enough to do whatever is necessary to transform an existing config.yaml so that it is suitable to run on docker targets. And fail loudly if it can't ;-)

Quoted 21 lines
Quoted 18 lines
Quoted 17 lines

* I have only tried the above with the radosbench and ceph-fuse tasks. Using --cap-add=ALL and -v /lib/modules:/lib/modules flags allows a container to load kernel modules so, in principle, it should work for rbd and kclient tasks but I haven't tried it yet.
* For jobs specifying multiple remotes, multiple containers can be launched (one per remote). While it is possible to run these on the same docker host, the way ceph daemons dynamically bind to ports in the 6800-7300 range makes it difficult to determine which ports to expose from each container (exposing the same port from multiple containers in the same host is not allowed, for obvious reasons). So either each remote runs on a distinct docker host machine, or a deterministic port assignment is implemented such that, for example, 6800 is always assigned to osd.0, regardless of where it runs.

Quoted 1 line

Would docker run --publish-all=true help ?

Quoted 7 lines

That option doesn't work with --net=container, which is what we are using in this case since we remap sshd's 22 port of the container. In other words, for --publish-all to work we need to use --net=host but that disables the virtual network that docker provides. An alternative would be to configure the base image we're using
(https://github.com/tutumcloud/tutum-ubuntu/) so that the port that sshd uses is passed in an env var.

Why not use --net=host then ?

Quoted 3 lines
Quoted 3 lines
Quoted 9 lines
Quoted 5 lines
Quoted 1 line

Clever hack, congrats :-)

thanks!

--
Loïc Dachary, Artisan Logiciel Libre

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

Hi Ivo,

Quoted 5 lines · Ivo Jimenez

Hi Loic,

Based on your feedback, a few action-items emerged for improving this containerized approach to running teuthology jobs:

Quoted 7 lines

1. use install-deps.sh for installing dependencies
2. modify the sshd configuration so that the ssh port is specified at runtime via an environment variable. This has the consequence of being able to use --net=host and thus more than one remote can run locally (for jobs with multiple remotes).
3. add an option to provide a sha1 so that the code gets checked out as part of the entrypoint of the container and gets built.

Would it be something like http://tracker.ceph.com/issues/13031 ?

Quoted 2 lines

4. write a 'dockerize-config' script for taking a failed job's YAML file and modify it so that it can run with containers.

+1 :-)

Quoted 3 lines

5. write a 'failed-devenv' script that given a url to a failed job
(a) fetches the YAML file (b) runs the dockerize-config script (c) checks out the corresponding sha1 version (d) compiles the code

In this case it might be easier to have the original teuthology-suite command available as part of the job config (original-cli-call: teuthology-suite --ceph foo --....) and just re-run that command with --filter="$description" where $description is the description of the job. It's a lot more stable / reliable than reworking the config.yaml file. Doing that kind of dockerization of the config.yaml is very useful for any existing job archive for which you don't have enough information to reschedule the job with --filter. But if you have the original command, then it's way easier to just re-issue a teuthology-suite with a change in argumente to use --filter.

Quoted 3 lines

6. write a 'run-failed-job' that (a) re-builds the code (b) instantiates one container for each specified remote and (c) executes the job.

+2000

Here is how we do it for backports : http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO_run_integration_and_upgrade_tests#Re-scheduling-failed-or-dead-jobs-from-an-existing-suite

It's simple and tedious. It would be awesome to have something easier and shorter :-)

Quoted 8 lines

I've implemented 1-3 and am working on 4-6. In short, the goal of all the above is to capture the dev/build/test loop and make it easier to go from 'failed job' to 'working on a fix'. The high-level sequence is
(1) run 'make-failed-devenv' so you get the dev environment for the failed job (2) work on a fix and (3) invoke 'run-failed-job' and inspect results (possibly going back to 2 if need it).

Quoted 5 lines

Thoughts on 4-6?

cheers,
ivo

Cheers

Quoted 114 lines · Loic Dachary
Quoted 112 lines · Loic Dachary
Quoted 17 lines
Quoted 17 lines
Quoted 16 lines

2. Initialize a cephdev container (the following assumes $PWD is

    the folder containing the ceph code in your machine):

    ```bash
    docker run \
      --name remote0
      -p 2222:22
      -d -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" \
      -v `pwd`:/ceph \
      -v /dev:/dev \
      -v /tmp/ceph_data/$RANDOM:/var/lib/ceph \
      --cap-add=SYS_ADMIN --privileged \
      --device /dev/fuse
      ivotron/cephdev
    ```
Quoted 7 lines
Quoted 1 line

$PWD is ceph built from sources ? Could you share the dockerfile you used to create ivotron/cephdev ?

Yes, the idea is to wrap your ceph folder in a container so that it becomes a target for teuthology. The link to the dockerfile:

https://github.com/ivotron/docker-cephdev

You may want to use install-deps.sh instead of apt-get build-dep to get the packages from sources instead of a presumably older from the source repositories.

Quoted 20 lines
Quoted 5 lines
Quoted 5 lines

Caveats:

Quoted 7 lines
Quoted 5 lines

* only a single job can be executed and has to be manually assembled. I plan to work on supporting suites, which, in short, implies stripping out the install task from existing suites and leaving only the install.ship_utilities subtask instead (the container image has all the dependencies in it already).

Maybe there could be a script to transform config files such as http://qa-proxy.ceph.com/teuthology/loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml into a config file suitable for this use case ?

that's what I have in mind but haven't looked into it yet. I was thinking about extending teuthology-suite so that you pass a --filter-tasks flag so that we can remove the unwanted tasks, in the similar way that --filter leaves some suites out.

Quoted 1 line
Quoted 7 lines
Quoted 1 line

Together with git clone -b $sha1 + make in the container, it would be a nice way to replay / debug a failed job using a single vm and without going through packages.

that'd be relatively straight-forward to accomplish, at least the docker-side of things (a dockerfile that is given the $SHA1). Prior to that, we'd need to have a script that extracts the failed job from paddles (does this exist already?), creates a new sha1-predicated

What do you mean by "extract the failed job" ? Do you expect paddles to have more information than the config.yaml file ( loic-2015-09-02_15:41:18-rbd-master---basic-multi/1042448/config.yaml for instance) ?

Quoted 3 lines

container and passes the yaml file of the failed job to teuthology (which would be invoked with the hypothetical --filter-tasks flag mentioned above).

It's probably more than just filtering out tasks. What about a script that would

dockerize-config < config.yaml > docker-config.yaml

and be smart enough to do whatever is necessary to transform an existing config.yaml so that it is suitable to run on docker targets. And fail loudly if it can't ;-)

Quoted 21 lines
Quoted 18 lines
Quoted 17 lines

* I have only tried the above with the radosbench and ceph-fuse tasks. Using --cap-add=ALL and -v /lib/modules:/lib/modules flags allows a container to load kernel modules so, in principle, it should work for rbd and kclient tasks but I haven't tried it yet.
* For jobs specifying multiple remotes, multiple containers can be launched (one per remote). While it is possible to run these on the same docker host, the way ceph daemons dynamically bind to ports in the 6800-7300 range makes it difficult to determine which ports to expose from each container (exposing the same port from multiple containers in the same host is not allowed, for obvious reasons). So either each remote runs on a distinct docker host machine, or a deterministic port assignment is implemented such that, for example, 6800 is always assigned to osd.0, regardless of where it runs.

Quoted 1 line

Would docker run --publish-all=true help ?

Quoted 7 lines

That option doesn't work with --net=container, which is what we are using in this case since we remap sshd's 22 port of the container. In other words, for --publish-all to work we need to use --net=host but that disables the virtual network that docker provides. An alternative would be to configure the base image we're using
(https://github.com/tutumcloud/tutum-ubuntu/) so that the port that sshd uses is passed in an env var.

Why not use --net=host then ?

Quoted 8 lines
Quoted 4 lines

Clever hack, congrats :-)

thanks!

--
Loïc Dachary, Artisan Logiciel Libre

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre