Skip to content

Latest commit

 

History

History
97 lines (68 loc) · 5.74 KB

File metadata and controls

97 lines (68 loc) · 5.74 KB

Getting Started with Automation Toolkit

There are 2 main inputs to the Automation Toolkit.

  • CD3 Excel Sheet
  • setUpOCI.properties

Excel Sheet Templates

Below are the CD3 templates for the latest release having standardised IAM Components (compartments, groups and policies), Network Components and Events & Notifications Rules as per CIS Foundations Benchmark for Oracle Cloud.

Details on how to fill data into the excel sheet can be found in the Blue section of each sheet inside the excel file. Make appropriate changes to the templates eg region and use for deployment.

Excel Sheet Purpose
CD3-Blank-template.xlsx Choose this template while exporting the existing resources from OCI into the CD3 and Terraform.
CD3-CIS-template.xlsx This template has auto-filled in data of CIS Landing Zone for DRGv2. Choose this template to create Core OCI Objects (IAM, Tags, Networking, Instances, LBR, Storage, Databases)
CD3-HubSpoke-template This template has auto-filled in data for a Hub and Spoke model of networking. Choose this template to create Core OCI Objects (IAM, Tags, Networking, Instances, LBR, Storage, Databases)
CD3-SingleVCN-template This template has auto-filled in data for a Single VCN model of networking. Choose this template to create Core OCI Objects (IAM, Tags, Networking, Instances, LBR, Storage, Databases)
CD3-CIS-ManagementServices-template.xlsx This template has auto-filled in data of CIS Landing Zone. Choose this template while creating the components of Events, Alarms, Notifications and Service Connectors

The Excel Templates can also be found at /cd3user/oci_tools/cd3_automation_toolkit/example inside the container. After deploying the infra using any of the templates, please run CIS compliance checker script)

setUpOCI.properties

Current Version: setUpOCI.properties v10.1

Make sure to use/modify the properties file at /cd3user/tenancies /<customer_name>/<customer_name>_setUpOCI.properties during executions.

[Default]

#Input variables required to run setUpOCI script

#path to output directory where terraform file will be generated. eg /cd3user/tenancies/<customer_name>/terraform_files
outdir=

#prefix for output terraform files eg <customer_name> like demotenancy
prefix=

#input config file for Python API communication with OCI eg /cd3user/tenancies/<customer_name>/<customer_name>_config;
config_file=

#path to cd3 excel eg /cd3user/tenancies/<customer_name>/CD3-Customer.xlsx
cd3file=

#Is it Non GreenField tenancy
non_gf_tenancy=false

# Leave it blank if you want single outdir or specify outdir_structure_file.properties containing directory structure for OCI services.
outdir_structure_file=
Variable Description Example
outdir Path to output directory where terraform files will be generated /cd3user/tenancies/<customer_name>/terraform_files
prefix Prefix for output terraform files <customer_name>
config_file Python config file /cd3user/tenancies/<customer_name>/config
cd3file Path to the CD3 input file /cd3user/tenancies/<customer_name>/testCD3. xlsx
non_gf_tenancy Specify if its a Non Green field tenancy or not (True or False) False
outdir_structure_file Parameter specifying single outdir or different for different services Blank or <customer_name>_gc2_outdir_structure_file
For more information on usage of non_gf_tenancy flag, refer to Automation Toolkit Workflows

Execution Steps Overview:

Choose the appropriate CD3 Excel Sheet and update the setUpOCI.properties file at /cd3user/tenancies/<customer_name>/<customer_name>_setUpOCI.properties and run the commands below:

Step 1:
Change Directory to 'cd3_automation_toolkit'
cd /cd3user/oci_tools/cd3_automation_toolkit/

Step 2:
Place Excel sheet at appropriate location in your container and provide the corresponding path in cd3file parmeter of: /cd3user/tenancies /<customer_name>/<customer_name>_setUpOCI.properties file

Step 3
Execute the setUpOCI Script:
python setUpOCI.py /cd3user/tenancies/<customer_name>/<customer_name>_setUpOCI.properties
→ Example execution of the script:

[cd3user@25260a87b137 cd3_automation_toolkit]$ python setUpOCI.py /cd3user/tenancies/demotenancy/demotenancy_setUpOCI.properties
Updated OCI_Regions file !!!
Script to fetch the compartment OCIDs into variables file has not been executed.
Do you want to run it now? (y|n):

→ This prompt appears for the very first time when you run the toolkit or when any new compartments are created using the toolkit. Enter 'y' to fetch the details of compartment OCIDs into variables file.
→ After fetching the compartment details, the toolkit will display the menu options.