• No results found

Workflows and Patterns. #jenkinsconf

N/A
N/A
Protected

Academic year: 2021

Share "Workflows and Patterns. #jenkinsconf"

Copied!
62
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)
(3)
(4)

San Francisco, CA

Janine

Fiona

that’s me

Leo

(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)

Continuous Development Continuous Delivery Continuous Integration Continuous Deployment Continuous Monitoring

Continuous

Jenkins

Everything sounds better

with “continuous”

(13)
(14)

CMS Magento Solr ERP

Project

Applications

Magento Magento 117 Magento 118 Magento 119

Builds

Release

(15)

Staging Magento 72 Magento 103 Magento 119 Magento 72 Magento 103 Magento 119 Magento 72 Magento 103 Magento 119

Environment

Servers

Instances

(16)

Staging Integration

Devbox Deploy Production

transient,

(17)

Staging Integration

Devbox Deploy Production

VirtualBox

+ Vagrant

Jenkins

Server

identical

setup

(18)
(19)

What is it?

A simple shell script. That’s it!

No Ant, no Phing, no fancy PHP tool/framework

Where is it used?

In the build job of a Jenkins server

What does it need to know?

Where to get all the source code from

What does it do?

add metadata, composer, minify,

(20)

What is it?

A couple of chef cookbooks.

Run by AWS OpsWorks or Vagrant,…

Where is it used?

On the target servers

What does it need to know?

The role of the server (web server, devbox, Redis,…)

What does it do?

Installing and configuring web server, PHP, MySQL, Redis,…

(21)

What is it?

A simple shell script.

Or the “deploy” chef cookbook Or EasyDeployWorkflows

Where is it used?

On the target servers

What does it need to know?

How to get the build and where to deploy it to

What does it do?

(Resetting the environment), getting the build, extracting it, managing release folders and symlinks, triggering installer,

(22)

What is it?

A simple shell script.

Sometimes triggered inside “deploy” before_migrate.rb

Where is it used?

On the target servers, called from deployment step

What does it need to know?

What environment this is. Injected settings

What does it do?

(23)

doesn’t know anything about

the app, except where to get it

from and where to put it

knows how to get

the app up and

(24)
(25)

no creating

CMS blocks

no creating

product attributes

no updating of any

configuration settings!

no clearing

the cache

no purging CDN or

Reverse Proxy

content!

(26)

media directory (sometimes minified) Database dump (Vanilla) Magento core Modules Scripts Settings Tools

(27)

Urls

Database

Settings

Payment Provider

Configuration

Feature

Flags…

Everything that’s

different between two

environments

(28)
(29)
(30)

Vagrant

Boxes

(31)

Awesome

stuff

Every single

line potentially

can break

production!

Bratwurst

(Germans)

Donut

Pizza

(Italians)

(32)

Version Control

GIT, SVN,…

(33)

Version Control Code Reviews

(34)

Version Control Code Reviews Build Files DB Installer Settings

(35)

Version Control Code Reviews Build Files DB Installer Static Code Analysis

CodeSniffer

php-pmd

php-cpd

php-depend

(36)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

First system where

code from all

developers/teams

meets each other

unstable system,

might be broken,

will be rebuilt

without warning

(37)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration” Unit Tests

PHPUnit

(38)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

Unit Tests Integration Tests

AOE PMD

(for Magento)

broken links, HTTP headers, W3C validity,…

Test features that rely on other parts

(e.g. framework, external services,…) External components

(SSL, Redis, Varnish,

Basically this is also PHPUnit, but addressing

(39)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

Unit Tests Integration Tests Acceptance Tests

(40)

Firefox Chrome browser size 640 980 1280 1900 US UK DE IT FR languages

(41)

language size

browser

(42)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

Unit Tests Integration Tests Acceptance Tests

Install on “Staging”

Behat,

PDIFF,…

Same setup as production, but different machines

Client QA /

approval

(43)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

Unit Tests Integration Tests Acceptance Tests

Install on “Staging” Stress Tests

JMeter

Spin up EC2 instances to produce traffic

(44)

Again:

multiple servers or

autoscaling setup

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

Unit Tests Integration Tests Acceptance Tests

Install on “Staging” Stress Tests Install on “Production”

A/B

Deployments

on different

scales

Plan B:

rollback

Zero Downtime

(45)
(46)
(47)
(48)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

Unit Tests Integration Tests Acceptance Tests

Install on “Staging” Stress Tests Install on “Production”

(49)

Deployment !=

(50)

Version Control Code Reviews Build Files DB Installer Static Code Analysis Install on “Integration”

Unit Tests Integration Tests Acceptance Tests

Install on “Staging” Stress Tests Install on “Production” Enable Features

(51)

Version

Control Code Reviews Build Static Code Analysis

Install on “Integration”

Unit Tests Integration Tests Acceptance Tests Install on “Staging” Install on

(52)

Pipeline Visualization

#284 #283 #282 #281 #280

Build Static Code

Analysis Unit Tests Install on “Integration” Integration Tests Acceptance Tests #285

(53)
(54)
(55)
(56)
(57)
(58)
(59)
(60)
(61)

Follow me on twitter!

My blog

(62)

References

Related documents

equivalent commands, such as “install a package”, “update a package”, “remove a package”, “list contents of a package”, and “list the package owning the given file”.

When using IPv6, in some situations the WLAN UE may need additional configuration information from the Intranet or ISP besides the IP address. If the UE is DHCP capable and the

A pro rata distribution is taxed as ordinary income only to the extent of earnings and profits of the distributing corporation."'s After a tax-free division, the

Non Smoking Rooms Available: Yes, No, Available Private Bath Refrigerator in Room Television Tours Tour - Guided Tour – Other: Tour - Segway Tour - Self Guided Tour

Objectives: To derive a trial- informed estimate of the incremental costs of intensive treatment as delivered in the Anglo-Danish-Dutch Study of Intensive Treatment in People

An organizational level program utilizing Participatory Curriculum Development (PCD) (Taylor, 2003) is presented to assist postsecondary institutions with development,

Between 1 GB and 2 GB 1.5 times the size of RAM Between 2 GB and 8 GB Equal to the size of RAM More than 8 GB .75 times the size of RAM 500MB free space in /tmp directory.

• During each production run use data loggers or your plant equipment to monitor and record: production run duration, press motor voltage (measured between two phases), pellet