Top Banner
1 © Copyright 2016 EMC Corporation. All rights reserved. 1 © Copyright 2016 EMC Corporation. All rights reserved. 12-FACTOR APP FTW !!! (FOR THE WIN)
25

EMC World 2016 12 Factor Apps FTW

Apr 12, 2017

Download

Education

Tommy Trogden
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: EMC World 2016 12 Factor Apps FTW

1© Copyright 2016 EMC Corporation. All rights reserved. 1© Copyright 2016 EMC Corporation. All rights reserved.

12-FACTOR APP FTW !!! (FOR THE WIN)

Page 2: EMC World 2016 12 Factor Apps FTW

2© Copyright 2016 EMC Corporation. All rights reserved.

Our Asks…..• Don’t be quiet or shy !!• Sales Pitch Free Zone! • Tweet it out Questions! #EMCWorld

@vTexan @bverkley

Page 3: EMC World 2016 12 Factor Apps FTW

3© Copyright 2016 EMC Corporation. All rights reserved.

Product Companies Are Creating “Smart Devices”EVERY INDUSTRY IS BEING DIGITALLY TRANSFORMED

Page 4: EMC World 2016 12 Factor Apps FTW

4© Copyright 2016 EMC Corporation. All rights reserved.

APPS ARE GOING FROM MONOLITHIC…

To Cloud Native

http://catina.co

Page 5: EMC World 2016 12 Factor Apps FTW

5© Copyright 2016 EMC Corporation. All rights reserved.

WHAT MAKES CLOUD NATIVE APPS DIFFERENT?

• Operate At Much Greater Scale On Much More Data• Tend To Be Built On Microservices• Use New Development Methods• As Well As New Deployment, Organizational and

Management Models• With Open Source Components At All Levels

Different Promises:

Page 6: EMC World 2016 12 Factor Apps FTW

6© Copyright 2016 EMC Corporation. All rights reserved.

CLOUD NATIVE APPS INFRASTRUCTURE NEEDS

• Programmability (“Infrastructure As Code”)• Elasticity (Which Demands A Scale-Out Architecture)• Economics (Steers Towards Commodity + Software-

based)• Strong Instrumentation And Telemetry Of

Infrastructure Layer

Page 7: EMC World 2016 12 Factor Apps FTW

7© Copyright 2016 EMC Corporation. All rights reserved.

DevOps is an operations model where software

development principles are applied to operations

Page 8: EMC World 2016 12 Factor Apps FTW

8© Copyright 2016 EMC Corporation. All rights reserved.

OKAY, I TOTALLY GET IT ! WHAT'S THE BLUEPRINT?

Page 9: EMC World 2016 12 Factor Apps FTW

9© Copyright 2016 EMC Corporation. All rights reserved.

• It’s a methodology for developing what is known as “Cloud Native Apps”• It helps minimize divergence between development

and production• It enables continuous deployment to maximize agility• It can be applied to any app written in any

programming language

WHAT IS 12-FACTOR

Page 10: EMC World 2016 12 Factor Apps FTW

10© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR I - CODEBASE

• Not just for developers anymore• Central repository for all

infrastructure Information– Chef, Ansible, Puppet, Jenkins etc

• Ops: “Dear Ops – can you deploy this code for me….is it in GitHub? If not, it doesn’t exist !.”

One codebase tracked in revision control, many deploys

Page 11: EMC World 2016 12 Factor Apps FTW

11© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR II - DEPENDENCIESExplicitly declare and isolate dependencies

• Never make environment assumptions– Enable automated builds of fresh environments

• Explicitly declare in code– Track in your code repository

• Ops: “Dear Ops, my app broke, can you update a dependency for me?” - “No. Declare it and rebuild.”

Page 12: EMC World 2016 12 Factor Apps FTW

12© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR III - CONFIG

• Config is everything that is likely to vary between deploys ! (Staging, Production, Dev etc)• Include access credentials, logging config• Not buried into the code (with passwords etc)

• Ops “Hey, can you update the app to reflect this new password….ah nope….store your config somewhere other than the code !”

Store config in the environment

Page 13: EMC World 2016 12 Factor Apps FTW

13© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR IV - BACKING SERVICESTreat backing services as attached resources

