SlideShare a Scribd company logo
Tackling Fastly Terraform @
Ticketmaster
Paris Apostolopoulos
Lead Software Engineer
International Platform Team
Ticketmaster, UK
+ +
Terrafor
m
Fastl
y
Ticketmaster =
About me
● @javapapo
● about.me/javapapo
● www.linkedin.com/in/javaneze/
● javapapo@mac.com
● paris.apostolopoulos@ticketmaster.co.uk
My first reaction when I heard about Fastly
for the first time...some time ago
After a year using Fastly on a public facing
website
About the team
Fastly - more than a CDN to us
● Edge Cache
● Intelligent Router / Cluster load
balancing / event based routing
● Image optimization
● Our strongest ally during onsales!
● ~95% cache coverage
Fastly - our strongest ally
● We must be able to go from a few
req/sec to 1000x req/sec instantly.
● We need to be able to do that at any
day, any give time, live events never
stop!
● Netflix style of traffic BUT -
remember we sell a finite resource
(tickets) not infinite copies of the
same video ;)
Challenge: Multiple Services / Domains
● We have a large number Fastly Services (domains)
● Different web apps / managed by different teams
● Pre-prod and beta environments
● Production Services
Challenge: Multiple Services / Domains
Challenge: How do you effectively manage
so many domains?
● Limit access to services to certain teams
● At the same time you want to encourage your dev team
to embrace Fastly
● The closer the devops team is to Fastly the more the
end product will benefit
● How do you implement change control over your multi-
domain fastly configuration?
The Fastly dashboard is your friend...initially
● We have seen that most of the teams start interacting
directly with the Fastly dashboard
● This is to be expected and actually encouraged,
especially when you start adding Fastly to your solution
● Fastly’s built-in versioning helps to keep track of who is
doing what & revert mistakes ;)
The Fastly dashboard is your friend...initially
And then you start making use of more
advanced features - VCL
● One of the most powerful features of Fastly is the ability
to ‘code’ your edge cache
● When you enter the ‘VCL’ world you become a power
user and have total control
And then you start making use of more
advanced features - more VCL , edge
dictionaries, shielding
At some point updating your Fastly
configuration through the dashboard
becomes a problem
● Too many different changes happening at the same
time
● VCL code becomes bigger and bigger, change on logic
or even introducing bugs!
● Multiple people, editing the configuration at the same
time, too many interim config versions
At some point maintaining your Fastly
configuration through the dashboard
becomes a problem
Fastly Terraform Provider to the rescue!
Step 0: Basic idea
● Use the Fastly Terraform provider and migrate all the
configs and the update process to a Terraform
automated pipeline
● Team members should update on git the Terraform
config for each domain /service and then kick a build
pipeline
● https://www.terraform.io/docs/providers/fastly/index.html
Step 0 : Basic Idea - Flow
Step 1: Setup the CI/CD pipeline - Gitlab
Gitlab-ci.yml
.template: &terraform
image: xxxxx/terraform
tags:
- tm-prod cicd build
tickectmasterUk-plan:
<<: *terraform
stage: plan
only:
- master
script:
- |
cd ticketmaster-uk
terraform init;terraform plan
tickectmasterUk-apply:
<<: *terraform
stage: apply
when: manual
only:
- master
script:
- |
cd ticketmaster-uk
terraform init;terraform apply
The only thing you need to pass to the `terraform` worker is your
API key `FASTLY_KEY` so that it can access Fastly’s public
API, and depending on your terraform any keys for storing
securing the `tfstate.files`!
Step 1: Setup the CI/CD pipeline
Step 2: Setup the terraform project structure
Terraform files-
all your config is
here. Based on
the fastly
provider
All your VCL -
you can have
multiple files
The gitlab-ci
pipeline from
the previous
step
Step 3: Terraform your fastly dashboard
Step 3: Terraform your fastly dashboard
clicks
● For every section on the Fastly
dashboard config, there is a
Terraform resource to be used
● https://www.terraform.io/docs/providers/fastly/r/service_v1.ht
ml
Step 3: If you are unsure don't forget you
already have the generated VCL from Fastly
- use it as reference!
Step 4: Perform changes through git,
commit and trigger the pipeline!
Done! It's easier than you think!
● Estimated time for migrating any domain is within hours to max 1 day
● Once you migrate one, you have the pipeline for all the others
● Bonus feature - Fastly continues to version your configs internally +
you can mix manual updates and subsequent Terraform runs
● The Fastly Terraform provider is expected to improve over time!
● https://github.com/terraform-providers/terraform-provider-fastly
What you gain
● Changes on your config are versioned on git + fastly
● You can do M.R / P.R and check the quality of the changes
● The terraform pipeline ensures the order of executions
● Your VCL code is properly versioned and you can break it to smaller
files, share it among other services
● One pipeline can eventually update multiple related services
● One pipeline per ‘application’ multiple services (prod/beta/dev)
○ Sharing common resources (tf, vcl)
How it worked for us
● Our Fastly update process is more transparent than ever and is fully
automated.
● This means, the chance of making a mistake, is actually very low.
● We treat our Fastly config as part of our code base, developers love
automation and version control systems, so this process is very familiar
and easily understood by newcomers
● We actually followed the same principle as with our infrastructure,
maintaining large corporate AWS accounts using only the web console is
not sustainable. The same applies for Fastly.
Thank you - Happy Terraforming your Fastly
configs!

