-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathonboard_replset.sh
executable file
·26 lines (25 loc) · 1.28 KB
/
onboard_replset.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
source functions.sh
inventory="ansible-hosts"
echo `clear`
title "Onboard Replica Set Members for Ops Manager Management"
echo "Setting up a ${green}MongoDB${reset} cluster with ${green}Ops Manager${reset}"
echo "The hosts you intend to use for your cluster should already be up and running."
echo "The replica set instances must be in group [ReplicaSet]"
echo "ensure you are using the right private keyfile in ansible.cfg"
echo
title "Step 1 - Ping Hosts to Verify Connectivity"
pause
typeit "ansible -i ${inventory} ReplicaSet -m ping\n"
ansible -i ${inventory} ReplicaSet -m ping
echo
title "Step 2 - Install the ${green}Ops Manager${reset} Prerequisite Packages on the Replicaset Members"
pause
typeit "ansible-playbook -i ${inventory} playbooks/playbook-replicaset-prerequisites.yml"
ansible-playbook -i ${inventory} playbooks/playbook-replicaset-prerequisites.yml
echo
title "Step 3 - Install the ${green}Ops Manager${reset} Automation Agent on your target replica set members"
pause
typeit "ansible-playbook -i ${inventory} playbooks/playbook-automation-agent.yml"
ansible-playbook -i ${inventory} playbooks/playbook-automation-agent.yml
title "Step 4 - Now open your ${green}Ops Manager${reset} console in a browser. Click on Server View and you will see your newly onboarded hosts."