solar/bootstrap/playbooks/riak.yaml
Bogdan Dobrelya 58683af802 Fix riak container nested docker mounts
Fix docker mounts to allow the riak docker container
to be started nested.
Also note about nested containers in the docs.

Related-bug: #1548851
Related-bug: #1547587

Change-Id: I2fb448ac439b717eae1c3deee2cd067ac8b4f0c7
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-03-02 10:30:20 +01:00

23 lines
843 B
YAML

- file: path=/var/tmp/vagrant state=directory
- copy: src=/vagrant/utils/riak/app.config dest=/var/tmp/vagrant/riak-app.config
- name: start riak container
docker:
name: vagrant_riak_1
image: solarproject/riak
volumes:
- /var/tmp/vagrant/riak-app.config:/etc/riak/app.config
ports:
- 8087:8087
- 8098:8098
# preconfigure docker container
# add counters datatype etc.
- shell: timeout 60 docker exec vagrant_riak_1 riak-admin wait_for_service riak_kv
- shell: timeout 10 docker exec vagrant_riak_1 riak-admin bucket-type create counters '{"props":{"datatype":"counter"}}'
ignore_errors: yes
- shell: timeout 10 docker exec vagrant_riak_1 riak-admin bucket-type activate counters
- lineinfile:
dest: /.solar_config_override
line: "solar_db: riak://127.0.0.1:8087"
state: present
create: yes