mongo_ops_add_existing_server

So, if we want to add existing server, under the wing of MongoOps Manager, we have to do the following:

  1. Download & Install the RPM on the
  2. Configure the agents with the MongoOps using ApiKey and Endpoint URL

That is that. After that, we will be able to install whatever we want from the MongoOps manager. So let's get started:

In fact, when you go to MongoOps → All clusters → Agents → Download & Settings, there is a easy way how to do the steps. Just follow them :)

Download & Install

[root@dbpahfgcl ~]# curl -OL http://secretMongoOpsUrl:8080/download/agent/automation/mongodb-mms-automation-agent-manager-10.2.18.5978-1.x86_64.rhel7.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.5M    0 13.5M    0     0   208M      0 --:--:-- --:--:-- --:--:--  211M
[root@dbpahfgcl ~]#
[root@dbpahfgcl ~]#
[root@dbpahfgcl ~]# rpm -U mongodb-mms-automation-agent-manager-10.2.18.5978-1.x86_64.rhel7.rpm
[root@dbpahfgcl ~]#

You see, wasn't so hard :) Now for the tricky part.

To configure the agent we need:

  • GroupId
  • ApiKey
  • MongoOps URL

In my case they are:

  • Secret
  • Secret
  • and Secret

You have to configure them in:

Configure the Agent

/etc/mongodb-mms/automation-agent.config

Once all this is done, we can start the agent as follows:

Start the agent

