Skip to content

Commit 164c9dd

Browse files
committed
Automation Toolkit Release v2024.4.1
1 parent 706f417 commit 164c9dd

File tree

451 files changed

+185
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+185
-169
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN microdnf install -y sudo && \
1515
chown -R $USERNAME:$USERNAME /cd3user/tenancies/ && \
1616
microdnf install -y vim && \
1717
microdnf install -y dnf && \
18+
microdnf install -y graphviz && \
1819
echo 'alias vi="vim"' >> /etc/bashrc
1920

2021
USER $USERNAME

cd3_automation_toolkit/Compute/export_instances_nonGreenField.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ def export_instances(inputfile, outdir, service_dir,config1, signer1, ct, export
371371

372372
tempStrKeys = "\n" + tempStrKeys
373373
tempStrKeys = "#START_instance_ssh_keys#" + tempStrKeys + "\t#instance_ssh_keys_END#"
374-
if ("\\n" in tempStrKeys):
375-
tempStrKeys = tempStrKeys.replace("\\n", "\\\\n")
374+
if ("\\" in tempStrKeys):
375+
tempStrKeys = tempStrKeys.replace("\\", "\\\\")
376376

377377
var_data[reg] = re.sub('#START_instance_ssh_keys#.*?#instance_ssh_keys_END#', tempStrKeys,
378378
var_data[reg],flags=re.DOTALL)

cd3_automation_toolkit/Network/BaseNetwork/export_network_nonGreenField.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,10 @@ def export_subnets_vlans(inputfile, outdir, service_dir, config, signer, ct, exp
10511051
if (os.path.exists(outdir + "/" + reg + "/" + service_dir_vlan + "/"+vlan_file_name)):
10521052
commonTools.backup_file(outdir + "/" + reg + "/" + service_dir_vlan, "import_network",vlan_file_name)
10531053
importCommands_vlan[reg] = open(outdir + "/" + reg + "/" + service_dir_vlan + "/" + vlan_file_name, "w")
1054+
importCommands_vlan[reg].write("\n#!/bin/bash")
1055+
importCommands_vlan[reg].write("\n")
1056+
importCommands_vlan[reg].write(f'{tf_or_tofu} init')
1057+
importCommands_vlan[reg].write("\n\n######### Writing import for VLANs #########\n\n")
10541058

10551059
print("Tab- 'SubnetsVLANs' would be overwritten during export process!!!")
10561060
for reg in export_regions:
@@ -1124,10 +1128,6 @@ def export_subnets_vlans(inputfile, outdir, service_dir, config, signer, ct, exp
11241128
# VLAN Data
11251129
if skip_vlans['reg'] == 1:
11261130
continue
1127-
importCommands_vlan[reg].write("#!/bin/bash")
1128-
importCommands_vlan[reg].write("\n")
1129-
importCommands_vlan[reg].write(f'{tf_or_tofu} init')
1130-
importCommands_vlan[reg].write("\n\n######### Writing import for VLANs #########\n\n")
11311131
# check resources in vlan state
11321132
state_vlan = {'path': f'{outdir}/{reg}/{service_dir_vlan}', 'resources': []}
11331133
try:

cd3_automation_toolkit/Network/LoadBalancers/export_lbr_nonGreenField.py

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,9 @@ def print_backendset_backendserver(region, ct, values_for_column_bss, lbr, LBRs,
477477
values_for_column_bss['Cookie Path'].append("")
478478
values_for_column_bss['Disable Fallback(TRUE|FALSE)'].append("")
479479

480+
# Get Health Checker
481+
hc = lbr.get_health_checker(eachlbr.__getattribute__('id'), backendsets).data
482+
480483
for col_headers in values_for_column_bss:
481484
headers_lower = commonTools.check_column_headers(col_headers)
482485

@@ -503,8 +506,6 @@ def print_backendset_backendserver(region, ct, values_for_column_bss, lbr, LBRs,
503506

504507
# Process the Backend Set and Backend Server Columns
505508
elif col_headers in sheet_dict_bss.keys():
506-
hc = lbr.get_health_checker(eachlbr.__getattribute__('id'), backendsets).data
507-
508509
if col_headers == "Backend Policy(LEAST_CONNECTIONS|ROUND_ROBIN|IP_HASH)":
509510
policy = backendset_details.__getattribute__(sheet_dict_bss[col_headers])
510511
values_for_column_bss['Backend Policy(LEAST_CONNECTIONS|ROUND_ROBIN|IP_HASH)'].append(
@@ -871,41 +872,48 @@ def print_routing_policies(region, ct, values_for_column_rp, LBRs, lbr_compartme
871872
comp_done_ids = []
872873
for comp_name, comp_id in ct.ntk_compartment_ids.items():
873874
if lbr_comp_id == comp_id and lbr_comp_id not in comp_done_ids:
874-
# Retrieve the values for the routing policies
875-
for rp, values in eachlbr.__getattribute__('routing_policies').items():
876-
for col_headers in values_for_column_rp.keys():
877-
headers_lower = commonTools.check_column_headers(col_headers)
878-
879-
if col_headers in sheet_dict_common.keys():
880-
values_for_column_rp = common_headers(region, col_headers, values_for_column_rp, eachlbr,
881-
sheet_dict_common, lbr_compartment_name)
882-
elif col_headers == 'LBR Name':
883-
values_for_column_rp[col_headers].append(eachlbr.display_name)
884-
885-
elif col_headers == 'Routing Policy Name':
886-
values_for_column_rp[col_headers].append(values.__getattribute__('name'))
887-
888-
elif col_headers == "Rules":
889-
rules = []
890-
for rule in values.rules:
891-
if hasattr(rule, 'actions') and rule.actions and hasattr(rule.actions[0], 'backend_set_name'):
892-
backend_set_name = rule.actions[0].backend_set_name
893-
else:
894-
backend_set_name = None
895-
rule_str = f"{rule.name}::{rule.condition}::{backend_set_name}"
896-
rules.append(rule_str)
897-
rules_string = "\n".join(rules)
898-
values_for_column_rp[col_headers].append(rules_string)
875+
lbr_compartment_name = comp_name
876+
comp_done_ids.append(lbr_comp_id)
899877

900-
elif col_headers in sheet_dict_rp.keys():
901-
values_for_column_rp[col_headers].append(
902-
values.__getattribute__(sheet_dict_rp[col_headers]))
878+
# Retrieve the values for the routing policies
879+
for rp, values in eachlbr.__getattribute__('routing_policies').items():
880+
for col_headers in values_for_column_rp.keys():
881+
headers_lower = commonTools.check_column_headers(col_headers)
903882

883+
if col_headers in sheet_dict_common.keys():
884+
values_for_column_rp = common_headers(region, col_headers, values_for_column_rp, eachlbr,
885+
sheet_dict_common, lbr_compartment_name)
886+
elif col_headers == 'LBR Name':
887+
values_for_column_rp[col_headers].append(eachlbr.display_name)
888+
889+
elif col_headers == 'Routing Policy Name':
890+
values_for_column_rp[col_headers].append(values.__getattribute__('name'))
891+
892+
elif col_headers == "Rules":
893+
rules = []
894+
for rule in values.rules:
895+
if hasattr(rule, 'actions') and rule.actions and hasattr(rule.actions[0], 'backend_set_name'):
896+
backend_set_name = rule.actions[0].backend_set_name
904897
else:
905-
# Process the remaining Columns
906-
oci_objs = [eachlbr, values]
907-
values_for_column_rp = commonTools.export_extra_columns(oci_objs, col_headers,
908-
sheet_dict_rp,
898+
backend_set_name = None
899+
900+
name = rule.name.strip("\n")
901+
condition = rule.condition.strip("\n")
902+
backend_set_name = backend_set_name.strip("\n")
903+
rule_str = f"{name}::{condition}::{backend_set_name}"
904+
rules.append(rule_str)
905+
rules_string = "\n".join(rules)
906+
values_for_column_rp[col_headers].append(rules_string)
907+
908+
elif col_headers in sheet_dict_rp.keys():
909+
values_for_column_rp[col_headers].append(
910+
values.__getattribute__(sheet_dict_rp[col_headers]))
911+
912+
else:
913+
# Process the remaining Columns
914+
oci_objs = [eachlbr, values]
915+
values_for_column_rp = commonTools.export_extra_columns(oci_objs, col_headers,
916+
sheet_dict_rp,
909917
values_for_column_rp)
910918

911919
return values_for_column_rp
@@ -968,7 +976,7 @@ def export_lbr(inputfile, outdir, service_dir, config1, signer1, ct, export_comp
968976
print("\nFetching details of Load Balancer...")
969977

970978
# Create backups
971-
file_name = 'import_commands_lbr_nonGF.sh'
979+
file_name = 'import_commands_lbr.sh'
972980
resource = 'import_lbr'
973981
total_resources=0
974982

cd3_automation_toolkit/Release-Notes

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
CD3 Automation Toolkit Tag v2024.4.1
33
Sep 30th, 2024
44
-------------------------------------
5-
1. Terraform modules in its own GIT Repo - https://github.com/oracle-devrel/cd3-automation-toolkit
6-
2. Call CD3 Validator for services while invoking create workflow for that service.
7-
3. Multi Prefix Support using Jenkins. Toolkit can be setup for multiple prefixes by specifying different values in tenancyconfig.properties.
8-
4. OCI RM Stack enhancements - disable legacy IMDS endpoints, enable in transit encryption, enable bastion plugin, specify custom boot volume size.
9-
5. Bug fixes - skip cross tenancy RPC, KMS fix, identity domain users/groups terraform modules, fetch compatible image OCIDs during createTenancyConfig.py
5+
1. Call CD3 Validator for services while invoking create workflow for that service.
6+
2. Multi Prefix Support using Jenkins. Toolkit can be setup for multiple prefixes by specifying different values in tenancyconfig.properties.
7+
3. OCI RM Stack enhancements - disable legacy IMDS endpoints, enable in transit encryption, enable bastion plugin, specify custom boot volume size.
8+
4. Bug fixes - skip cross tenancy RPC, KMS fix, identity domain users/groups terraform modules, fetch compatible image OCIDs during createTenancyConfig.py
109

1110
-------------------------------------
1211
CD3 Automation Toolkit Tag v2024.4.0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)