Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Automate your Oracle Cloud Infrastructure operation

773 Aufrufe

Veröffentlicht am

The Oracle Cloud provides APIs and CLI utilities to handle your infrastructure in the cloud without using the web console. In addition, there are orchestration tools such as Terraform to build, change and version your infrastructure.
This presentation introduces to the topic through examples, minimizing manual interventions: creating instances and containers, using the REST api and opc tool, deploying a cluster using the project terraform-kubernetes-installer, and backing up your databases.

Veröffentlicht in: Technologie

Automate your Oracle Cloud Infrastructure operation

  1. 1. Automate your Oracle Cloud Infrastructure operations Julio 2018 Nelson Calero
  2. 2. Today’s topics • Oracle cloud concepts (quick review) • CLI tools (focus on OCI) • Examples • Automation 2 © 2018 Pythian Intended audience: DBAs interested in Cloud and DevOps
  3. 3. • Database Consultant at Pythian since 2014 • Working with Oracle tools and Linux environments since 1996 • DBA Oracle (2001) & MySQL (2005) • Co-founder and President of the Oracle user Group of Uruguay (2009) • LAOUC Director of events (2013) • Computer Engineer (1998) • Oracle ACE (2014), Oracle ACE Director (2017) • Oracle Certified Professional 10g/11g/12c (2008), OCE, Cloud • Amazon Solutions Architect – Associate (2016) • Google Cloud Architect (2017), Google Cloud Data Engineer (2017) • Oracle University Instructor (2011) • Blogger and speaker: Oracle Open World, Collaborate, OTN Tour, Regional conferences About me 3 © 2018 Pythian http://www.linkedin.com/in/ncalero @ncalerouy
  4. 4. Pythian overview © 2015 Pythian Confidential4 • 21 Years of data infrastructure management consulting • 250+ Top brands • 11800+ Systems under management • 400+ employees in 35 countries • 10 Oracle ACEs, 4 ACED, 3 OakTable members, 2 OCM, 6 Microsoft MVPs, 1 Cloudera Champion of Big Data, AWS Certified Solutions Architect – 2 Professional, 12 Associate • Oracle, Microsoft, MySQL, Hadoop, Cassandra, MongoDB, and more • Infrastructure, Cloud, DevOps, and application expertise
  5. 5. 5 © 2018 Pythian
  6. 6. Oracle Cloud offering 6 https://blogs.oracle.com/futurestate/when-cloud-meets-on-premise:-a-story-of-two-applications © 2018 Pythian
  7. 7. Oracle Cloud - IaaS OCI (new gen. - 2017) •Audit •Compute •Container Engine for Kubernetes •Container Registry •Load Balancing •Object Storage •Oracle Cloud Infrastructure Database •Networking •Ravello •Wercker 7 OCI Classic (v1 - 2014) •Compute Classic •Container Classic •Container Registry Classic •Dedicated Compute Classic - SPARC Model 300 •DIVA (media assets) •Load Balancing Classic •Messaging •Storage Classic •Storage Software Appliance https://docs.oracle.com/en/cloud/iaas/index.html © 2018 Pythian
  8. 8. Oracle Cloud - PaaS Application Development • API Catalog • Application Container • Autonomous Mobile Cloud Enterprise • Developer • Developer Classic • Java • Java - SaaS Extension • Mobile • Mobile Cloud Enterprise • Visual Builder 8 Business Analytics •Analytics Cloud •Big Data Discovery •Big Data Preparation •Business Intelligence •Data Visualization •Internet of Things Data Management •Autonomous Data Warehouse Cloud •Big Data •Big Data Cloud •Big Data SQL Cloud •Data Hub •Database •Database Backup •Database Schema •Event Hub •Exadata •Exadata Express •MySQL Database Integration •API Platform •Apiary •Data Integration Platform •Data Integrator •Integration •GoldenGate •Managed File Transfer •Process •Self-Service Integration •SOA Management •Management cloud Security •CASB •Identity https://docs.oracle.com/en/cloud/paas/index.html
  9. 9. OCI – DBCS editions and versions 9 © 2018 Pythian
  10. 10. Oracle cloud elements – network and instance 10 https://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stcsg/terminology.html https://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stcsg/ip-networks.html
  11. 11. 11 http://cloud.oracle.com
  12. 12. © 2015 Pythian Confidential12 http://cloud.oracle.com
  13. 13. Oracle Cloud dashboard 13 © 2018 Pythian
  14. 14. © 2015 Pythian Confidential14
  15. 15. Other ways to access to Oracle Cloud • API (REST) - https://docs.cloud.oracle.com/iaas/api/ • SDK (Java, Python, Ruby) • CLI tools – Generic and specific to each service – Example: Object storage • HDFS Plug-in • NFS Gateway • Terraform • OCI native API or Amazon S3 compatible API 15 © 2018 Pythian
  16. 16. OCI CLI tools 16 ORACLE CLOUD INFRASTRUCTURE Database System Bare Metal Compute Container dbaascli raccli dbpatchm bkup_api opc (classic) oci oracle-dbcs-cli ftmcli.jar bmcs Virtual Machine Load Balancer Object Storage REST SDK © 2018 Pythian Download tools from OTN: http://www.oracle.com/technetwork/topics/cloud/downloads/index.html
  17. 17. Required account details for CLI OCI Classic • REST endpoint • user • password • identity domain 17 © 2018 Pythian OCI • tenancy OCID • compartment OCID • user OCID • public key fingerprint • region OCI: https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm OCI-C: https://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stopc/preparing-use-cli.html
  18. 18. Example – opc (OCI-C) on Windows bash ncalero@H6RMYZ1:~/.opc$ cat oci-profile.txt { "global": { "format": "text", "debug-requests": false }, "compute": { "user": "/Compute-a123456/myuser", "password-file": "/home/ncalero/.opc/opc-oci-pwd", "endpoint": "api-yours.compute.us2.oraclecloud.com/" } } ncalero@H6RMYZ1:~/.opc$ ls -l opc-oci-pwd oci-profile.txt -rw------- 1 ncalero ncalero 11 May 23 15:25 opc-oci-pwd -rw------- 1 ncalero ncalero 245 May 23 15:26 oci-profile.txt ncalero@H6RMYZ1:~/.opc$ export OPC_PROFILE_FILE=oci-profile.txt ncalero@H6RMYZ1:~/.opc$ export OPC_PROFILE_DIRECTORY=$HOME/.opc 18 © 2018 Pythian identity domain user REST endpoint
  19. 19. ncalero@H6RMYZ1:~$ opc compute instance list /Compute-a123456/myuser NAME /Compute-a123456/myuser/AppVM1-myuser/e6880f1f-c2b9-4b7c-87cd-eebf8168f13a ncalero@H6RMYZ1:~$ opc -f table -F name,status compute orchestration-v2 list /Compute-a123456/myuser +---------------------------------------------+----------------+ NAME | STATUS +---------------------------------------------+----------------+ /Compute-a123456/myuser/AppVM1-myuser | terminal_error +---------------------------------------------+----------------+ ncalero@H6RMYZ1:~$ opc -f json compute orchestration-v2 get /Compute-a123456/myuser/AppVM1-myuser | egrep -A5 "health" "health": { "cause": "create_failed", "detail": "System object cannot be created as specified in template. Ensure that the template defines a valid object with all necessary fields.", "error": "seclist /Compute-a123456/myuser/app-seclist-myuser not found", "object": null, "status": "terminal_error" 19 © 2018 Pythian
  20. 20. REST API - OCI-C • Account information needed: – Rest endpoint: https://api-yours.compute.us2.oraclecloud.com/ • Displayed in Site Selector in top of web console – Resource path – Resource name: /Compute-{identityDomainName}/{user}/{object_id} – Password • First - get authentication token, valid for 30 minutes 20 © 2018 Pythian curl -i -X POST -H "Content-Type: application/oracle-compute-v3+json" –d '{"user":"/Compute-a123456/myuser","password":“xxxx"}' https://api-yours.compute.us2.oraclecloud.com/authenticate/
  21. 21. REST API - OCI-C - auth response 21 © 2018 Pythian HTTP/1.1 204 No Content Date: Wed, 23 May 2018 20:41:20 GMT Server: nginx Content-Type: text/plain; charset=UTF-8 X-Oracle-Compute-Call-Id: 180523f5d2c9d6a90c27ce4462198de27be2c6 Expires: Wed, 23 May 2018 20:41:20 GMT Cache-Control: no-cache Vary: Accept Content-Length: 0 Set-Cookie: nimbula=eyJpZGVudGl0eSI6ICJ7XCJyZWFsbVwiOiBcImNvbXB1dGUtdXMyLXo0M1wiLCBcInZhbHVlXCI6IFwie1xcXCJjdXN 0b21lclxcXCI6IFxcXCJDb21wdXRlLWE0ODAwNjZcXFwiLCBcXFwicmVhbG1cXFwiOiBcXFwiY29tcHV0ZS11czItejQzXFxcIi wgXFxcImVudGl0eV90eXBlXFxcIjogXFxcInVzZXJcXFwiLCBcXFwic2Vzc2lvbl9leHBpcmVzXFxcIjogMTUyNzExODg4MC4zN jE0NTMxLCBcXFwiZXhwaXJlc1xcXCI6IDE1MjcxMDk4ODAuMzYxNTAxOSwgXFxcInVzZXJcXFwiOiBcXFwiL0NvbXB1dGUtYTQ4 MDA2Ni9TdHVkZW50MDJcXFwiLCBcXFwiZ3JvdXBzXFxcIjogW1xcXCIvQ29tcHV0… Content-Language: en
  22. 22. REST API - OCI-C - example 22 © 2018 Pythian ncalero@H6RMYZ1:~/.opc$ export COMPUTE_COOKIE='nimbula=eyJpZGVudGl0eSI6.. ; Path=/; Max-Age=1800‘ ncalero@H6RMYZ1:~/.opc$ curl -X GET -H "Cookie: $COMPUTE_COOKIE" -H "Accept: application/oracle- compute-v3+json" https://api-yours.compute.us2.oraclecloud.com/instance/Compute-a123456/myuser/ {"result": [{"domain": "compute-a123456.oraclecloud.internal.", "placement_requirements": ["/system/compute/placement/default", "/system/compute/allow_instances"], "ip": "10.31.103.11", "fingerprint": "", "image_metadata_bag": … ncalero@H6RMYZ1:~/.opc$ curl -X GET -H "Cookie: $COMPUTE_COOKIE" -H "Accept: application/oracle- compute-v3+json" https://api-yours.compute.us2.oraclecloud.com/instance/Compute-a123456/myuser/ | jshon -e result -a -e label "appvm1-S01“ Examples in docs: https://docs.oracle.com/en/cloud/iaas/compute-iaas-cloud/stcsa/Use_Cases.html Parsing JSON output with jshon unix tool:
  23. 23. REST API - OCI • Account information needed: – Region endpoint+version: https://iaas.us-ashburn-1.oraclecloud.com/20160918 – KeyID: <TENANCY OCID>/<USER OCID>/<KEY FINGERPRINT> – User privateKey • JSON used for request and response body • All requests must be signed (Authorization header) https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm • Scripts provided by Oracle to simplify this process: – Bash, PowerShell, C#, Java, NodeJS, Perl, PHP, Python, Ruby, Go 23 © 2018 Pythian https://docs.cloud.oracle.com/iaas/Content/API/Concepts/signingrequests.htm
  24. 24. REST API - OCI - Example 24 © 2018 Pythian ncalero@H6RMYZ1:~/bin$ ./oci-curl iaas.us-ashburn-1.oraclecloud.com get "/20160918/instances?compartmentId=ocid1.compartment.oc1..aaaaaaapqowerpoirdalsdkfajlfklfdkalj flasdfl" [{"availabilityDomain":"HDGG:US-ASHBURN-AD-1","compartmentId":"ocid1.compartment.oc1.. aaaaaaapqowerpoirdalsdkfajlfklfdkaljflasdfl ","definedTags":{},"displayName":"Demo- Instance","extendedMetadata":{},"faultDomain":null,"freeformTags":{},"id":"ocid1.instance.oc1.iad.abuwc ljtxf33kdnipvlsewtoxpdtljex6zq5gl2vsccmgffvlfcsswom5usa","imageId":"ocid1.image.oc1.iad.aaaaaaaaqza35hd 7hx6o2xnwkv34g7p7irsxfm4zwkcq6wzz4kquyf6r2j6q","ipxeScript":null,"launchMode":"NATIVE","launchOptions": {"bootVolumeType":"ISCSI","firmware":"UEFI_64","networkType":"VFIO","remoteDataVolumeType":"PARAVIRTUAL IZED"},"lifecycleState":"TERMINATED","metadata":{"ssh_authorized_keys":"ssh-rsa AAAAB3Nxxxxxxxxx…. calero@H6RMYZ1n","user_data":"IyEvYmluL2Jhc2gKdG91Y2ggadlfjalsdfjdalfalklfdVuCnl1bSB1cGRhdGUgLXkKdG91Y 2ggL3Jvb3QvcnVuX2NvbXBsZXRlCg=="},"region":"iad","shape":"VM.Standard1.2","sourceDetails":{"sourceType" :"image","bootVolumeSizeInGBs":null,"imageId":"ocid1.image.oc1.iad.aaaaaaaaqza35hd7hx6o2xnwkv34g7p7irsx fm4zwkcq6wzz4kquyf6r2j6q","kmsKeyId":null},"timeCreated":"2018-07- 02T17:21:54.902Z","timeMaintenanceRebootDue":null}] fin real ncalero@H6RMYZ1:~/bin$ tail -2 oci-curl # ncalero oci-curl $* Only change to bash script found in docs to use it here:
  25. 25. Example: creating a Compute Instance We need to create/use several components: – OCI • Compartment • Virtual Cloud Network – Subnet, Internet GW, route table, security list, security rules, vnic • OS Image • Shape • Ssh keys – OCI-C: extra network & security steps 25 © 2018 Pythian
  26. 26. OCI shapes 26 OCI Classic OCI Not in all regions!
  27. 27. Example: creating a Compute Instance • Using web console • Using API / CLI – No wizard, each component must be created • Automation – OCI-C orchestration – Terraform provider • oci for OCI • opc for OCI-C 27 © 2018 Pythian
  28. 28. © 2015 Pythian Confidential28
  29. 29. © 2015 Pythian Confidential29
  30. 30. © 2015 Pythian Confidential30
  31. 31. OCI-C orchestration 31 © 2018 Pythian { "account" : "/Compute-a123456/default", "description" : "This is the bastion, app/web host", "tags" : [ "calero" ], "name" : "/Compute-a123456/calero/AppVM1-calero", "objects" : [ { "account" : "/Compute-a123456/default", "desired_state" : "inherit", "description" : "This is the bastion, app/web host", "persistent" : false, "template" : { "networking" : { "eth1" : { "vnic" : "/Compute-a123456/calero/eth1", "ipnetwork" : "/Compute- a123456/calero/appIPnetwork-calero", "nat" : [ ], "vnicsets" : [ "/Compute-a123456/calero/app- vNICSet-calero" ] }, "eth0" : { "seclists" : [ "/Compute-a123456/calero/app- seclist-calero" ], "nat" : "ipreservation:/Compute- a123456/calero/appvm1-pubip-calero", "dns" : [ "appvm1-S02" ] } }, "name" : "/Compute-a123456/calero/AppVM1-calero", "tags" : [ "calero" ], "hostname" : "appvm1-S02", "label" : "appvm1-S02", "shape" : "oc3", "attributes" : { "userdata" : { "pre-bootstrap" : { "failonerror" : true, "script" : [] } } }, "imagelist" : "/oracle/public/OL_7.2_UEKR3_x86_64", "sshkeys" : [ "/Compute-a123456/calero/ssh-key- calero" ] },
  32. 32. Example: OCI Instance using Terraform • Download Terraform binary (my example uses v0.11.3) – https://www.terraform.io/downloads.html • Download Terraform OCI-provider (using v2.1.0) – https://github.com/oracle/terraform-provider-oci/releases • Create .tf HCL Project (based on examples): – https://github.com/oracle/terraform-provider-oci/tree/master/docs/examples • Configure your account Access (env-vars.ps1) – Tenancy and user OCIDs, fingerprint, private key, region • Terraform Plan • Terraform Apply • Step by step guide: https://community.oracle.com/docs/DOC-1019936 32 © 2018 Pythian
  33. 33. ncalero@H6RMYZ1:/mnt/d/GitHub/terraform-OCI/$ ls block.tf compute.tf env-vars.ps1 outputs.tf userdata datasources.tf network.tf provider.tf remote-exec.tf variables.tf ncalero@H6RMYZ1:/mnt/d/GitHub/terraform-OCI$ cat /mnt/c/users/calero/AppData/Roaming/terraform.rc providers { oci = "d:softterraform-provider-oci_v2.1.0.exe" } 33 © 2018 Pythian PS D:GitHubterraform-OCI> cat ./env-vars.ps1 $env:TF_VAR_tenancy_ocid="ocid1.tenancy.oc1..aaaaaaaaw5hodl4pajmymyo62bwkj4kokziowmjkvj7fvmgt4lqia3yg7km" $env:TF_VAR_user_ocid="ocid1.user.oc1..aaaaaaaaiyhrscq7rhfiyhrscql4tb3ojto2ysw72l656yknkyqau2lxotqf" $env:TF_VAR_compartment_ocid="ocid1.compartment.oc1.. aaaaaaaakdevdha7q7yjdheridcy63sgv2syefv7x46u67jk4hj" $env:TF_VAR_region="us-ashburn-1“ $env:TF_VAR_fingerprint="db:a3:b8:59:ce:05:ff:78:c0:fb:aa:ca:d7:09:77:ad" $env:TF_VAR_private_key_path="C:Userscalero.ocioci_api_key.pem" ### Public/private keys used on the instances $env:TF_VAR_ssh_public_key = Get-Content C:Userscalero.sshid_rsa.pub -Raw $env:TF_VAR_ssh_private_key = Get-Content C:Userscalero.sshid_rsa -Raw PS D:GitHubterraform-OCI> ./env-vars.ps1
  34. 34. ncalero@H6RMYZ1:/mnt/d/GitHub/terraform-OCI$ cat compute.tf resource "oci_core_instance" "DemoInstance" { availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}" compartment_id = "${var.compartment_ocid}" display_name = "Demo-Instance" image = "${lookup(data.oci_core_images.OLImageOCID.images[0], "id")}" shape = "${var.InstanceShape}" subnet_id = "${oci_core_subnet.SN-DemoSubnetAD1.id}" metadata { ssh_authorized_keys = "${var.ssh_public_key}" user_data = "${base64encode(file(var.InstanceBootStrap))}" } } ncalero@H6RMYZ1:/mnt/d/GitHub/terraform-OCI/demo$ cat provider.tf 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}" } 34 © 2018 Pythian
  35. 35. 35 © 2018 Pythian
  36. 36. 36 © 2018 Pythian
  37. 37. © 2015 Pythian Confidential37 PS D:GitHubterraform-OCI> d:softterraform graph | dot -Tpng -o demo-graph.png
  38. 38. Terraform apply © 2015 Pythian Confidential38
  39. 39. PS D:GitHubterraform-OCIdemo> d:softterraform apply Terraform will perform the following actions: … Plan: 9 to add, 1 to change, 0 to destroy. Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes oci_core_volume.DemoBlock0: Creating... … oci_core_instance.DemoInstance: Creation complete after 1m9s (ID: ocid1.instance.oc1.iad.abuwcljtxf33kdni...toxpdtljex6zq5gl2vsccmgffvlfcsswom5usa) … Apply complete! Resources: 9 added, 0 changed, 0 destroyed. Outputs: InstancePublicIP = [ 129.213.48.178 ] 39 © 2018 Pythian
  40. 40. Automation • Not the kind you are used to as DBA – PaaS have built-in automation. DBaaS example: • Backup • Recovery • Patch • Failover • Extra tools provided by Oracle – OCI-C orchestration – OCI Terraform provider • built-in since 0.9.4, external before – Chef Knife Plugin – EBS Cloud Admin Tool 40 © 2018 Pythian
  41. 41. © 2015 Pythian Confidential41 Example: DBCS patching
  42. 42. © 2015 Pythian Confidential42
  43. 43. © 2015 Pythian Confidential43
  44. 44. [root@oacsdb ~]# dbaascli dbpatchm --run -list_tools DBAAS CLI version 1.0.0 Executing command dbpatchm --run -list_tools -cli /var/opt/oracle/patch/dbpatchm -list_tools -cli Subroutine sync_dg_standby redefined at /var/opt/oracle/patch/dbpatchm line 7383. Starting DBPATCHM Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-06-03_20:43:12.log Config file is /var/opt/oracle/patch/dbpatchm.cfg INFO: cdb is set to : yes INFO: dbversion detected : 12102 INFO: patching type : psu dbpatchm Execution completed [root@oacsdb dbpatchm]# less dbpatchm_2018-06-03_20:43:12.log 2018-06-03 20:43:14 - Output from cmd rpm -qa|grep -i dbaastools run on localhost is: 2018-06-03 20:43:14 - dbaastools-1.0-1+17.3.5.0.0_170731.1639.x86_64 2018-06-03 20:43:14 - cmd took 0 seconds … 2018-06-03 20:43:15 - INFO: total rpm's available for this version: 35 44 © 2018 Pythian
  45. 45. [root@oacsdb ~]# dbaascli dbpatchm --run -toolsinst -rpmversion=18.2.3.1.0_180530.0000 … [root@oacsdb ~]# dbaascli dbpatchm --run -list_patches DBAAS CLI version 1.0.0 Executing command dbpatchm --run -list_patches -cli /var/opt/oracle/patch/dbpatchm -list_patches -cli Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-07-01_14:59:03.log Config file is /var/opt/oracle/patch/dbpatchm.cfg INFO: cdb is set to : yes INFO: dbversion detected : 12102 INFO: patching type : psu Current Patch : 25171037-SE Available patches : Patchid : 26609783-SE Patchid : 26713565-SE Patchid : 26925311-SE Patchid : 27338041-SE dbpatchm Execution completed 45 © 2018 Pythian
  46. 46. [root@oacsdb ~]#[root@oacsdb dbpatchm]# dbaascli dbpatchm --run -prereq … INFO: dbversion detected : 12102 INFO: patching type : psu WARN: inventory check: patch 25731006 installed is a oneoff - which could be lost in upgrade process WARN: and it can be reinstalled manually if needed, post upgrade. WARN: inventory check: patch 23026585 installed is a oneoff - which could be lost in upgrade process WARN: and it can be reinstalled manually if needed, post upgrade. WARN: inventory check: patch 23088803 installed is a oneoff - which could be lost in upgrade process WARN: and it can be reinstalled manually if needed, post upgrade. WARN: inventory check: patch 24624166 installed is a oneoff - which could be lost in upgrade process WARN: and it can be reinstalled manually if needed, post upgrade. WARN: inventory check: patch 22366322 installed is a oneoff - which could be lost in upgrade process WARN: and it can be reinstalled manually if needed, post upgrade. WARN: inventory check: patch 25873689 installed is a oneoff - which could be lost in upgrade process WARN: and it can be reinstalled manually if needed, post upgrade. WARN: inventory check: patch 25437695 installed is a oneoff - which could be lost in upgrade process WARN: and it can be reinstalled manually if needed, post upgrade. WARN: inventory check: patch 25171037 installed is a psu - upgrade will bring in newer s/w bits INFO: there are interim patches installed - please check /var/opt/oracle/log/dbpatchm/invlog for details oss_patch: Database version is required dbpatchm Execution completed 46 © 2018 Pythian
  47. 47. © 2015 Pythian Confidential47
  48. 48. © 2015 Pythian Confidential48
  49. 49. DBCS patching summary • Cloud tools (dbaascli) pre-installed in compute instance • Logs in /var/opt/oracle/log/dbpatchm/ • Tools needs to be updated for patch to work • Conflict resolution automated for included one-offs 49 © 2018 Pythian
  50. 50. Example: managing DBCS backups Backups are configured with a checkbox when creating the DBCS. Managing backups from the Compute service instance: • Listing existing backups: RMAN client • Creating an on demand backup: as root: • To recover from most recent backup: 50 © 2018 Pythian dbaascli orec –args -latest /var/opt/oracle/bkup_api/bkup_api bkup_start https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbi/back-and-recover.html
  51. 51. Automation: Infrastructure as a Code (IaC) • Lifecycle: Provision, Update, Destroy • IaC categories: – Scripts – Configuration management tools: chef, puppet – Server templating tools: packer, vagrant, docker – Server provisioning tools: terraform, cloud formation, ansible 51 © 2018 Pythian
  52. 52. More terraform examples Creating a kubernetes cluster https://github.com/oracle/terraform-kubernetes-installer Same account configuration as previous OCI instance example, but also: • Policy at root compartment – allow service OKE to manage all-resources in tenancy • A group to which a policy grants appropriate permissions • command line tool kubectl https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengprerequisites.htm NOTE: Only cluster setup – need an application to consume it 52 © 2018 Pythian
  53. 53. What’s next? • Explore the APIs/CLI for all Oracle cloud services DBCS: https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbi/oracle-dbcs-cli- config-file.html • Automate infrastructure changes with CI/CD pipelines • Take advantage of Oracle Management Cloud – more than just monitoring: https://cloud.oracle.com/management • Explore hybrid Cloud deployments to expand your on-premises capacity for specific use cases 53 © 2018 Pythian
  54. 54. THANK YOU Questions? 54 calero@pythian.com @ncalerouy http://www.linkedin.com/in/ncalero © 2018 Pythian
  55. 55. References - documentation Oracle Cloud tools: http://www.oracle.com/technetwork/topics/cloud/downloads/index.html Oracle Cloud API https://docs.cloud.oracle.com/iaas/api/#/ Oracle Cloud Compute shapes https://docs.cloud.oracle.com/iaas/Content/Compute/References/computeshapes.htm https://cloud.oracle.com/en_US/compute-classic/pricing EBS cloud admin tool https://blogs.oracle.com/ebsandoraclecloud/june-2018-ebs-cloud-admin-tool-updates-available Using Terraform with OCI https://community.oracle.com/docs/DOC-1019936 55 © 2018 Pythian

×