Submit Search
Upload
Terraform with OCI
•
1 like
•
365 views
JeSam Kim
Follow
OCI (Oracle Cloud Infrastructure) 에서 Terraform을 이용하여 관리 자동화 구축
Read less
Read more
Technology
Report
Share
Report
Share
1 of 23
Download now
Download to read offline
Recommended
Oracle OCI APIs and SDK
Oracle OCI APIs and SDK
Phil Wilkins
Mastering Terraform and the Provider for OCI
Mastering Terraform and the Provider for OCI
Gregory GUILLOU
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
OpenShift Origin
Are We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack Deployment
Ken Pepple
Red Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABC
Robert Bohne
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
ragss
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rulli
mfrancis
Cloud standards interoperability: status update on OCCI and CDMI implementations
Cloud standards interoperability: status update on OCCI and CDMI implementations
Florian Feldhaus
Recommended
Oracle OCI APIs and SDK
Oracle OCI APIs and SDK
Phil Wilkins
Mastering Terraform and the Provider for OCI
Mastering Terraform and the Provider for OCI
Gregory GUILLOU
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
Build Your Own PaaS, Just like Red Hat's OpenShift from LinuxCon 2013 New Orl...
OpenShift Origin
Are We Done Yet ? Testing Your OpenStack Deployment
Are We Done Yet ? Testing Your OpenStack Deployment
Ken Pepple
Red Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABC
Robert Bohne
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
OpenStack + Cloud Foundry for the OpenStack Boston Meetup
ragss
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rulli
mfrancis
Cloud standards interoperability: status update on OCCI and CDMI implementations
Cloud standards interoperability: status update on OCCI and CDMI implementations
Florian Feldhaus
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Tomasz Cholewa
Kubernetes day 2 Operations
Kubernetes day 2 Operations
Paul Czarkowski
A DevOps guide to Kubernetes
A DevOps guide to Kubernetes
Paul Czarkowski
Fuel, Puppet and OpenStack
Fuel, Puppet and OpenStack
aedocw
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10
MagaliDavidCruz
Putting Private Clouds to Work with PaaS Interop Vegas 2013 presentation by D...
Putting Private Clouds to Work with PaaS Interop Vegas 2013 presentation by D...
Diane Mueller
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
OpenShift Origin
Upgrading to Alfresco 6
Upgrading to Alfresco 6
Angel Borroy López
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
mfrancis
Tales From The Ship: Navigating the OpenStack Community Seas
Tales From The Ship: Navigating the OpenStack Community Seas
Mirantis
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Origin
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift Origin
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
OpenShift Origin
Extending TripleO for OpenStack Management
Extending TripleO for OpenStack Management
Keith Basil
Openstack benelux 2015
Openstack benelux 2015
Microsoft
Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
Ververica
OpenShift and next generation application development
OpenShift and next generation application development
Syed Shaaf
Inter-Sling communication with message queue
Inter-Sling communication with message queue
Tomasz Rękawek
Adobe AEM - From Eventing to Job Processing
Adobe AEM - From Eventing to Job Processing
Carsten Ziegeler
Red Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep Dive
Greg Hoelzer
Getting Started with Terraform
Getting Started with Terraform
Revelation Technologies
Oracle Cloud deployment with Terraform
Oracle Cloud deployment with Terraform
Stefan Oehrli
More Related Content
What's hot
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Tomasz Cholewa
Kubernetes day 2 Operations
Kubernetes day 2 Operations
Paul Czarkowski
A DevOps guide to Kubernetes
A DevOps guide to Kubernetes
Paul Czarkowski
Fuel, Puppet and OpenStack
Fuel, Puppet and OpenStack
aedocw
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10
MagaliDavidCruz
Putting Private Clouds to Work with PaaS Interop Vegas 2013 presentation by D...
Putting Private Clouds to Work with PaaS Interop Vegas 2013 presentation by D...
Diane Mueller
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
OpenShift Origin
Upgrading to Alfresco 6
Upgrading to Alfresco 6
Angel Borroy López
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
mfrancis
Tales From The Ship: Navigating the OpenStack Community Seas
Tales From The Ship: Navigating the OpenStack Community Seas
Mirantis
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Origin
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift Origin
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
OpenShift Origin
Extending TripleO for OpenStack Management
Extending TripleO for OpenStack Management
Keith Basil
Openstack benelux 2015
Openstack benelux 2015
Microsoft
Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
Ververica
OpenShift and next generation application development
OpenShift and next generation application development
Syed Shaaf
Inter-Sling communication with message queue
Inter-Sling communication with message queue
Tomasz Rękawek
Adobe AEM - From Eventing to Job Processing
Adobe AEM - From Eventing to Job Processing
Carsten Ziegeler
Red Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep Dive
Greg Hoelzer
What's hot
(20)
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes day 2 Operations
Kubernetes day 2 Operations
A DevOps guide to Kubernetes
A DevOps guide to Kubernetes
Fuel, Puppet and OpenStack
Fuel, Puppet and OpenStack
Meetup Openshift Geneva 03/10
Meetup Openshift Geneva 03/10
Putting Private Clouds to Work with PaaS Interop Vegas 2013 presentation by D...
Putting Private Clouds to Work with PaaS Interop Vegas 2013 presentation by D...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Upgrading to Alfresco 6
Upgrading to Alfresco 6
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
New and cool in OSGi R7 - David Bosschaert & Carsten Ziegeler
Tales From The Ship: Navigating the OpenStack Community Seas
Tales From The Ship: Navigating the OpenStack Community Seas
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
Extending TripleO for OpenStack Management
Extending TripleO for OpenStack Management
Openstack benelux 2015
Openstack benelux 2015
Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
OpenShift and next generation application development
OpenShift and next generation application development
Inter-Sling communication with message queue
Inter-Sling communication with message queue
Adobe AEM - From Eventing to Job Processing
Adobe AEM - From Eventing to Job Processing
Red Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep Dive
Similar to Terraform with OCI
Getting Started with Terraform
Getting Started with Terraform
Revelation Technologies
Oracle Cloud deployment with Terraform
Oracle Cloud deployment with Terraform
Stefan Oehrli
Oracle Cloud - Infrastruktura jako kód
Oracle Cloud - Infrastruktura jako kód
MarketingArrowECS_CZ
Terraform
Terraform
Phil Wilkins
Terraform day 1
Terraform day 1
Kalkey
Better Practices when Using Terraform to Manage Oracle Cloud Infrastructure
Better Practices when Using Terraform to Manage Oracle Cloud Infrastructure
Simon Haslam
Introducing Fn Project
Introducing Fn Project
Ayumu Aizawa
Terraform vs Pulumi
Terraform vs Pulumi
HoaiNam307
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Vietnam Open Infrastructure User Group
Provisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack Manager
Simon Haslam
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Frederic Descamps
Terrraform meet Oracle Cloud: Platform Provisioning Automation
Terrraform meet Oracle Cloud: Platform Provisioning Automation
Simon Haslam
OracleBeer_Terraform_soe.pdf
OracleBeer_Terraform_soe.pdf
Stefan Oehrli
Collaborative Terraform with Atlantis
Collaborative Terraform with Atlantis
Ferenc Kovács
Core os dna_automacon
Core os dna_automacon
Patrick Galbraith
Managing Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with Puppet
glynnfoster
Terraform - Taming Modern Clouds
Terraform - Taming Modern Clouds
Nic Jackson
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
Karin Patenge
Platform Provisioning Automation for Oracle Cloud
Platform Provisioning Automation for Oracle Cloud
Simon Haslam
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
Georgi Kodinov
Similar to Terraform with OCI
(20)
Getting Started with Terraform
Getting Started with Terraform
Oracle Cloud deployment with Terraform
Oracle Cloud deployment with Terraform
Oracle Cloud - Infrastruktura jako kód
Oracle Cloud - Infrastruktura jako kód
Terraform
Terraform
Terraform day 1
Terraform day 1
Better Practices when Using Terraform to Manage Oracle Cloud Infrastructure
Better Practices when Using Terraform to Manage Oracle Cloud Infrastructure
Introducing Fn Project
Introducing Fn Project
Terraform vs Pulumi
Terraform vs Pulumi
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Provisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack Manager
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
Terrraform meet Oracle Cloud: Platform Provisioning Automation
Terrraform meet Oracle Cloud: Platform Provisioning Automation
OracleBeer_Terraform_soe.pdf
OracleBeer_Terraform_soe.pdf
Collaborative Terraform with Atlantis
Collaborative Terraform with Atlantis
Core os dna_automacon
Core os dna_automacon
Managing Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with Puppet
Terraform - Taming Modern Clouds
Terraform - Taming Modern Clouds
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
Platform Provisioning Automation for Oracle Cloud
Platform Provisioning Automation for Oracle Cloud
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
Recently uploaded
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
The Digital Insurer
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
charlottematthew16
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
MarianaLemus7
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Pixlogix Infotech
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Fwdays
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
Recently uploaded
(20)
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Terraform with OCI
1.
Terraform with OCI Jesam
Kim, Senior Sales Consultant Oracle Infrastructure Cloud / IaaS 28 June 2018 Confidential – Oracle RestrictedCopyright © 2018, Oracle and/or its affiliates. All rights reserved. |
2.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Agenda – Introducing Terraform – Installing Terraform on Oracle Linux 7 – Terraform configuration files – Terraform providers and OCI – Terraform resources, plan and apply – Terraform : DEMO
3.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Introducing Terraform • Terraform is written by the team at Hashicorp. • 인프라를 효율적으로 구축하고 관리하기 위한 “Infrastructure as Code” 도구 입니다. • Terraform – 다양한 프로바이더에서 인프라를 생성, 결합 및 관리 합니다. • Terraform은 Chef, Puppet 및 Ansible 과 같은 구성 관리 및 프로비저닝 툴과도 통합됩니다.
4.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Introducing Terraform – Why not a configuration management tool? – Why not CloudFormation? – What can you use Terraform for? • Multi-tier applications • Self-service infrastructure • Production, development and testing environments • Continues delivery
5.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Introducing Terraform • Written in Go • Runtimes available for OSX, Linux and Windows • Ia32, x64 and ARM • Fast development - releases monthly+ • HCL – Hashi Configuration Language and simple markup format - JSON interoperable
6.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Introducing Terraform • Traditional procedural build process: - Login to a dashboard - Go to compute tab - Click on launch new instance - ….. - Configure VM, etc • Terraform uses a declarative build process: - A VM with 2 OCPUs and 7GB RAM - 100GB of block storage - CentOS 7 - Two network interfaces with IP 10.0.0.1/24 and 10.0.1.1./24
7.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Installing Terraform on Oracle Linux 7 Oracle Linux 7.5 인스턴스에 Terraform을 설치하기 위해 yum 저장소를 사용하여 terraform 바이너리 및 oci provider를 설치: # sudo yum install terraform terraform-provider-oci These packages are installed: - Terraform v0.11.7 - terraform-provider-oci v2.1.12 You can also install from provider for OCI using our Github repo: https://github.com/oracle/terraform-provider-oci
8.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform Configuration Files • Configuration 은 단일 혹은 복수의 파일로 분할 될 수 있습니다. • Terraform 은 현재 작업 디렉토리의 모든 .tf 혹은 .tf.json 으로 끝나는 파일을 병합합니다. • 하위 디렉토리는 포함되지 않습니다. (non-recursive). • 파일은 순차적으로 병합 됩니다. • .tf , .tf.json 외 다른 확장자명을 가진 파일은 무시됩니다. (e.g. .jpg) TIP: Setup a directory to host all your terraform files
9.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform Configuration Files 두 가지 configuration files formats (.tf and .tf.json) : • Humans -.tf 형식은 광범위하게 사람이 읽을 수 있으며, 인라인 주석을 허용하며 일반적으로 사람이 구성하는 경우 권장됩니다. • Machines - The .tf.json 형식은 순수한 JSON 형식이며, 기계가 구성 파일을 작성하는 기계 상호 작용을 위한 것입니다. { "keyword1": [ { "some_name": [ { "key": "value", "nested": [ { "key": "value" } ] } ] } ] } keyword1 "some_name" { key = "value" nested { key = "value' }
10.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform Configuration Files - Providers • Providers connect Terraform to the infrastructure you want to manage • They provide configuration like connection details and authentication credentials. • You can think about them as a wrapper around the services whose infrastructure we wish to manage. • In order to download the providers you’re using in your environment you need to run the terraform init command to install any required providers.
11.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform Configuration Files – OCI Provider 첫 째로 할 일은 provider setup 입니다. 다음은 OCI 예제 입니다 : provider "oci" { tenancy_ocid = "${var.tenancy_ocid}" user_ocid = "${var.user_ocid}" fingerprint = "${var.fingerprint}" private_key_path = "${var.private_key_path}" region = "${var.region}" } oci provider 는 Terraform을 사용하여 OCI 테넌시에 대해 자원을 생성, 관리 및 삭제할 수 있습니다.
12.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform Configuration Files – Resources Resources - provider 가 구성되고 나면 provider의 resource를 사용할 수 있습니다. oci provider를 사용하여 인스턴스, 블록 및 오브젝트 스토리지, 네트워크 등을 만들 수 있습니다. The following example starts an instance: Component Provider Type Name NOTE: The combination of type and name must be unique in your configuration.
13.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform plan • The plan shows you what will happen • You can save plans to guarantee what will happen • Plans show reasons for certain actions (such as re-create) • Prior to Terraform, users had to guess change ordering, parallelization, and rollout effect # terraform plan
14.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform plan - Example
15.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform plan - Indicators + indicates a resource will be created - indicates a resource will be destroyed ~ indicates a resource will be updated in-place -/+ indicates a resources will be destroyed and re-created
16.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform apply • Executes changes in order based on the resource graph • Parallelizes changes when possible • Handles and recovers transient errors • Updates existing resources when updates are allowed • Re-creates existing resources when updates are not allowed # terraform apply
17.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform apply - Example # terraform apply -auto-approve
18.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform : DEMO • Oracle Linux 7.5 VM 생성 및 Terraform 설치는 선행되어 있음. • Oracle Linux 7.5 에서 OCI API 접속을 위한 Key Pair 생성 (1) Private Key 생성 (2) Public Key 생성 • 생성된 Public Key의 내용을 복사 한뒤, OCI > User의 api용 user에 등록 ($ cat ~/.ssh/oci_api_key_public.pem 출력 내용 복사) $ openssl genrsa –out ~/.ssh/oci_api_key.pem 2048 $ chmod go-r ~/.ssh/oci_api_key.pem $ openssl rsa –pubout –in ~/.ssh/oci_api_key.pem –out ~/.ssh/oci_api_key_public.pem
19.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform : DEMO • 생성된 Public Key의 내용을 복사 한뒤, OCI > User의 api용 user에 등록 후 Fingerprint 값 복사
20.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform : DEMO • 접속용 Key 정보 및 OCI의 각 OCID 정보를 OS 파라미터로 설정 $ vi ~/.bash_profile ….. export TF_VAR_tenancy_ocid="ocid1.tenancy.oc1..aaaaaaaaujfmhpw3mr6bu3s7ntoe3dwwi36oxw2esgvj2per34kogpnvudja" export TF_VAR_user_ocid="ocid1.user.oc1..aaaaaaaagv3hsgqmht5roynxn64wab4zjywkuisxhs6rdxvtj32gje4jeufq" export TF_VAR_compartment_ocid="ocid1.compartment.oc1..aaaaaaaasj3wfoxxtewwa7t4b5g743iixsmetst5pc6l6o3q7yd242nz3bcq" export TF_VAR_fingerprint="47:eb:46:4b:87:bf:af:c1:84:2b:fb:44:cb:ab:37:64" export TF_VAR_private_key_path=/home/opc/.ssh/oci_api_key.pem :wq! $ source ~/.bash_profile
21.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform : DEMO • OCI Instance 생성을 위한 Compute.tf 작성 (사전에 VCN 및 Subnet은 생성되어 있음) variable "tenancy_ocid" {} variable "user_ocid" {} variable "fingerprint" {} variable "private_key_path" {} variable "compartment_ocid" {} provider "oci" { tenancy_ocid = "${var.tenancy_ocid}" user_ocid = "${var.user_ocid}" fingerprint = "${var.fingerprint}" private_key_path = "${var.private_key_path}" } resource "oci_core_instance" "TFInstance" { availability_domain = "rDTV:US-ASHBURN-AD-1" compartment_id = "${var.compartment_ocid}" display_name = "TEST" image = "ocid1.image.oc1.iad.aaaaaaaazq7xlunevyn3cf4wppcx2j53eb26pnnc4ukqtfj4tbjjcklnhpaa" shape = "VM.Standard1.1" subnet_id = "ocid1.subnet.oc1.iad.aaaaaaaan4t2zxrc5gf76lfpzndkbg23um5daov5r3yn5oaorupgbhzx2p5a" metadata { ssh_authorized_keys = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjDdIiOo3haHr41dSbR1EV2gbNq8by1ldWXaPciwfQs4KkXygPedqWRGf9Iegzw3/CMK8uUvhoVMH6KdBOEYC+k9rPawfl5y7lWxXkY3DKe4Fe1RIMZbh5azmQcRKcx+aW hksTLIJn630Fe5o8zI2iLaHWwIbyF9aWflSFCQBfr6HwvenSfxVUXgpKrGytbO6QGIYhq5W/7Zb5sYYHg8wET3S3uI5acZu3bD/2Q7OK1PnC6/JrGvLgDDhUAp7Bfqa70xGM0t1I+2AuemzZ1LqQuWIQEHZQJPCEayPg8 WsqwIhURfZ/qTLGF5Az6HdOL2aaQcwXwXNL88t48EAVWgXP" } }
22.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform : DEMO • Terraform plan 및 apply 수행 (OCI Region은 Ashburn 환경이므로, The region for API connections 에 대해서 us-ashburn-1 입력) $ terraform plan … $ terraform apply …
23.
Copyright © 2018,
Oracle and/or its affiliates. All rights reserved. | Terraform : DEMO • 생성된 TEST instance 확인
Download now