Skip to content

Instantly share code, notes, and snippets.

@sehqlr
Last active December 18, 2015 20:14
Show Gist options
  • Save sehqlr/8f8a69d8108bb461481d to your computer and use it in GitHub Desktop.
Save sehqlr/8f8a69d8108bb461481d to your computer and use it in GitHub Desktop.
Packaging Roadmap for Mantl

Packaging Roadmap for Mantl

Rationale

To improve mantl's deployment speed, we are going to replace some ansible role logic with packages. These packages will be defined by a hammer spec, and uploaded to bintray. Anything that is as simple as 'copy this file here' or 'run this command' can be ported to these packages. Then, the ansible roles can be updated to simple package install commands

Because we are using the hammer tool to build these, when hammer supports .deb packages, ubuntu/debian support will come much more easily.

Logic that relies upon Jinja2 templates could be ported to Consul templates, and those could be ported to packages.

The more ansible roles that we port to packages, the faster the build process will be. If we can remove ansible entirely, we can have mantl bootstrap from terraform, and make cluster deployment into a one-step process.

Ansible role

Here is the list from the terraform.sample.yml ansible playbook. For each role that we can port to a package, put the package name after it, and list the package description below, or make a note. I hope that the ad-hoc formatting here makes sense.

Roles for all hosts

  • common: mantl-common
  • lvm: mantl-lvm
  • collectd
  • logrotate: I think that this one should be split up and managed by each package
  • consul-template: this is in the same boat as mantl-consul
  • docker
  • logstash
  • nginx
  • consul: mantl-consul
  • dnsmasq

Roles for workers

  • mesos: Secrets should be managed by vault before this is a package

Roles for controls

  • vault
  • zookeeper
  • mesos
  • marathon
  • chronos
  • mantlui

Roles for edges

  • traefik: mantl-traefik

New packages

These are high level descriptions of some of the packages that we'll make. We can then use these descriptions to write actual hammer specs and package them.

mantl-common

  • set timezone to UTC (ln -sf /etc/localtime /usr/share/zoneinfo/Etc/UTC)

  • create /etc/mantl, a config dir that along with consul/vault k/v stores, can replace ansible facts

  • Dependencies

    • httpd-tools
    • nc
    • openssh
    • policycoreutils-python
    • unzip
    • pyhon-pip
  • Reverse Dependencies

    • mantl-distributive
    • mantl-consul

mantl-lvm

  • create volume group, and save the in etc/mantl
  • enable lvmetad service
  • Dependencies
    • mantl-common
    • device-mapper-libs
    • lvm2

mantl-consul This package is important during the bootstrapping process, so it's getting mentioned here

  • Dependencies
    • mantl-common

mantl-traefik

  • install traefik from the internet
  • copy certs to /etc/traefik/certs/
  • copy traefik.toml to /etc/traefik/
  • copy traefik consul service to /etc/consul/
  • Dependencies
    • mantl-consul

mantl-distributive This is a package that installs distributive, then configures it

  • Dependencies
    • mantl-common
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment