Top Banner
Deployment Within a Traditional IT environment Rob Allen akrabat.com ~ @akrabat ~ October 2016
40

Deployment - · PDF fileDeployment Within a Traditional IT environment ... • Git flow • Github flow Rob Allen ~ @akrabat. Git flow Rob Allen ~ @akrabat. Github Flow

Feb 10, 2018

Download

Documents

vutruc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • DeploymentWithin a Traditional IT environment

    Rob Allen

    akrabat.com ~ @akrabat ~ October 2016

  • What?Software deployment is all of the activities that make a softwaresystem available for use.

    Wikipedia

    Rob Allen ~ @akrabat

  • Traditional IT environment Servers "owned" by client

    Perceived control and compliance IT departments control policy

    Variety of stack Windows/IIS IBMi Solaris Linux

    Rob Allen ~ @akrabat

  • What we're not going to cover Cloud deployments Provisioning of servers Continuous Integration Continuous Delivery Chat Ops

    Rob Allen ~ @akrabat

  • Fundamentals

    Rob Allen ~ @akrabat

  • Development processesFundamental development processes are still required

    Local development environments Source code control Database schema management Management of configuration data

    Rob Allen ~ @akrabat

  • Source code control Git Subversion Team Foundation Server

    Rob Allen ~ @akrabat

  • Code organisation Isolate work Branch!

    One branch per logical work unit Merge once approved Always have a way to create a hot fix from what's on live

    Rob Allen ~ @akrabat

  • Branching methodology Branch per team Branch per sprint Branch per feature

    Git flow Github flow

    Rob Allen ~ @akrabat

  • Git flow

    Rob Allen ~ @akrabat

  • Github Flow

    Rob Allen ~ @akrabat

  • Continuous integration Automatically test every PR Types of tests:

    Coding style Unit tests Functional tests Acceptance tests

    Rob Allen ~ @akrabat

  • Database schema managementaka: Migrations

    Schema changes stored in individual files delta files with UP and DOWN functionality Version controlled Destructive changes possible (be careful!)

    Rob Allen ~ @akrabat

  • Migration toolsIt really doesn't matter which tool you use

    Simple SQL files Your framework's system Liquibase DBDeploy Flyway DBMaestro Redgate SQL Compare

    Rob Allen ~ @akrabat

  • Management of configuration dataEach environment needs different configuration:

    Database credentials Debug / logging levels Links to other servers

    Rob Allen ~ @akrabat

  • Context awareness Automatic

    Automatic detection based on URL Environment variables (12factor.net/config)

    Local configuration file

    Rob Allen ~ @akrabat

  • Deployment

    Rob Allen ~ @akrabat

  • Manual deploymentSimply copy the files to the right placeProblems:

    Slow Inconsistent between each deploy Failures in production No records. Who deployed what, when (or where)?

    Rob Allen ~ @akrabat

  • Simple deployment systems FTP / SFTP rsync Remote Desktop

    Rob Allen ~ @akrabat

  • It's more than just copying code

    Rob Allen ~ @akrabat

  • Other things to think about File permissions Preserve user uploaded files Steps after upload

    Stale cache? Cache priming?

    Keeping records

    Rob Allen ~ @akrabat

  • People aren't machines!

    Rob Allen ~ @akrabat

  • Automation People: good at creative judgement Machines: Good at doing the same thing over and over

    Rob Allen ~ @akrabat

  • Advantages of automation Deferred deployments Self-service deployments Automatically triggered deployments Smoke tests (automated tests after deploying) Automatic rollbacks (restore last successful deployment if this one

    fails)

    Rob Allen ~ @akrabat

  • Scripts Provide consistency Provide a platform for additional abilities

    continuous deployment smoke tests

    No need to wait for other people Faster and less hassle.

    Rob Allen ~ @akrabat

  • What needs to be done?Write a deployment checklist. Then script it.

    Copy files & folders database schema & content updates configuration updates r/w permissions on files & folders SSL certs? Clear caches

    Rob Allen ~ @akrabat

  • Tooling Simple script Make-like tool Specialist tool

    Rob Allen ~ @akrabat

  • Simple script Bash Powershell Usually runs on the server

    Rob Allen ~ @akrabat

  • Make-like tool Abstracted script Easier to make cross platform Make/Phing/Ant/Rake More likely to push to server

    Rob Allen ~ @akrabat

  • Specialist tools Fabric/Capistrano Ansible/Chef/Puppet/Salt Deploybot More likely to be automated

    Rob Allen ~ @akrabat

  • Challenges Technical Political

    Rob Allen ~ @akrabat

  • TechnicalInfrastructure challenges

    VPN Firewall Operating systems

    Rob Allen ~ @akrabat

  • Political What is acceptable? What are you allowed to do? Does IT change things for you? Does IT change things unexpectedly? Change request documentation?

    Rob Allen ~ @akrabat

  • Case studies

    Rob Allen ~ @akrabat

  • Case study 1: Internal Self-hosted by client Within company network Windows/IIS/SQL Server

    Rob Allen ~ @akrabat

  • Case study 1: Internal Multi-script solution

    1. Tag code & build tarball 2. Ship tarball to UAT server via VPN 3. IT copy tarball from UAT to Live 4. Script to untar & run deploy steps

    Rob Allen ~ @akrabat

  • Case study 2: Minicomputer Self-hosted by client Some access to Internet IBM i-series/DB2

    Rob Allen ~ @akrabat

  • Case study 2: Minicomputer CI tooling Checklist

    Manual tag creation for release Automatic script to deploy

    Rob Allen ~ @akrabat

  • To sum up

    Rob Allen ~ @akrabat

  • Thank you!

    Feedback: https://joind.in/talk/38e78

    Rob Allen ~ akrabat.com ~ @akrabat

    https://joind.in/talk/38e78

    What?Traditional IT environmentWhat we're not going to coverDevelopment processesSource code controlCode organisationBranching methodologyGit flowGithub FlowContinuous integrationDatabase schema managementaka: Migrations

    Migration toolsManagement of configuration dataContext awarenessManual deploymentSimple deployment systemsOther things to think aboutAutomationAdvantages of automationScriptsWhat needs to be done?ToolingSimple scriptMake-like toolSpecialist toolsChallengesTechnicalPoliticalCase study 1: InternalCase study 1: InternalCase study 2: MinicomputerCase study 2: Minicomputer