More Related Content

ODP
Lvm and gang 2015
PPTX
BAM experiences in large scale deployments
PDF
The Beam Vision for Portability: "Write once run anywhere"
KEY
RoR app screencast
PDF
Python Experience in KKBOX Group
PDF
Ignite Devops Fast Moving Software
PDF
Riak at Posterous
PDF
Orchestrating the execution of workflows for media streaming service and even...
Lvm and gang 2015
BAM experiences in large scale deployments
The Beam Vision for Portability: "Write once run anywhere"
RoR app screencast
Python Experience in KKBOX Group
Ignite Devops Fast Moving Software
Riak at Posterous
Orchestrating the execution of workflows for media streaming service and even...

What's hot (20)

PDF
How does Netflix Get Built and Triumphed?
PDF
Adrian Mouat - Microservice deployment techniques
PDF
Native Java with GraalVM
PDF
Making your first contribution to Foreman
PDF
How to video.
KEY
Ship It ! with Ruby/ Rails Ecosystem
PPTX
Introduction to GraalVM
PDF
Using ssh as portal - The CMS CRAB over glideinWMS experience
PDF
State of the CLI- Kat Marchan
PPTX
How to achieve scalable environments using kubernetes and vmss on azure cloud
PDF
Ruby World
PDF
perlcc made easy or, how to make a CGI Moose app
ODP
It gilde 20150209
PDF
Multi-language/multi-OS communication using RabbitMQ
PPT
SaltConf14 - Brendan Burns, Google - Management at Google Scale
PDF
Asynchronous Programming in Kotlin with Coroutines
PPTX
RedMart Migrating from EC2 to VPC with Chef
PDF
Composer
PDF
Recent Change of cpm
PDF
RabbitMQ fairly-indepth
How does Netflix Get Built and Triumphed?
Adrian Mouat - Microservice deployment techniques
Native Java with GraalVM
Making your first contribution to Foreman
How to video.
Ship It ! with Ruby/ Rails Ecosystem
Introduction to GraalVM
Using ssh as portal - The CMS CRAB over glideinWMS experience
State of the CLI- Kat Marchan
How to achieve scalable environments using kubernetes and vmss on azure cloud
Ruby World
perlcc made easy or, how to make a CGI Moose app
It gilde 20150209
Multi-language/multi-OS communication using RabbitMQ
SaltConf14 - Brendan Burns, Google - Management at Google Scale
Asynchronous Programming in Kotlin with Coroutines
RedMart Migrating from EC2 to VPC with Chef
Composer
Recent Change of cpm
RabbitMQ fairly-indepth
Ad

Similar to Tackling Terraform at Ticketmaster (20)

