KEMBAR78
UrbanCode Deploy DevOps Best Practices | PDF
© 2016 IBM Corporation
UrbanCode Deploy
DevOps Best Practices
Michael	D.	Elder
IBM	Distinguished	 Engineer
Chief	Developer,	 UrbanCode
mdelder@us.ibm.com
@mdelder
Get this deck
http://bit.ly/2c1G8sy
2© 2016 IBM Corporation
Please	Note
2
• IBM’s	statements	regarding	its	plans,	directions,	and	intent	are	subject	to	change	or	withdrawal	
without	notice	at	IBM’s	sole	discretion.
• Information	regarding	potential	future	products	is	intended	to	outline	our	general	product	direction	
and	it	should	not	be	relied	on	in	making	a	purchasing	decision.	
• The	information	mentioned	regarding	potential	future	products	is	not	a	commitment,	
promise,	or	legal	obligation	to	deliver	any	material,	code	or	functionality.	Information	about	
potential	future	products	may	not	be	incorporated	into	any	contract.	
• The	development,	release,	and	timing	of	any	future	features	or	functionality	described	for	our	
products	remains	at	our	sole	discretion.	
• Performance	is	based	on	measurements	and	projections	using	standard	IBM	benchmarks	in	a	
controlled	environment.	The	actual	throughput	or	performance	 that	any	user	will	experience	 will	
vary	depending	upon	many	factors,	including	considerations	such	as	the	amount	of	
multiprogramming	in	the	user’s	job	stream,	the	I/O	configuration,	the	storage	configuration,	and	
the	workload	processed.	Therefore,	no	assurance	can	be	given	that	an	individual	user	will	achieve	
results	similar	to	those	stated	here.
3© 2016 IBM Corporation
• Understanding	DevOps
• DevOps	Best	Practices
• Clouds	&	Containers
Agenda
IBM	Confidential
© 2016 IBM Corporation
Understanding	DevOps
5© 2016 IBM Corporation
Failures due	to	
inconsistent	dev and	
production	
environments
Bottlenecks trying	to	
deliver	more	frequent	
releases		to	meet	
market	demands
Complex,	manual,	
processes	for	release	
lack	repeatability	and	
speed	
Poor	visibility	into	
dependencies	 across	
releases,	resources,	and	
teams
Software	delivery	challenges
Daily	
Build
Monthly
Delivery
Who	did	
this	last	
time?
Dave…
Dave’s	not	
here	man…
Dev
Prod
6© 2016 IBM Corporation
High	performing	teams	adopt	DevOps
Reference: 2013State ofDevOps Report by PuppetLabs
7© 2016 IBM Corporation
Intuitive and Scalable Model Driven Deployment
Composite Applications
Components
Re-usable Workflows Environment Management
SIT
PROD
The “What” The “How” The “Where”
DEPLOYMENT AUTOMATION
8© 2016 IBM Corporation
Intuitive and Scalable Model Driven Deployment
Composite Applications
Components:
Container Images
Re-usable Workflows Environment Management
SIT
PROD
The “What” The “How” The “Where”
DEPLOYMENT AUTOMATION
$ docker run .. {image}:{version}
9© 2016 IBM Corporation
About	philosophy
Culture	of	continual	
experimentation	and	
learning
• Production	like	environments
• Fully	automated	deployments
• Accelerated	delivery	cycles
Build	– Measure	- Learn
“Success	is	not	delivering	a	
feature;	success	is	learning	
how	to	solve	the	customer’s	
problem.”
10© 2016 IBM Corporation 1
0
IBM	Bluemix Garage	Method
Practices
Processes or actions you & your
team perform to achieve an
outcome.
Tracks
A selectedset of practices,tools,
and toolchains tocreateacloud
nativeorcloudenabled solution
Toolchain
Complementary & compatible tools
that when used together create a
flexible solution
Experts & Experiences
ListentoourExperts tolearnhow
wetransformedourbusiness
Combines	industry	best	practices	for	Design	
Thinking,	Lean	Startup,	Agile	Development,	
DevOps,	and Cloud	to	build	and	deliver	
innovative	solutions.
https://www.ibm.com/devops/method
11© 2016 IBM Corporation © IBM
Corporation
New	content	added	weekly
12© 2016 IBM Corporation
Accelerate Innovation
ivDeliverCodeThink Run
Systems of engagement
Systems of Record
Enterprise
Applications
Production
Most	enterprises	need	a	combination	of	DevOps	patterns
12
API
Catalog
Operational Excellence
ivDeliverCodeThink Run Production
Shared
Services
Digital
Applications
• Coordinating	different	
teams	working	at	different	
speeds	
• Balancing	between	agility,	
stability,	and	risk
• Decouple	across	API	
boundary,	but	manage	
release	process	with	
consistent	approach
13© 2016 IBM Corporation
Expectations	of	Continuous	Delivery
User Experience Today Emerging
Primary Workload Type Software supports core
business function
Software enables innovative business approaches to differentiate from
competition
Big Data, Analytics, Mobile/Social Channels
Delivery Model Planned Incremental(DevOps)
Development and Operations Team Sizes 100s and costly 10s with built-in DevOps automation
Release Frequency Months to years Days to weeks, based on business opportunity
Integration Frequency Weeks Continuous
Infrastructure Deployment Days Minutes
Time to Value Planned Opportunistic
Operational Model Systems management Built into application, recovery-oriented, continuous availability
Service Sourcing Develop Consume and assemble (public and private)
Feedback Loop Periodic Continuous interaction with clients
14© 2016 IBM Corporation
Increase	the	operational	awareness	of	your	software earlier	in	the	
development	process.
What	does	DevOps	mean	to	me?
How	do	you	do	that?
§ Architecture
§ Automated	Testing
§ Automated	Deployments
§ Production-Like	Environments
§ Automated	Release	Promotion	Process
§ Version	control	of	all	software,	automation,	and	configuration
Why	do	this?
Because	faster	feedback	loops	enable	rapid	evolution of	ideas	and	
therefore	faster	iterations	of	your	software
Shift	Left
15© 2016 IBM Corporation
Better	communication between	those	who createand	those	who	operate	
(same	people	in	some	cases)
Reduced	fear	of	breaking	the	build/deployment/environment
Fail	fast	before	you	“fail	all”
Heavy	focus	on	experimentation	and	learning
Improve	the	speed	of	your	feedback	loop	to	enable	rapid	evolution	of	ideas
What	are	the	characteristics	of	teams	who	practice	DevOps?
© 2016 IBM Corporation
DevOps	Best	Practices
17© 2016 IBM Corporation
§ Architecture
§ Automated	Testing
§ Automated	Deployments
§ Production-Like	Environments
§ Automated	Release	Promotion	Process
§ Version	control	of	all	software,	automation,	and	
configuration
About	our	next	topics
18© 2016 IBM Corporation
IBM	UrbanCode for	Continuous	Delivery
Drive down cost
Reduce amount of manual labor, resource wait-time,andrework by
eliminating errors & providingself-serviceenvironments
Speed time to market
Increase frequency of softwaredelivery throughautomated, repeatable
deploymentprocesses across development, test and production
Reduce risk
Robust configurationmanagement, coordinatedreleaseprocesses, audits,
and traceability
Enabling clients to continuously deliver applications with high quality and low risk
IBM UrbanCode Build is a continuous integrationandbuildmanagement server optimized
for the enterprise,designed tomake it easy to scaletheconfigurationand managementof
build infrastructureandseamlessly plugin to development, testingand release tooling.
IBM UrbanCode Deploy enables hybridcloudby automatingthe deployment of
applications, databases, configurations and containers into development, test and production
on prem or in the cloud, helping todrive downcost,speed time to market with reducedrisk.
With full-stack environment management and deployment automation,users to design,
deploy and updatefull-stack environments for multiple clouds, including Bluemix, Softlayer,
AWS, Azure, and virtualizedenvironments.
IBM UrbanCode Release is an intelligent collaboration releasemanagement solutionthat
replaces error-pronemanual spreadsheets andstreamlines releaseactivitiesfor application
and infrastructure changes.
19© 2016 IBM Corporation
About	your	architecture
• Architecture	should	support	DevOps principles	such	as	staged	
roll	out,	operational	insights,	and	scriptability
• Each	resource	provides	some	very	practical	advice	for	building	
systems	which	are	focused	on	reliability	and	feedback	loops
Experiment!:	Website	
conversion	rate	
optimization	with	A/B	
and	multivariate	testing
Release	It!:	Design	and	
Deploy	Production-Ready	
Software
20© 2016 IBM Corporation
Application	model
Reliably	capture	application	content	and	configuration	
settings	with	versioning	and	traceability
21© 2016 IBM Corporation
Application	environments
Define	where	components	are	deployed	and	capture	configuration	
settings	per	deployment	environment	for	an	application
22© 2016 IBM Corporation
Templating	for	good	architecture
Templates	can	be	created	to	standardize	component	processes	&	config
23© 2016 IBM Corporation
Create	application	templates	for	accelerated	onboarding
Templates	can	be	created	to	standardize	component	processes	&	config
24© 2016 IBM Corporation
Automated	testing	is	critical	for	automated	feedback
• This	is	THE	HARDEST	part	of	the	whole	experience
• NO	ONE	is	great	at	this,	so	don’t	get	discouraged
• Facebook’s	process	for	code	review	include	stats	on	how	
many	tests	are	consistently	 broken	to	decide	whether	the	test	
failures	are	noteworthy
• Continuously	 improve	your	coverage,	flexibility,	 and	discipline
• Consider	all	aspects	of	testing:
• Programmatic	API	(JUnit)
• REST	API	(HTTPUnit,	REST	Fuse)
• Web	UI	(Selenium)
• Behavior	driven	testing	(Cucumber)
• Performance	testing	(Apache	JMeter)
• Security	testing	(Rational	AppScan &	IBM	QRadar)
25© 2016 IBM Corporation
Embedding	unit	tests	in	your	classes	directly
• Promoted	approach	by	
Netflix	to	reduce	friction	and	
introduces	limited	additional	
bytes	relative	to	third	party	
libraries
• Makes	 it	easy	to	write	
commands,	the	UnitTest
becomes	the	test	harness	
and	verification
• Always	testSuccess()	 and	
testFailure()	use	cases	to	
ensure	expected	behavior
import	static	org.junit.Assert.assertEquals;
import	static	org.junit.Assert.assertNotNull;
public	class	OSDeployEnvironmentCommand extends
OSAbstractOrchestrationCommand<Response>	{
public	static	class	UnitTest {
@Test
public	void	testSuccess()	 throws	InterruptedException,
ExecutionException,	JSONException {
…	
Future<Response>	request	=	
new			OSDeployEnvironmentCommand(…)
.queue();
Response	response =	request.get();
assertNotNull(response);
assertEquals(HttpStatus.SC_OK,												
response.getStatus());	
}
}
26© 2016 IBM Corporation
Testing	Your	Deployed	Application	– REST	API
• We	have	used	REST	Fuse	
which	is	an	Eclipse	project
• Captures	REST	calls	as	
annotations,	freeing	up	
your	test	method	to	just	
verify	behavior
• Requires	a	little	“hoop	
jumping”	for	testing	a	
series	of	calls	(e.g.	POST	..	
PUT	..	GET)
import	static	
com.eclipsesource.restfuse.Assert.assertCreated;
import	...restfuse.annotation.Authentication;
import	...restfuse.annotation.HttpTest;
import	...restfuse.MediaType;
@HttpTest (method	=
com.eclipsesource.restfuse.Method.POST,	 															
contentMethod="getBlueprintRequestBody",
authentications	=	{	
@Authentication(	type	=	BASIC,	
user	=	"{keystoneUser}",	
password	=	"{keystonePassword}")	},
path	=	"/rest/blueprint",
type	=	MediaType.APPLICATION_JSON
)
public	void	testCreateBlueprintOK()	throws	Exception	{
assertCreated(response);
}
27© 2016 IBM Corporation
Behavior	Driven	Development	&	Testing
• Captures	natural	language	
statements	 using	“Given”,	
“When”,	“Then”	clauses
• Each	line	is	matched	to	a	
snippet	of	code	based	on	
regular	expression
• Complete	code	statements	
are	executed	to	validate	
behavior
• Bridge	between	business	
goals	and	technical	details
Scenario:	Success	– Upload	client	directory
Given	I	provide	valid	credentials	to	the	api client
And	I	want	to	use	the	api client	to	make	requests
When	I	upload	the	directory	”data/sample-app”	 with	the	client
Then	the	files	returned	matches	the	upload	directory	”data/sample-app"
28© 2016 IBM Corporation
Testing	Your	Deployed	Application	– Web	UI
• Selenium	is	the	only	
“apparent”	choice	that	
we’ve	come	across	that’s	
effective	
• Couples	automated	test	to	
some	details	of	your	web	UI	
and	must	be	kept	in	sync
• We’ve	developed	 a	few	best	
practices	around	location	
elements	 for	maximum	
flexibility,	 could	publish	this	
if	there’s	interest
public	class	EditorsPage extends	UCDPPage {
…
@FindBy(id	=	"new-blueprint-button")
private	WebElement newButton;
…
public	void	createFile(String	 name,	String	id,	
String[]	values)	{
newButton.click();
util().waitForElementPresentAndVisible(
By.className("new-file-dialog"));
WebElement widget	=		
util().findElement(
By.className("new-file-dialog"));
Dialog	 dialog	=	
Widget.init(this,	 widget,	Dialog.class);
dialog.setValues(values,	 true,	true);
dialog.clickPrimaryButton();
…
}
…
}
29© 2016 IBM Corporation
Automated	deployments
• Visibility	 and	automated	control	of	your	application	deployment	 process
• Manage	application	
components	and	versions
• Manage	configurations	
across	all	environments
• Offer	secure	‘self-service’
capabilities
• Increase	transparency
• Ensure	governance	and	compliancy
30© 2016 IBM Corporation
Define	automated	processes	for	each	application	component
Each	component	defines	a	series	of	steps,	backed	by	
plugin	tasks	or	custom	scripts,	to	deploy	it
31© 2016 IBM Corporation
Define	automated	processes	for	the	application
Order	components	or	apply	logic	which	is	“outside”	of	
any	specific	component
32© 2016 IBM Corporation
IBM	UrbanCode	Deploy	– Plug-ins
Over 150 – in over 50 categories
33© 2016 IBM Corporation
Production-Like	Environments	– Unified	Resource	Tree
Provides	logical	hierarchy	of	deployed	artifacts	and	their	middleware	containers
DEV	Resources
- Web	Host
- Web	Component
- Database	
- Database	Component
QA	Resources
- Web	Host	1
- Web	Component
- Web	Host	2
- Web	Component	
- Database	
- Database	Component
PROD	Resources
- Web	Host	1
- Web	Component
- Web	Host	2
- Web	Component
- Web	Host	3
- Web	Component
- Web	Host	4
- Web	Component
- Database	Primary
- Database	Component
- Database	Secondary
- Database	Component
34© 2016 IBM Corporation
Production-Like	Environments	– Local	Development
Possibly	one	of	the	most	important	principles	of	DevOps
Shift	left	any	operational	concerns	that	lead	to	
differences	from	DEV	to	PROD
https://hub.docker.com/u/ibmcom/#
35© 2016 IBM Corporation
Deployment	of	Applications	across	Environments
Applications	are	
managed	for	
deployment
Components	
from	the	app
Specific	versions	of	
the	Components’	
artifacts	are	
deployed
Compliancy	keeps	track	
of	whether	the	actual	
versions	matches	the	
expected
Each	Component	
knows	its	relevant	
deployment	
processes
Compare	versions	across	
environments	and	define	
Snapshots	of	known	working	
sets	of	Components
View	
deployment	
requests	against	
the	environment
https://developer.ibm.com/urbancode/
Automated	Release	Promotion	Process
36© 2016 IBM Corporation
Promotion	Lifecycles
• Should	focus	on	consistency	
from	end	to	end	
• Use	the	same	logical	
organization	and	component	
automation	in	DEV,	QA,	PROD	
to	validate	the	automation	
early	in	the	delivery	 cycle
• Apply	approval	gates	where	
necessary	 to	ensure	
appropriate	quality	validation	
has	occurred
IBM
Commerce
WebSphere ND
Static
Content
Commerce Data
IBM
Commerce
WebSphere ND
Static
Content
Commerce Data
37© 2016 IBM Corporation
Quality	Assurance	– Automated	gates
• Use	Component	Statuses	and	
Environment	Gates	where	
possible
• Define	statuses	for	all	Apps
• Use	REST	API/CLI	to	
tag/approve	Components	 or	
Snapshots	based	on	
automated	verification	(CI	or	
other	testing)
• Only	components	
versions/snapshots	 with	tag	
can	enter	environment
38© 2016 IBM Corporation
Quality	Assurance	– Manual	Sign	off
• Manual	approvals	are	
possible,	but	recommend	
that	as	much	as	possible	 is	
automated	(e.g.	with	statuses	
+	gates)
• Approval	process	can	trigger	
emails	or	some	clients	use	
”chat	ops”	tools	like	Slack	to	
streamline	the	process
39© 2016 IBM Corporation
Inventory	over	time
40© 2016 IBM Corporation
Configuration	Management	- Snapshots
Creating a Snapshot
Component Versions
1
1
2
2
3
3
321Web
Mid. Code
DB
Snapshot
3
2
1
Mid. Config 1 2 3 3
Snapshot Deployment
ENVSnapshot
3
2
1
WEB HOST
MID HOST
DB HOST
2
1
1
3
2
X
3 3 1
Contents	of	environments	 that	pass	tests
• contain	deployable	 version	and	configuration
Deployments	 are	based	on	deltas
They	provide Automation,	Audit,	and	Visibility
41© 2016 IBM Corporation
Version	applications	with	Snapshots
Capture	tested	component	versions	and	configuration	
settings	as	a	snapshot	that	is	promoted	to	other	
environments	for	better	visibility	and	control
42© 2016 IBM Corporation
Better Release Planning and Management
• Enterprise Calendaring
• Release Process Checklist Templates
• Environment Reservation
Effective Change and Risk Management
• Rational Team Concert integration
• Impact Analysis
Continuous Delivery with Auto-Progression
• IBM UrbanCode Deploy integration
Increased Visibility and Control
• Pipeline View
• Federated Dashboard
• Segment Dependency Graph
UrbanCode	Release
Transform	chaotic	release	planning	into	streamlined	release	events
44© 2016 IBM Corporation
Code	review	should	be	part	of	your	versioning	process
§ Define	and	enforce	coding	
standards	early	in	the	
process
§ Automate	deployment	 to	
production-like	 systems	as	
part	of	automatic	verification
§ Each	commit	should	run	
automated	testing	and	code	
coverage,	and	the	toolchain	
should	enforce	compliance	
before	merging	or	promoting	
changes
45© 2016 IBM Corporation
§ Architecture
§ Automated	Testing
§ Automated	Deployments
§ Production-Like	Environments
§ Automated	Release	Promotion	Process
§ Version	control	of	all	software,	automation,	and	
configuration
About	this	deck
mdelder@us.ibm.com http://linkedin.com/in/mdelder @mdelder
© 2016 IBM Corporation
Clouds	&	Containers
Workload styles vary, but not release methodology
Traditional IT Cloud-Enabled Cloud-Native
App Servers
+ +
DatabaseWeb Servers
Applications
App Servers
+ +
DatabaseWeb Servers
Applications ServicesApplicationsServices
Managed Runtimes
Traditional IT Cloud-Enabled IT Cloud-Native IT
Continuous Integration
Continuous delivery to
production
Cloud-nativeruntimes (node.js)
Pipeline per microservice
Change Record
CMDB
Automated build / deploy
of VMs & Containers
Stage Gates, Co-ordinated Releases
Manual Change & Release
Some automation
Audit reports
CAB
Assessment
&
Approval Theory
Reality
IBM Control Desk
BMC Remedy
As a Business Owner, I want my team to
deliver as fast as possible, but with
appropriate controls when needed.
But don’t slow everything down to the
slowest speed when controls are added!
Change Management vs. Continuous Delivery
Accelerate Innovation
ivDeliverCodeThink Run
Systems of engagement
Systems of Record
Enterprise
Applications
Production
Most enterprises need a combination of DevOps patterns
49
API
Catalog
Operational Excellence
ivDeliverCodeThink Run Production
Shared
Services
Digital
Applications
§ Coordinating	 different	teams	
working	at	different	speeds	
§ Balancing	 between	agility,	
stability,	and	risk
§ Decouple	across	API	
boundary,	but	manage	
release	 process	with	
consistent	 approach
Cloud-Enabled Workloads with UrbanCode Deploy
50
§ Your	applications	 are	managed	
throughout	the	entire	release	 process	
with	predictable	 automation	 and	
inventory	services
§ Your	full-stack	blueprints	 capture	the	
relationships	 between	 your	
applications	 and	cloud	infrastructure
§ OpenStack	API	provides	defacto
standards	for	interacting	with	all	of	
your	cloud	resources
Heat Blueprints
UrbanCode
Deploy
Compute Network Storage
Your Applications &
Middleware
Full-stack Application Pattern
51
Innovate. Disrupt.
Transform. Fast.
@Enterprise Scale.
Hybrid Cloud Deployments through a Single Point of Control
IBM Bluemix
Cloud
Foundry
On-prem IaaS
On-prem Traditional IT
IBM	Cloud	Orchestrator
IBM	PureApplication	System
Manage	application	deployment	across	dev,	test,	and	
production	spanning	multiple	clouds
Key	Points:
• Enable	full	stack	deployments	(OS,	patterns	and	
applications)	across	hybrid	cloud	applications
• Establish	common	DevOps	pipelines	with	plug	points	to	
support	continuous	delivery
Virtual
Machines
Docker
Containers
Other VendorsUrbanCode
Deploy
UrbanCode
Release
https://www.youtube.com/watch?v=fFuRg6l3N44
SCREENCAP: Designer
& Palette
Watson Health: 6 active teams, more on the way
§ Social	Care	(Abu	Dhabi):	
– Complex topology, heavy UCD components (2 Gb)
– 2 hours roundtrip / provision
– 50% Heat engine CPU capacity / provision
§ Real	World	Evidence	:
– 4 Offerings
– Analytics workload (DB2 blue, Cognos)
§ Analytics	Core:
– Analytics workload (Spark clusters)
– UCDP Rest API driven variable sized cluster size
§ Operational	Dashboard:
– Cloud control desk for solution management (provision, monitor,
troubleshoot)
§ Watson	Health	Cloud:
– Foundational micro-services (data lake, data pipeline, logging,
monitoring etc)
53
Abu Dhabi Blueprint
54© 2016 IBM Corporation
Docker is great for developers – everything can be run on your laptop
54
55© 2016 IBM Corporation
Production-Like	Environments	– Local	Development
Possibly	one	of	the	most	important	principles	of	DevOps
Shift	left	any	operational	concerns	that	lead	to	
differences	from	DEV	to	PROD
https://hub.docker.com/u/ibmcom/#
Continuous Integration for Containers
56
Jenkins
IBM UrbanCode
Deploy
Docker Trusted	
Registry
Build	Image
Track	Versions
Deploy	 &	
Promote
§ Jenkins	builds	Docker	images	and	
publishes	 them	to	Docker Trusted	
Registry
§ UrbanCode	Deploy	immediately	 becomes	
aware	of	new	versions,	available	for	
deployment
§ Schedule	 deployments,	 track	readiness	
via	environment	 gates,	and	manage	
configuration	properties	 securely
§ Deployments	 to	Docker Universal	Control	
Plane
Docker Integration Architecture
Docker Trusted
Registry
IBM UrbanCode Deploy
swarm
Docker
Universal
Control
Plane
Legacy
Database
Legacy
Applications
Use UrbanCode Deploy to manage:
Inventory Management Promotion Lifecycle
Separation of Duties Import images from trusted sources
Docker Trusted
Registry
UrbanCode Deploy & Compose
§ Import	your	docker-compose	 file
§ Automatically	 create	resource	tree	components
§ Updates,	Inventory	management,	 Deployments,	 etc.	are	all	the	same.
59
Dev/Test with Hybrid Cloud
Off-PremOn-Prem
Image Registry
PRODSTAGING
Delivery
Pipeline
IBM Bluemix
https://www.youtube.com/watch?v=Eo1rFsv4BW0
IBM UrbanCode
Deploy
© 2016 IBM Corporation
Q&A
Get this deck
http://bit.ly/2c1G8sy
62© 2016 IBM Corporation62
©	Copyright	 IBM	Corporation	 2013.		All	 rights	 reserved.	 The	information	 contained	 in	these	 materials	 is	 provided	 for	informational	 purposes	 only,	 and	 is	provided	 AS	 IS	without	 warranty of	any	kind,	 express	 or	
implied.	 	IBM	shall	 not	be	 responsible	 for	 any	damages	 arising	 out	of	the	use	 of,	 or	otherwise	 related	 to,	 these	 materials.	 	Nothing	 contained	 in	these	 materials	 is	 intended	 to,	 nor	shall	 have	the	effect	of,	 creating	
any	warranties	 or	representations	 from	 IBM	or	its	 suppliers	 or	licensors,	 or	altering	 the	terms	 and	conditions	 of	the	applicable license	 agreement	 	governing	 the	use	 of	IBM	software.	 References	 in	these	 materials	
to	IBM	products,	 programs,	 or	services	 do	not	 imply	 that	they	will	 be	available	 in	all	 countries	 in	which	 IBM	operates.	 	Product release	 dates	 and/or	 capabilities	 referenced	 in	these	 materials	 may	change	 at	any	
time	 at	IBM’s	 sole	 discretion	 based	 on	market	opportunities	 or	other	 factors,	 and	 are	not	intended	 to	be	 a	commitment	 to	future	 product	 or	feature	 availability	 in	any	way.		IBM,	 the	 IBM	logo,	 Rational,	 the	
Rational	 logo,	 Telelogic,	 the	Telelogic	 logo,	 and	other	 IBM	products	 and	services	 are	trademarks	 of	the	International	 Business	 Machines	 Corporation,	 in	the	 United	 States,	 other	 countries	 or	 both.	Other	 company,	
product,	 or	service	 names	 may	be	trademarks	 or	service	 marks	 of	others.
www.ibm.com/software

UrbanCode Deploy DevOps Best Practices

  • 1.
    © 2016 IBMCorporation UrbanCode Deploy DevOps Best Practices Michael D. Elder IBM Distinguished Engineer Chief Developer, UrbanCode mdelder@us.ibm.com @mdelder Get this deck http://bit.ly/2c1G8sy
  • 2.
    2© 2016 IBMCorporation Please Note 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. • The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. • The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
  • 3.
    3© 2016 IBMCorporation • Understanding DevOps • DevOps Best Practices • Clouds & Containers Agenda IBM Confidential
  • 4.
    © 2016 IBMCorporation Understanding DevOps
  • 5.
    5© 2016 IBMCorporation Failures due to inconsistent dev and production environments Bottlenecks trying to deliver more frequent releases to meet market demands Complex, manual, processes for release lack repeatability and speed Poor visibility into dependencies across releases, resources, and teams Software delivery challenges Daily Build Monthly Delivery Who did this last time? Dave… Dave’s not here man… Dev Prod
  • 6.
    6© 2016 IBMCorporation High performing teams adopt DevOps Reference: 2013State ofDevOps Report by PuppetLabs
  • 7.
    7© 2016 IBMCorporation Intuitive and Scalable Model Driven Deployment Composite Applications Components Re-usable Workflows Environment Management SIT PROD The “What” The “How” The “Where” DEPLOYMENT AUTOMATION
  • 8.
    8© 2016 IBMCorporation Intuitive and Scalable Model Driven Deployment Composite Applications Components: Container Images Re-usable Workflows Environment Management SIT PROD The “What” The “How” The “Where” DEPLOYMENT AUTOMATION $ docker run .. {image}:{version}
  • 9.
    9© 2016 IBMCorporation About philosophy Culture of continual experimentation and learning • Production like environments • Fully automated deployments • Accelerated delivery cycles Build – Measure - Learn “Success is not delivering a feature; success is learning how to solve the customer’s problem.”
  • 10.
    10© 2016 IBMCorporation 1 0 IBM Bluemix Garage Method Practices Processes or actions you & your team perform to achieve an outcome. Tracks A selectedset of practices,tools, and toolchains tocreateacloud nativeorcloudenabled solution Toolchain Complementary & compatible tools that when used together create a flexible solution Experts & Experiences ListentoourExperts tolearnhow wetransformedourbusiness Combines industry best practices for Design Thinking, Lean Startup, Agile Development, DevOps, and Cloud to build and deliver innovative solutions. https://www.ibm.com/devops/method
  • 11.
    11© 2016 IBMCorporation © IBM Corporation New content added weekly
  • 12.
    12© 2016 IBMCorporation Accelerate Innovation ivDeliverCodeThink Run Systems of engagement Systems of Record Enterprise Applications Production Most enterprises need a combination of DevOps patterns 12 API Catalog Operational Excellence ivDeliverCodeThink Run Production Shared Services Digital Applications • Coordinating different teams working at different speeds • Balancing between agility, stability, and risk • Decouple across API boundary, but manage release process with consistent approach
  • 13.
    13© 2016 IBMCorporation Expectations of Continuous Delivery User Experience Today Emerging Primary Workload Type Software supports core business function Software enables innovative business approaches to differentiate from competition Big Data, Analytics, Mobile/Social Channels Delivery Model Planned Incremental(DevOps) Development and Operations Team Sizes 100s and costly 10s with built-in DevOps automation Release Frequency Months to years Days to weeks, based on business opportunity Integration Frequency Weeks Continuous Infrastructure Deployment Days Minutes Time to Value Planned Opportunistic Operational Model Systems management Built into application, recovery-oriented, continuous availability Service Sourcing Develop Consume and assemble (public and private) Feedback Loop Periodic Continuous interaction with clients
  • 14.
    14© 2016 IBMCorporation Increase the operational awareness of your software earlier in the development process. What does DevOps mean to me? How do you do that? § Architecture § Automated Testing § Automated Deployments § Production-Like Environments § Automated Release Promotion Process § Version control of all software, automation, and configuration Why do this? Because faster feedback loops enable rapid evolution of ideas and therefore faster iterations of your software Shift Left
  • 15.
    15© 2016 IBMCorporation Better communication between those who createand those who operate (same people in some cases) Reduced fear of breaking the build/deployment/environment Fail fast before you “fail all” Heavy focus on experimentation and learning Improve the speed of your feedback loop to enable rapid evolution of ideas What are the characteristics of teams who practice DevOps?
  • 16.
    © 2016 IBMCorporation DevOps Best Practices
  • 17.
    17© 2016 IBMCorporation § Architecture § Automated Testing § Automated Deployments § Production-Like Environments § Automated Release Promotion Process § Version control of all software, automation, and configuration About our next topics
  • 18.
    18© 2016 IBMCorporation IBM UrbanCode for Continuous Delivery Drive down cost Reduce amount of manual labor, resource wait-time,andrework by eliminating errors & providingself-serviceenvironments Speed time to market Increase frequency of softwaredelivery throughautomated, repeatable deploymentprocesses across development, test and production Reduce risk Robust configurationmanagement, coordinatedreleaseprocesses, audits, and traceability Enabling clients to continuously deliver applications with high quality and low risk IBM UrbanCode Build is a continuous integrationandbuildmanagement server optimized for the enterprise,designed tomake it easy to scaletheconfigurationand managementof build infrastructureandseamlessly plugin to development, testingand release tooling. IBM UrbanCode Deploy enables hybridcloudby automatingthe deployment of applications, databases, configurations and containers into development, test and production on prem or in the cloud, helping todrive downcost,speed time to market with reducedrisk. With full-stack environment management and deployment automation,users to design, deploy and updatefull-stack environments for multiple clouds, including Bluemix, Softlayer, AWS, Azure, and virtualizedenvironments. IBM UrbanCode Release is an intelligent collaboration releasemanagement solutionthat replaces error-pronemanual spreadsheets andstreamlines releaseactivitiesfor application and infrastructure changes.
  • 19.
    19© 2016 IBMCorporation About your architecture • Architecture should support DevOps principles such as staged roll out, operational insights, and scriptability • Each resource provides some very practical advice for building systems which are focused on reliability and feedback loops Experiment!: Website conversion rate optimization with A/B and multivariate testing Release It!: Design and Deploy Production-Ready Software
  • 20.
    20© 2016 IBMCorporation Application model Reliably capture application content and configuration settings with versioning and traceability
  • 21.
    21© 2016 IBMCorporation Application environments Define where components are deployed and capture configuration settings per deployment environment for an application
  • 22.
    22© 2016 IBMCorporation Templating for good architecture Templates can be created to standardize component processes & config
  • 23.
    23© 2016 IBMCorporation Create application templates for accelerated onboarding Templates can be created to standardize component processes & config
  • 24.
    24© 2016 IBMCorporation Automated testing is critical for automated feedback • This is THE HARDEST part of the whole experience • NO ONE is great at this, so don’t get discouraged • Facebook’s process for code review include stats on how many tests are consistently broken to decide whether the test failures are noteworthy • Continuously improve your coverage, flexibility, and discipline • Consider all aspects of testing: • Programmatic API (JUnit) • REST API (HTTPUnit, REST Fuse) • Web UI (Selenium) • Behavior driven testing (Cucumber) • Performance testing (Apache JMeter) • Security testing (Rational AppScan & IBM QRadar)
  • 25.
    25© 2016 IBMCorporation Embedding unit tests in your classes directly • Promoted approach by Netflix to reduce friction and introduces limited additional bytes relative to third party libraries • Makes it easy to write commands, the UnitTest becomes the test harness and verification • Always testSuccess() and testFailure() use cases to ensure expected behavior import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; public class OSDeployEnvironmentCommand extends OSAbstractOrchestrationCommand<Response> { public static class UnitTest { @Test public void testSuccess() throws InterruptedException, ExecutionException, JSONException { … Future<Response> request = new OSDeployEnvironmentCommand(…) .queue(); Response response = request.get(); assertNotNull(response); assertEquals(HttpStatus.SC_OK, response.getStatus()); } }
  • 26.
    26© 2016 IBMCorporation Testing Your Deployed Application – REST API • We have used REST Fuse which is an Eclipse project • Captures REST calls as annotations, freeing up your test method to just verify behavior • Requires a little “hoop jumping” for testing a series of calls (e.g. POST .. PUT .. GET) import static com.eclipsesource.restfuse.Assert.assertCreated; import ...restfuse.annotation.Authentication; import ...restfuse.annotation.HttpTest; import ...restfuse.MediaType; @HttpTest (method = com.eclipsesource.restfuse.Method.POST, contentMethod="getBlueprintRequestBody", authentications = { @Authentication( type = BASIC, user = "{keystoneUser}", password = "{keystonePassword}") }, path = "/rest/blueprint", type = MediaType.APPLICATION_JSON ) public void testCreateBlueprintOK() throws Exception { assertCreated(response); }
  • 27.
    27© 2016 IBMCorporation Behavior Driven Development & Testing • Captures natural language statements using “Given”, “When”, “Then” clauses • Each line is matched to a snippet of code based on regular expression • Complete code statements are executed to validate behavior • Bridge between business goals and technical details Scenario: Success – Upload client directory Given I provide valid credentials to the api client And I want to use the api client to make requests When I upload the directory ”data/sample-app” with the client Then the files returned matches the upload directory ”data/sample-app"
  • 28.
    28© 2016 IBMCorporation Testing Your Deployed Application – Web UI • Selenium is the only “apparent” choice that we’ve come across that’s effective • Couples automated test to some details of your web UI and must be kept in sync • We’ve developed a few best practices around location elements for maximum flexibility, could publish this if there’s interest public class EditorsPage extends UCDPPage { … @FindBy(id = "new-blueprint-button") private WebElement newButton; … public void createFile(String name, String id, String[] values) { newButton.click(); util().waitForElementPresentAndVisible( By.className("new-file-dialog")); WebElement widget = util().findElement( By.className("new-file-dialog")); Dialog dialog = Widget.init(this, widget, Dialog.class); dialog.setValues(values, true, true); dialog.clickPrimaryButton(); … } … }
  • 29.
    29© 2016 IBMCorporation Automated deployments • Visibility and automated control of your application deployment process • Manage application components and versions • Manage configurations across all environments • Offer secure ‘self-service’ capabilities • Increase transparency • Ensure governance and compliancy
  • 30.
    30© 2016 IBMCorporation Define automated processes for each application component Each component defines a series of steps, backed by plugin tasks or custom scripts, to deploy it
  • 31.
    31© 2016 IBMCorporation Define automated processes for the application Order components or apply logic which is “outside” of any specific component
  • 32.
    32© 2016 IBMCorporation IBM UrbanCode Deploy – Plug-ins Over 150 – in over 50 categories
  • 33.
    33© 2016 IBMCorporation Production-Like Environments – Unified Resource Tree Provides logical hierarchy of deployed artifacts and their middleware containers DEV Resources - Web Host - Web Component - Database - Database Component QA Resources - Web Host 1 - Web Component - Web Host 2 - Web Component - Database - Database Component PROD Resources - Web Host 1 - Web Component - Web Host 2 - Web Component - Web Host 3 - Web Component - Web Host 4 - Web Component - Database Primary - Database Component - Database Secondary - Database Component
  • 34.
    34© 2016 IBMCorporation Production-Like Environments – Local Development Possibly one of the most important principles of DevOps Shift left any operational concerns that lead to differences from DEV to PROD https://hub.docker.com/u/ibmcom/#
  • 35.
    35© 2016 IBMCorporation Deployment of Applications across Environments Applications are managed for deployment Components from the app Specific versions of the Components’ artifacts are deployed Compliancy keeps track of whether the actual versions matches the expected Each Component knows its relevant deployment processes Compare versions across environments and define Snapshots of known working sets of Components View deployment requests against the environment https://developer.ibm.com/urbancode/ Automated Release Promotion Process
  • 36.
    36© 2016 IBMCorporation Promotion Lifecycles • Should focus on consistency from end to end • Use the same logical organization and component automation in DEV, QA, PROD to validate the automation early in the delivery cycle • Apply approval gates where necessary to ensure appropriate quality validation has occurred IBM Commerce WebSphere ND Static Content Commerce Data IBM Commerce WebSphere ND Static Content Commerce Data
  • 37.
    37© 2016 IBMCorporation Quality Assurance – Automated gates • Use Component Statuses and Environment Gates where possible • Define statuses for all Apps • Use REST API/CLI to tag/approve Components or Snapshots based on automated verification (CI or other testing) • Only components versions/snapshots with tag can enter environment
  • 38.
    38© 2016 IBMCorporation Quality Assurance – Manual Sign off • Manual approvals are possible, but recommend that as much as possible is automated (e.g. with statuses + gates) • Approval process can trigger emails or some clients use ”chat ops” tools like Slack to streamline the process
  • 39.
    39© 2016 IBMCorporation Inventory over time
  • 40.
    40© 2016 IBMCorporation Configuration Management - Snapshots Creating a Snapshot Component Versions 1 1 2 2 3 3 321Web Mid. Code DB Snapshot 3 2 1 Mid. Config 1 2 3 3 Snapshot Deployment ENVSnapshot 3 2 1 WEB HOST MID HOST DB HOST 2 1 1 3 2 X 3 3 1 Contents of environments that pass tests • contain deployable version and configuration Deployments are based on deltas They provide Automation, Audit, and Visibility
  • 41.
    41© 2016 IBMCorporation Version applications with Snapshots Capture tested component versions and configuration settings as a snapshot that is promoted to other environments for better visibility and control
  • 42.
    42© 2016 IBMCorporation Better Release Planning and Management • Enterprise Calendaring • Release Process Checklist Templates • Environment Reservation Effective Change and Risk Management • Rational Team Concert integration • Impact Analysis Continuous Delivery with Auto-Progression • IBM UrbanCode Deploy integration Increased Visibility and Control • Pipeline View • Federated Dashboard • Segment Dependency Graph UrbanCode Release Transform chaotic release planning into streamlined release events
  • 43.
    44© 2016 IBMCorporation Code review should be part of your versioning process § Define and enforce coding standards early in the process § Automate deployment to production-like systems as part of automatic verification § Each commit should run automated testing and code coverage, and the toolchain should enforce compliance before merging or promoting changes
  • 44.
    45© 2016 IBMCorporation § Architecture § Automated Testing § Automated Deployments § Production-Like Environments § Automated Release Promotion Process § Version control of all software, automation, and configuration About this deck mdelder@us.ibm.com http://linkedin.com/in/mdelder @mdelder
  • 45.
    © 2016 IBMCorporation Clouds & Containers
  • 46.
    Workload styles vary,but not release methodology Traditional IT Cloud-Enabled Cloud-Native App Servers + + DatabaseWeb Servers Applications App Servers + + DatabaseWeb Servers Applications ServicesApplicationsServices Managed Runtimes
  • 47.
    Traditional IT Cloud-EnabledIT Cloud-Native IT Continuous Integration Continuous delivery to production Cloud-nativeruntimes (node.js) Pipeline per microservice Change Record CMDB Automated build / deploy of VMs & Containers Stage Gates, Co-ordinated Releases Manual Change & Release Some automation Audit reports CAB Assessment & Approval Theory Reality IBM Control Desk BMC Remedy As a Business Owner, I want my team to deliver as fast as possible, but with appropriate controls when needed. But don’t slow everything down to the slowest speed when controls are added! Change Management vs. Continuous Delivery
  • 48.
    Accelerate Innovation ivDeliverCodeThink Run Systemsof engagement Systems of Record Enterprise Applications Production Most enterprises need a combination of DevOps patterns 49 API Catalog Operational Excellence ivDeliverCodeThink Run Production Shared Services Digital Applications § Coordinating different teams working at different speeds § Balancing between agility, stability, and risk § Decouple across API boundary, but manage release process with consistent approach
  • 49.
    Cloud-Enabled Workloads withUrbanCode Deploy 50 § Your applications are managed throughout the entire release process with predictable automation and inventory services § Your full-stack blueprints capture the relationships between your applications and cloud infrastructure § OpenStack API provides defacto standards for interacting with all of your cloud resources Heat Blueprints UrbanCode Deploy Compute Network Storage Your Applications & Middleware Full-stack Application Pattern
  • 50.
    51 Innovate. Disrupt. Transform. Fast. @EnterpriseScale. Hybrid Cloud Deployments through a Single Point of Control IBM Bluemix Cloud Foundry On-prem IaaS On-prem Traditional IT IBM Cloud Orchestrator IBM PureApplication System Manage application deployment across dev, test, and production spanning multiple clouds Key Points: • Enable full stack deployments (OS, patterns and applications) across hybrid cloud applications • Establish common DevOps pipelines with plug points to support continuous delivery Virtual Machines Docker Containers Other VendorsUrbanCode Deploy UrbanCode Release https://www.youtube.com/watch?v=fFuRg6l3N44
  • 51.
  • 52.
    Watson Health: 6active teams, more on the way § Social Care (Abu Dhabi): – Complex topology, heavy UCD components (2 Gb) – 2 hours roundtrip / provision – 50% Heat engine CPU capacity / provision § Real World Evidence : – 4 Offerings – Analytics workload (DB2 blue, Cognos) § Analytics Core: – Analytics workload (Spark clusters) – UCDP Rest API driven variable sized cluster size § Operational Dashboard: – Cloud control desk for solution management (provision, monitor, troubleshoot) § Watson Health Cloud: – Foundational micro-services (data lake, data pipeline, logging, monitoring etc) 53 Abu Dhabi Blueprint
  • 53.
    54© 2016 IBMCorporation Docker is great for developers – everything can be run on your laptop 54
  • 54.
    55© 2016 IBMCorporation Production-Like Environments – Local Development Possibly one of the most important principles of DevOps Shift left any operational concerns that lead to differences from DEV to PROD https://hub.docker.com/u/ibmcom/#
  • 55.
    Continuous Integration forContainers 56 Jenkins IBM UrbanCode Deploy Docker Trusted Registry Build Image Track Versions Deploy & Promote § Jenkins builds Docker images and publishes them to Docker Trusted Registry § UrbanCode Deploy immediately becomes aware of new versions, available for deployment § Schedule deployments, track readiness via environment gates, and manage configuration properties securely § Deployments to Docker Universal Control Plane
  • 56.
    Docker Integration Architecture DockerTrusted Registry IBM UrbanCode Deploy swarm Docker Universal Control Plane Legacy Database Legacy Applications
  • 57.
    Use UrbanCode Deployto manage: Inventory Management Promotion Lifecycle Separation of Duties Import images from trusted sources Docker Trusted Registry
  • 58.
    UrbanCode Deploy &Compose § Import your docker-compose file § Automatically create resource tree components § Updates, Inventory management, Deployments, etc. are all the same. 59
  • 59.
    Dev/Test with HybridCloud Off-PremOn-Prem Image Registry PRODSTAGING Delivery Pipeline IBM Bluemix https://www.youtube.com/watch?v=Eo1rFsv4BW0 IBM UrbanCode Deploy
  • 60.
    © 2016 IBMCorporation Q&A Get this deck http://bit.ly/2c1G8sy
  • 61.
    62© 2016 IBMCorporation62 © Copyright IBM Corporation 2013. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. www.ibm.com/software