4developers 2015: enterprise makeover. be a good web citizen, deliver continuously and change your...

165
PaaS Enterprise makeover change organizational SSI CSI ESI Heroku cloud-native progressive enhancement integration 12factor REST deployment pipeline lean startup enterprise decisions continuous delivery Web automation

Upload: proidea

Post on 16-Jul-2015

103 views

Category:

Software


1 download

TRANSCRIPT

PaaS

Enterprise makeover

changeorganizational

SSICSIESI Heroku

cloud-native

progressive

enhancement

integration

12factorREST

deployment pipeline

leanstartup

enterprisedecisions

continuousdelivery

Web

automation

Continuous

Delivery

Organizational change

RESTful

*services

Once upon a time...

http://upload.wikimedia.org/wikipedia/commons/d/d9/Carlo_Dolci_-_St_Catherine_Reading_a_Book_-_WGA06372.jpg

Part 2/10

CMS

Content Management System

Content Management System

presentation

architecture: logic in JSP

infrastructure: shared test environments

performance:

slooooow and unstable

Attention, code freeze!

I’m deploying!

http://upload.wikimedia.org/wikipedia/commons/e/e6/Kazanie_Skargi.jpg

CMSWeb Frontend

CMS

Web Frontend

Change pattern: Low hanging fruit

Change pattern:

Right Time

Hackday

Prototype

Web Frontend

5 times faster

30 deployments in one day

Use the Web, don’t abuse it

Part 3/10

Resources and

representations

header

articles list

most read

articles list

footer

ad

resource

resource

resource

resource

resource

header

articles list

most read

articles list

footer

ad

as media type

header

articles list

most read

articles list

footer

ad

as media type

URL

header

articles list

most read

articles list

footer

ad

as media type

URL

cache-control

in-processand

over HTTP microservice

microlib

reve

rsib

le de

cisio

ns

Web integration

Server Side Include

Edge Side Include

<esi:include src=”http://mywebsite.com/mostRead” />

SSI with

ESI tags

move ESI processing between backend and proxy server

reve

rsib

le de

cisio

ns

Client Side Include

article video

article text

link - sport widget

core content

article text

<a role="widget" class="widget-link" href=”//example.com/sportWidget”>sport widget</a>

link - sport widget

read URL

article video

article text

link - sport widget

article text

HTTP

GET

article video

article text

link - sport widget

article text

HTML + (CSS) + (JS)

article video

article text

sport widget

article text

HTML only

HTML+CSS+JS

Multitracking

reve

rsib

le de

cisio

ns

Why not Single Page App

integration?

Part 4/10

Based on: Nicholas Zakas: Enough With The JavaScript Already!

Based on: Nicholas Zakas: Enough With The JavaScript Already!

Based on: Nicholas Zakas: Enough With The JavaScript Already!

Based on: Nicholas Zakas: Enough With The JavaScript Already!

Based on: Nicholas Zakas: Enough With The JavaScript Already!

+

+ =

Progressive enhancement

curl

wget

bot

view-source:http://mypage.com

“PhantomJS can be CPU and memory intensive (and randomly crashes or freezes)”http://sorcery.smugmug.com/2013/12/17/using-phantomjs-at-scale/

http://upload.wikimedia.org/wikipedia/commons/1/1d/Pietro_Longhi_021.jpg

Scientific method

every 2 weeks

6 times a day

http://upload.wikimedia.org/wikipedia/commons/b/be/Abacus_4.jpg

http://pixabay.com/static/uploads/photo/2013/07/12/18/30/stopwatch-153398_640.png

Lead time: 5-8 minutes

IDE is my layout tool

Build Continuous Deliverability in

Part 6/10

no dev|test|prod.properties in the app codebase

treat you code like an open source library

in-memory HttpSession

is the root of all deployment evil

run apps as stateless processes

VCS

cron

logging

business logic

ssh + tail

ssh + tail

ssh + tail

log to stdout and pipe it to

modern log analysis tool

"Installing software is like a first date: if it can't be polite, smart, and generous, what should I expect later?" - Scott Berkun

create fast, disposable and self-contained

services

<build_tool> build<build_tool> run

Part 7/10

cloud-

native

yo!

http://upload.wikimedia.org/wikipedia/commons/f/f7/EES_(Namibian_rapper).jpg

can’t display ad

personal data compromised

can’t display ad

someone dies

personal data compromised

can’t display ad

someone dies

personal data compromised

can’t display ad

Why did we choose Heroku?

https://c2.staticflickr.com/4/3362/3546059144_64e632801c.jpg

our apps

PaaS IaaS for this app

diff

diff< PORT---> OPENSHIFT_NODEJS_PORT

diff< PORT---> OPENSHIFT_NODEJS_PORT

reve

rsib

le de

cisio

ns

our users

our users

EU backendUS backup

backend

our users

EU backendUS backup

backendVarnish

self-service envs

Part 8/10

self-service envs

trial!

we may outgrow Heroku one day

we may outgrow Heroku one day

OrchestrationPart 9/10

manually

git push/pull origin master

http://upload.wikimedia.org/wikipedia/commons/d/d4/Devicetemplates_laptop-01.png

run build with tests

git push heroku_test master

heroku pipeline:promote

heroku pipeline:promote

CI/CD as a service

self-hosted CI tools

“An opportunity opens up to transform your software into something more expressive and versatile than you expected. This can mean new features or it can just mean the replacement of a big chunk of rigid code with a simple, flexible expression of a deeper model. While this does not happen every day, it is so valuable when it does come up that the opportunity needs to be recognized and grasped.”

“An opportunity opens up to transform your software into something more expressive and versatile than you expected. This can mean new features or it can just mean the replacement of a big chunk of rigid code with a simple, flexible expression of a deeper model. While this does not happen every day, it is so valuable when it does come up that the opportunity needs to be recognized and grasped.”

“An opportunity opens up to transform your software into something more expressive and versatile than you expected. This can mean new features or it can just mean the replacement of a big chunk of rigid code with a simple, flexible expression of a deeper model. While this does not happen every day, it is so valuable when it does come up that the opportunity needs to be recognized and grasped.”

“An opportunity opens up to transform your software into something more expressive and versatile than you expected. This can mean new features or it can just mean the replacement of a big chunk of rigid code with a simple, flexible expression of a deeper model. While this does not happen every day, it is so valuable when it does come up that the opportunity needs to be recognized and grasped.”

Pipeline as code

shape the path

Part 10/10

shape the path

communicate changes and

build good PR

be nice to people

Summary

• Consider using the Web before you start reimplementing it

• Consider designing for replaceability and deployability

• Consider automating boring things including PaaS setup and deployment pipelines

• Consider using different change patterns for your context

Summary

• Consider using the Web before you start reimplementing it

• Consider designing for replaceability and deployability

• Consider automating boring things including PaaS setup and deployment pipelines

• Consider using different change patterns for your context

Summary

• Consider using the Web before you start reimplementing it

• Consider designing for replaceability and deployability

• Consider automating boring things including PaaS setup and deployment pipelines

• Consider using different change patterns for your context

Summary

• Consider using the Web before you start reimplementing it

• Consider designing for replaceability and deployability

• Consider automating boring things including PaaS setup and deployment pipelines

• Consider using different change patterns for your context

Thank you

Mateusz Kwaśniewski

“The purpose of an organization

is to enable ordinary human

beings to do extraordinary

things” - P.Drucker

Continuous

Delivery

Organizational change

RESTful

*services

Read

ing L

ist