HashiCorp at JUST EAT
ANDREW BROWN - Senior Platform Engineer
Overview
Core Platform - Using Consul & Packer
Acquired Platforms - Terraform & Vagrant
• The world’s leading digital marketplace for takeaway food delivery
• Operate in 13 markets around the globe
• Platform peak ~ 2,500 orders per minute
JUST EAT
TECHNOLOGY
• Migrated to AWS (Amazon Web Services) 4 years ago
• Run hundreds of Instances at peak - daily scaling to match demand
• Heavily utilise CloudFormation
AWS - Setup
• Multiple AWS Accounts
• QA Daily Launch and Teardown
• On average an instance less than 3 days old
Before Consul…..
CONFIGURATION
• JSON file bundled with application package
• Deployment step to “Generate Config”
SETTINGS
• Feature settingsapi
• key/values stored in DynamoDB
Before Consul…..
SERVICE DISCOVERY?
• DNS -> Endpoint of the Elastic Load Balancer
• Hard-coded Ips
Consul Setup
● Consul Cluster per environment
● JSON config stored in GitHub in templated format
● Generator run via TeamCity
● Config committed to “Generated Repository”
After Consul….
• Instance joins the Consul Cluster during Deployment
• Service registered on consul cluster
• Consul-Template generates config files
Benefits of Consul
• No need to cycle instances (seconds vs minutes)
• PR to Github to change and validate Config
• Consistent Config
• UI - Platform and Health Overview
Consul MetaData
• Recently launched a “Platform Consul Cluster”
• MetaData Generated using same mechanism as Features
• Powering other tools used in Just Eat
Finally…. Packer
BAKED AMI (Amazon Machine Image)
• All Dependencies Pre-installed
• CloudFormation reduced (removed 500 lines of json)
• Significantly reduced deployment time (Linux and Windows)
• AMI ID pushed to Consul - Config now stores “AMI Name”
HashiCorp at
Acquired Platforms
ALBERTO BLANCO - Platform Developer
What we do?
Yes, correct! we acquire platforms
And we look after them too...
So we do...
What we value the most of Terraform
● Abstraction
● Infrastructure versioning
● A common language
● Lifecycle
● Dependency resolution
Starting for scratch
The three S’s
Stability
Scalability
Security
And also we want to keep releasing!
And monitor it properly!
to the cloud!
A reproducible deployment pipeline
As much as cloud agnostic as we can
Using Terraform as the base
How we deal with it
Consul for config
...and tfstate files
How we deal with it
On top of the base we put the rest
How we deal with it
On top of the base we put the rest
How we deal with it
On top of the base we put the rest
Here our tools...
● Terraform, the base
● Ansible for provisioning
● Capistrano for some deployments
● Consul for configs and tfstate
● Vagrant for local development
● Jenkins for orchestration
More HashiCorp to come for us...
● Packer for sharing artifacts and images
between providers
● Vault for secrets
Any questions?
We are hiring!
Come talk to us.
Thank you

HashiCorp at Just Eat