Orchestrated, Consistent, and Deterministic Deployment: What Does it Mean and How to Get There...
-
Upload
ez-systems -
Category
Technology
-
view
186 -
download
0
Transcript of Orchestrated, Consistent, and Deterministic Deployment: What Does it Mean and How to Get There...
OCD DeploymentObsessive about successful
web-applications
With examples from
Robert DouglassVP Customer Success, Platform.shOctober 5, 2016
A web application is:
Deployment means:@local
@dev
@stage @prod
Deployment means:@bob-local @feature1
@prod
@jim-local @theme
@sue-local @feature2
@stage@auto-test
@uat@sprint3
“How to migrate from test environment to production environment?”
“Broken Image links after migrating a site from Local Machine to Live Server”
“Home page missing theme and css after migrating to a VPS host”
“Updating to PHP 5.4 breaks my site”
“Dealing with Solr indexes on development and live environments”
“best practices to deal with Search on different environments, dev, stage prod? i.e. - Not indexing / corrupting live Solr indexes when testing on dev and
staging.”
Orchestrated
Consistent
Deterministic
“Planned to produce a desired result”
Orchestrated
Orchestrated• Resolve dependencies
• Build code
• Provision servers, storage, I/O
• Launch and configure services (eg MySQL)
• Manage data
OrchestratedFor HA Applications, you must provide and configure the following services:
• HA Proxy / Load balancing
• Nginx
• PHP-FPM
• MariaDB (PostgreSQL)
• Solr (ElasticSearch)
• Redis
Orchestrated• Guarantee high availability for all services
• Guarantee disaster recovery for all services
• Guarantee change management for all services
• For every developer and tester, as well as production.
Orchestrated• Persistent storage:
• Unique needs for mount points, eg. applications need public, private, and temporary directories that the web server can write to
• Don't allow storage to be a single point of failure! Are you using a high-availability, distributed file system? (eg. GlusterFS, CEPH)
OrchestratedSecurity Security Security!
• Read-only code deployments
• ACLS
• Physical and network access
• Change management (that guy you just fired)
• Patch levels and vulnerability reactivity: You actually have to read [email protected]
Orchestrated
Orchestrated
Orchestrated
Modern Languages
Modern Services
Multiple Clouds
“acting or done in the same way over time”
Consistent
ConsistentAn OCD Deployment will guarantee that you always:
• Use the same tools to deploy, on every environment
• Know from deploying to (@local / @dev / @test / @stage / @UAT ) that deploying to @production will work.
• Consistent infrastructure, Actual data
Consistent
Know from one deployment that deployment to @prod will work:
• Deployment to @local, @stage, @prod etc *all* use the same tools.
• Weak link: @local
ConsistentWork on actual data
• 99% of the time, the data needs to come from @prod
• Data = SQL, uploaded files, Solr index, any other permanent data store
• When does synchronisation become problematic? 10G? 100G? 1T?
• Sanitise sensitive data outside of @prod
Consistent
“for every event there exist conditions that could cause no
other event”
Deterministic
DeterministicThe goal: For a given Git repository (hash), exactly the same application code and infrastructure should be deployed, every time it is pushed to any environment.
DeterministicCode is assembled with build and make files using technologies like:
• Composer
• NPM
• PIP
• Ruby Gems
• Maven or Ant
DeterministicCode-assets are generated
$ compass compile --production
DeterministicDeterministic Infrastructure:
• Obvious: use the same services in the same configuration on every environment you deploy to (local, dev, staging, testing, UAT, production)
• Less obvious: changing the infrastructure needs to be a repeatable, reversible action
DeterministicActual Data:
Data is easily partitioned and fragmented. Examples:
• Files that are in the DB but not on the filesystem.
• Documents not indexed into Solr
• Databases so large they take hours to import/export/transfer over the wire
DeterministicActual Data:
An OCD Deployment is NOT:
• Mysql Dump / Mysql Import
• rsync for files
• Re-indexing Solr
Benefits of You get deployment that is:
• Simple to execute
• Testable
• Repeatable
• Reversible
?
Can eZ Platform be
https://github.com/platformsh/platformsh-example-ezplatform
LIVE DEMO!!!!