Commit 1344456a by Joseph Mulloy

Update mongo_3_2 play/role to Mongo 3.2 OPS-2205

parent f69c0239
# Manages a mongo cluster. # Manages a mongo cluster.
# To set up a new mongo cluster, make sure you've configured MONGO_RS_CONFIG # To set up a new mongo cluster, make sure you've configured MONGO_RS_CONFIG
# as used by mongo_replica_set in the mongo_3_0 role. # as used by mongo_replica_set in the mongo_3_2 role.
# #
# If you are initializing a cluster, your command might look like: # If you are initializing a cluster, your command might look like:
# ansible-playbook mongo_3_0.yml -i 10.1.1.1,10.2.2.2,10.3.3.3 -e@/path/to/edx.yml -e@/path/to/ed.yml # ansible-playbook mongo_3_2.yml -i 10.1.1.1,10.2.2.2,10.3.3.3 -e@/path/to/edx.yml -e@/path/to/ed.yml
# If you just want to deploy an updated replica set config, you can run # If you just want to deploy an updated replica set config, you can run
# ansible-playbook mongo_3_0.yml -i any-cluster-ip -e@/path/to/edx.yml -e@/path/to/ed.yml --tags configure_replica_set # ansible-playbook mongo_3_2.yml -i any-cluster-ip -e@/path/to/edx.yml -e@/path/to/ed.yml --tags configure_replica_set
# #
# ADDING A NEW CLUSTER MEMBER # ADDING A NEW CLUSTER MEMBER
# If you are adding a member to a cluster, you must be sure that the new machine is not first in your inventory # If you are adding a member to a cluster, you must be sure that the new machine is not first in your inventory
# ansible-playbook mongo_3_0.yml -i 10.1.1.1,10.2.2.2,new-machine-ip -e@/path/to/edx.yml -e@/path/to/ed.yml # ansible-playbook mongo_3_2.yml -i 10.1.1.1,10.2.2.2,new-machine-ip -e@/path/to/edx.yml -e@/path/to/ed.yml
- name: Deploy MongoDB - name: Deploy MongoDB
hosts: all hosts: all
become: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
- enhanced_networking - mongo_3_2
- mongo_3_0
- munin_node - munin_node
- role: datadog - role: datadog
when: COMMON_ENABLE_DATADOG when: COMMON_ENABLE_DATADOG
......
...@@ -3,30 +3,26 @@ mongo_logappend: true ...@@ -3,30 +3,26 @@ mongo_logappend: true
#This way, when mongod receives a SIGUSR1, it'll close and reopen its log file handle #This way, when mongod receives a SIGUSR1, it'll close and reopen its log file handle
mongo_logrotate: reopen mongo_logrotate: reopen
mongo_version: 3.0.14 mongo_version: 3.2.16
mongo_port: "27017" mongo_port: "27017"
mongo_extra_conf: '' mongo_extra_conf: ''
mongo_key_file: '/etc/mongodb_key' mongo_key_file: '/etc/mongodb_key'
pymongo_version: 2.8.1 pymongo_version: 3.2.2
mongo_data_dir: "{{ COMMON_DATA_DIR }}/mongo" mongo_data_dir: "{{ COMMON_DATA_DIR }}/mongo"
mongo_log_dir: "{{ COMMON_LOG_DIR }}/mongo" mongo_log_dir: "{{ COMMON_LOG_DIR }}/mongo"
mongo_journal_dir: "{{ COMMON_DATA_DIR }}/mongo/mongodb/journal" mongo_journal_dir: "{{ COMMON_DATA_DIR }}/mongo/mongodb/journal"
mongo_user: mongodb mongo_user: mongodb
# The MONGODB_REPO variable should use {{ ansible_distribution_release }} MONGODB_REPO: "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.2 multiverse"
# instead of hard coding a release name. Since we are already accidentally
# running precise binaries on trusty, we are going to leave this alone for
# mongo 3.0 and remedy it when we upgrade to mongo 3.2
MONGODB_REPO: "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse"
MONGODB_APT_KEY: "7F0CEB10" MONGODB_APT_KEY: "7F0CEB10"
MONGODB_APT_KEYSERVER: "keyserver.ubuntu.com" MONGODB_APT_KEYSERVER: "keyserver.ubuntu.com"
mongodb_debian_pkgs: mongodb_debian_pkgs:
- "mongodb-org={{ mongo_version }}" - "mongodb-org={{ mongo_version }}"
- "mongodb-org-server={{ mongo_version }}" - "mongodb-org-server={{ mongo_version }}"
- "mongodb-org-shell={{ mongo_version }}" - "mongodb-org-shell={{ mongo_version }}"
- "mongodb-org-mongos={{ mongo_version }}" - "mongodb-org-mongos={{ mongo_version }}"
- "mongodb-org-tools={{ mongo_version }}" - "mongodb-org-tools={{ mongo_version }}"
...@@ -53,8 +49,8 @@ MONGO_AUTH: true ...@@ -53,8 +49,8 @@ MONGO_AUTH: true
MONGO_RS_CONFIG: MONGO_RS_CONFIG:
members: [] members: []
# Storage engine options in 3.0: "mmapv1" or "wiredTiger" # Storage engine options in 3.2: "mmapv1" or "wiredTiger"
# As 3.2 and 3.4 default to wiredTiger, our 3.0 play will help future-proof # 3.2 and 3.4 default to wiredTiger
MONGO_STORAGE_ENGINE: "wiredTiger" MONGO_STORAGE_ENGINE: "wiredTiger"
# List of dictionaries as described in the mount_ebs role's default # List of dictionaries as described in the mount_ebs role's default
......
...@@ -20,7 +20,7 @@ pathlib2==2.1.0 ...@@ -20,7 +20,7 @@ pathlib2==2.1.0
boto3==1.4.4 boto3==1.4.4
# Needed for the mongo_* modules (playbooks/library/mongo_*) # Needed for the mongo_* modules (playbooks/library/mongo_*)
pymongo==3.1 pymongo==3.2.2
# Needed for the mysql_db module # Needed for the mysql_db module
MySQL-python==1.2.5 MySQL-python==1.2.5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment