SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Journey from monolith to microservices
Utilizing microservice patterns with monoliths
Chris Gianelloni @wolf31o2
1
In the beginning…
Applause had several ways to deploy and manage software.
• Custom system management tool (sysdeploy)
• Basically a SSH wrapper for manually created systems
• Custom Docker image management tool (Platypus)
• Standardized AMIs, built w/ Packer, including Docker daemon
• Services in Docker containers w/ configuration using SaltStack
• Provides A/B testing and health checks
• Packer + Chef + Terraform
• Packer + Chef to bake AMIs
• Terraform to deploy using ASGs
• Mesosphere DC/OS
• OSS orchestration for “Docker” containers
2
Typical “old school” configuration system, written completely
in-house, limited in capabilities, author has long-since
departed the company
• SSH wrapper to copy files and run commands
• No instance management
• No user management
• No rollback features
• No documentation
• Unfamiliar code base to everyone
• Unable to look up problems
sysdeploy
3
In-house microservice deployment and service management
• Leverages CloudFormation for infrastructure
• Template-based system
• INI-style configuration files
• Output lookups
• Leverages SaltStack for some configuration management
• Uses roles for service management
• Services in Docker containers
• Supports health checking
• Supports A/B deployments
• Supports manual rollback
• Tied to AWS
• Lots of ELBs
Platypus
4
Utilizes common, public, OSS tools
• Common tools with existing user bases and communities
• Basically “best of breed” tools
• Packer for AMIs
• Chef for installing and configuring software
• Terraform for deploying baked AMIs
• Plethora of documentation for each tool
• Chef Server optional
• Composable and reusable pieces
• Output lookups (Chef + Terraform)
Packer +
Chef +
Terraform
5
Mesos, Marathon, and Metronome (and more)
• Consolidated and unified platform
• Leverages common OSS technologies
• Standardized application and service management
• Health checking for services
• Supports single-shot, or scheduled tasks
• Service discovery
• Metrics and log collection
• Integrated data services
• Configuration rollbacks
• Canary deployments
• Universe packages
Mesosphere
DC/OS
6
7
Applause chose DC/OS to leverage previous work while
also moving to a scalable system using open source
components. This frees the Platform Delivery team to
provide new capabilities to the Applause Hosting
Platform which provide for our business needs.
• Open source with a vibrant and active community
• Strong feature set around an integrated platform
• Ability to colocate diverse workloads
• Microservices
• Data services
• AI / Machine learning / Analytics
• Simple interfaces using API, CLI, and GUI
• Enterprise features and support
• Appreciation for memes
Why DC/OS?
8
DC/OS Architecture
Software layer is where containers
execute to provide services. This
includes Marathon applications,
Metronome jobs, and Mesos
frameworks.
Platform layer is Mesosphere DC/OS
services execute, which run in the host
operating system.
Infrastructure layer provides the host
and operating system which hosts our
stack, such as Amazon Web Services.
9
DC/OS Node Types
Master nodes host DC/OS services and
provide the orchestration layer, service
discovery, and administrative interfaces.
Public agent nodes are public facing
and contain API routing and load
balancing of incoming requests to
backend services. These are agent
nodes with a public role.
Private agent nodes are internal and
host all other services. Services
communicate via East-West load
balancing.
Applause
Hosting
Platform
10
Mesosphere
Universe
packages +
Application
services
11
Packages and services which provide base value to the
platform to be used by all Applause services:
• ecr-login - AWS Elastic Container Registry login process
• Provides and updates credentials for fetching images
• marathon-lb - North-South load balancer
• Provides ingress load balancing from public slaves to services
running in private slaves
• hdfs - Hadoop Distributed File System
• Provides shared storage for artifacts, logs, etc.
• Provides storage layer for AI/ML and analytics processes
• linkerd - HTTP proxy
• Provides service discovery and service mesh
• Provides East-West load balancing across private slaves
• kong - API gateway
• Provides API routing to specific endpoints
• spark - Data processing framework
• Provides processing framework for AI/ML and analytics
• Chef cookbook wrapping community cookbook: https://supermarket.chef.io/cookbooks/dcos
• Custom recipes
• Monitoring agent
• Docker Engine installation and configuration
• Enhanced Networking (ena) driver
• Logging aggregation agent
• System users via data bag
• DC/OS volumes (volume0, etc)
• DC/OS workdir configuration
• Cookbook “bake_time”
• Packer templates to create “shared” images
• Start from “official” CentOS base images
• Patch
• Reboot
• Remove old kernels
• Run Chef
• Cleanup
How do we build DC/OS?
12
Chef
wrapper
“secret
sauce”
13
Disable some Chef resources by modifying resources at
converge time:
# These are resources which need to be modified in the upstream dcos
# cookbook to prevent them from executing at bake time
[
{ template: '/usr/src/dcos/genconf/config.yaml' },
{ execute: 'dcos-genconf' },
{ file: '/usr/src/dcos/genconf/serve/dcos_install.sh' },
{ execute: 'preflight-check' },
{ execute: 'dcos_install' },
].each do |res|
ruby_block "action-nothing-#{res.keys.first}[#{res.values.first}]" do
block do
r = resources(res)
r.action([:nothing])
end
only_if { node['chef-applause-dcos']['bake_time'] }
end
end
Packer
template
14
Runs Chef wrapper cookbook to produce a shared AMI:
{
"type": "chef-solo",
"version": "13.8.5",
"run_list": ["recipe[chef-applause-base]", "recipe[chef-applause-dcos]"],
"json": {
"chef-applause-dcos": {
"bake_time": true,
"chef_config_actions": ["nothing"]
},
"dcos": {
"dcos_enterprise": "{{user `dcos_enterprise`}}",
"dcos_role": "nil",
"dcos_version": "{{user `dcos_version`}}"
}
},
"cookbook_paths": [ "chef/cookbooks" ],
"data_bags_path": "chef/pubkeys/data_bags"
},
• Terraform
• Derived from Mesosphere’s AWS CloudFormation templates
• Originally a 1:1 translation
• Evolved over time, more customizations
• VPC per cluster
• Masters have public addresses / ELB for discovery
• Private slaves have only internal addresses
• Public slaves are behind ALB
• Autoscaling Groups + Launch Configs
• One group per DC/OS role
• Launch Configs write out node-specific Chef configuration
• Executes Chef client in cloud-init at boot
• IAM instance profiles used
• One profile per DC/OS role
How do we deploy DC/OS?
15
Launch
Configs
template
16
Provide outputs from terraform to Chef client:
#cloud-config
write_files:
- content: |
{
"dcos": {
"config": {
"aws_region": "${region}",
"cluster_name": "${stack_name}",
"exhibitor_address": "${internal_elb_dns_name}",
"master_external_loadbalancer": "${public_elb_dns_name}",
"num_masters": "${num_masters}",
"s3_bucket": "${exhibitor_s3_bucket}",
"superuser_username": "${superuser_username}",
"superuser_password_hash": "${superuser_password_hash}"
},
"dcos_enterprise": ${dcos_enterprise},
"dcos_role": "${dcos_role}",
"dcos_version": "${dcos_version}"
}
}
path: |-
/etc/chef/client-config.json
• Chef wrapper changes
• Pull Request made
• Tested with ChefDK and Test Kitchen
• Merged to master
• Tested again
• Pushed to Chef server
• Packer job executed
• Creates AMIs in AWS accounts
• Terraform job executed
• Creates AWS resources
• IAM accounts, profiles, instance profiles
• VPC, subnets, security groups
• ASGs, ELBs/ALBs
• Creates terraform outputs
Development to deployment workflow for DC/OS
17
• Application terraform updated
• Databases, caches, storage buckets, etc
• Service repository updated
• Pull Request made
• Unit tests, integration tests
• Merge to master (or deployment branch)
• Unit tests
• Docker image
• Integration tests
• Code coverage
• Push image
• Service deployment / promotion to DC/OS
• Metronome
• Marathon
• Kong
Development to deployment workflow for Applause services
18
• Migrate more workloads from legacy hosting
• Data science
• Analytics
• Build and test
• Other products
• Integrate services with in-cluster resources
• Data services
• Migrate scheduled jobs to Metronome
• Chronos
• cron
• Applause platform
• Migrate long-running tasks to Metronome
• Kubernetes in-cluster
What now?
19
Check out our careers page:
https://www.applause.com/working-at-applause/We’re hiring
20
Questions?
21

Weitere ähnliche Inhalte

Was ist angesagt?

What's New for the Windows Azure Developer? Lots! (July 2013)
What's New for the Windows Azure Developer?  Lots! (July 2013)What's New for the Windows Azure Developer?  Lots! (July 2013)
What's New for the Windows Azure Developer? Lots! (July 2013)
Michael Collier
 
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
Michael Noel
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
Michael Noel
 

Was ist angesagt? (20)

(CMP302) Amazon ECS: Distributed Applications at Scale
(CMP302) Amazon ECS: Distributed Applications at Scale(CMP302) Amazon ECS: Distributed Applications at Scale
(CMP302) Amazon ECS: Distributed Applications at Scale
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
 
Azure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment ScenariosAzure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment Scenarios
 
What's New for the Windows Azure Developer? Lots! (July 2013)
What's New for the Windows Azure Developer?  Lots! (July 2013)What's New for the Windows Azure Developer?  Lots! (July 2013)
What's New for the Windows Azure Developer? Lots! (July 2013)
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
 
IaaS azure_vs_amazon
IaaS azure_vs_amazonIaaS azure_vs_amazon
IaaS azure_vs_amazon
 
Elastic beanstalk
Elastic beanstalkElastic beanstalk
Elastic beanstalk
 
Introduction to Desired State Configuration (DSC)
Introduction to Desired State Configuration (DSC)Introduction to Desired State Configuration (DSC)
Introduction to Desired State Configuration (DSC)
 
AWS RDS Oracle - What is missing for a fully managed service?
AWS RDS Oracle - What is missing for a fully managed service?AWS RDS Oracle - What is missing for a fully managed service?
AWS RDS Oracle - What is missing for a fully managed service?
 
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and PerformanceVMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
VMworld 2013: Architecting VMware Horizon Workspace for Scale and Performance
 
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
 
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the FieldMigrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
 
SharePoint 24x7x365 Architecting for High Availability, Fault Tolerance and D...
SharePoint 24x7x365 Architecting for High Availability, Fault Tolerance and D...SharePoint 24x7x365 Architecting for High Availability, Fault Tolerance and D...
SharePoint 24x7x365 Architecting for High Availability, Fault Tolerance and D...
 
The Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with AzureThe Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with Azure
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
What’s New with SSIS in ADF
 What’s New with SSIS in ADF What’s New with SSIS in ADF
What’s New with SSIS in ADF
 
Embrace and Extend - First-Class Activity and 3rd Party Ecosystem for SSIS in...
Embrace and Extend - First-Class Activity and 3rd Party Ecosystem for SSIS in...Embrace and Extend - First-Class Activity and 3rd Party Ecosystem for SSIS in...
Embrace and Extend - First-Class Activity and 3rd Party Ecosystem for SSIS in...
 
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan InstabilityLVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
 
Apache Mesos at Twitter (Texas LinuxFest 2014)
Apache Mesos at Twitter (Texas LinuxFest 2014)Apache Mesos at Twitter (Texas LinuxFest 2014)
Apache Mesos at Twitter (Texas LinuxFest 2014)
 

Ähnlich wie TechBeats #2

Ähnlich wie TechBeats #2 (20)

IBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudIBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the Cloud
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
 
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
 
Flying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native ApplicationsFlying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native Applications
 
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
 
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Going Serverless - an Introduction to AWS Glue
Going Serverless - an Introduction to AWS GlueGoing Serverless - an Introduction to AWS Glue
Going Serverless - an Introduction to AWS Glue
 
So Many Docker Platforms...so little time
So Many Docker Platforms...so little timeSo Many Docker Platforms...so little time
So Many Docker Platforms...so little time
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
 
Azure: Docker Container orchestration, PaaS ( Service Farbic ) and High avail...
Azure: Docker Container orchestration, PaaS ( Service Farbic ) and High avail...Azure: Docker Container orchestration, PaaS ( Service Farbic ) and High avail...
Azure: Docker Container orchestration, PaaS ( Service Farbic ) and High avail...
 
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
DEVNET-1007	Network Infrastructure as Code with Chef and CiscoDEVNET-1007	Network Infrastructure as Code with Chef and Cisco
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
 
eCAP Developer Walkthru
eCAP Developer WalkthrueCAP Developer Walkthru
eCAP Developer Walkthru
 
Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and Cisco
 
