Terraform providers for Cloud Foundry
Guillaume Berche & Mevan Samaratunga
1
Latest slides: https://goo.gl/5GRV1t
Team introduction
Guillaume Berche �@gberche, Orange�product management
Arthur Halet �Orange, �development
Mevan Samaratunga �@mevansam, Pivotal development
Xavier Marcelet�Orange, �development
Samed Guner @samedguener, SAP �development
Janos Binder �SAP,�development
Jim Carrothers�SAP, �development
Xilin Li�Sap, �development
2
Agenda
3
Why terraform for CF? CF admins use cases
4
#! /bin/bash
$ cf create-
Why terraform for CF? Developers use cases
5
Agenda
6
How is terraform helping ?
Terraform (https://www.terraform.io/) “enables you to safely and predictably create, change, and improve your production platforms and apps. 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.”
7
8
9
UAA
10
Getting started demo
11
Demo
Short demo (9 mins)
Long demo (28 mins)
12
Admin case study: ASG, isolation segment
13
space:
space1
organization:
public
isolation-segment:
public
asg:
dns
asg:
orange-dns
default-running-asgs
default-staging-asgs
IS Entitled to org
Space
assigned
to IS
Includes
cloudfoundry
uaa
credhub
Provider color code:
Includes
14
Admin case study: credhub, uaa, cf ar
15
app: cf-wall
Mapped to route �(as a route service)
Bound to app
Bound to app
References data from
References data from
user-provided- service:�cf-wall-smtp
user-provided- service:�cf-wall-config
uaa-client:�cf-wall
credhub-user:�cf-wall
route: cf-wall
service-instance:�Gobis �(OAuth gateway)
cloudfoundry
uaa
credhub
Provider color code:
16
Admin case study: Cloudflare & CFAR domains
17
cloudfoundry
cloudflare
Provider color code:
app: �myapp
route:
myapp.domain.com �(host=””)
domain:�myapp.domain.com
cloudflare_record:�myapp.domain.com
References data from
References data from
Admin case study: Cloudflare & CFAR domains
18
TF on-demand invocation through a service broker: orange-cloudfoundry/cf-ops-automation-broker
Developer case study 1: CFAR, CFCR
19
Collection of Spring based Microservices to track and manage vehicle fleets at a telco.
Originally built and run on Docker.
Migrated Spring Microservices to CFCR
Migrated CQRS event back-bone to CFCR
Terraform used to wire the architecture together and deploy continuously in an idempotent manner
Architecture overview of SAP Leonardo Machine Learning Foundation
20
Developer case study 2: CFAR, CFCR
Integrating TF in CI/CD 1/2
21
Integrating TF in CI/CD 2/2: SAP experience
22
Get credentials & tf state file from Vault
Run aliveness & integration tests
Apply changes using tf
Store changed tf state in Vault
Agenda
23
History of the CFAR providers and community convergence
24
2019
2018
2017
Converged efforts
terraform-providers/
terraform-provider-cloudfoundry
Official release
Details of each contributed CFAR providers and their status
25
2019
2018
2017
Community CFCR (K8S) providers
26
2018
2017
2019
CFAR provider backlog, challenges & future work
Suggestions, comments, and contributions are welcome!
27
Thanks! Questions ?
Slides: https://goo.gl/5GRV1t
Reach us on cloudfoundry slack #terraform
https://cloudfoundry.slack.com/messages/C7JRBR8CV/
28