In previous post we covered the process of deploying Mesosphere Cluster. In this post we will be covering the process of deploying a new containerized docker application in Mesosphere Cluster. To deploy container application in a Mesosphere Cluster, we will be leveraging Marathon. Marathon is a production-proven Apache Mesos framework for container orchestration. DC/OS is the easiest way to start using Marathon. Marathon provides a REST API for starting, stopping, and scaling applications.

Each application represents a service having many instances running on multiple host. Each application instance is called a task. The application definition describes everything needed to start and maintain the tasks. Once you launch an application, Marathon hands over execution to Mesos. Mesos creates a sandbox directory for each task. The sanbox directory is a directory on each agent node that acts as an execution environment and contains relevant log files. The stderr and stdout streams are also written to the sanbox directory.

Prerequisite 

All Mesos Slave nodes should have docker installed and running.

Step 1 : Login to Marathon URL using Internet browser.

http://<ip_address_of_Master_Node>:8080

Click on Create Application.

1Provide the appropriate ID for the new application. Assign CPU and Memory as recommended by application.  3

4Provide the name of the Docker container to pull the image from.5

Provide the port container port number if needed6

You can change the mode to JSON Mode to view / modify the JSON Script written in background. Click on Change and Deploy Configuration once all configuration are done.

2

Click on the application to view the host application is running on and the port number assigned. As we deployed office application in LAB, I will be using VNC Viewer to connect deployed application. 8

9

10

7

Scaling Application to multiple nodes

12

Provide the number of host you want to run this application on. Click on Scale Application.

13

14

Now we have application running on 3 nodes of the cluster.

11

In this post we covered the process of deploying new application and scaling an existing running application on multiple nodes. I hope this is informative for you. Thanks for Reading!!. Be social and share it in social media, if you feel worth sharing it