DC/OS series [Part 2] - Deploy simple applications
There are so many interesting things in DC/OS GUI (
Dashboard with useful metrics/status from all nodes,
Services tab help us to know which application/service is runnning on which node, its status, etc.).
In this article, we will try to deploy applications to DC/OS and run it.
The Universe tab shows all of the available DC/OS services from package repositories. You can install packages from the DC/OS Universe with a single click. The packages can be installed with defaults or customized directly in the web interface.
You also can use the DC/OS command-line interface (CLI) to manage your cluster nodes, install DC/OS packages, inspect the cluster state, and administer the DC/OS service subcommands, deploy application, etc.
You can quickly install the CLI from the DC/OS web interface.
- Click Install CLI from the top-left corner of the DC/OS web interface.
- Copy and paste the code snippets into your terminal.
To list available commands, either run dcos with no parameters or run dcos help:
OK. We will focus on command
dcos marathon app add <app-resource>which help us deploy application to DC/OS
- Create an app definition file named my-app.json with these contents
By default, applications will be deployed to
private node, so if you want to deploy to
public node, you can add
"acceptedResourceRoles": ["slave_public"] to
- Add your app to Marathon:
If this is added successfully, output will be something like this:
- Verify that the app is added with this command:
The output can be look like this:
- Check application on DC/OS GUI
Services tab, you will see list of applications that you are running. To check application’s information, just click on service and choose service ID that you want to see
As the picture above, you can check your application directly via
Work with us
Drop us a message if you need any helps from the DwarvesLet's build something