Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Serverless Computing and Microservices With Iron.io and Mesosphere

DZone's Guide to

Serverless Computing and Microservices With Iron.io and Mesosphere

See how two companies have joined together to provide a multi-cloud job-processing service. This article includes a step-by-step guide to getting your system set up.

· Cloud Zone
Free Resource

MongoDB Atlas is a database as a service that makes it easy to deploy, manage, and scale MongoDB. So you can focus on innovation, not operations. Brought to you in partnership with MongoDB.

Iron_Mesos_A


Lots of people have been asking about how they can use Mesosphere and Iron.io together. It makes sense because Iron.io’s workload processing engine and hybrid microservices architecture are perfectly suited to take advantage of Mesosphere’s Datacenter Operating System (DC/OS), the first open and comprehensive platform for building, running and scaling modern enterprise applications.

The serverless Iron.io platform provides a multi-cloud, Docker-based job-processing service. Using DC/OS with Iron.io, joint customers would see enhanced flexibility to develop their hybrid cloud strategy and run distributed job processing across heterogeneous environments. This would be a big win for enterprise customers who want to pair the scalability and operational ease of DC/OS with the serverless and microservices expertise of Iron.io.

This is why our two companies are working together to create a series of reference architectures for enterprises looking to adopt microservices at scale, for a variety of modern applications and workloads using a containerized infrastructure.

Evolution Enterprise Applications
Source

Benefits

DC/OS drastically simplifies the process of running applications, including those built around Docker containers and big data systems. It is built on a foundation of Apache Mesos, which works under the covers to aggregate up to tens of thousands of machines into a single resource pool. DC/OS services are highly available, and users can easily deploy and manage distributed services, as well as massive collections of application containers, without configuring servers.

Iron.io provides a hosted service that can deploy workers across public and private cloud environments. These IronWorkers are instantiated in the appropriate target clouds and execute their business logic before being destroyed.

More often than not, IronWorker jobs connect to enterprise big data services and SQL/NoSQL databases. This is where the power of DC/OS can play a key role, by allowing infrastructure developers to build distributed systems that dynamically leverage a range of underlying resources, offering the following key benefits:

  • Hybrid microservices: Both Iron.io and Mesosphere are able to support and run across public, private, and hybrid cloud environments. This allows customers of all sizes from startups to large enterprises to deploy “Hybrid microservices,” allowing flexibility of workload pipelines and back-end data services to be assembled based on performance, security, price and other constraints that customers care about.
  • Event-driven resource optimization: As IronMQ queues grow, they can set off triggers that can be used by DC/OS to expand the targeted resources.
  • Polyglot languages, meet polyglot databases: The benefits of being polyglot has been widely publicised in cloud-native environments. Combining Iron.io’s support for multiple languages with Mesosphere’s ability to run a variety of big data and analytics platforms provides the greatest flexibility in the industry in a turnkey approach.
  • Containers-as-a-Service (CaaS): Specifically for, but not limited to born-in-the-cloud SaaS companies, the evolution of their platforms to microservices can be accelerated through the use of a CaaS environment. Our combined solution provides comprehensive CaaS capabilities.

A high-level overview that shows how Iron.io and Mesosphere DC/OS work together, highlighting some of these benefits can be found below. For more background, you can also check out my recent post on Iron.io hybrid capabilities.

Iron.io Stack

Enabling Iron.io IronWorker on Mesosphere

  1. Sign up for an account at https://hud.iron.io.
  2. Contact sales@iron.io for access to the Hybrid Cluster configuration.
  3. Log into https://hud.iron.io.
  4. Go to My Clusters.Iron.io Hud Dashboard
  5. Select create a new cluster
    1. Name can be any name.
    2. Memory: This is the amount of memory to restrict the worker to for the workers in the cluster.
    3. Disk Space: This is the amount of disk space the container for workers will have access to when running.Clusters
  6. Select your cluster and keep track of the Cluster ID and Cluster Token as we will need these two items later.Internal Clusters
  7. Log into your DC/OS Cluster.
  8. Select Services.
  9. Click on Marathon.
  10. Select “Open Service”.Marathon UI
  11. In the Marathon UI select “Create new Application”.
  12. In the New Application Dialog give the Application any name.
    1. You can specify the number of CPUs to make available to each container and the amount of memory.
    2. IronWorker will automatically break the memory up into workers based on the available memory. So if there is 2048 memory with 512MB workers then there would be 4 workers per instance.New Application
  13. In the Docker Container:
    1. Image: index.docker.io/iron/gorunner (This is the image that will be pulled for the container).
    2. Network: Any option should work as long as the container can connect outbound to 443 *.iron.io.
    3. Select “extend runtime privileges”.
  14. Select Environment Variables
    • Create three Environment Variables.
      1. CLUSTER_ID=CLUSTERID (This is the value from the my clusters page).
      2. CLUSTER_TOKEN=CLUSTERTOKEN (This is the value from the my clusters page).
    • ENV=PRODUCTION

New Application 2

  1. Select Health Checks
    1. We’ll be creating 3 health checks
    2. Healthcheck 1
      1. COMMAND: ps -Aef | grep -q ./runner
      2. Grace Period: 300
  • Interval: 60
  1. Timeout: 20
  2. Max Consecutive Failures: 3
  3. Healthcheck 2
    1. COMMAND: ps -Aef | grep -q dockerd
    2. Grace Period: 60
  • Interval: 60
  1. Timeout: 20
  2. Max Consecutive Failures: 3
  3. Healthcheck 3
    1. COMMAND: docker ps -a
    2. Grace Period: 300
  • Interval: 60
  1. Timeout: 20
  2. Max Consecutive Failures: 3

16. Select Optional

  1. On your Mesosphere node,s you will need to perform a “docker login” and log in with the user who has access to the Iron.io IronWorker Docker image. Once you have done that you will need to gzip the .docker folder with the config.json and make sure it is available on all of the nodes.
  2. Put the tar.gz file on each node where it is accessible toDC/OS
  3. In URIs put the path to the file like: file:///etc/docker.tar.gzNew Application 3
  4. Select “Create Application”
  5. You can now click scale to have instances created

Summary

We are truly excited about this partnership and the potential it holds for turnkey “hybrid microservices” deployments. I’m looking forward to seeing how customers innovate around our combined platforms. Please share your comments and feedback below about your use cases, additional areas we should focus on, or anything else really. And stay tuned for a lot more from this partnership in the near future.

MongoDB Atlas is the best way to run MongoDB on AWS — highly secure by default, highly available, and fully elastic. Get started free. Brought to you in partnership with MongoDB.

Topics:
iron.io ,serverless ,mesosphere ,platform ,microservices ,cloud ,docker ,engine ,architecture

Published at DZone with permission of Doug Coburn, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}