Muawia Khan 10e55aa4e7
Problem: No automated way to set up a dev/test network (#2300)
* Problem: No automated way to set up a dev/test network

* Problem: docs not updated for stack, ansible and docker based dev environments

* Problem: Using apt triggers java runtime installation on MacOS

- Update pre_tasks in ansible
- Update bigchaindb-stop playbook to handle pre_tasks

* Update Tendermint version to 0.19.3 from 0.19.2

* Update tendermint version to 0.19.3 everywhere else

* Problem: Sphinx warns about duplicate section labels

Solution: Don't use sphinx.ext.autosectionlabel

* Problem: Sphinx complains that run-node-with-docker not in any TOC

Solution: Add run-node-with-docker to a TOC (i.e. to an index.rst file)

* Tendermint has not tagged `0.19.3` container

* Problem: Internal hyperlinks to new pages not working

Solution: Add .html to the ends of the filename strings

* Problem: Invalid script imports

* Problem: Invalid comparison for supported OS version

* Addressing comments I

* Problem: No way to configure dev/forked repo for developers

* Problem: Docs not updated with STACK_REPO parameter

* Addressing comments II
2018-05-31 16:56:45 +02:00

56 lines
1.8 KiB
YAML

---
- name: Running MongoDB Docker
docker_container:
name: "{{ mongodb_docker_name }}{{ item }}"
hostname: "{{ mongodb_docker_name }}{{ item }}"
image: "mongo:{{ mongo_version }}"
detach: true
network_mode: bridge
networks:
- name: "{{ bigchaindb_docker_net }}"
published_ports:
- "{{ mongodb_port }}"
restart_policy: unless-stopped
volumes:
- "{{ mongodb_host_mount_dir }}{{ item|string }}/db:{{ mongodb_storage_path }}"
- "{{ mongodb_host_mount_dir }}{{ item|string }}/configdb:{{ mongodb_config_path }}"
state: started
keep_volumes: true
command: mongod
with_sequence: start=1 end="{{ stack_size|int }}" stride=1
when: stack_type|lower == "docker" or stack_type|lower == "cloud"
tags: [mongodb]
- name: Creating directories
file:
path: "{{ item }}"
state: directory
mode: 0700
with_items: "{{ directories }}"
when: stack_type|lower == "local"
tags: [mongodb]
- import_tasks: debian.yml
when: stack_type|lower == "local" and (distribution_name == "debian" or distribution_name == "ubuntu")
tags: [mongodb]
- import_tasks: centos.yml
when: stack_type|lower == "local" and (distribution_name == "centos" or distribution_name == "red hat enterprise linux")
tags: [mongodb]
- import_tasks: fedora.yml
when: stack_type|lower == "local" and (distribution_name == "fedora")
tags: [mongodb]
- name: MongoDB Process Check
shell: pgrep mongod | wc -l
register: command_result
when: stack_type|lower == "local"
tags: [mongodb]
- name: Run MongoDB
shell: nohup mongod > /tmp/mongodb_log_$(date +%Y%m%d_%H%M%S) 2>&1 &
register: start_mdb
failed_when: "'FAILED' in start_mdb.stderr or start_mdb.rc != 0"
when: stack_type|lower == "local" and command_result.stdout| int == 0
tags: [mongodb]