PPTX
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
PDF
20221130 - Luxembourg HUG Meetup
KEY
Make It Cooler: Using Decentralized Version Control
PPTX
Cinder Updates - Liberty Edition
PDF
FDM to FDMEE migration utility
PDF
Introduction to DevOps and the Practical Use Cases at Credit OK
PDF
OSDC 2018 | Migrating to the cloud by Devdas Bhagat
PDF
How to plan and define your CI-CD pipeline
PDF
Finagle-Based Microservices at SoundCloud
PDF
Meetup Openshift Geneva 03/10
PDF
Meetup 2020 - Back to the Basics part 101 : IaC
PPTX
Hashiconf Israel 2022 - Terraform Pull Request Automation.pptx
PDF
DevOps Fest 2020. immutable infrastructure as code. True story.
PDF
Fluentd and docker monitoring
PPTX
Lessons Learned while Deploying OneDrive Sync
PDF
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
PDF
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
PDF
Improve the deployment process step by step
PPTX
Your Inner Sysadmin - MidwestPHP 2015
PDF
Berlin AWS meetup: here.com on AWS
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
20221130 - Luxembourg HUG Meetup
Make It Cooler: Using Decentralized Version Control
Cinder Updates - Liberty Edition
FDM to FDMEE migration utility
Introduction to DevOps and the Practical Use Cases at Credit OK
OSDC 2018 | Migrating to the cloud by Devdas Bhagat
How to plan and define your CI-CD pipeline
Finagle-Based Microservices at SoundCloud
Meetup Openshift Geneva 03/10
Meetup 2020 - Back to the Basics part 101 : IaC
Hashiconf Israel 2022 - Terraform Pull Request Automation.pptx
DevOps Fest 2020. immutable infrastructure as code. True story.
Fluentd and docker monitoring
Lessons Learned while Deploying OneDrive Sync
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Improve the deployment process step by step
Your Inner Sysadmin - MidwestPHP 2015
Berlin AWS meetup: here.com on AWS
Ad

More from Fastly (20)

PDF
Revisiting HTTP/2
PPTX
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
PPTX
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
PDF
Altitude San Francisco 2018: The World Cup Stream
PDF
Altitude San Francisco 2018: We Own Our Destiny
PDF
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
PDF
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
PDF
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
PDF
Altitude San Francisco 2018: HTTP Invalidation Workshop
PDF
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
PPTX
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
PDF
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
PPTX
Altitude San Francisco 2018: Authentication at the Edge
PDF
Altitude San Francisco 2018: WebAssembly Tools & Applications
PPTX
Altitude San Francisco 2018: Testing with Fastly Workshop
PDF
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
PPTX
Altitude San Francisco 2018: WAF Workshop
PPTX
Altitude San Francisco 2018: Logging at the Edge
PPTX
Altitude San Francisco 2018: Video Workshop Docs
PPTX
Altitude San Francisco 2018: Programming the Edge
Revisiting HTTP/2
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Programming the Edge

Recently uploaded (20)

PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
project resource management chapter-09.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
A Presentation on Touch Screen Technology
PDF
Hybrid model detection and classification of lung cancer
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
TLE Review Electricity (Electricity).pptx
PDF
August Patch Tuesday
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
Chapter 5: Probability Theory and Statistics
A novel scalable deep ensemble learning framework for big data classification...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Unlocking AI with Model Context Protocol (MCP)
Accuracy of neural networks in brain wave diagnosis of schizophrenia
project resource management chapter-09.pdf
1 - Historical Antecedents, Social Consideration.pdf
Heart disease approach using modified random forest and particle swarm optimi...
Web App vs Mobile App What Should You Build First.pdf
Encapsulation_ Review paper, used for researhc scholars
Building Integrated photovoltaic BIPV_UPV.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
A Presentation on Touch Screen Technology
Hybrid model detection and classification of lung cancer
DP Operators-handbook-extract for the Mautical Institute
TLE Review Electricity (Electricity).pptx
August Patch Tuesday
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Assigned Numbers - 2025 - Bluetooth® Document
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Chapter 5: Probability Theory and Statistics

