Install a basic cluster
From the CLI
To start a basic test cluster , run the following command on the DC/OS CLI.
dcos package install percona-server-mongodb
This command creates a new instance with the default name percona-server-mongodb
. Two instances cannot share the same name, so installing additional instances beyond the default instance requires customizing the name
at install time for each additional instance.
All dcos percona-server-mongodb
CLI commands have a --name
argument allowing you to specify which instance to query. If you do not specify a service name, the CLI assumes a default value matching the package name, percona-server-mongodb
. The default value for --name
can be customized via the DC/OS CLI configuration:
dcos percona-server-mongodb --name=percona-server-mongodb <cmd>
From the web interface
Alternatively, you can install from the DC/OS web interface. If you install Percona Server for MongoDB from the DC/OS web interface, the dcos percona-server-mongodb
CLI commands are not automatically installed to your workstation. They may be manually installed using the DC/OS CLI:
dcos package install percona-server-mongodb --cli
After running the package install
command, the service will begin installing.
Enterprise DC/OS installation
Depending on the security mode of the Enterprise DC/OS cluster, Enterprise DC/OS users may need to create a custom .json file and use it to install Percona Server for MongoDB.
Create a Configuration File
Create a custom configuration file that will be used to install Percona Server for MongoDB, and save it as config.json
. Specify the service account (<service_account_id>
) and a secret path (percona-server-mongodb/<secret-name>
) .
{
"service": {
"service_account": "<service_account_id>",
"service_account_secret": "percona-server-mongodb/<secret-name>"
}
}
Installing with a custom config file
Use the custom configuration file you just created to install Percona Server for MongoDB with this command:
dcos package install --options=config.json percona-server-mongodb
Installing with external volumes enabled
Create a custom configuration file that will be used to install Percona Server for MongoDB, and save it as config.json
.
{
"service": {
"user": "root"
},
"node": {
"external_volume": {
"enabled": true,
"driver_name": "pxd",
}
}
}
Use the custom configuration file you just created to install Percona Server for MongoDB with this command:
dcos package install --options=config.json percona-server-mongodb
Service Deployment
To monitor the deployment of your test instance, install the package cli (see command above) and run the command:
dcos percona-server-mongodb plan status deploy
Once the deploy plan has a status of Complete
, the service is fully deployed.
Service Discovery
To connect a client, query the service for its endpoints.
dcos percona-server-mongodb endpoints
Select an endpoint from the list to see the available connections.
dcos percona-server-mongodb endpoints <endpoint>
Working with the Service
Using the endpoint information, you can connect a client to the service from within the DC/OS cluster (for example, a Marathon app running a client application). See the other sections of the documentation for more details on configuration, operation, and service capabilities.