diff --git a/cd3-automation-toolkit/add-resource-values-excel/add-resource.md b/cd3-automation-toolkit/add-resource-values-excel/add-resource.md index 4db579ba2..4a63ff397 100644 --- a/cd3-automation-toolkit/add-resource-values-excel/add-resource.md +++ b/cd3-automation-toolkit/add-resource-values-excel/add-resource.md @@ -22,7 +22,7 @@ In this lab, you will: ### 1. **Identity** -1. Choose CD3-CIS-template from [CD3 Excel templates](https://github.com/oracle-devrel/cd3-automation-toolkit/blob/main/cd3_automation_toolkit/documentation/user_guide/ExcelTemplates.md). +1. Choose CD3-CIS-template from [CD3 Excel templates](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/excel-templates/). >**Note:** Any template other than *CD3-CIS-ManagementServices-template* can be used to provision these services. @@ -135,7 +135,7 @@ In this lab, you will: - Create bash file "web.sh" under below path and copy sample script to enable Apache on the instance. ``` - /cd3user/tenancies//terraform_files//compute/scripts + /cd3user/tenancies//terraform_files//compute/scripts ``` ``` @@ -190,4 +190,4 @@ You may now __proceed to the next lab__. - __Author__ - Dipesh Rathod - __Contributors__ - Murali N V, Suruchi Singla, Lasya Vadavalli -- __Last Updated By/Date__ - Dipesh Rathod, Mar 2024 \ No newline at end of file +- __Last Updated By/Date__ - Dipesh Rathod, Mar 2024 diff --git a/cd3-automation-toolkit/create-eventalarm/create-eventalarm.md b/cd3-automation-toolkit/create-eventalarm/create-eventalarm.md index 825f76698..cd2c9dce9 100644 --- a/cd3-automation-toolkit/create-eventalarm/create-eventalarm.md +++ b/cd3-automation-toolkit/create-eventalarm/create-eventalarm.md @@ -47,14 +47,14 @@ Please follow the previous lab till the last step. Once you are able to provisio 1. Place *CD3-CIS-ManagementServices-template.xlsx* Excel sheet at appropriate location in your container and provide the corresponding path in cd3file parameter at below path. ``` - /cd3user/tenancies //_setUpOCI.properties + /cd3user/tenancies //_setUpOCI.properties e.g. cd3file=/cd3user/tenancies/usr1_livelab/CD3-CIS-ManagementServices-template.xlsx ``` 2. *Execute* the setUpOCI Script from below path: ``` - python setUpOCI.py /cd3user/tenancies//_setUpOCI.properties + python setUpOCI.py /cd3user/tenancies//_setUpOCI.properties e.g. cd3file=/cd3user/tenancies/usr1_livelab/CD3-CIS-ManagementServices-template.xlsx ``` @@ -63,7 +63,7 @@ Please follow the previous lab till the last step. Once you are able to provisio 4. Once the execution is *successful*, tfvars file will be generated under below folder in that region. ``` - _events.auto.tfvars file under /cd3user/tenancies//terraform_files/ + _events.auto.tfvars file under /cd3user/tenancies//terraform_files/ ``` 5. Navigate to the above path and *execute* the terraform commands: diff --git a/cd3-automation-toolkit/deploy-compute-cli/deploy-compute-cli.md b/cd3-automation-toolkit/deploy-compute-cli/deploy-compute-cli.md index eca9e0ab2..074749dff 100644 --- a/cd3-automation-toolkit/deploy-compute-cli/deploy-compute-cli.md +++ b/cd3-automation-toolkit/deploy-compute-cli/deploy-compute-cli.md @@ -21,12 +21,14 @@ In this lab, you will: # Create Resources using CLI -## Task 1: Add Excel path to 'customername_setUpoci.properties' +## Task 1: Add Excel path to 'prefix_setUpOCI.properties' + + Note: Please check the tenancyconfig.properties file for prefix information 1. Add the Excel file path for "cd3file" parameter. You can find a file in below location. ``` - /cd3user/tenancies/_setUpOCI.properties + /cd3user/tenancies/_setUpOCI.properties ``` 2. Set below parameter to *create_resources*, since we are creating new resources, and not modifying any existing ones. @@ -46,7 +48,7 @@ In this lab, you will: ``` cd /cd3user/oci_tools/cd3_automation_toolkit/ - python setUpOCI.py /cd3user/tenancies//_setUpOCI.properties + python setUpOCI.py /cd3user/tenancies//_setUpOCI.properties ``` ## Task 3: Generate terraform files and create our resources in OCI @@ -57,7 +59,7 @@ In this lab, you will: 2. Navigate to identity directory under home region directory after Terraform files are created. ``` - cd /cd3user/tenancies//terraform_files//identity + cd /cd3user/tenancies//terraform_files//identity ``` 3. Execute terraform init, plan and apply to create the compartment. @@ -84,7 +86,7 @@ In this lab, you will: 6. Once the Terraform files are created from above step, navigate to below path for each of the services: Network, Compute, Database and Block volume. ``` - /cd3user/tenancies//terraform_files// + /cd3user/tenancies//terraform_files// ``` 7. Enter into each of the required service folders (network, compute, database) and execute the below terraform commands to provision the resources in OCI. @@ -109,4 +111,4 @@ You may now __proceed to the next lab__. - __Author__ - Lasya Vadavalli - __Contributors__ - Murali N V, Suruchi Singla, Dipesh Rathod -- __Last Updated By/Date__ - Dipesh Rathod, Mar 2024 \ No newline at end of file +- __Last Updated By/Date__ - Dipesh Rathod, Mar 2024 diff --git a/cd3-automation-toolkit/deploy-compute-jenkins/deploy-compute-jenkins.md b/cd3-automation-toolkit/deploy-compute-jenkins/deploy-compute-jenkins.md index 92ad89d51..e107ffcaf 100644 --- a/cd3-automation-toolkit/deploy-compute-jenkins/deploy-compute-jenkins.md +++ b/cd3-automation-toolkit/deploy-compute-jenkins/deploy-compute-jenkins.md @@ -23,22 +23,23 @@ In this lab, you will: >**Note:** Only one user at a time using the Jenkins setup is supported in the current release of the toolkit. -## Task 1: Add Excel path to 'customername_setUpoci.properties' +## Task 1: Add Excel path to 'prefix_setUpoci.properties' 1. **Login** to Jenkins URL with the user created after initialization. -2. **Click** on setUpOCI pipeline from Dashboard. -3. **Click** on **Build with Parameters** from left side menu. +2. **Click** on Prefix Name from Dashboard +3. **Click** on setUpOCI pipeline. +4. **Click** on **Build with Parameters** from left side menu. - ![BUILDPARAM](./images/jen_cr_build_param.png "Build Parameter") + ![BUILDPARAM](./images/jen_cr_build_param_v1.png "Build Parameter") -4. **Upload** the filled [Excel sheet](https://github.com/oracle-devrel/cd3-automation-toolkit/blob/main/cd3_automation_toolkit/documentation/user_guide/ExcelTemplates.md) in Excel_Template section. +5. **Upload** the filled [Excel sheet](https://oracle-devrel.github.io/cd3-automation-toolkit/latest/excel-templates/) in Excel_Template section. - ![EXCELTEMP](./images/jen_cr_excel_temp.png "Excel Template") + ![EXCELTEMP](./images/jen_cr_excel_temp_v1.png "Excel Template") ## Task 2: Execute setUpOCI.py 1. Select the workflow as Create Resources in OCI (Greenfield Workflow). Choose single or multiple MainOptions as required and then corresponding SubOptions. - >**Note:** Please read while selcting multiple options simultaneously. Below screenshot shows example to create compartments and Tags. + >**Note:** Please read while selecting multiple options simultaneously. Below screenshot shows example to create compartments. - ![CREATRES](./images/jen_cr_res.png "Create Resource") + ![CREATRES](./images/jen_cr_res_v1.png "Create Resource") 6. Click on **Build** at the bottom. @@ -49,7 +50,7 @@ In this lab, you will: 1. You could also navigate terraform-apply pipeline as example below. >**Note:** terraform_files » phoenix » tagging » terraform-apply - ![CREATSTG](./images/jen_cr_stage.png "Stage of Resources") + ![CREATSTG](./images/jen_cr_stage_v1.png "Stage of Resources") 2. **Review Logs** for Terraform Plan and OPA stages by clicking on the stage and then **Logs**. @@ -68,4 +69,4 @@ You may now __proceed to the next lab__. - __Author__ - Dipesh Rathod - __Contributors__ - Murali N V, Suruchi Singla, Dipesh Rathod -- __Last Updated By/Date__ - Dipesh Rathod, Mar 2024 \ No newline at end of file +- __Last Updated By/Date__ - Dipesh Rathod, Mar 2024 diff --git a/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_build_param_v1.png b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_build_param_v1.png new file mode 100644 index 000000000..bf0537bc6 Binary files /dev/null and b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_build_param_v1.png differ diff --git a/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_excel_temp_v1.png b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_excel_temp_v1.png new file mode 100644 index 000000000..6ee27c639 Binary files /dev/null and b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_excel_temp_v1.png differ diff --git a/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_res_v1.png b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_res_v1.png new file mode 100644 index 000000000..bd17f245b Binary files /dev/null and b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_res_v1.png differ diff --git a/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_stage_v1.png b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_stage_v1.png new file mode 100644 index 000000000..370dbb2f7 Binary files /dev/null and b/cd3-automation-toolkit/deploy-compute-jenkins/images/jen_cr_stage_v1.png differ diff --git a/cd3-automation-toolkit/introduction/images/CD3-Process.png b/cd3-automation-toolkit/introduction/images/CD3-Process.png new file mode 100644 index 000000000..b3c491d63 Binary files /dev/null and b/cd3-automation-toolkit/introduction/images/CD3-Process.png differ diff --git a/cd3-automation-toolkit/introduction/introduction.md b/cd3-automation-toolkit/introduction/introduction.md index 9ff72329d..a508308c5 100644 --- a/cd3-automation-toolkit/introduction/introduction.md +++ b/cd3-automation-toolkit/introduction/introduction.md @@ -11,7 +11,7 @@ Estimated Workshop Time: 60 Minutes In this workshop, you will learn how to: - Get Started with CD3 Automation Toolkit - Build OCI infrastructure using CD3 Automation Toolkit -- Produce and Inspect Terraform Plan +- Produce and Inspect Terraform Plan (Both Terarform and Tofu are supported by the toolkit, we will use Terraform for this labs) - Apply Plan to OCI tenancy - OCI Resource Manager Upload - Terraform Destroy to reset @@ -28,7 +28,7 @@ This lab has the following pre-requisites: ## The CD3 Automation Toolkit Architecture - ![CD3 Automation Toolkit Architecture](images/cd3_architecture.png "CD3 Automation Toolkit Architecture") + ![CD3 Automation Toolkit Architecture](images/CD3-Process.png "CD3 Automation Toolkit Architecture") ### Overview @@ -70,4 +70,4 @@ Most of the resources in OCI can be provisioned with Terraform. While beyond the - __Author__ - Dipesh Rathod - __Contributors__ - Murali N V, Suruchi Singla, Lasya Vadavalli -- __Last Updated By/Date__ - Dipesh Rathod, May 2023 \ No newline at end of file +- __Last Updated By/Date__ - Dipesh Rathod, May 2023 diff --git a/cd3-automation-toolkit/setup-the-toolkit/images/rmstackoutput_v1.png b/cd3-automation-toolkit/setup-the-toolkit/images/rmstackoutput_v1.png new file mode 100644 index 000000000..3b3179083 Binary files /dev/null and b/cd3-automation-toolkit/setup-the-toolkit/images/rmstackoutput_v1.png differ diff --git a/cd3-automation-toolkit/setup-the-toolkit/setup-the-toolkit.md b/cd3-automation-toolkit/setup-the-toolkit/setup-the-toolkit.md index 101adeed6..521cb4cd7 100644 --- a/cd3-automation-toolkit/setup-the-toolkit/setup-the-toolkit.md +++ b/cd3-automation-toolkit/setup-the-toolkit/setup-the-toolkit.md @@ -40,7 +40,7 @@ The objectives of this lab are: Below is a sample output: - ![rmstackoutput](./images/rmstackoutput.png) + ![rmstackoutput](./images/rmstackoutput_v1.png) After executing the container, jump to [Task 3](#task-3-connect-container-to-oci-tenancy) to connect this container to OCI tenancy. @@ -108,7 +108,8 @@ Make sure the [prerequisites](#prerequisites) are met before proceeding. - Paste the contents of the **PEM public key** in the dialog box and click **Add**. -3. Open *tenancyconfig.properties* file and fill the details in **Required parameters** and **Auth Details Parameters** sections. +3. Navigate to ```/cd3user/oci_tools/cd3_automation_toolkit/user-scripts/``` +4. Edit ```tenancyconfig.properties``` file and fill the details in **Required parameters** and **Auth Details Parameters** sections. Below are the sample values for **API_Key Auth mechanism**. @@ -120,7 +121,7 @@ Make sure the [prerequisites](#prerequisites) are met before proceeding. # Friendly name for the Customer Tenancy eg: demotenancy; The generated .auto.tfvars files will be prefixed with this # customer_name. - customer_name=demo_tenancy + prefix=rg-sep tenancy_ocid=ocid1.tenancy.oc1.....niuea @@ -147,26 +148,71 @@ Make sure the [prerequisites](#prerequisites) are met before proceeding. >**Note:** If you selected Instance Principal or session token method for authentication, follow the commented guidelines in the *tenancyconfig.properties* file or [Auth Mechanisms documentation](https://github.com/oracle-devrel/cd3-automation-toolkit) and proceed accordingly. -4. Under **Deployment Parameters** section in tenancyconfig.properties file, Leave the default value for **outdir structure file** parameter to group your generated terraform auto.tfvars files for each service. +5. Under **Deployment Parameters** section in ```tenancyconfig.properties``` file, Leave the default value for **outdir structure file** parameter to group your generated terraform auto.tfvars files for each service. >**Note:** To place all the generated terraform auto.tfvars files directly under the region folder, comment the parameter with the default outdirectory structure file path and uncomment the one above it. -5. Under **Advanced parameters for DevOps** section in tenancyconfig.properties file set the parameter ```use_oci_devops_git=yes``` to use the toolkit with **Jenkins**. +6. Under **Advanced parameters for DevOps** section in tenancyconfig.properties file set the parameter ```use_oci_devops_git=yes``` to use the toolkit with **Jenkins**. >**Note:** If you plan to use the toolkit with CLI, skip this section. Since we are using API-key Auth mechanism, the **User details** section can be skipped. -6. **Initialise** your environment to use the Automation Toolkit. +7. **Initialise** your environment to use the Automation Toolkit. ```bash python createTenancyConfig.py tenancyconfig.properties ``` -7. You should see an output similar to below: +8. You should see an output similar to below: + + ```bash + [cd3user@109c63ee4ec0 user-scripts]$ python createTenancyConfig.py tenancyconfig.properties + ================================================================= + NOTE: Make sure the API Public Key is added to the OCI Console!!! + ================================================================= + + Using different directories for OCI services as per the input outdir_structure_file.......... + + Copying Private Key File.......... + + Creating Tenancy specific config................. + Updated OCI_Regions file !!! + + + Creating Tenancy specific remote tfstate Items - bucket, S3 credentials................. + Creating new customer secret key + + Creating Tenancy specific setUpOCI.properties................. + Creating Tenancy specific region directories, terraform provider , variables files................. + + Creating Tenancy specific DevOps Items - Topic, Project and Repository................. + + The toolkit has been setup successfully. !!! + + Customer Specific Working Directory Path: /cd3user/tenancies/rg-sep + + Remote State Bucket Name: rg-sep-automation-toolkit-bucket in us-sanjose-1. + Common Jenkins Home: /cd3user/tenancies/jenkins_home + DevOps Project Name and Repo Name: rg-sep-automation-toolkit-project, rg-sep-automation-toolkit-repo in us-sanjose-1. + Folder configured for OCI DevOps GIT: /cd3user/tenancies/rg-sep/terraform_files/ Initial Commit ID from createTenancyConfig.py: df73e44 + + ######################################### + Next Steps for using toolkit via Jenkins + ######################################### + Start Jenkins using - /usr/share/jenkins/jenkins.sh & + Access Jenkins using - https://:8443 + + ###################################### + Next Steps for using toolkit via CLI + ###################################### + Modify /cd3user/tenancies/rg-sep/rg-sep_setUpOCI.properties with input values for cd3file and workflow_type + cd /cd3user/oci_tools/cd3_automation_toolkit/ + python setUpOCI.py /cd3user/tenancies/rg-sep/rg-sep_setUpOCI.properties + ================================================================================================================================== + ``` - ![tenancyconfigoutput](./images/tenancyconfigoutput.png) -8. After the createTenancyConfig.py script is successfully executed, customer specific files are created under ```/cd3user/tenancies/```. +10. After the createTenancyConfig.py script is successfully executed, customer specific files are created under ```/cd3user/tenancies/```. In this lab, we have learnt how to **setup CD3 toolkit container** and **connect** it to OCI tenancy. @@ -176,4 +222,4 @@ You may now __proceed to the next lab__. - __Author__ - Lasya Vadavalli - __Contributors__ - Murali N V, Suruchi Singla, Dipesh Rathod -- __Last Updated By/Date__ - Lasya Vadavalli, Mar 2024 \ No newline at end of file +- __Last Updated By/Date__ - Lasya Vadavalli, Mar 2024 diff --git a/cd3-automation-toolkit/upload-resourcemanager/upload-resourcemanager.md b/cd3-automation-toolkit/upload-resourcemanager/upload-resourcemanager.md index 3b861b143..e2c6608d7 100644 --- a/cd3-automation-toolkit/upload-resourcemanager/upload-resourcemanager.md +++ b/cd3-automation-toolkit/upload-resourcemanager/upload-resourcemanager.md @@ -21,7 +21,7 @@ Please follow the previous lab till the last step. Once you are able to provisio 1. Execute the *setUpOCI* Script: ``` - python setUpOCI.py /cd3user/tenancies//_setUpOCI.properties + python setUpOCI.py /cd3user/tenancies//_setUpOCI.properties e.g. python setUpOCI.py /cd3user/tenancies/usr1_livelab/usr1_livelab_setUpOCI.properties ``` @@ -30,7 +30,7 @@ Please follow the previous lab till the last step. Once you are able to provisio 3. Once the *execution* is successful, you will see the below stack in resource manager and file will be generated under the folder. ``` - --stacks.zip file will be generated under the folder /cd3user/tenancies//terraform_files/ + --stacks.zip file will be generated under the folder /cd3user/tenancies//terraform_files/ ``` 4. Go to *OCI console* under compartment which was selected for upload and take a few moments to explore the stack created.