Deep Dive: OpenStack Summit (Red Hat Summit 2014)
Deep Dive: OpenStack Summit (Red Hat Summit 2014)Deep Dive: OpenStack Summit (Red Hat Summit 2014)
Deep Dive: OpenStack Summit (Red Hat Summit 2014)
 
On Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNOn Docker and its use for LHC at CERN
On Docker and its use for LHC at CERN
 

Kürzlich hochgeladen

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Kürzlich hochgeladen (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 

TechBeats #2

  • 1. Journey from monolith to microservices Utilizing microservice patterns with monoliths Chris Gianelloni @wolf31o2 1
  • 2. In the beginning… Applause had several ways to deploy and manage software. • Custom system management tool (sysdeploy) • Basically a SSH wrapper for manually created systems • Custom Docker image management tool (Platypus) • Standardized AMIs, built w/ Packer, including Docker daemon • Services in Docker containers w/ configuration using SaltStack • Provides A/B testing and health checks • Packer + Chef + Terraform • Packer + Chef to bake AMIs • Terraform to deploy using ASGs • Mesosphere DC/OS • OSS orchestration for “Docker” containers 2
  • 3. Typical “old school” configuration system, written completely in-house, limited in capabilities, author has long-since departed the company • SSH wrapper to copy files and run commands • No instance management • No user management • No rollback features • No documentation • Unfamiliar code base to everyone • Unable to look up problems sysdeploy 3
  • 4. In-house microservice deployment and service management • Leverages CloudFormation for infrastructure • Template-based system • INI-style configuration files • Output lookups • Leverages SaltStack for some configuration management • Uses roles for service management • Services in Docker containers • Supports health checking • Supports A/B deployments • Supports manual rollback • Tied to AWS • Lots of ELBs Platypus 4
  • 5. Utilizes common, public, OSS tools • Common tools with existing user bases and communities • Basically “best of breed” tools • Packer for AMIs • Chef for installing and configuring software • Terraform for deploying baked AMIs • Plethora of documentation for each tool • Chef Server optional • Composable and reusable pieces • Output lookups (Chef + Terraform) Packer + Chef + Terraform 5
  • 6. Mesos, Marathon, and Metronome (and more) • Consolidated and unified platform • Leverages common OSS technologies • Standardized application and service management • Health checking for services • Supports single-shot, or scheduled tasks • Service discovery • Metrics and log collection • Integrated data services • Configuration rollbacks • Canary deployments • Universe packages Mesosphere DC/OS 6
  • 7. 7 Applause chose DC/OS to leverage previous work while also moving to a scalable system using open source components. This frees the Platform Delivery team to provide new capabilities to the Applause Hosting Platform which provide for our business needs. • Open source with a vibrant and active community • Strong feature set around an integrated platform • Ability to colocate diverse workloads • Microservices • Data services • AI / Machine learning / Analytics • Simple interfaces using API, CLI, and GUI • Enterprise features and support • Appreciation for memes Why DC/OS?
  • 8. 8 DC/OS Architecture Software layer is where containers execute to provide services. This includes Marathon applications, Metronome jobs, and Mesos frameworks. Platform layer is Mesosphere DC/OS services execute, which run in the host operating system. Infrastructure layer provides the host and operating system which hosts our stack, such as Amazon Web Services.
  • 9. 9 DC/OS Node Types Master nodes host DC/OS services and provide the orchestration layer, service discovery, and administrative interfaces. Public agent nodes are public facing and contain API routing and load balancing of incoming requests to backend services. These are agent nodes with a public role. Private agent nodes are internal and host all other services. Services communicate via East-West load balancing.
  • 11. Mesosphere Universe packages + Application services 11 Packages and services which provide base value to the platform to be used by all Applause services: • ecr-login - AWS Elastic Container Registry login process • Provides and updates credentials for fetching images • marathon-lb - North-South load balancer • Provides ingress load balancing from public slaves to services running in private slaves • hdfs - Hadoop Distributed File System • Provides shared storage for artifacts, logs, etc. • Provides storage layer for AI/ML and analytics processes • linkerd - HTTP proxy • Provides service discovery and service mesh • Provides East-West load balancing across private slaves • kong - API gateway • Provides API routing to specific endpoints • spark - Data processing framework • Provides processing framework for AI/ML and analytics
  • 12. • Chef cookbook wrapping community cookbook: https://supermarket.chef.io/cookbooks/dcos • Custom recipes • Monitoring agent • Docker Engine installation and configuration • Enhanced Networking (ena) driver • Logging aggregation agent • System users via data bag • DC/OS volumes (volume0, etc) • DC/OS workdir configuration • Cookbook “bake_time” • Packer templates to create “shared” images • Start from “official” CentOS base images • Patch • Reboot • Remove old kernels • Run Chef • Cleanup How do we build DC/OS? 12
  • 13. Chef wrapper “secret sauce” 13 Disable some Chef resources by modifying resources at converge time: # These are resources which need to be modified in the upstream dcos # cookbook to prevent them from executing at bake time [ { template: '/usr/src/dcos/genconf/config.yaml' }, { execute: 'dcos-genconf' }, { file: '/usr/src/dcos/genconf/serve/dcos_install.sh' }, { execute: 'preflight-check' }, { execute: 'dcos_install' }, ].each do |res| ruby_block "action-nothing-#{res.keys.first}[#{res.values.first}]" do block do r = resources(res) r.action([:nothing]) end only_if { node['chef-applause-dcos']['bake_time'] } end end
  • 14. Packer template 14 Runs Chef wrapper cookbook to produce a shared AMI: { "type": "chef-solo", "version": "13.8.5", "run_list": ["recipe[chef-applause-base]", "recipe[chef-applause-dcos]"], "json": { "chef-applause-dcos": { "bake_time": true, "chef_config_actions": ["nothing"] }, "dcos": { "dcos_enterprise": "{{user `dcos_enterprise`}}", "dcos_role": "nil", "dcos_version": "{{user `dcos_version`}}" } }, "cookbook_paths": [ "chef/cookbooks" ], "data_bags_path": "chef/pubkeys/data_bags" },
  • 15. • Terraform • Derived from Mesosphere’s AWS CloudFormation templates • Originally a 1:1 translation • Evolved over time, more customizations • VPC per cluster • Masters have public addresses / ELB for discovery • Private slaves have only internal addresses • Public slaves are behind ALB • Autoscaling Groups + Launch Configs • One group per DC/OS role • Launch Configs write out node-specific Chef configuration • Executes Chef client in cloud-init at boot • IAM instance profiles used • One profile per DC/OS role How do we deploy DC/OS? 15
  • 16. Launch Configs template 16 Provide outputs from terraform to Chef client: #cloud-config write_files: - content: | { "dcos": { "config": { "aws_region": "${region}", "cluster_name": "${stack_name}", "exhibitor_address": "${internal_elb_dns_name}", "master_external_loadbalancer": "${public_elb_dns_name}", "num_masters": "${num_masters}", "s3_bucket": "${exhibitor_s3_bucket}", "superuser_username": "${superuser_username}", "superuser_password_hash": "${superuser_password_hash}" }, "dcos_enterprise": ${dcos_enterprise}, "dcos_role": "${dcos_role}", "dcos_version": "${dcos_version}" } } path: |- /etc/chef/client-config.json
  • 17. • Chef wrapper changes • Pull Request made • Tested with ChefDK and Test Kitchen • Merged to master • Tested again • Pushed to Chef server • Packer job executed • Creates AMIs in AWS accounts • Terraform job executed • Creates AWS resources • IAM accounts, profiles, instance profiles • VPC, subnets, security groups • ASGs, ELBs/ALBs • Creates terraform outputs Development to deployment workflow for DC/OS 17
  • 18. • Application terraform updated • Databases, caches, storage buckets, etc • Service repository updated • Pull Request made • Unit tests, integration tests • Merge to master (or deployment branch) • Unit tests • Docker image • Integration tests • Code coverage • Push image • Service deployment / promotion to DC/OS • Metronome • Marathon • Kong Development to deployment workflow for Applause services 18
  • 19. • Migrate more workloads from legacy hosting • Data science • Analytics • Build and test • Other products • Integrate services with in-cluster resources • Data services • Migrate scheduled jobs to Metronome • Chronos • cron • Applause platform • Migrate long-running tasks to Metronome • Kubernetes in-cluster What now? 19
  • 20. Check out our careers page: https://www.applause.com/working-at-applause/We’re hiring 20