• URLs allow freedom. Enjoy your freedom. – Freedom of mobility– Freedom of scalability– Freedom of language– Freedom of provider

• Ops: Hardware changes won’t necessitate application changes. Delightful.

Page 14: EMC World 2016 12 Factor Apps FTW

14© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR V - BUILD, RELEASE, RUN

• Build = Codebase being built• Release = Build + Config• Run = deploy to the wild

• Ops: Can you edit this one thing for me…NO ! We don’t do snowflakes…trust the tools

Strictly separate build and run stages

Page 15: EMC World 2016 12 Factor Apps FTW

15© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR VI - PROCESSExecute the app as one or more stateless processes

• When bad stuff happens to good code– Failure is not an option… it is a certainty– Outages are not a choice… how you handle them is

• Be as stateless as possible, so failures are easy to recover from

• Ops: Do you enjoy waking up at 2am to restart a process ?

Page 16: EMC World 2016 12 Factor Apps FTW

16© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR VII - PORT BINDING

• The app should be completely self contained. Don’t assume your app is the only thing on that server• Resources needed to listen (IP Address, Ports) should

be received from the environment (env)• Multi-level systems (Java in Tomcat, PHP in Apache)

violate this principle.• Ops: Ahhhh, my app isn’t working anymore, is

someone else using 8080? Is Python 3.5 compatible with Apache 2.2?

Export services via port binding

Page 17: EMC World 2016 12 Factor Apps FTW

17© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR VIII - CONCURRENCYScale out via the process model• One task = one process• To scale a task up, add processes to do more at once• To improve concurrency, look to eliminate locking &

increase caching (ie table database locking etc)• Reduce whack-a-mole scale bottlenecks• Ops: Infrastructure should be pools of resources and

the applications should allocated them to the tasks based on demand

Page 18: EMC World 2016 12 Factor Apps FTW

18© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR IX - DISPOSABILITYMaximize robustness with fast startup and graceful shutdown

• Startup times should be low• No loss of state for users if process is lost• If it can’t heal itself, kill it and bring up another one.

• Ops: “Can you reboot this app….no….kill it and respawn it”

Page 19: EMC World 2016 12 Factor Apps FTW

19© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR X - DEV/PROD PARITYKeep development, staging, and production as similar as possible

• “Worked in Dev….no idea why it’s not in Prod” • Do you want to troubleshoot code or environment?• Increase deployment confidence• Performance can be different !

• Ops: Reduce the blame game, and the downtime

Page 20: EMC World 2016 12 Factor Apps FTW

20© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR XI - LOGS

• Log absolutely everything !• Searching is cheap !!• Logs should be treated as first class citizens !

• Ops: Logs are the canary in the coal mine! It helps you figure out where things went wrong ! “If I had a $1 for each time my boss said “did you check the logs” when I ask him for troubleshooting help!”

Treat logs as event streams

Page 21: EMC World 2016 12 Factor Apps FTW

21© Copyright 2016 EMC Corporation. All rights reserved.

FACTOR XII - ADMIN PROCESSESRun admin/management tasks as one-off processes

• No one-off custom scripts• Everything done live is from the codebase and logs

to the official logging system• (eg, never update the database from the db cli)

• Ops: “Dear Ops, can you run this for me?” - “No, I like you too much to be that mean.”

Page 22: EMC World 2016 12 Factor Apps FTW

22© Copyright 2016 EMC Corporation. All rights reserved.

• 12 Factor is a mindset, and set of tools/process• DevOps is a cultural shift combining Operations

teams and Development Teams (embrace it!)• DevOps is also the most overused term since Cloud • Keep in mind, this is session is a blueprint!

SUMMARY

Page 23: EMC World 2016 12 Factor Apps FTW

23© Copyright 2016 EMC Corporation. All rights reserved.

• Brian Verkley - @bverkley• Tommy Trogden - @vTexan

WANT TO REACH OUT TO US?

Page 24: EMC World 2016 12 Factor Apps FTW

24© Copyright 2016 EMC Corporation. All rights reserved. 24© Copyright 2016 EMC Corporation. All rights reserved.

Page 25: EMC World 2016 12 Factor Apps FTW