DevOps
and
Application Modelling
Tim Penhey
@howbazaar
What we'll cover
What is DevOps
What is Application Modelling
How does Juju help
DevOps
DevOps is a Culture
It depends who you ask
Automation
Repeatability
Feedback
Operations
Application Modelling
What do we model?
Self-contained
Application
What do we model?
Self-contained
Application
Configuration
Software is Complicated
Most software starts quite simple
Complexity grows over time as components are added
Components often need to be configured to work together
A Simple Example
Django Application
Web application using Django
PostgreSQL database
Django Application
For the database, django needs
Database credentials
Database created for the application
Connection URL - where is the DB server
Production Deployment
Web application using Django
PostgreSQL database
gunicorn as an efficient WSGI HTTP Server
nginx as efficient static file server
Gunicorn
Python environment
WSGI configuration
Port to listen on
Nginx
Hostname
Static files path extension
Static files file location
Port to forward non-static calls to
Scale Out
Highly available database - 2 or 3 nodes
Multiple web application servers
HA proxy
Extend and Monitor
Add celery for asynchronous tasks
Now we need redis or rabbitMQ
Monitor with nagios
Juju
and
Charms
Juju
An Open Source tool
github.com/juju/juju
Manages the deployment and operation of charms
Provides the modelling abstraction
Can think more about the applications and their relationships rather than machines
Charms are
Encapsulated DevOps
Installation and configuration
Relationship management
Operational activities
Can become projects in their own right
A Charm
It is just a ZIP file
Metadata defined in YAML
Hooks are executed at specific times of change
Installation and Configuration
install, config-changed, and upgrade-charm
start, stop, update-status
leader-elected, leader-settings-changed
Relationship Management
Relations between software using agreed "protocols"
For example, "pgsql" for PostgreSQL information
Protocol goes something like this:
django establishes relationship with postgresql
django says my app is "foo"
postgresql creates a database "foo", a user "fooish" and a password, and sets these values
django picks up those settings and saves them for its configuration
Operational Activities
A charm can also define any number of named actions
These actions can be invoked by an operator at any time
For example:
backup / restore
quiesce
update content
Deployment Targets
Juju also abstracts the deployment target being used
Kubernetes - for container workloads
Public clouds:
AWS, Azure, GCE, Joyent, Oracle cloud
Private clouds:
OpenStack, VMWare, MAAS, LXD, Manual
Modelling Requirements
Some software has more defined needs
High IOPS
GPU
Attached storage
Networks
Extra layer 2 devices, VLANs, subnets
Spaces - multiple connected subnets with same ingress and egress rules, e.g. DMZ
Simple Repeatability
Bundles are YAML documents
Lists the applications to deploy
Charm and Configuration
Target Constraints
Relationships
Made with Slides.com