Microservices infrastructure is a modern platform for rapidly deploying globally distributed services
Table of Contents
- 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
- Vault for managing secrets
- Docker container runtime
- Multi-datacenter support
- High availablity
- Security
The base platform contains control nodes that manage the cluster and any number of resource nodes. Containers automatically register themselves into DNS so that other services can locate them.
Once WAN joining is configured, each cluster can locate services in other data centers via DNS or the Consul API.
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.
Resource nodes launch containers and other Mesos-based workloads. Registrator is used to update Consul as containers are launched and exit.
All development is done on the master
branch. Tested, stable versions are identified via git tags.
git clone https://github.com/CiscoCloud/microservices-infrastructure.git
To use a stable version, use git tag
to list the stable versions:
git tag
0.1.0
0.2.0
git checkout 0.2.0
A Vagrantfile is provided that provisions everything on a single VM. To run (ensure that your sytem has 4GB or RAM free):
sudo pip install -r requirements.txt
./security-setup
vagrant up
Note:
- There is no support for Windows at this time, however support is planned.
- There is no support for the VMware Fusion Vagrant provider, so ensure that you set your provider to Virtualbox when running
vagrant up
:vagrant up --provider=virtualbox
.
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.
If you already have running instances (Centos7 is the only Linux distribution supported at this time), do the following to deploy the software:
- Install the software components:
pip install -r requirements.txt
. - Create an Ansible inventory file. You can use the the following files as examples, replacing the host names with your instances:
inventory/1-datacenter
inventory/2-datacenter
Multi-DC with WAN join. Ensure that DCs have network connectivity to each other, especially for ports 8300-8302.
- Set up security. Run:
./security-setup
- Run
ansible-playbook -i <your_inventory_file> site.yml -e @security.yml
The Getting Started Guide covers multi-server and OpenStack deployments.
All documentation is located at https://microservices-infrastructure.readthedocs.org.
To build the documentation locally, run:
sudo pip install -r requirements.txt
cd docs
make html
- Mesos
- Consul
- Multi-datacenter
- High availablity
- Rapid immutable deployment (with Terraform + Packer)
- Marathon
- Kubernetes
- Kafka
- Riak
- Cassandra
- Elasticsearch
- HDFS
- Spark
- Storm
- Chronos
- Manage Linux user accounts
- Authentication and authorization for Consul
- Authentication and authorization for Mesos
- Authentication and authorization for Marathon
- Application load balancer (based on HAProxy and consul-template)
- Application dynamic firewalls (using consul template)
- Logging
- Metrics
- In-service upgrade with rollback
- Autoscaling of Resource Nodes
- Self maintaining system (log rotation, etc)
- Self healing system (automatic failed instance replacement, etc)
- Vagrant (Mac OSX + VirtualBox)
- Vagrant (Windows + VirtualBox)
- OpenStack
- Cisco Cloud Services
- Cisco MetaCloud
- Cisco Unified Computing System
- Amazon Web Services
- Microsoft Azure
- Google Compute Engine
- VMware vSphere
- Apache CloudStack
Please see milestones for more details on the roadmap.
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.
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.