Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
ecac0d8e
Commit
ecac0d8e
authored
Jun 09, 2016
by
Kevin Falcone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SKIP_PRIMARY to allow partial cluster upgrades
Improve docs.
parent
8dd4e8fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
playbooks/edx-east/mongo_rolling_upgrade.yml
+15
-7
No files found.
playbooks/edx-east/mongo_rolling_upgrade.yml
View file @
ecac0d8e
# Upgrades the hidden secondary in a mongo cluster if one exists
# Upgrades a full mongo cluster, starting with the hidden members, then the
#
# secondary, and finally steps down the primary and upgrades it. It checks along
# This is useful for using the hidden secondary to sniff out any problems with
# the way for a healthy cluster, failing if that is not true.
# your point upgrade before you upgrade your primary/secondary servers using the
# mongo_rolling_upgrade.yml play
#
#
# This play expects to have access to a config file where MONGO_RS_CONFIG, as described
# This play expects to have access to a config file where MONGO_RS_CONFIG, as described
# in the mongo_3_0 role, is defined, as well as MONGO_ADMIN_USER and MONGO_ADMIN_PASSWORD.
# in the mongo_3_0 role, is defined, as well as MONGO_ADMIN_USER and MONGO_ADMIN_PASSWORD.
#
#
# ansible-playbook -i 127.0.0.1, mongo_
upgrade_hidden_secondaries
.yml -e@/path/to/config-file.yml
# ansible-playbook -i 127.0.0.1, mongo_
rolling_upgrade
.yml -e@/path/to/config-file.yml
#
#
# This play uses MONGO_RS_CONFIG to find a host to connect to and fetch replset config and build an
# This play uses MONGO_RS_CONFIG to find a host to connect to and fetch replset config and build an
# inventory, so you can just target localhost.
# inventory, so you can just target localhost.
#
#
# If there are no hidden secondaries, the 'Upgrade hidden members' task will just skip.
# If there are no hidden secondaries, the 'Upgrade hidden members' task block will just skip.
#
# This will process a hidden secondary twice - first as a 'hidden' server, then as a 'secondary' but
# this is effectively a no-op except for apt checking the versions and then checking that mongo is running.
# It is valid to have other types of hidden machines, so this seemed better than skipping.
#
# If you wish to avoid updating the primary, you can add -e 'SKIP_PRIMARY=true' to your ansible
# invocation.
-
name
:
Find hidden secondaries
-
name
:
Find hidden secondaries
hosts
:
127.0.0.1
hosts
:
127.0.0.1
connection
:
local
connection
:
local
gather_facts
:
False
gather_facts
:
False
vars
:
-
SKIP_PRIMARY
:
False
tasks
:
tasks
:
-
name
:
Get configuration of mongo cluster
-
name
:
Get configuration of mongo cluster
mongodb_rs_config
:
mongodb_rs_config
:
...
@@ -49,6 +56,7 @@
...
@@ -49,6 +56,7 @@
ansible_ssh_user
:
ubuntu
ansible_ssh_user
:
ubuntu
with_items
:
with_items
:
-
"
{{
rs_config.primary
}}"
-
"
{{
rs_config.primary
}}"
when
:
not SKIP_PRIMARY
-
name
:
Upgrade hidden members
-
name
:
Upgrade hidden members
hosts
:
hidden_hosts
hosts
:
hidden_hosts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment