Update from the legacy Backup and Monitoring Agents
You have a project with monitored and backed up MongoDB deployments that Automation did not manage and want to update to the MongoDB Agent.
步骤
使用此过程可在运行 Microsoft Windows 的 x86_64 架构上更新到 MongoDB Agent:
Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
安装 MongoDB 助手。
MongoDB Agent Installation Instructions 框会显示以下信息:
Project ID (绑定到项目时必填)
API Key
如果没有 API 密钥,请单击生成密钥。
警告
后续步骤需要用到其中部分或全部值。复制这些值,然后将它们存储在便于稍后访问的位置。
运行 MongoDB Agent Windows 安装程序。
下载
MSI
后,双击:mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi
注意
在文件名中使用
mongodb-mms-automation
是一个传统项目,并不意味着在安装 MongoDB 助手时配置了自动化。如果出现安全警告,请单击 Run。
At the Configuration/Log Folder step, enter the directory where the
MSI
files are saved.在Key Type步骤中,选择Agent API Key以绑定到特定项目。
输入相应的代理密钥。
注意
上一步描述的 MongoDB Agent Installation Instructions 模态中提供了这些密钥。
Type your Project ID into the Project ID box.
Type your Agent API Key into the Agent API Key box.
At the MongoDB Paths step, specify the Log and Backup directories.
At the Windows Firewall Configuration step, select your preferred firewall configuration.
If you select Configure firewall rules allowing access from only the specified |ipaddr| addresses., type the necessary IPv4 addresses into the provided box.
(有条件)Windows 启用 隐身模式 默认用于 Windows 防火墙。如果您尚未在安装MongoDB 助手的MongoDB Agent 主机上禁用此功能,请立即禁用。隐身模式会显着降低MongoDB Agent助手的性能和功能。 单击Disable Stealth Mode 。
(有条件) Windows未启用 磁盘性能计数器 默认。如果您尚未为MongoDB托管启用磁盘性能计数器,请单击Enable Disk Performance Counters 。 MongoDB Agent使用这些计数器进行某些硬件监控活动。
单击 Install(连接)。
设置完成后,请单击 Finish。
下载MSI
后,您可以运行无人值守安装。 可以在命令提示符或 PowerShell 中命令行运行无人值守安装。 要学习;了解有关无人值守安装的更多信息,请参阅有关 标准安装程序命令行选项 的 Microsoft 文档
要在无人值守的情况命令行运行MSI
安装程序,请使用/q
和/i
标志以及必需和可选参数的组合来调用msiexec.exe
:
Parameter | 必要性 | 值 |
---|---|---|
| 必需 | Cloud Manager项目的代理API密钥。 |
| 必需 | Cloud Manager项目的唯一标识符。 |
| Optional | Cloud Manager应将MongoDB Agent配置文件写入的绝对文件路径。 |
| Optional | Cloud Manager应将MongoDB Agent日志写入到的绝对文件路径 |
| Optional | Cloud Manager自动化配置备份JSON文件的绝对文件路径。 |
例子
要在无人值守的情况下安装MongoDB Agent助手,请使用以下选项调用 msiexec.exe
:
msiexec.exe /q /i "C:\PATH\TO\mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi" MMSGROUPID=<GROUP.ID> MMSAPIKEY=<AGENT.API.ID> MMSBASEURL="<http://opsmanager.example.com:8080>" LOGFILE="C:\MMSData\Server\Log\automation-agent.log" MMSCONFIGBACKUP="C:\MMSData\MongoDB\mms-cluster-config-backup.json"
Finish the installation of the MongoDB Agent. In the Install Agent Instructions modal, click Done.
(可选)更改 MongoDB 助手二进制文件和配置备份文件的位置。
Your system policies or practices may require the MongoDB binaries
and Cloud Manager configuration backup file to be located somewhere other
than the default location of %SystemDrive%\MMSMongoDB\versions
.
注意
Windows sets the %SystemDrive%
environment variable to the
drive on which you installed Windows. By default, you are
directed to install Windows on the C:
drive. To find your
%SystemDrive%
, issue the following command from PowerShell:
get-childitem env:SystemDrive
如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
更改 MongoDB 助手二进制文件的位置
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
单击 Downloads & Settings 标签页。
在 Download Directory 标题下方,单击 Download Directory (Windows) 中所示路径右侧的 。
将路径更改为所需的新路径。
单击 Save(连接)。
Create the new directory you specified on each host that runs a MongoDB Agent. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:
md \<newPath> 重要
确保运行 MongoDB Agent 的系统用户可以写入这个新目录。这通常是
SYSTEM
用户,除非您更改了用户,否则不需要其他配置。
更改 MongoDB 助手配置备份的位置
用您首选的文本编辑器打开 MongoDB 助手配置文件。
Change the
mmsConfigBackup
setting to the new path for the configuration backup file. ReplaceX
in the following example with the drive letter on which your backup is stored.mmsConfigBackup=X:\<newPath>\mms-cluster-config-backup.json 保存 MongoDB 助手配置文件。
将配置备份文件移至新目录。 使用 Windows 资源管理器移动文件,或从命令提示符或 PowerShell 发出以下命令:
move %SystemDrive%\MMSMongoDB\versions\mms-cluster-config-backup.json \<newPath>
使用此程序更新到 MongoDB Agent:
在运行 Debian 8、Debian 9、Ubuntu 18.04、Ubuntu 20.04 或 Ubuntu 22.04 的 x86_64 架构上:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
下载最新版本的 MongoDB 助手。
注意
从这一步开始,按照 MongoDB Agent 安装模式,将提供的命令复制到 Linux shell 中。
从将运行 MongoDB 助手的主机上的 Shell 中,发出以下 curl
命令来下载 Ubuntu 18.04/20.04/22.04 或 Debian 9/10/11(适用于 64 位 x86 架构)的安装程序:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.amd64.ubuntu1604.deb
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
在使用deb
包运行Ubuntu 18.04的 zSeries 架构上:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
使用此程序更新到 MongoDB Agent:
在 x 86 _ 64架构上:
使用rpm
包运行 RHEL/ CentOS 6 .x:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
运行 RHEL/ CentOS 7 .x, SUSE12 、 SUSE15或Amazon Linux 2 :
使用rpm
包:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
使用tar
存档:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装MongoDB Agent助手的目录中,使用首选文本编辑器打开 local.config文件。
vi <install-path>/local.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
可选:创建二进制、日志和数据目录。
If you have existing Monitoring Agent and/or Backup Agent users and do not plan on activating Automation, you only need to create the log directory.
创建以下目录来存储MongoDB Agent所需的文件。
注意
在文件路径中使用 mongodb-mms-automation
是一项传统项目,并不平均值在安装MongoDB Agent时会配置自动化。
组件 | 默认目录 | 说明 |
---|---|---|
二进制文件 |
| 这些是MongoDB Agent管理的二进制文件。 其中包括MongoDB Agent 、 BI Connector和MongoDB二进制文件。 |
MongoDB 助手日志 |
| 这些是MongoDB Agent创建的日志文件。 |
MongoDB数据库 |
| 这些是MongoDB Agent创建和管理的数据库。 |
运行以下命令以创建目录:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation sudo mkdir -m 755 -p /var/log/mongodb-mms-automation sudo mkdir -m 755 -p /data
默认,助手二进制文件和Cloud Manager配置备份文件位于/var/lib/mongodb-mms-automation
中。 如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
要更改代理二进制文件的位置:
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
更改路径。
单击 Downloads & Settings(连接)。
在Download Directory标题下方,单击Download Directory (Linux)中所示路径右侧的铅笔图标。
将路径更改为所需的新路径。
单击 Save(连接)。
在运行代理的每台主机上创建您指定的新目录。
sudo mkdir -m 755 -p /<newPath>
要更改助手配置备份的位置,请执行以下操作:
在您首选的文本编辑器中打开助手配置文件。
将
mmsConfigBackup
设置更改为配置备份文件的新路径。mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json 保存代理配置文件。
将配置备份文件移至新目录。
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
为运行MongoDB Agent的系统用户分配权限。
运行以下命令:
Create mongodb user and group if they do not exist if ! sudo /usr/bin/id -g mongodb &>/dev/null; then sudo /usr/sbin/groupadd -r mongodb fi Create mongodb user if they do not exist and assign them to the mongodb group if ! sudo /usr/bin/id mongodb &>/dev/null; then sudo /usr/sbin/useradd -M -r -g mongodb \ -d /var/lib/mongo -s /bin/false \ -c mongodb mongodb > /dev/null 2>&1 fi Grant the mongodb:mongodb user and group permissions to manage deployments. sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation sudo chown mongodb:mongodb /var/log/mongodb-mms-automation sudo chown mongodb:mongodb /data
在 PowerPC 架构上的 RHEL/ CentOS ( 7 .x) 上(管理MongoDB 3.4或更高版本的部署):
使用rpm
包:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
使用tar
存档:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装MongoDB Agent助手的目录中,使用首选文本编辑器打开 local.config文件。
vi <install-path>/local.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
可选:创建二进制、日志和数据目录。
If you have existing Monitoring Agent and/or Backup Agent users and do not plan on activating Automation, you only need to create the log directory.
创建以下目录来存储MongoDB Agent所需的文件。
注意
在文件路径中使用 mongodb-mms-automation
是一项传统项目,并不平均值在安装MongoDB Agent时会配置自动化。
组件 | 默认目录 | 说明 |
---|---|---|
二进制文件 |
| 这些是MongoDB Agent管理的二进制文件。 其中包括MongoDB Agent 、 BI Connector和MongoDB二进制文件。 |
MongoDB 助手日志 |
| 这些是MongoDB Agent创建的日志文件。 |
MongoDB数据库 |
| 这些是MongoDB Agent创建和管理的数据库。 |
运行以下命令以创建目录:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation sudo mkdir -m 755 -p /var/log/mongodb-mms-automation sudo mkdir -m 755 -p /data
默认,助手二进制文件和Cloud Manager配置备份文件位于/var/lib/mongodb-mms-automation
中。 如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
要更改代理二进制文件的位置:
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
更改路径。
单击 Downloads & Settings(连接)。
在Download Directory标题下方,单击Download Directory (Linux)中所示路径右侧的铅笔图标。
将路径更改为所需的新路径。
单击 Save(连接)。
在运行代理的每台主机上创建您指定的新目录。
sudo mkdir -m 755 -p /<newPath>
要更改助手配置备份的位置,请执行以下操作:
在您首选的文本编辑器中打开助手配置文件。
将
mmsConfigBackup
设置更改为配置备份文件的新路径。mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json 保存代理配置文件。
将配置备份文件移至新目录。
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
为运行MongoDB Agent的系统用户分配权限。
运行以下命令:
Create mongodb user and group if they do not exist if ! sudo /usr/bin/id -g mongodb &>/dev/null; then sudo /usr/sbin/groupadd -r mongodb fi Create mongodb user if they do not exist and assign them to the mongodb group if ! sudo /usr/bin/id mongodb &>/dev/null; then sudo /usr/sbin/useradd -M -r -g mongodb \ -d /var/lib/mongo -s /bin/false \ -c mongodb mongodb > /dev/null 2>&1 fi Grant the mongodb:mongodb user and group permissions to manage deployments. sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation sudo chown mongodb:mongodb /var/log/mongodb-mms-automation sudo chown mongodb:mongodb /data
On zSeries architecture (managing MongoDB 3.4 or later deployments):
Running RHEL / CentOS 7.x/8.x using the
rpm
package manager:
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
使用此过程可在不使用MongoDB Agent Linuxdeb
或rpm
包的 系统上安装 更新。
Optional: Add any existing configuration options for your legacy Agents.
If Automation did not manage your Backup or Monitoring Agents, you can add any Backup or Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.
重要
Deployments using Kerberos Authentication
Don't add either of the following settings from the legacy Agents:
krb5Principal
krb5Keytab
Your legacy Agents authenticated with Kerberos as separate database users. Because the MongoDB Agent combines the functions of the legacy Agents, it employs a single database user. To upgrade to the MongoDB Agent and continue using Kerberos, you must:
Create a new Kerberos User Principal and database user for the MongoDB Agent.
Update the Agent authentication configuration in the Cloud Manager Authentication & TLS settings with the new MongoDB Agent Principal and Keytab files.
You can remove the legacy Monitoring and Backup Agent users after updating to the MongoDB Agent.
To add options that you had for your 备份代理 and 监控代理:
Under the Backup Configurations section:
Type the desired setting in the Setting box and its corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
Under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
添加部署所需的所有设置后,单击Next 。
您可以单击删除已添加的所有设置。
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装MongoDB Agent助手的目录中,使用首选文本编辑器打开 local.config文件。
vi <install-path>/local.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
可选:创建二进制、日志和数据目录。
If you have existing Monitoring Agent and/or Backup Agent users and do not plan on activating Automation, you only need to create the log directory.
创建以下目录来存储MongoDB Agent所需的文件。
注意
在文件路径中使用 mongodb-mms-automation
是一项传统项目,并不平均值在安装MongoDB Agent时会配置自动化。
组件 | 默认目录 | 说明 |
---|---|---|
二进制文件 |
| 这些是MongoDB Agent管理的二进制文件。 其中包括MongoDB Agent 、 BI Connector和MongoDB二进制文件。 |
MongoDB 助手日志 |
| 这些是MongoDB Agent创建的日志文件。 |
MongoDB数据库 |
| 这些是MongoDB Agent创建和管理的数据库。 |
运行以下命令以创建目录:
sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation sudo mkdir -m 755 -p /var/log/mongodb-mms-automation sudo mkdir -m 755 -p /data
默认,助手二进制文件和Cloud Manager配置备份文件位于/var/lib/mongodb-mms-automation
中。 如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
要更改代理二进制文件的位置:
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
更改路径。
单击 Downloads & Settings(连接)。
在Download Directory标题下方,单击Download Directory (Linux)中所示路径右侧的铅笔图标。
将路径更改为所需的新路径。
单击 Save(连接)。
在运行代理的每台主机上创建您指定的新目录。
sudo mkdir -m 755 -p /<newPath>
要更改助手配置备份的位置,请执行以下操作:
在您首选的文本编辑器中打开助手配置文件。
将
mmsConfigBackup
设置更改为配置备份文件的新路径。mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json 保存代理配置文件。
将配置备份文件移至新目录。
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
为运行MongoDB Agent的系统用户分配权限。
运行以下命令:
Create mongodb user and group if they do not exist if ! sudo /usr/bin/id -g mongodb &>/dev/null; then sudo /usr/sbin/groupadd -r mongodb fi Create mongodb user if they do not exist and assign them to the mongodb group if ! sudo /usr/bin/id mongodb &>/dev/null; then sudo /usr/sbin/useradd -M -r -g mongodb \ -d /var/lib/mongo -s /bin/false \ -c mongodb mongodb > /dev/null 2>&1 fi Grant the mongodb:mongodb user and group permissions to manage deployments. sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation sudo chown mongodb:mongodb /var/log/mongodb-mms-automation sudo chown mongodb:mongodb /data
后续步骤
MongoDB Agent 更新完成后: