Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Mesos

You're reading from  Mastering Mesos

Product type Book
Published in May 2016
Publisher Packt
ISBN-13 9781785886249
Pages 352 pages
Edition 1st Edition
Languages
Authors (2):
Dipa Dubhashi Dipa Dubhashi
Profile icon Dipa Dubhashi
Akhil Das Akhil Das
Profile icon Akhil Das
View More author details

Table of Contents (16) Chapters

Mastering Mesos
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Introducing Mesos Mesos Internals Getting Started with Mesos Service Scheduling and Management Frameworks Mesos Cluster Deployment Mesos Frameworks Mesos Containerizers Mesos Big Data Frameworks Mesos Big Data Frameworks 2 Index

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 to "0.0.0.0"
    server.listen(8000); 
    // Put a friendly message on the terminal
    console.log("Server running at http://127.0.0.1:8000/");
  2. Next we create the package.json file with the following contents:

    {
      "name": "hello-world",
      "description"...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}