(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
© 2017 Capgemini. All rights reserved.1© 2017 Capgemini. All rights reserved.
An Introduction to Terraform
Chris Hollies
Capgemini UK Oracle IaaS lead
© 2017 Capgemini. All rights reserved.2 2© 2017 Capgemini. All rights reserved.2
I have worked with Oracle products since 1999,
focused around ERP.
Roles have included –
• Oracle PL/SQL & Pro*C Developer
• Oracle DBA
• Oracle E-Business Suite DBA
• Oracle Infrastructure Architect
• Oracle IaaS & PaaS Architect
• Technical Delivery Lead
• Oracle Pre-Sales Lead
Returned to Capgemini in 2016.
Capgemini UK Oracle IaaS Lead
Chris Hollies
© 2017 Capgemini. All rights reserved.3 3© 2017 Capgemini. All rights reserved.
© 2017 Capgemini. All rights reserved.3
Agenda
Overview of Terraform.
Why choose Terraform?
Terraform installation, structure, syntax,
characteristics and deployment
Sample use-cases and code examples
1
2
3
4 Best practices
5
Complementary tooling to incorporate
Terraform into a DevOps approach
© 2017 Capgemini. All rights reserved.4 4© 2017 Capgemini. All rights reserved.
© 2017 Capgemini. All rights reserved.4
Agenda
Overview of Terraform.
Why choose Terraform?
Terraform installation, structure, syntax,
characteristics and deployment
Sample use-cases and code examples
1
2
3
4 Best practices
5
Complementary tooling to incorporate
Terraform into a DevOps approach
© 2017 Capgemini. All rights reserved.5 5
Portable
• Binaries available for
various Linux distros, Mac
OS, Windows, Solaris
Declarative
• Specify the end-state and
Terraform derives the
execution plan
Multi-cloud
• Plug and play support for
over 100 different clouds
using lightweight provider
architecture
Simple & Fast
• Simple human readable
Hashicorp Configuration
Language
• Plain text
Why we chose Terraform
© 2017 Capgemini. All rights reserved.6 6
Why Terraform specifically, and which one?
Terraform is open source and licensed under the Mozilla Public Licence v2.0.
Terraform has a rich community and many Git repositories with sample code.
Since it supports over 100 different Infrastructure technologies and is open source,
Terraform does not lead to vendor lock-in unlike AWS CloudFormation, and is truly
multi-cloud unlike CloudFormation or Openstack Heat.
Like any good open source product, there are commercial versions available.
Terraform Pro adds collaboration and operations features whereas Terraform
Premium goes further with governance and policy management features.
© 2017 Capgemini. All rights reserved.7 7© 2017 Capgemini. All rights reserved.
© 2017 Capgemini. All rights reserved.7
Agenda
Overview of Terraform.
Why choose Terraform?
Terraform installation, structure, syntax,
characteristics and deployment
Sample use-cases and code examples
1
2
3
4 Best practices
5
Complementary tooling to incorporate
Terraform into a DevOps approach
© 2017 Capgemini. All rights reserved.8
Terraform Installation
© 2017 Capgemini. All rights reserved.9 9
• Created compartment (CJPH5)
• Created a Virtual Cloud Network in CJPH5 – 10.0.0.0/16 with
associated resources
• Created a VM called terra in the VCN
• Created a user called provtool
• Created an API signing key for the provtool user
Terraform Client Provisioning
© 2017 Capgemini. All rights reserved.13 13
Connect to terra1 and do this -
To install on OL7 do this –
sudo yum-config-manager --enable ol7_developer
sudo yum -y install terraform-0.11.7-1.el7 terraform-provider-oci-2.1.5-1.el7
Useradd terraform
Run terraform help
Tell them –
Sudo su – terra
mkdir –p terraform/base; cd terraform/base
Tell them we’re going to adopt dev practices, so we’re going to
install and use git; do so as a live demo
(https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
git init
This initialises the directory as a repo taking it under source code
control
© 2017 Capgemini. All rights reserved.14 14
• Terraform reads all ‘*.tf’ config files from current directory
• It reads them alphabetically
• It does not recurse
• Variables can be specified on command line, in standalone variables file or
for string variables, sourced as TF_VARS_ environment variables
Terraform – Infrastructure build process
• Terraform then builds a DAG – Directed Acyclic Graph with nodes
(resources) and edges (relationships)
• We can view these using graphviz
© 2017 Capgemini. All rights reserved.15 15
Terraform variables – Strings, Maps & Lists
Defined using a variable block.
• Name - Mandatory
• Type - Optional (default:string)
• Default - Optional
• Description - Optional
© 2017 Capgemini. All rights reserved.16 16
terraform.tfvars and *.auto.tfvars
Some variables are used so frequently that it makes sense to
abstract them into their own configuration file.
Special files will be automatically read by Terraform to set
variables –
• terraform.tfvars
• *.auto.tfvars
These files are a good place to store credentials and
connectivity configuration, but not the only place …
© 2017 Capgemini. All rights reserved.17 17
terraform.tfvars (and *.auto.tfvars)
# -- Tenant Information
tenancy_ocid =
"ocid1.tenancy.oc1..aaaaaaaahg2j4y6afjf6wzatofa4ojfkja…k64ba4a"
user_ocid = "ocid1.user.oc1..aaaaaaaaim55fbyubf673fcw…52k3lq"
compartment_ocid =
"ocid1.compartment.oc1..aaaaaaaa2ooed…durdy6rza5e3xhgjkncsk5ra
"
fingerprint = "b6:3b:16:3e:77:10:96:…:bb:92:80:6c"
private_key_path = "/home/oracle/.oci/oci_api_key.pem"
region = "eu-frankfurt-1"
# ---- availability domain (1, 2 or 3)
AD = "1"
The compartment we just created (CJPH1)
© 2017 Capgemini. All rights reserved.18 18© 2017 Capgemini. All rights reserved.
© 2017 Capgemini. All rights reserved.18
Agenda
Overview of Terraform.
Why choose Terraform?
Terraform installation, structure, syntax,
characteristics and deployment
Sample use-cases and code examples
1
2
3
4 Best practices
5
Complementary tooling to incorporate
Terraform into a DevOps approach
© 2017 Capgemini. All rights reserved.19
Building our first
infrastructure
© 2017 Capgemini. All rights reserved.20 20
a_provider.tf
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "private_key_path" {}
variable "region" {}
# Declare that we will use the OCI provider
provider "oci" {
region = "${var.region}"
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key_path = "${var.private_key_path}"
}
© 2017 Capgemini. All rights reserved.21 21
Do the following –
git add terraform.tfvars
git add a_provider.tf
terraform init
This will show terraform downloading the provider
Can also vi a .gitignore containing –
.gitignore
.terraform
Now commit our files by doing this –
git commit -m "Configure the provider"
© 2017 Capgemini. All rights reserved.22 22
b_vcn.tf
# Need to pull in compartment ocid
variable compartment_ocid {}
# ------ Create VCN
resource "oci_core_virtual_network" “cjph-tst-vcn" {
cidr_block = “10.0.0.0/24"
compartment_id = "${var.compartment_ocid}"
display_name = “cjph-tst-vcn"
dns_label = “cjphtstvcn"
}
resource “resource_type” “resource_name” {}
© 2017 Capgemini. All rights reserved.23 23
b_vcn.tf
© 2017 Capgemini. All rights reserved.24 24
c_igw.tf
# ------ Create Internet Gateway
resource "oci_core_internet_gateway" “cjph-tst-igw" {
compartment_id = "${var.compartment_ocid}"
display_name = “cjph-tst-igw"
vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}"
}
© 2017 Capgemini. All rights reserved.25 25
c_igw.tf
© 2017 Capgemini. All rights reserved.26 26
Terraform – Infrastructure build process
Use terraform plan to show the build process.
Pass the output to graphviz
Use graphviz dot to view the DAG.
© 2017 Capgemini. All rights reserved.27 27
Terraform data sources
Allow us to fetch or compute read-only data from outside
Terraform or from a Terraform configuration, such as –
• Image lists
• Availability domains
• Governance configurations
• Configuration Metadata
• Infrastructure resources
Every data source in Terraform is mapped to a provider based
on longest-prefix matching, such as aws_ for Amazon Web
Services or oci_ for Oracle Cloud Infrastructure.
© 2017 Capgemini. All rights reserved.28 28
datasources.tf
# -------- get the list of available ADs
data "oci_identity_availability_domains" "ADs" {
compartment_id = "${var.tenancy_ocid}"
}
data “datasource_type” “datasource_name” {}
© 2017 Capgemini. All rights reserved.29 29
d_subnets.tf
# ------ Create public subnets
resource "oci_core_subnet" "cjph-tst-ad1-admpub-subnet" {
availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}"
cidr_block = "10.0.0.0/26"
display_name = "cjph-tst-ad1-admpub-subnet"
dns_label = "cjphtstadmpubsub"
compartment_id = "${var.compartment_ocid}"
vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}"
}
resource "oci_core_subnet" "cjph-tst-ad1-apppub-subnet" {
availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}"
cidr_block = "10.0.0.64/26"
display_name = "cjph-tst-ad1-apppub-subnet"
dns_label = "cjphtstapppubsub"
compartment_id = "${var.compartment_ocid}"
vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}"
}
resource "oci_core_subnet" "cjph-tst-ad1-dbpub-subnet" {
availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}"
cidr_block = "10.0.0.128/26"
display_name = "cjph-tst-ad1-dbpub-subnet"
dns_label = "cjphtstdbpubsub"
compartment_id = "${var.compartment_ocid}"
vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}"
}
© 2017 Capgemini. All rights reserved.31
Tainting & destroying
infrastructure
© 2017 Capgemini. All rights reserved.32 32
Tainting a resource
Tainting a resource can be done manually
Tainting can be done by terraform during a failed apply operation
Tainted resources will be destroyed and recreated on next apply command
(terraform apply – does nothing
Terraform taint oci_core_internet_gateway.cjph-tst-igw
Terraform plan
Terraform apply
© 2017 Capgemini. All rights reserved.33 33
Destroying a resource
Resources can be selectively destroyed using –target=
Without options, terraform will destroy all resources
© 2017 Capgemini. All rights reserved.34 34© 2017 Capgemini. All rights reserved.
© 2017 Capgemini. All rights reserved.34
Agenda
Overview of Terraform.
Why choose Terraform?
Terraform installation, structure, syntax,
characteristics and deployment
Sample use-cases and code examples
1
2
3
4 Best practices
5
Complementary tooling to incorporate
Terraform into a DevOps approach
© 2017 Capgemini. All rights reserved.35 35
Suggested best practices
• Collaborate - Agree on a common approach and evolve it as a team
• Keep your configurations DRY
• Structure your configurations by environment/department/both
• Control your source code
• Keep groups of resources within configurations small –
blast radius
© 2017 Capgemini. All rights reserved.36 36© 2017 Capgemini. All rights reserved.
© 2017 Capgemini. All rights reserved.36
Agenda
Overview of Terraform.
Why choose Terraform?
Terraform installation, structure, syntax,
characteristics and deployment
Sample use-cases and code examples
1
2
3
4 Best practices
5
Complementary tooling to incorporate
Terraform into a DevOps approach
© 2017 Capgemini. All rights reserved.37 37Oracle Cloud | Johan Louwers | 2018 © 2017 Capgemini. All rights reserved.
Oracle Cloud – IaaS Integration
CODE BUILD TEST RELEASE OPERATE
Developer
Community
Automatic
code review
Version
control
Build
automation
Deployment
automation
(unit) test
automation
Build
automation
Deployment
automation
Integration
test
automation
Deployment
automation
Run
operations
Oracle Cloud
Developer Services
© 2017 Capgemini. All rights reserved.38
With more than 190,000 people, Capgemini is present in over 40 countries and
celebrates its 50th Anniversary year in 2017. A global leader in consulting, technology
and outsourcing services, the Group reported 2016 global revenues of EUR 12.5 billion.
Together with its clients, Capgemini creates and delivers business, technology and
digital solutions that fit their needs, enabling them to achieve innovation and
competitiveness. A deeply multicultural organization, Capgemini has developed its own
way of working, the Collaborative Business Experience™, and draws on Rightshore®, its
worldwide delivery model.
About Capgemini
Learn more about us at
www.capgemini.com
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group.
Copyright © 2017 Capgemini. All rights reserved.
Rightshore® is a trademark belonging to Capgemini.
This message is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please
notify the sender immediately and delete all copies of this message.

More Related Content

What's hot

Terraform Introduction
Terraform IntroductionTerraform Introduction
Terraform Introduction
soniasnowfrog
 
Terraform
TerraformTerraform
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as Code
Martin Schütte
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
Anton Babenko
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
Julien Pivotto
 
Effective terraform
Effective terraformEffective terraform
Effective terraform
Calvin French-Owen
 
Terraform
TerraformTerraform
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
Julien Corioland
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowBuilding infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps Krakow
Anton Babenko
 
Introduction To Terraform
Introduction To TerraformIntroduction To Terraform
Introduction To Terraform
Sasitha Iresh
 
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
Mithun Shanbhag
 
Advanced Terraform
Advanced TerraformAdvanced Terraform
Advanced Terraform
Samsung Electronics
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introduction
Jason Vance
 
Terraform
TerraformTerraform
Terraform
An Nguyen
 
Infrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformInfrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using Terraform
Adin Ermie
 
Best Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformBest Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with Terraform
DevOps.com
 
Introduce to Terraform
Introduce to TerraformIntroduce to Terraform
Introduce to Terraform
Samsung Electronics
 
Terraform
TerraformTerraform
Terraform
Harish Kumar
 
Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
Mohammed Fazuluddin
 
Intro to Terraform
Intro to TerraformIntro to Terraform
Intro to Terraform
Josh Michielsen
 

What's hot (20)

Terraform Introduction
Terraform IntroductionTerraform Introduction
Terraform Introduction
 
Terraform
TerraformTerraform
Terraform
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as Code
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
 
Effective terraform
Effective terraformEffective terraform
Effective terraform
 
Terraform
TerraformTerraform
Terraform
 
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowBuilding infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps Krakow
 
Introduction To Terraform
Introduction To TerraformIntroduction To Terraform
Introduction To Terraform
 
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
 
Advanced Terraform
Advanced TerraformAdvanced Terraform
Advanced Terraform
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introduction
 
Terraform
TerraformTerraform
Terraform
 
Infrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformInfrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using Terraform
 
Best Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformBest Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with Terraform
 
Introduce to Terraform
Introduce to TerraformIntroduce to Terraform
Introduce to Terraform
 
Terraform
TerraformTerraform
Terraform
 
Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
 
Intro to Terraform
Intro to TerraformIntro to Terraform
Intro to Terraform
 

Similar to Terraform

Platform Provisioning Automation for Oracle Cloud
Platform Provisioning Automation for Oracle CloudPlatform Provisioning Automation for Oracle Cloud
Platform Provisioning Automation for Oracle Cloud
Simon Haslam
 
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish AbramsGraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
Oracle Developers
 
Terraform with OCI
Terraform with OCITerraform with OCI
Terraform with OCI
JeSam Kim
 
TEC118 – How Do You Manage the Configuration of Your Environments from Metal ...
TEC118 –How Do You Manage the Configuration of Your Environments from Metal ...TEC118 –How Do You Manage the Configuration of Your Environments from Metal ...
TEC118 – How Do You Manage the Configuration of Your Environments from Metal ...
Chris Kernaghan
 
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Akamai Developers & Admins
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
Alvin Richards
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
Aerospike, Inc.
 
EPM, ERP, Cloud, and On-Premise: All Integration Options Explained
EPM, ERP, Cloud, and On-Premise:  All Integration Options ExplainedEPM, ERP, Cloud, and On-Premise:  All Integration Options Explained
EPM, ERP, Cloud, and On-Premise: All Integration Options Explained
Joseph Alaimo Jr
 
Oracle Cloud - Infrastruktura jako kód
Oracle Cloud - Infrastruktura jako kódOracle Cloud - Infrastruktura jako kód
Oracle Cloud - Infrastruktura jako kód
MarketingArrowECS_CZ
 
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
ragss
 
Getting Started with Terraform
Getting Started with TerraformGetting Started with Terraform
Getting Started with Terraform
Revelation Technologies
 
Spark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod NarasimhaSpark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit
 
Virtual training Intro to InfluxDB & Telegraf
Virtual training  Intro to InfluxDB & TelegrafVirtual training  Intro to InfluxDB & Telegraf
Virtual training Intro to InfluxDB & Telegraf
InfluxData
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
Morgan Tocker
 
Cloud Adoption: From Start to PaaS
Cloud Adoption: From Start to PaaSCloud Adoption: From Start to PaaS
Cloud Adoption: From Start to PaaS
Andrew Khoury
 
Why Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps MonitoringWhy Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps Monitoring
DevOps.com
 
Integrating Existing C++ Libraries into PySpark with Esther Kundin
Integrating Existing C++ Libraries into PySpark with Esther KundinIntegrating Existing C++ Libraries into PySpark with Esther Kundin
Integrating Existing C++ Libraries into PySpark with Esther Kundin
Databricks
 
Terrraform meet Oracle Cloud: Platform Provisioning Automation
Terrraform meet Oracle Cloud: Platform Provisioning AutomationTerrraform meet Oracle Cloud: Platform Provisioning Automation
Terrraform meet Oracle Cloud: Platform Provisioning Automation
Simon Haslam
 
Introduction to IAC and Terraform
Introduction to IAC and Terraform Introduction to IAC and Terraform
Introduction to IAC and Terraform
Venkat NaveenKashyap Devulapally
 
RIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptxRIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptx
MrJustbis
 

Similar to Terraform (20)

Platform Provisioning Automation for Oracle Cloud
Platform Provisioning Automation for Oracle CloudPlatform Provisioning Automation for Oracle Cloud
Platform Provisioning Automation for Oracle Cloud
 
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish AbramsGraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
 
Terraform with OCI
Terraform with OCITerraform with OCI
Terraform with OCI
 
TEC118 – How Do You Manage the Configuration of Your Environments from Metal ...
TEC118 –How Do You Manage the Configuration of Your Environments from Metal ...TEC118 –How Do You Manage the Configuration of Your Environments from Metal ...
TEC118 – How Do You Manage the Configuration of Your Environments from Metal ...
 
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
EPM, ERP, Cloud, and On-Premise: All Integration Options Explained
EPM, ERP, Cloud, and On-Premise:  All Integration Options ExplainedEPM, ERP, Cloud, and On-Premise:  All Integration Options Explained
EPM, ERP, Cloud, and On-Premise: All Integration Options Explained
 
Oracle Cloud - Infrastruktura jako kód
Oracle Cloud - Infrastruktura jako kódOracle Cloud - Infrastruktura jako kód
Oracle Cloud - Infrastruktura jako kód
 
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston MeetupOpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
 
Getting Started with Terraform
Getting Started with TerraformGetting Started with Terraform
Getting Started with Terraform
 
Spark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod NarasimhaSpark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod Narasimha
 
Virtual training Intro to InfluxDB & Telegraf
Virtual training  Intro to InfluxDB & TelegrafVirtual training  Intro to InfluxDB & Telegraf
Virtual training Intro to InfluxDB & Telegraf
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
Cloud Adoption: From Start to PaaS
Cloud Adoption: From Start to PaaSCloud Adoption: From Start to PaaS
Cloud Adoption: From Start to PaaS
 
Why Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps MonitoringWhy Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps Monitoring
 
Integrating Existing C++ Libraries into PySpark with Esther Kundin
Integrating Existing C++ Libraries into PySpark with Esther KundinIntegrating Existing C++ Libraries into PySpark with Esther Kundin
Integrating Existing C++ Libraries into PySpark with Esther Kundin
 
Terrraform meet Oracle Cloud: Platform Provisioning Automation
Terrraform meet Oracle Cloud: Platform Provisioning AutomationTerrraform meet Oracle Cloud: Platform Provisioning Automation
Terrraform meet Oracle Cloud: Platform Provisioning Automation
 
Introduction to IAC and Terraform
Introduction to IAC and Terraform Introduction to IAC and Terraform
Introduction to IAC and Terraform
 
RIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptxRIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptx
 

More from Phil Wilkins

API Design – More than just a Payload Definition
API Design – More than just a Payload DefinitionAPI Design – More than just a Payload Definition
API Design – More than just a Payload Definition
Phil Wilkins
 
Is 12 Factor App Right About Logging
Is 12 Factor App Right About LoggingIs 12 Factor App Right About Logging
Is 12 Factor App Right About Logging
Phil Wilkins
 
APIs, STOP Polling, lets go Streaming
APIs, STOP Polling, lets go StreamingAPIs, STOP Polling, lets go Streaming
APIs, STOP Polling, lets go Streaming
Phil Wilkins
 
Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...
Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...
Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...
Phil Wilkins
 
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
Phil Wilkins
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDK
Phil Wilkins
 
Api more than payload (2021 Update)
Api more than payload (2021 Update)Api more than payload (2021 Update)
Api more than payload (2021 Update)
Phil Wilkins
 
API more than payload
API more than payloadAPI more than payload
API more than payload
Phil Wilkins
 
How fluentd fits into the modern software landscape
How fluentd fits into the modern software landscapeHow fluentd fits into the modern software landscape
How fluentd fits into the modern software landscape
Phil Wilkins
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
Phil Wilkins
 
FluentD for end to end monitoring
FluentD for end to end monitoringFluentD for end to end monitoring
FluentD for end to end monitoring
Phil Wilkins
 
Meetups - The Oracle Ace Way
Meetups - The Oracle Ace WayMeetups - The Oracle Ace Way
Meetups - The Oracle Ace Way
Phil Wilkins
 
Apiary - A Developers Perspective
Apiary - A Developers PerspectiveApiary - A Developers Perspective
Apiary - A Developers Perspective
Phil Wilkins
 
Secrets of Custom API Policies on the Oracle API Platform
Secrets of Custom API Policies on the Oracle API PlatformSecrets of Custom API Policies on the Oracle API Platform
Secrets of Custom API Policies on the Oracle API Platform
Phil Wilkins
 
Oracle London Developer Meetup November 2018
Oracle London Developer Meetup November 2018Oracle London Developer Meetup November 2018
Oracle London Developer Meetup November 2018
Phil Wilkins
 
London Oracle Developer Meetup - June 18 - Drones with APIs
London Oracle Developer Meetup - June 18 - Drones with APIsLondon Oracle Developer Meetup - June 18 - Drones with APIs
London Oracle Developer Meetup - June 18 - Drones with APIs
Phil Wilkins
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18
Phil Wilkins
 
Oracle Developer Meetup March 2018
Oracle Developer Meetup March 2018Oracle Developer Meetup March 2018
Oracle Developer Meetup March 2018
Phil Wilkins
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
Phil Wilkins
 
Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...
Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...
Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...
Phil Wilkins
 

More from Phil Wilkins (20)

API Design – More than just a Payload Definition
API Design – More than just a Payload DefinitionAPI Design – More than just a Payload Definition
API Design – More than just a Payload Definition
 
Is 12 Factor App Right About Logging
Is 12 Factor App Right About LoggingIs 12 Factor App Right About Logging
Is 12 Factor App Right About Logging
 
APIs, STOP Polling, lets go Streaming
APIs, STOP Polling, lets go StreamingAPIs, STOP Polling, lets go Streaming
APIs, STOP Polling, lets go Streaming
 
Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...
Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...
Fluentd – Making Logging Easy & Effective in a Multi-cloud & Hybrid Environme...
 
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDK
 
Api more than payload (2021 Update)
Api more than payload (2021 Update)Api more than payload (2021 Update)
Api more than payload (2021 Update)
 
API more than payload
API more than payloadAPI more than payload
API more than payload
 
How fluentd fits into the modern software landscape
How fluentd fits into the modern software landscapeHow fluentd fits into the modern software landscape
How fluentd fits into the modern software landscape
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
 
FluentD for end to end monitoring
FluentD for end to end monitoringFluentD for end to end monitoring
FluentD for end to end monitoring
 
Meetups - The Oracle Ace Way
Meetups - The Oracle Ace WayMeetups - The Oracle Ace Way
Meetups - The Oracle Ace Way
 
Apiary - A Developers Perspective
Apiary - A Developers PerspectiveApiary - A Developers Perspective
Apiary - A Developers Perspective
 
Secrets of Custom API Policies on the Oracle API Platform
Secrets of Custom API Policies on the Oracle API PlatformSecrets of Custom API Policies on the Oracle API Platform
Secrets of Custom API Policies on the Oracle API Platform
 
Oracle London Developer Meetup November 2018
Oracle London Developer Meetup November 2018Oracle London Developer Meetup November 2018
Oracle London Developer Meetup November 2018
 
London Oracle Developer Meetup - June 18 - Drones with APIs
London Oracle Developer Meetup - June 18 - Drones with APIsLondon Oracle Developer Meetup - June 18 - Drones with APIs
London Oracle Developer Meetup - June 18 - Drones with APIs
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18
 
Oracle Developer Meetup March 2018
Oracle Developer Meetup March 2018Oracle Developer Meetup March 2018
Oracle Developer Meetup March 2018
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
 
Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...
Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...
Look at Oracle Integration Cloud – its relationship to ICS. Customer use Case...
 

Recently uploaded

It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
Zilliz
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
FIDO Alliance
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
Zilliz
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
SynapseIndia
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
Zilliz
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
Jimmy Lai
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
AmandaCheung15
 
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Zilliz
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
DianaGray10
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
Razin Mustafiz
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
SelfMade bd
 
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
FIDO Alliance
 
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
AimanAthambawa1
 
Intel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdfIntel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdf
Tech Guru
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
alexjohnson7307
 
UX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business GoalsUX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business Goals
FIDO Alliance
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
Alison B. Lowndes
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 

Recently uploaded (20)

It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...It's your unstructured data: How to get your GenAI app to production (and spe...
It's your unstructured data: How to get your GenAI app to production (and spe...
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
 
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
 
The Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - CoatueThe Path to General-Purpose Robots - Coatue
The Path to General-Purpose Robots - Coatue
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdfLeadMagnet IQ Review:  Unlock the Secret to Effortless Traffic and Leads.pdf
LeadMagnet IQ Review: Unlock the Secret to Effortless Traffic and Leads.pdf
 
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
 
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
COVID-19 and the Level of Cloud Computing Adoption: A Study of Sri Lankan Inf...
 
Intel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdfIntel Unveils Core Ultra 200V Lunar chip .pdf
Intel Unveils Core Ultra 200V Lunar chip .pdf
 
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
leewayhertz.com-AI agents for healthcare Applications benefits and implementa...
 
UX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business GoalsUX Webinar Series: Aligning Authentication Experiences with Business Goals
UX Webinar Series: Aligning Authentication Experiences with Business Goals
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
 

Terraform

  • 1. © 2017 Capgemini. All rights reserved.1© 2017 Capgemini. All rights reserved. An Introduction to Terraform Chris Hollies Capgemini UK Oracle IaaS lead
  • 2. © 2017 Capgemini. All rights reserved.2 2© 2017 Capgemini. All rights reserved.2 I have worked with Oracle products since 1999, focused around ERP. Roles have included – • Oracle PL/SQL & Pro*C Developer • Oracle DBA • Oracle E-Business Suite DBA • Oracle Infrastructure Architect • Oracle IaaS & PaaS Architect • Technical Delivery Lead • Oracle Pre-Sales Lead Returned to Capgemini in 2016. Capgemini UK Oracle IaaS Lead Chris Hollies
  • 3. © 2017 Capgemini. All rights reserved.3 3© 2017 Capgemini. All rights reserved. © 2017 Capgemini. All rights reserved.3 Agenda Overview of Terraform. Why choose Terraform? Terraform installation, structure, syntax, characteristics and deployment Sample use-cases and code examples 1 2 3 4 Best practices 5 Complementary tooling to incorporate Terraform into a DevOps approach
  • 4. © 2017 Capgemini. All rights reserved.4 4© 2017 Capgemini. All rights reserved. © 2017 Capgemini. All rights reserved.4 Agenda Overview of Terraform. Why choose Terraform? Terraform installation, structure, syntax, characteristics and deployment Sample use-cases and code examples 1 2 3 4 Best practices 5 Complementary tooling to incorporate Terraform into a DevOps approach
  • 5. © 2017 Capgemini. All rights reserved.5 5 Portable • Binaries available for various Linux distros, Mac OS, Windows, Solaris Declarative • Specify the end-state and Terraform derives the execution plan Multi-cloud • Plug and play support for over 100 different clouds using lightweight provider architecture Simple & Fast • Simple human readable Hashicorp Configuration Language • Plain text Why we chose Terraform
  • 6. © 2017 Capgemini. All rights reserved.6 6 Why Terraform specifically, and which one? Terraform is open source and licensed under the Mozilla Public Licence v2.0. Terraform has a rich community and many Git repositories with sample code. Since it supports over 100 different Infrastructure technologies and is open source, Terraform does not lead to vendor lock-in unlike AWS CloudFormation, and is truly multi-cloud unlike CloudFormation or Openstack Heat. Like any good open source product, there are commercial versions available. Terraform Pro adds collaboration and operations features whereas Terraform Premium goes further with governance and policy management features.
  • 7. © 2017 Capgemini. All rights reserved.7 7© 2017 Capgemini. All rights reserved. © 2017 Capgemini. All rights reserved.7 Agenda Overview of Terraform. Why choose Terraform? Terraform installation, structure, syntax, characteristics and deployment Sample use-cases and code examples 1 2 3 4 Best practices 5 Complementary tooling to incorporate Terraform into a DevOps approach
  • 8. © 2017 Capgemini. All rights reserved.8 Terraform Installation
  • 9. © 2017 Capgemini. All rights reserved.9 9 • Created compartment (CJPH5) • Created a Virtual Cloud Network in CJPH5 – 10.0.0.0/16 with associated resources • Created a VM called terra in the VCN • Created a user called provtool • Created an API signing key for the provtool user Terraform Client Provisioning
  • 10. © 2017 Capgemini. All rights reserved.13 13 Connect to terra1 and do this - To install on OL7 do this – sudo yum-config-manager --enable ol7_developer sudo yum -y install terraform-0.11.7-1.el7 terraform-provider-oci-2.1.5-1.el7 Useradd terraform Run terraform help Tell them – Sudo su – terra mkdir –p terraform/base; cd terraform/base Tell them we’re going to adopt dev practices, so we’re going to install and use git; do so as a live demo (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) git init This initialises the directory as a repo taking it under source code control
  • 11. © 2017 Capgemini. All rights reserved.14 14 • Terraform reads all ‘*.tf’ config files from current directory • It reads them alphabetically • It does not recurse • Variables can be specified on command line, in standalone variables file or for string variables, sourced as TF_VARS_ environment variables Terraform – Infrastructure build process • Terraform then builds a DAG – Directed Acyclic Graph with nodes (resources) and edges (relationships) • We can view these using graphviz
  • 12. © 2017 Capgemini. All rights reserved.15 15 Terraform variables – Strings, Maps & Lists Defined using a variable block. • Name - Mandatory • Type - Optional (default:string) • Default - Optional • Description - Optional
  • 13. © 2017 Capgemini. All rights reserved.16 16 terraform.tfvars and *.auto.tfvars Some variables are used so frequently that it makes sense to abstract them into their own configuration file. Special files will be automatically read by Terraform to set variables – • terraform.tfvars • *.auto.tfvars These files are a good place to store credentials and connectivity configuration, but not the only place …
  • 14. © 2017 Capgemini. All rights reserved.17 17 terraform.tfvars (and *.auto.tfvars) # -- Tenant Information tenancy_ocid = "ocid1.tenancy.oc1..aaaaaaaahg2j4y6afjf6wzatofa4ojfkja…k64ba4a" user_ocid = "ocid1.user.oc1..aaaaaaaaim55fbyubf673fcw…52k3lq" compartment_ocid = "ocid1.compartment.oc1..aaaaaaaa2ooed…durdy6rza5e3xhgjkncsk5ra " fingerprint = "b6:3b:16:3e:77:10:96:…:bb:92:80:6c" private_key_path = "/home/oracle/.oci/oci_api_key.pem" region = "eu-frankfurt-1" # ---- availability domain (1, 2 or 3) AD = "1" The compartment we just created (CJPH1)
  • 15. © 2017 Capgemini. All rights reserved.18 18© 2017 Capgemini. All rights reserved. © 2017 Capgemini. All rights reserved.18 Agenda Overview of Terraform. Why choose Terraform? Terraform installation, structure, syntax, characteristics and deployment Sample use-cases and code examples 1 2 3 4 Best practices 5 Complementary tooling to incorporate Terraform into a DevOps approach
  • 16. © 2017 Capgemini. All rights reserved.19 Building our first infrastructure
  • 17. © 2017 Capgemini. All rights reserved.20 20 a_provider.tf variable "tenancy_ocid" {} variable "user_ocid" {} variable "fingerprint" {} variable "private_key_path" {} variable "region" {} # Declare that we will use the OCI provider provider "oci" { region = "${var.region}" tenancy_ocid = "${var.tenancy_ocid}" user_ocid = "${var.user_ocid}" fingerprint = "${var.fingerprint}" private_key_path = "${var.private_key_path}" }
  • 18. © 2017 Capgemini. All rights reserved.21 21 Do the following – git add terraform.tfvars git add a_provider.tf terraform init This will show terraform downloading the provider Can also vi a .gitignore containing – .gitignore .terraform Now commit our files by doing this – git commit -m "Configure the provider"
  • 19. © 2017 Capgemini. All rights reserved.22 22 b_vcn.tf # Need to pull in compartment ocid variable compartment_ocid {} # ------ Create VCN resource "oci_core_virtual_network" “cjph-tst-vcn" { cidr_block = “10.0.0.0/24" compartment_id = "${var.compartment_ocid}" display_name = “cjph-tst-vcn" dns_label = “cjphtstvcn" } resource “resource_type” “resource_name” {}
  • 20. © 2017 Capgemini. All rights reserved.23 23 b_vcn.tf
  • 21. © 2017 Capgemini. All rights reserved.24 24 c_igw.tf # ------ Create Internet Gateway resource "oci_core_internet_gateway" “cjph-tst-igw" { compartment_id = "${var.compartment_ocid}" display_name = “cjph-tst-igw" vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}" }
  • 22. © 2017 Capgemini. All rights reserved.25 25 c_igw.tf
  • 23. © 2017 Capgemini. All rights reserved.26 26 Terraform – Infrastructure build process Use terraform plan to show the build process. Pass the output to graphviz Use graphviz dot to view the DAG.
  • 24. © 2017 Capgemini. All rights reserved.27 27 Terraform data sources Allow us to fetch or compute read-only data from outside Terraform or from a Terraform configuration, such as – • Image lists • Availability domains • Governance configurations • Configuration Metadata • Infrastructure resources Every data source in Terraform is mapped to a provider based on longest-prefix matching, such as aws_ for Amazon Web Services or oci_ for Oracle Cloud Infrastructure.
  • 25. © 2017 Capgemini. All rights reserved.28 28 datasources.tf # -------- get the list of available ADs data "oci_identity_availability_domains" "ADs" { compartment_id = "${var.tenancy_ocid}" } data “datasource_type” “datasource_name” {}
  • 26. © 2017 Capgemini. All rights reserved.29 29 d_subnets.tf # ------ Create public subnets resource "oci_core_subnet" "cjph-tst-ad1-admpub-subnet" { availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}" cidr_block = "10.0.0.0/26" display_name = "cjph-tst-ad1-admpub-subnet" dns_label = "cjphtstadmpubsub" compartment_id = "${var.compartment_ocid}" vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}" } resource "oci_core_subnet" "cjph-tst-ad1-apppub-subnet" { availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}" cidr_block = "10.0.0.64/26" display_name = "cjph-tst-ad1-apppub-subnet" dns_label = "cjphtstapppubsub" compartment_id = "${var.compartment_ocid}" vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}" } resource "oci_core_subnet" "cjph-tst-ad1-dbpub-subnet" { availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}" cidr_block = "10.0.0.128/26" display_name = "cjph-tst-ad1-dbpub-subnet" dns_label = "cjphtstdbpubsub" compartment_id = "${var.compartment_ocid}" vcn_id = "${oci_core_virtual_network.cjph-tst-vcn.id}" }
  • 27. © 2017 Capgemini. All rights reserved.31 Tainting & destroying infrastructure
  • 28. © 2017 Capgemini. All rights reserved.32 32 Tainting a resource Tainting a resource can be done manually Tainting can be done by terraform during a failed apply operation Tainted resources will be destroyed and recreated on next apply command (terraform apply – does nothing Terraform taint oci_core_internet_gateway.cjph-tst-igw Terraform plan Terraform apply
  • 29. © 2017 Capgemini. All rights reserved.33 33 Destroying a resource Resources can be selectively destroyed using –target= Without options, terraform will destroy all resources
  • 30. © 2017 Capgemini. All rights reserved.34 34© 2017 Capgemini. All rights reserved. © 2017 Capgemini. All rights reserved.34 Agenda Overview of Terraform. Why choose Terraform? Terraform installation, structure, syntax, characteristics and deployment Sample use-cases and code examples 1 2 3 4 Best practices 5 Complementary tooling to incorporate Terraform into a DevOps approach
  • 31. © 2017 Capgemini. All rights reserved.35 35 Suggested best practices • Collaborate - Agree on a common approach and evolve it as a team • Keep your configurations DRY • Structure your configurations by environment/department/both • Control your source code • Keep groups of resources within configurations small – blast radius
  • 32. © 2017 Capgemini. All rights reserved.36 36© 2017 Capgemini. All rights reserved. © 2017 Capgemini. All rights reserved.36 Agenda Overview of Terraform. Why choose Terraform? Terraform installation, structure, syntax, characteristics and deployment Sample use-cases and code examples 1 2 3 4 Best practices 5 Complementary tooling to incorporate Terraform into a DevOps approach
  • 33. © 2017 Capgemini. All rights reserved.37 37Oracle Cloud | Johan Louwers | 2018 © 2017 Capgemini. All rights reserved. Oracle Cloud – IaaS Integration CODE BUILD TEST RELEASE OPERATE Developer Community Automatic code review Version control Build automation Deployment automation (unit) test automation Build automation Deployment automation Integration test automation Deployment automation Run operations Oracle Cloud Developer Services
  • 34. © 2017 Capgemini. All rights reserved.38 With more than 190,000 people, Capgemini is present in over 40 countries and celebrates its 50th Anniversary year in 2017. A global leader in consulting, technology and outsourcing services, the Group reported 2016 global revenues of EUR 12.5 billion. Together with its clients, Capgemini creates and delivers business, technology and digital solutions that fit their needs, enabling them to achieve innovation and competitiveness. A deeply multicultural organization, Capgemini has developed its own way of working, the Collaborative Business Experience™, and draws on Rightshore®, its worldwide delivery model. About Capgemini Learn more about us at www.capgemini.com This message contains information that may be privileged or confidential and is the property of the Capgemini Group. Copyright © 2017 Capgemini. All rights reserved. Rightshore® is a trademark belonging to Capgemini. This message is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Editor's Notes

  1. Rename some files to reorder them and show that the output is actually the same Now do a yum –y install graphviz Terraform graph Terraform graph > cjph.dot dot cjph.dot -Tsvg -o cjph.svg FTP the svg back and view it
  2. Terraform plan Terraform graph > cjph2.dot dot cjph2.dot -Tsvg -o cjph2.svg FTP the svg back and view it