[root@dbpahfgcl ~]# vi /etc/mongodb-mms/automation-agent.config
[root@dbpahfgcl ~]# chown mongod:mongod /data
[root@dbpahfgcl ~]# systemctl start mongodb-mms-automation-agent.service
[root@dbpahfgcl ~]# systemctl status mongodb-mms-automation-agent.service
● mongodb-mms-automation-agent.service - MongoDB MMS Automation Agent
   Loaded: loaded (/etc/systemd/system/mongodb-mms-automation-agent.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-07-01 10:33:30 EDT; 4s ago
  Process: 5759 ExecStartPre=/usr/bin/chown -R mongod:mongod /var/run/mongodb-mms-automation (code=exited, status=0/SUCCESS)
  Process: 5757 ExecStartPre=/usr/bin/mkdir /var/run/mongodb-mms-automation (code=exited, status=0/SUCCESS)
 Main PID: 5762 (mongodb-mms-aut)
   CGroup: /system.slice/mongodb-mms-automation-agent.service
           └─5762 /opt/mongodb-mms-automation/bin/mongodb-mms-automation-agent -f /etc/mongodb-mms/automation-agen...

Jul 01 10:33:30 dbpahfgcl systemd[1]: Starting MongoDB MMS Automation Agent...
Jul 01 10:33:30 dbpahfgcl systemd[1]: Started MongoDB MMS Automation Agent.
Jul 01 10:33:30 dbpahfgcl mongodb-mms-automation-agent[5762]: [2020/07/01 10:33:30.531] [.info] [cm/util/sysdep...ock
Jul 01 10:33:30 dbpahfgcl mongodb-mms-automation-agent[5762]: [10:33:30.636] Killing all running mongodb-mms-mo... *$
Jul 01 10:33:30 dbpahfgcl mongodb-mms-automation-agent[5762]: [10:33:30.670] Killing all running mongodb-mms-ba... *$
Jul 01 10:33:31 dbpahfgcl mongodb-mms-automation-agent[5762]: [10:33:31.815] All 0 Mongo processes are in goal ...ied
Hint: Some lines were ellipsized, use -l to show in full.
[root@dbpahfgcl ~]#

That easily can be done from the MongoOps manager, but before you do, be sure to install the required packages:

Install required packages

[root@dbpaifgcl ~]# yum -y  install cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs libcurl libpcap lm_sensors-libs net-snmp net-snmp-agent-libs openldap openssl rpm-libs tcp_wrappers-libs
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package krb5-libs-1.15.1-46.el7.x86_64 already installed and latest version
Package libcurl-7.29.0-57.el7.x86_64 already installed and latest version
Package 14:libpcap-1.5.3-12.el7.x86_64 already installed and latest version
Package openldap-2.4.44-21.el7_6.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-19.el7.x86_64 already installed and latest version
Package rpm-libs-4.11.3-43.el7.x86_64 already installed and latest version
Package tcp_wrappers-libs-7.6-77.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package cyrus-sasl.x86_64 0:2.1.26-23.el7 will be installed
---> Package cyrus-sasl-gssapi.x86_64 0:2.1.26-23.el7 will be installed
---> Package cyrus-sasl-plain.x86_64 0:2.1.26-23.el7 will be installed
---> Package lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 will be installed
---> Package net-snmp.x86_64 1:5.7.2-48.el7_8.1 will be installed
--> Processing Dependency: net-snmp-libs = 1:5.7.2-48.el7_8.1 for package: 1:net-snmp-5.7.2-48.el7_8.1.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: 1:net-snmp-5.7.2-48.el7_8.1.x86_64
--> Processing Dependency: libnetsnmp.so.31()(64bit) for package: 1:net-snmp-5.7.2-48.el7_8.1.x86_64
---> Package net-snmp-agent-libs.x86_64 1:5.7.2-48.el7_8.1 will be installed
--> Running transaction check
---> Package net-snmp-libs.x86_64 1:5.7.2-48.el7_8.1 will be installed
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                     Arch           Version                                 Repository                  Size
=====================================================================================================================
Installing:
 cyrus-sasl                  x86_64         2.1.26-23.el7                           rhel-7-server-rpms          88 k
 cyrus-sasl-gssapi           x86_64         2.1.26-23.el7                           rhel-7-server-rpms          41 k
 cyrus-sasl-plain            x86_64         2.1.26-23.el7                           rhel-7-server-rpms          39 k
 lm_sensors-libs             x86_64         3.4.0-8.20160601gitf9185e5.el7          rhel-7-server-rpms          42 k
 net-snmp                    x86_64         1:5.7.2-48.el7_8.1                      rhel-7-server-rpms         332 k
 net-snmp-agent-libs         x86_64         1:5.7.2-48.el7_8.1                      rhel-7-server-rpms         707 k
Installing for dependencies:
 net-snmp-libs               x86_64         1:5.7.2-48.el7_8.1                      rhel-7-server-rpms         751 k
 perl-Data-Dumper            x86_64         2.145-3.el7                             rhel-7-server-rpms          47 k

Transaction Summary
=====================================================================================================================
Install  6 Packages (+2 Dependent packages)

Total download size: 2.0 M
Installed size: 6.2 M
Downloading packages:
(1/8): cyrus-sasl-2.1.26-23.el7.x86_64.rpm                                                    |  88 kB  00:00:00
(2/8): cyrus-sasl-gssapi-2.1.26-23.el7.x86_64.rpm                                             |  41 kB  00:00:00
(3/8): cyrus-sasl-plain-2.1.26-23.el7.x86_64.rpm                                              |  39 kB  00:00:00
(4/8): lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm                              |  42 kB  00:00:00
(5/8): net-snmp-5.7.2-48.el7_8.1.x86_64.rpm                                                   | 332 kB  00:00:00
(6/8): net-snmp-agent-libs-5.7.2-48.el7_8.1.x86_64.rpm                                        | 707 kB  00:00:00
(7/8): net-snmp-libs-5.7.2-48.el7_8.1.x86_64.rpm                                              | 751 kB  00:00:00
(8/8): perl-Data-Dumper-2.145-3.el7.x86_64.rpm                                                |  47 kB  00:00:00
---------------------------------------------------------------------------------------------------------------------
Total                                                                                1.1 MB/s | 2.0 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : 1:net-snmp-libs-5.7.2-48.el7_8.1.x86_64                                                           1/8
  Installing : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64                                             2/8
  Installing : 1:net-snmp-agent-libs-5.7.2-48.el7_8.1.x86_64                                                     3/8
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                               4/8
  Installing : 1:net-snmp-5.7.2-48.el7_8.1.x86_64                                                                5/8
  Installing : cyrus-sasl-gssapi-2.1.26-23.el7.x86_64                                                            6/8
  Installing : cyrus-sasl-2.1.26-23.el7.x86_64                                                                   7/8
  Installing : cyrus-sasl-plain-2.1.26-23.el7.x86_64                                                             8/8
  Verifying  : 1:net-snmp-agent-libs-5.7.2-48.el7_8.1.x86_64                                                     1/8
  Verifying  : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64                                             2/8
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                               3/8
  Verifying  : cyrus-sasl-plain-2.1.26-23.el7.x86_64                                                             4/8
  Verifying  : cyrus-sasl-2.1.26-23.el7.x86_64                                                                   5/8
  Verifying  : 1:net-snmp-5.7.2-48.el7_8.1.x86_64                                                                6/8
  Verifying  : cyrus-sasl-gssapi-2.1.26-23.el7.x86_64                                                            7/8
  Verifying  : 1:net-snmp-libs-5.7.2-48.el7_8.1.x86_64                                                           8/8

Installed:
  cyrus-sasl.x86_64 0:2.1.26-23.el7                 cyrus-sasl-gssapi.x86_64 0:2.1.26-23.el7
  cyrus-sasl-plain.x86_64 0:2.1.26-23.el7           lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7
  net-snmp.x86_64 1:5.7.2-48.el7_8.1                net-snmp-agent-libs.x86_64 1:5.7.2-48.el7_8.1

Dependency Installed:
  net-snmp-libs.x86_64 1:5.7.2-48.el7_8.1                    perl-Data-Dumper.x86_64 0:2.145-3.el7

Complete!
[root@dbpaifgcl ~]#

TODO

https://docs.opsmanager.mongodb.com/v4.0/tutorial/add-servers-automation/

  • mongo_ops_add_existing_server.txt
  • Last modified: 2020/07/02 10:04
  • by andonovj