creating resilient, dockerbased applications using lattice

21
TECHNOLOGY SOLUTIONS DELIVERED TECHNOLOGY SOLUTIONS DELIVERED Creating Resilient, Docker based Applications using Lattice

Upload: dustin-ruehle

Post on 23-Jan-2017

282 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

TECHNOLOGY SOLUTIONS DELIVERED

Creating Resilient, Docker based Applications using Lattice

Page 2: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

About Us

Founded in

1999Over 130

Consultants

HQ in

Greenwood

Village, CO

Delivering

Technology

Solutions

Solving

Strategic

Business

Challenges

Page 3: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Agenda

• What is Lattice?

• What is Cloud Rocker?

• What are Buildpacks?

• Demo:• Installing Lattice• Installing Cloud Rocker• Deploying an app• Building a Docker container with an app• Lattice scaling & resiliency• Customizing a buildpack

Page 4: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

What is Lattice?

• Cloud native platform

• Cluster of containerized apps

• Other key components:• http load balancing

• Cluster scheduler

• Log aggregation

• Health management

• Open-source

Page 5: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

What is missing from Lattice?

• Security• UAA and Login Server

• Multi-tenancy• Cloud Controller

• Configuration and cluster lifecycle management• BOSH

Page 6: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Lattice Design

• Eventual consistency• Reconcile desired state with actual

state

• Desired-state is synchronous

• Actual-state is asynchronous

• Uses Garden-Linux to construct Linux containers

Page 7: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

What is Cloud Rocker?

• Made by CloudCredo

• “Convergence of Cloud Foundry and Docker”

• Application developer focused

Linux VirtualBox

Running

Docker Daemon

Exploded

AppBuildpack

Docker

Image

rock

commands

Docker

Hub

Lattice Cluster

ltc

Page 8: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

What are Buildpacks?

• Framework and runtime support for your applications

• Typically examine user-provided artifacts to:• Determine what dependencies to download

• How to configure applications to communicate with bound services

• Can be used as a cloud-native form of governance

Page 9: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Installing Lattice

• Can install on laptop• Vagrant & Local VM

• Can install cluster in “the cloud”

• Using Terraform

• Zero to Lattice Cluster• 10 to 15 min

• 3 basic steps:• Modify lattice.<platform>.tf• Run “terraform get –update”• terraform apply

Page 10: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Installing Cloud Rocker

• Install Vagrant on your local machine

• Get a Docker Hub account• Only necessary for deploying containerized app to Lattice

• git clone Cloud Rocker repository

• vagrant up from local clone directory

Page 11: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Deploying an app….to the “cloud”

•Provision VM(s)• Install Application Runtime•Deploy Application•Configure Load Balancer•Configure SSL Termination•Configure Service Connectivity•Configure Firewall

• ltc create (or cf push)

Page 12: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Deploying an App• ltc create

cloudfoundry/lattice-app

• ltc logs lattice-app

• ltc remove lattice-app

• Some out-of-the-box apps:

• Redis• ltc create redis redis –r

• Rabbit• ltc create rabbit rabbitmq -r

Consider adding these options: --memory-mb=0 --disk-mb=0 --env LATTICE_CLI_TIMEOUT=300

Page 13: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Building a Docker container with an App

• Move your app (exploded) into the cloud rocker vm• Has sample apps /vagrant/sample-apps/

• Add necessary buildpack• rock add-buildpack <git repo location>

• Build from App root directory• rock build <docker hub username>/<app name>:<tag>• Example: rock build dustinruehle/java-rock:latest

• Test locally• rock up• rock off

• Deploy to Lattice cluster• docker push <docker hub username>/<app name>:<tag>• ltc create <docker hub username>/<app name>:<tag> <extra options>

Page 14: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Lattice Scaling & Resiliency

• Scaling• ltc scale

• Total number of containers

• Add cell• Increase num cells in terraform

config• terraform apply

• Resiliency• Kill a container

• Brain notices and restarts new one

• Kill cell• What do you think will happen?

Page 15: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Old way• Fork java buildpack git repo

• Modify • config/components.yml• config/oracle_jre.yml

• Create Oracle JRE repository root• Add index.yml & oracle jdk tarball

• From Cloud rocker:• Add new buildpack – rock add-

buildpack• Build new container – rock build

• Deploy new app to Lattice Cluster

New way (3.0)

• Don’t need to modify ymldirectly

• Override with env variable• Prefix with JBP_CONFIG

and drop .yml• Ex:

• JBP_ORACLE_JRE '[repository_root: "http://52.4.71.14"]'

Customizing Java Buildpack- Going from OpenJDK to OracleJRE

Page 16: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

ECS Team

Page 17: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

About Us

Founded in

1999Over 130

Consultants

HQ in

Greenwood

Village, CO

Delivering

Technology

Solutions

Solving

Strategic

Business

Challenges

Page 18: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Our Solutions

Cloud-Native

Development

Collaboration &

Portals

Custom Software

Development

Enterprise

Architecture

Enterprise Mobility Integration & API

Management

Interactive Design

UI/UX

Project Management

& Governance

Page 19: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Our Partners

Page 20: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Our Clients

Page 21: Creating Resilient, Dockerbased Applications using Lattice

TECHNOLOGY SOLUTIONS DELIVERED

Stage Focus

Project Management

& Governance

Ensure long-term project success through governance.

Discover Validate business challenges and develop a plan to

address these challenges with a new solution.

Design Map the business challenges defined in discover to a

technology solution.

Build Convert the design into a working, deployable solution.

At the end of build, the solution is ready for the

organization to use.

Launch Deploy the developed and tested solution.

Adopt Achieve client success and realize solution business

value.

ECS Team ensures project success through its process of discover, design, build, launch and adopt,

while offering project management & governance at the same time.

ECS Team Solution Framework