Giter Site home page Giter Site logo

layercake's Introduction

Layer Cake

Modern cloud automation using Terraform, opinionated fork of Segment Stack

Getting started

Pre-requisites

This only works on OS X for now

make install

Baking

AMI Baking assumes you have an existing vpc & subnet that you can spin up a Packer Builder instance. This can be a default vpc and public subnet. You will also need to find an Ubuntu 14.04 Trusty AMI to use for this example.

# TRUSTY_AMI_ID=ami-12345 AWS_REGION=us-east-1 VPC_ID=vpc-123456 SUBNET_ID=subnet-123456 make build-trusty

Orchestration

Write the following to a file named main.tf in a directory:

variable "region" {
    description = "Where to create the AWS resources"
    default     = "us-east-1"
}

module "layercake" {
    source                 = "github.com/likwid/layercake"
    name                   = "layercake-example"
    environment            = "sandbox"
    region                 = "${var.region}"
    key_name               = "sumnurv"
    docker_host_ami        = "ami-123456"
    docker_registry_s3_arn = "arn:aws:s3:::bucket_name"
}

provider "aws" {
    region = "${var.region}"
}

Inside directory where main.tf resides:

# terraform get
# terraform plan
# terraform apply
# terraform output -module="layercake.bastion"

Note: If you experience errors while executing terraform apply, just apply again, it is idempotent.

Provisioning

You will want to create a bucket for private docker registry storage

# ssh ubuntu@bastion_external_ip -oForwardAgent=yes
# ssh management.lc.io -oForwardAgent=yes
# git clone [email protected]:likwid/layercake
# cd layercake/tools/ansible
# ansible-playbook playbooks/nomad-consul-servers/playbook.yml -e "s3_bucket=blah"
# ansible-playbook playbooks/nomad-consul-agents/playbook.yml -e "s3_bucket=blah"

layercake's People

Contributors

likwid avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

layercake's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.