Deploying Oracle Database with IBM Terraform & Service Automation On
Total Page:16
File Type:pdf, Size:1020Kb
Deploying Oracle Database with IBM Terraform & Service Automation on Red Hat Openshift Container Platform and IBM PowerVC March, 31 2021 Ralf Schmidt-Dannert IBM Advanced Technology Group, ISV on Power - Oracle © Copyright IBM Corp. 2021. All rights reserved. This page intentionally left blank. © Copyright IBM Corp. 2021. All rights reserved. 2 Table of Contents 1 Abstract ....................................................................................................................................................................... 5 2 Legal Disclaimer ........................................................................................................................................................... 5 3 Comments / Feedback ................................................................................................................................................. 5 4 Introduction ................................................................................................................................................................. 6 5 Lab Environment .......................................................................................................................................................... 8 6 About Red Hat Openshift Container Platform and IBM Terraform & Service Automation ............................................ 9 7 Working with Terraform & Automation Services ....................................................................................................... 10 7.1 Accessing Terraform & Automation Services ............................................................................................................. 10 7.2 Development Workflow – Overview .......................................................................................................................... 12 7.3 Terraform Console ..................................................................................................................................................... 13 7.4 Create Cloud Connection ............................................................................................................................................ 13 7.5 Prepare Template Designer ....................................................................................................................................... 16 7.5.1 Create Repository .............................................................................................................................................. 17 8 Developing our Templates ......................................................................................................................................... 19 8.1 oradbaas Template Design ........................................................................................................................................ 19 8.1.1 oradbaas template ............................................................................................................................................ 19 8.1.2 Input and Output Parameters ............................................................................................................................ 20 8.1.3 Create oradbaas template ................................................................................................................................. 21 8.1.4 Commit oradbaas template to GitHub .............................................................................................................. 32 8.1.5 Publish the oradbaas template to Terraform & Service Automation ................................................................ 34 8.2 Deploying the oradbaas template ............................................................................................................................. 36 8.3 oraclient Template Design ......................................................................................................................................... 39 8.3.1 oraclient template ............................................................................................................................................. 40 8.3.2 Input and Output parameters ............................................................................................................................ 40 8.3.3 Create oraclient template .................................................................................................................................. 41 9 Developing our Service............................................................................................................................................... 43 9.1 Service Design ............................................................................................................................................................ 43 9.2 Creating the Service ................................................................................................................................................... 43 9.2.1 Create Service .................................................................................................................................................... 43 9.2.2 Create Service Output Parameters .................................................................................................................... 55 9.3 Push Service to GitHub ............................................................................................................................................... 59 9.4 Deploying the Service ................................................................................................................................................. 60 9.5 Test the deployed service ........................................................................................................................................... 62 9.6 Publish the service to OCP Service Catalog and CP4MCM catalog ............................................................................ 64 9.7 Cleaning up ................................................................................................................................................................ 67 9.7.1 Deleting a Deployed Service Instance ................................................................................................................ 67 9.7.2 Deleting a Deployed Template Instance ............................................................................................................ 69 © Copyright IBM Corp. 2021. All rights reserved. 3 10 Appendix ................................................................................................................................................................ 72 10.1 Working with GitHub ................................................................................................................................................. 72 10.1.1 Create GitHub repository ................................................................................................................................... 72 10.1.2 Create personal access token ............................................................................................................................ 73 10.2 oradbaas Template files............................................................................................................................................. 77 10.2.1 main.tf................................................................................................................................................................ 77 10.2.2 variables.tf ......................................................................................................................................................... 77 10.2.3 outputs.tf ........................................................................................................................................................... 78 10.2.4 camtemplate.json .............................................................................................................................................. 79 10.2.5 camvariables.json .............................................................................................................................................. 79 10.3 oraclient Template files ............................................................................................................................................. 82 10.3.1 main.tf................................................................................................................................................................ 82 10.3.2 variables.tf ......................................................................................................................................................... 84 10.3.3 outputs.tf ........................................................................................................................................................... 85 10.3.4 camtemplate.json .............................................................................................................................................. 85 10.3.5 camvariables.json .............................................................................................................................................. 86 10.4 Service definition ........................................................................................................................................................ 89 10.4.1 oradbaas_oraclient.json ...................................................................................................................................