Tackling Terraform at Ticketmaster

  • 1. Tackling Fastly Terraform @ Ticketmaster Paris Apostolopoulos Lead Software Engineer International Platform Team Ticketmaster, UK + + Terrafor m Fastl y Ticketmaster =
  • 2. About me ● @javapapo ● about.me/javapapo ● www.linkedin.com/in/javaneze/ ● javapapo@mac.com ● paris.apostolopoulos@ticketmaster.co.uk
  • 3. My first reaction when I heard about Fastly for the first time...some time ago
  • 4. After a year using Fastly on a public facing website
  • 6. Fastly - more than a CDN to us ● Edge Cache ● Intelligent Router / Cluster load balancing / event based routing ● Image optimization ● Our strongest ally during onsales! ● ~95% cache coverage
  • 7. Fastly - our strongest ally ● We must be able to go from a few req/sec to 1000x req/sec instantly. ● We need to be able to do that at any day, any give time, live events never stop! ● Netflix style of traffic BUT - remember we sell a finite resource (tickets) not infinite copies of the same video ;)
  • 8. Challenge: Multiple Services / Domains ● We have a large number Fastly Services (domains) ● Different web apps / managed by different teams ● Pre-prod and beta environments ● Production Services
  • 10. Challenge: How do you effectively manage so many domains? ● Limit access to services to certain teams ● At the same time you want to encourage your dev team to embrace Fastly ● The closer the devops team is to Fastly the more the end product will benefit ● How do you implement change control over your multi- domain fastly configuration?
  • 11. The Fastly dashboard is your friend...initially ● We have seen that most of the teams start interacting directly with the Fastly dashboard ● This is to be expected and actually encouraged, especially when you start adding Fastly to your solution ● Fastly’s built-in versioning helps to keep track of who is doing what & revert mistakes ;)
  • 12. The Fastly dashboard is your friend...initially
  • 13. And then you start making use of more advanced features - VCL ● One of the most powerful features of Fastly is the ability to ‘code’ your edge cache ● When you enter the ‘VCL’ world you become a power user and have total control
  • 14. And then you start making use of more advanced features - more VCL , edge dictionaries, shielding
  • 15. At some point updating your Fastly configuration through the dashboard becomes a problem ● Too many different changes happening at the same time ● VCL code becomes bigger and bigger, change on logic or even introducing bugs! ● Multiple people, editing the configuration at the same time, too many interim config versions
  • 16. At some point maintaining your Fastly configuration through the dashboard becomes a problem
  • 17. Fastly Terraform Provider to the rescue!
  • 18. Step 0: Basic idea ● Use the Fastly Terraform provider and migrate all the configs and the update process to a Terraform automated pipeline ● Team members should update on git the Terraform config for each domain /service and then kick a build pipeline ● https://www.terraform.io/docs/providers/fastly/index.html
  • 19. Step 0 : Basic Idea - Flow
  • 20. Step 1: Setup the CI/CD pipeline - Gitlab Gitlab-ci.yml .template: &terraform image: xxxxx/terraform tags: - tm-prod cicd build tickectmasterUk-plan: <<: *terraform stage: plan only: - master script: - | cd ticketmaster-uk terraform init;terraform plan tickectmasterUk-apply: <<: *terraform stage: apply when: manual only: - master script: - | cd ticketmaster-uk terraform init;terraform apply The only thing you need to pass to the `terraform` worker is your API key `FASTLY_KEY` so that it can access Fastly’s public API, and depending on your terraform any keys for storing securing the `tfstate.files`!
  • 21. Step 1: Setup the CI/CD pipeline
  • 22. Step 2: Setup the terraform project structure Terraform files- all your config is here. Based on the fastly provider All your VCL - you can have multiple files The gitlab-ci pipeline from the previous step
  • 23. Step 3: Terraform your fastly dashboard
  • 24. Step 3: Terraform your fastly dashboard clicks ● For every section on the Fastly dashboard config, there is a Terraform resource to be used ● https://www.terraform.io/docs/providers/fastly/r/service_v1.ht ml
  • 25. Step 3: If you are unsure don't forget you already have the generated VCL from Fastly - use it as reference!
  • 26. Step 4: Perform changes through git, commit and trigger the pipeline!
  • 27. Done! It's easier than you think! ● Estimated time for migrating any domain is within hours to max 1 day ● Once you migrate one, you have the pipeline for all the others ● Bonus feature - Fastly continues to version your configs internally + you can mix manual updates and subsequent Terraform runs ● The Fastly Terraform provider is expected to improve over time! ● https://github.com/terraform-providers/terraform-provider-fastly
  • 28. What you gain ● Changes on your config are versioned on git + fastly ● You can do M.R / P.R and check the quality of the changes ● The terraform pipeline ensures the order of executions ● Your VCL code is properly versioned and you can break it to smaller files, share it among other services ● One pipeline can eventually update multiple related services ● One pipeline per ‘application’ multiple services (prod/beta/dev) ○ Sharing common resources (tf, vcl)
  • 29. How it worked for us ● Our Fastly update process is more transparent than ever and is fully automated. ● This means, the chance of making a mistake, is actually very low. ● We treat our Fastly config as part of our code base, developers love automation and version control systems, so this process is very familiar and easily understood by newcomers ● We actually followed the same principle as with our infrastructure, maintaining large corporate AWS accounts using only the web console is not sustainable. The same applies for Fastly.
  • 30. Thank you - Happy Terraforming your Fastly configs!