|
| 1 | +# Networking Scenarios |
| 2 | + |
| 3 | +## Non-Greenfield Tenancies |
| 4 | +**NOTE-** |
| 5 | +Before you start with Network Export, make sure you have run 'Fetch Compartments OCIDs to variables file'. |
| 6 | + |
| 7 | +### 1. Export Network |
| 8 | + |
| 9 | +Follow the below steps to export the Networking components that includes VCNs, Subnets, DHCP, DRG, Security List, Route Tables, DRG Route Tables, NSGs, etc to CD3 Excel Sheet and create the Terraform state. |
| 10 | + |
| 11 | +1. Use the [CD3-Blank-Template.xlsx](/cd3_automation_toolkit/example) to export the networking resources into the Tabs - VCNs, DRGs, VCN Info, DHCP, Subnets, NSGs, RouteRulesInOCI, SecRulesInOCI,DRGRouteRulesInOCI tabs. |
| 12 | + |
| 13 | +2. Execute the _setupOCI.py_ file with _non_gf_tenancy_ parameter value to _true_: |
| 14 | + |
| 15 | + ```python setUpOCI.py /cd3user/tenancies/<customer_name>/<customer_name>_setUpOCI.properties``` |
| 16 | + |
| 17 | +3. Choose one of the below available sub-options from _'Export Network'_ of the main menu. |
| 18 | + - Export all Network Components |
| 19 | + - Export Network components for VCNs, DRGs and DRGRouteRulesinOCI Tabs |
| 20 | + - Export Network components for DHCP Tab |
| 21 | + - Export Network components for SecRulesinOCI Tab |
| 22 | + - Export Network components for RouteRulesinOCI Tab |
| 23 | + - Export Network components for Subnets Tab |
| 24 | + - Export Network components for NSGs Tab |
| 25 | + |
| 26 | + Once the execution is successful, networking related .tfvars files and .sh files containing import statements will be generated under the folder _/cd3user/tenancies/<customer\_name>/terraform_files/<region_dir>_ |
| 27 | + |
| 28 | + Navigate to the above path and execute the terraform commands:<br> |
| 29 | + <br>_terraform init_ |
| 30 | + <br>_Execute the shell scirpts of networking components_ |
| 31 | + <br>_terraform plan_ |
| 32 | + <br> → Terraform Plan must show that all the components are in sync. |
| 33 | + |
| 34 | +This completes the export of Networking components from OCI. |
| 35 | + |
| 36 | +**Sample of CD3 Excel after export:** |
| 37 | +<br>(DO NOT Modify the highlighted columns) |
| 38 | + |
| 39 | +VCNs tab: |
| 40 | + |
| 41 | + |
| 42 | +Subnets tab: |
| 43 | + |
| 44 | + |
| 45 | +### 2. Add a new or modify the existing networking components |
| 46 | +1. Export the Networking components by following the steps [above](#1-export-network). (Note that here _non\_gf\_tenancy_ flag is set to true) |
| 47 | +2. Follow the [process](/cd3_automation_toolkit/documentation/user_guide/learn_more/NetworkingScenariosGF.md#2-modify-network) to add new components such as VCN/DHCP/DRG/IGW/NGW/SGW/LPG/Subnet etc. (Note that here _non\_gf\_tenancy_ flag is set to false) |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +<br><br> |
| 53 | +<div align='center'> |
| 54 | + |
| 55 | +| <a href="/cd3_automation_toolkit/documentation/user_guide/NetworkingScenariosGF.md">:arrow_backward: Prev</a> | <a href="/cd3_automation_toolkit/documentation/user_guide/RestructuringOutDirectory.md">Next :arrow_forward:</a> | |
| 56 | +| :---- | -------: | |
| 57 | + |
| 58 | +</div> |
0 commit comments