domain's robot army
DESCRIPTION
A talk delivered at the Oct 1st Sydney AWS Meetup, on how Domain uses CloudFormation, DSC and Octopus Deploy to support our microservices arcitecture with continuous deliveryTRANSCRIPT
![Page 1: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/1.jpg)
Domain’s Robot ArmyCloudFormation, Windows and Octopus.
Jason Brown, DevOps Lead, Domain.com.auSydney AWS Meetup, October 2014
![Page 2: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/2.jpg)
Who Are We?
![Page 3: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/3.jpg)
What we’ll cover
The ChallengesThe CloudFormationThe Supporting CodeThe Gotchas
![Page 4: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/4.jpg)
Challenges at Domain● Complete Microservice re-architecture● Continuous Delivery● Agile ● Windows
Plus all the usual...
![Page 5: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/5.jpg)
How we do it
![Page 6: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/6.jpg)
Intro to CloudFormation● Infrastructure as code● Glue your AWS services together● Constantly expanding● Well documented● Lots of samples available● JSON syntax
![Page 7: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/7.jpg)
An example...
ELB
Health-check
HTTP port
HTTPS port
Cross-Zone
Tags!!
![Page 8: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/8.jpg)
CloudFormation at DomainWe took a pre-existing template and extended it
Then we cut it back down significantlyMulti-AZ Load-balanced, AutoScaling & Self-healingEach platoon has its own template and configCustomised LaunchConfigurationUses standard AWS AMIs Versioned using Git
![Page 9: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/9.jpg)
The LaunchConfiguration● The pivotal step● Lots of PowerShell● Pulls pre-built scripts from S3
based on cluster name
![Page 10: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/10.jpg)
The Powershell● Rename server● Set TZ● Pull files● cluster-config.json● Army config (DSC)● Platoon config (DSC)● Find latest app code● Notify
![Page 11: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/11.jpg)
Octopus DeployThe very last PowerShell Script drives OctopusDeploy.NET-based, API-first deployment enginePulls code from Bamboo/NugetPushes it out to serversExecutes supporting powershell code
![Page 12: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/12.jpg)
Gotchas- CFN-Init does not load windows profiles
- So it can’t use DPAPI or user environment variables
- More services means more stacks- We have to parameterise, or maintain lots of templates
- Multi-tenancy is tricky- Luckily, we want the resiliency of separate clusters
- OctopusDSC- We needed to customise OctopusDSC for AWS
- Octopus Reg/Dereg- Custom script to clean-up scaled-down instances
![Page 13: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/13.jpg)
In ConclusionYou can drive the entire provisioning chain - (yes, including app deployment)New cluster ~10-15 min Auto-scale: <10 minCloudformation is epicDomain’s new Microservices deploy on-commit, with the capacity to deploy hundreds of times per day to AWS.
![Page 14: Domain's Robot Army](https://reader035.vdocument.in/reader035/viewer/2022062419/55845418d8b42afc4e8b5248/html5/thumbnails/14.jpg)
Want to learn more?
Follow Domain’s tech bloghttp://tech.domain.com.au/
And we are hiring!
Big thanks to all the Invader Zim fan sites which contributed images for this presentation!