Deploying containerized apps using Docker and Mesos

This section gives a brief overview of deploying a Docker containerized Node.js application on Mesos using Marathon. This requires you to have Docker and fig already installed on the machine. Let's follow the steps listed next to carry out the deployment:

  1. Since we are deploying a simple Node.js application, we can start off by creating a simple App.js to print Hello World, a simple hello world Node.js program.
    var http = require('http'); // Configure our HTTP server to respond with Hello World to all requests. var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World "); }); // Listen on port 8000, IP defaults ...

Get Mastering Mesos now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.