Skip to content

Microservices infrastructure is a modern platform for rapidly deploying globally distributed services

License

Notifications You must be signed in to change notification settings

maier/microservices-infrastructure

 
 

Repository files navigation

Overview

Microservices infrastructure is a modern platform for rapidly deploying globally distributed services

Table of Contents

Features

  • Mesos cluster manager for efficient resource isolation and sharing across distributed services
  • Marathon for cluster management of long running containerized services
  • Consul for service discovery
  • Docker container runtime
  • Multi-datacenter support
  • High availablity

Architecture

The base platform contains control nodes that manage the cluster and any number of compute nodes. Containers automatically register themselves into DNS so that other services can locate them.

Single-DC

Once WAN joining is configured, each cluster can locate services in other data centers via DNS or the Consul API.

Mult-DC

Control Nodes

The control nodes manage a single datacenter. Each control node runs Consul for service discovery, Mesos leaders for resource scheduling and Mesos frameworks like Marathon.

In general, it's best to provision 3 or 5 control nodes to achieve higher availability of services. The Consul Ansible role will automatically bootstrap and join multiple Consul nodes. The Mesos Ansible role will provision highly-availabile Mesos and ZooKeeper environments when more than one node is provisioned.

Control Node

Compute Nodes

The compute nodes launch containers and other Mesos-based workloads. Registrator is used to update Consul as containers are launched and exit.

Compute Node

Getting Started

A Vagrantfile is provided that provisions everything on a single VM. To run (ensure that your sytem has 4GB or RAM free):

  1. Set up security. Run: ./security-setup
  2. Provision box. Run: vagrant up

Software Requirements

Requirements for running the project are listed in requirements.txt. Of note: Ansible 1.8 or later is required. All the software requirements are currently distributed as Python modules, and you can pip install -r requirements.txt to get them all at once.

Deploying on multiple servers

If you already have running instances (Centos7 is the only Linux distribution supported at this time), do the following to deploy the software:

  1. Install the software components: pip install -r requirements.txt.
  2. Create an Ansible inventory file. You can use the the following files as examples, replacing the host names with your instances:
  3. Set up security. Run: ./security-setup
  4. Run ansible-playbook -i <your_inventory_file> site.yml -e @security.yml

The Getting Started Guide covers multi-server and OpenStack deployments.

Documentation

All documentation is located at https://microservices-infrastructure.readthedocs.org.

To build the documentation locally, run:

pip install -r requirements.txt
cd docs
make html

Roadmap

  • Mesos
  • Marathon
  • Consul
  • Multi-datacenter
  • High availablity
  • Manage Linux user accounts
  • Authentication and authorization for Consul
  • Authentication and authorization for Mesos
  • Authentication and authorization for Marathonk
  • Application load balancer based on HAProxy and consul-template
  • In-service Upgrade and Rollback
  • Self maintaining system (log rotation, automatic instance replacement)
  • Autoscaling of compute nodes (with HashiCorp Atlas)
  • Immutable deployment (with HashiCorp Atlas + Packer)
  • Kafka Mesos framework for container logs and application event bus
  • ElasticSearch Mesos framework for container logs
  • Kubernetes Mesos framework
  • Support for Vagrant
  • Support for OpenStack
  • Support for Apache CloudStack
  • Support for Amazon Web Services
  • Support for Microsoft Azure
  • Support for Google compute Engine
  • Support for VMware vSphere

Please see milestones for more details on the roadmap.

Development

If you're interested in contributing to the project, install the software listed in requirements.txt and follow the Getting Started instructions. To build the docs, enter the docs directory and run make html. The docs will be output to _build/html.

Good issues to start with are marked with the low hanging fruit tag.

License

Copyright © 2015 Cisco Systems, Inc.

Licensed under the Apache License, Version 2.0 (the "License").

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Microservices infrastructure is a modern platform for rapidly deploying globally distributed services

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 90.7%
  • Shell 9.3%