Dmytro Mykhailov How HashiCorp platform tools can make the difference in development and deployment https://www.hashicorp.com/ Target and goal of HashiCorp tools is to give sample of the best practices that I’m going to describe.
Dmytro Mykhailov Solution Architect 3,5 years in EPAM >12 years in IT Microsoft Stack: .NET Azure skype: dmitry.mikhaylov email: dmytro_mykhailov@epam.com blog: https://devraccoon.com/
Problems in applications Holy Server Messy configuration Slow environments setup Works-on-my-machine syndrome Expensive resources that do nothing Hard non-consistent integration and end-to-end test environments Where is your disaster recovery? Are your secrets safe?
Holy Server Thing that can be treated as benefits: Easy to setup No need of delivery infrastructure upfront No need of tools knowledge Drawbacks: Hard to maintain Service failure is a catastrophe Custom knowledge of how to configure similar server
Immutable Infrastructure for Rescue Immutable infrastructure is an approach to managing services and software deployments on IT resources wherein components are replaced rather than changed. An application or services is effectively redeployed each time any change occurs. © WhatIs.com
Immutable Infrastructure for Rescue DevOps Image of WEB v32.2 Public portal v4.3 Admin portal v1.2 Database v2.1 Provision Change CI Tool Developer New feature Notify Build DB Schema Fix DBA
Immutable Infrastructure for Rescue LB WEB v32.1 API GW Backend Service A v12.34 Database A WEB v32.1 Backend Service B v3.2 Database B WEB v32.1
Messy Configuration – Reactive Configuration Database Dev QA Config Prod Configuration Data
Messy Configuration – Reactive Configuration Database Dev Config DB QA Config Prod Common Config Seed
Messy Configuration – Reactive Configuration Database ConfigDB Agent ConfigDB Agent ConfigDB Master ConfigDB Agent
Environments Setup, Disaster Recovery - Infrastructure-as-a-Code
Tests, Works-on-my-machine syndrome – Containers and Images Build MacOS Linux Run Build Test Deploy Run Local Dev Machine CI/CD Pipeline QA Server
Tests, Works-on-my-machine syndrome – Containers and Images MacOS Linux Build Deploy Run CI/CD Pipeline Dev Virtual Server Local Dev Machine
Expensive not-used resources – Elastic cluster setup 17% CPU 10% CPU CPU 55%
Expensive not-used resources – Elastic cluster setup Requests for allocation and deploy Cluster Scheduler CPU CPU 72% 55% 40%
Secrets management Dev Config QA Config Audit? Manage? Revoke? Where? How? Prod Configuration Data
Secrets management - Vault Config Dev Config QA Audit Manage Revoke Prod Vault Configuration Data
Security Management - Vaults Audit Manage Revoke Vault ConfigDB Master
Autopilot Pattern less or none application modification for containers On Start Application Post Stop Health Health Pre Stop On Change Autopilot Process http://autopilotpattern.io/ Service Discovery & Health Check
Tao of HashiCorp Workflows, Not Technologies Simple, Modular, Composable Communicating Sequential Processes Immutability Versioning through Codification Automation through Codification Resilient Systems Pragmatism https://www.hashicorp.com/tao-of-hashicorp/
Packer for Immutable Infrastructure Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Alternatives: Manual configuration scripts Chef, Puppet, Annsible, etc. https://www.packer.io/
Packer for Immutable Infrastructure Build Automated Machine Images https://www.packer.io/
Terraform for Infrastructure-as-a-Code Write, Plan, and Create Infrastructure as Code Terraform enables you to safely and predictably create, change, and improve production infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned. Alternatives: - Manual configuration scripts - Cloud-provider’s tool https://www.terraform.io/
Consul for Service Discovery, Health Checking Service Discovery and Configuration Made Easy http://txt.fliglio.com/2015/07/12-factor-infrastructure-with-consul-and-vault/ Alternatives: Eureka Etcd Zookeper https://www.consul.io/
Nomad for cluster scheduling Easily deploy applications at any scale Alternatives: Azure Service Fabric Mezos Yarn Kubernetes Docker Swarm DCOS 1000 redises or nginx, 3 data centers across atlantic. <1s schedule 1s to first start 6s to 95% 8s to 99% https://www.nomadproject.io/
Vagrant against works-on-my-machine syndrome Development Environments Made Easy Alternatives: Docker Compose https://www.vagrantup.com/
Vault for sensitive data A Tool for Managing Secrets Alternatives: Azure Key Vault Amazon KMS (Key Management Service) HSMs (Hardware Security Module): AWS CloudHSM Keywhiz by Square https://www.vaultproject.io/
HashiCorp Tools Ecosystem – Small Scale </> CI Pipeline Work Environment Local Dev Machine VM Image Repository CD Pipeline
HashiCorp Tools Ecosystem – Large Scale VM Images </> CI Pipeline CD Pipeline Local Dev Machine Server Server Nomad Cluster
Questions? Dmytro Mykhailov dmytro_mykhailov@epam.com https://www.linkedin.com/in/dmitry-mikhaylov-03b78971/ blog: https://devraccoon.com
Thank you!