You can configure a service before installation using either the DC/OS CLI or the GUI.
CLI
This section describes how to use the DC/OS CLI to configure services.
-
View the available configuration options for the service with the
dcos package describe --config <package-name>
command.dcos package describe --config marathon
The output should look like:
{ ... "service": { "additionalProperties": false, "description": "Marathon app configuration properties.", "properties": { "cpus": { "default": 2, "description": "CPU shares to allocate to each Marathon instance.", "minimum": 0, "type": "number" }, ... "instances": { "default": 1, "description": "Number of Marathon instances to run.", "minimum": 0, "type": "integer" }, "mem": { "default": 1536, "description": "Memory (MB) to allocate to each Marathon instance.", "minimum": 512, "type": "number" } }, ... } }
-
Create a JSON configuration file. You can choose an arbitrary name, but you might want to choose a pattern like
<package-name>-config.json
. For example,marathon-config.json
.nano marathon-config.json
-
Use the
properties
objects to build your JSON options file. For example, to change the number of Marathon CPU shares to 3 and memory allocation to 2048:{ "service": { "cpus": 3.0, "mem": 2048.0 } }
-
From the DC/OS CLI, install the DC/OS service with the custom options file specified:
dcos package install --options=marathon-config.json marathon
For more information, see the dcos package documentation.
GUI
This section describes how to use the DC/OS GUI to configure services.
You can edit and install the configuration file for your service from the DC/OS GUI. You can also download the config.json
file for reference.
-
From the DC/OS GUI, click on Catalog in the left hand navigation menu. The Catalog will appear.
Figure 3. Catalog screen
-
From the Catalog, choose your service. In this case, we will choose Elastic by clicking on the Elastic image. The Elastic service isntance page will appear.
-
From the Elastic service instance page, click on the REVIEW & RUN button.
Figure 4. Review & Run button
-
The Edit Configuration page will appear. If you need to see the code, click on the JSON Editor button at the top right.
Figure 5. JSON Editor button
-
The screen will split, showing you the Edit Configuration page and a text editor. Any changes you make to the Edit Configuration page are reflected in the JSON file shown on the right.
Figure 6. Edit Configuration split screen
-
When you finish making your changes, click the REVIEW & RUN button. The Review Configuration page will appear. This will show the Preinstall Notes, reminding you of the prerequisites for this service. You have the opportunity to review and edit your configuration file, or download it.
Figure 7. Review Configuration page
-
If you have more changes to make, click the Edit Config button. You may also download the
config.json
file by clicking on the Download Config button. This will start a download to your system’s designated download folder. This is useful to have as reference, upgrading and for backup.Figure 8. Download Config button
-
When you have finished configuring your installation, click the Run Service button on the top right.
Figure 9. Run Service button
-
DC/OS will install your service and display a success screen.
Figure 10. Success screen
-
From the Services tab, you can see that your service is now running.
Figure 11. Services screen showing Elastic service