diff --git a/README.md b/README.md index 6cff005..d459981 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ Current coverage: - [x] Deployment on AWS - [x] Deployment on Azure - [x] Deployment of: - - [x] vManage - - [x] vBond - - [x] vSmart + - [x] Manager + - [x] Validator + - [x] Controller - [x] cEdge - [x] Local installation via Ansible Galaxy - [x] Installation via git repository link @@ -125,7 +125,7 @@ ansible-galaxy install -r requirements.yml ### Prepare your configuration -*Note:* Current solution supports topology that consist of vManage, vBond, vSmart and C8000V edge device. +*Note:* Current solution supports topology that consist of Manager, Validator, Controller and C8000V edge device. There are configuration files which has been initially filled with values: @@ -235,7 +235,7 @@ is "allow-listed". See `aws_allowed_subnets` in `roles/aws_controllers/defaults/ ### 2. Services status -If vManage is not starting NMS service: +If Manager is not starting NMS service: - check if your disk /opt/data is more than 20% free. Otherwise that case shutdown application as well - remember to make sure the sdwan manager and other sdwan virtual machines are right sized for your deployment needs - cisco's server recommendations are available here: [server-requirements](https://www.cisco.com/c/en/us/td/docs/routers/sdwan/release/notes/compatibility-and-server-recommendations/server-requirements.html) diff --git a/playbooks/aws_sdwan_config.yml b/playbooks/aws_sdwan_config.yml index 5cda793..f540213 100644 --- a/playbooks/aws_sdwan_config.yml +++ b/playbooks/aws_sdwan_config.yml @@ -43,7 +43,7 @@ aws_subnets: | subnet_cidr: "10.0.2.0/24" # default ips from official Cisco guides VPN: 0 type: transport - {% if vmanage_instances is defined and vmanage_instances | length > 2 %} + {% if manager_instances is defined and manager_instances | length > 2 %} - name: "{{ aws_resources_prefix }}-cluster-subnet-0" subnet_cidr: "10.0.3.0/24" VPN: 0 @@ -74,9 +74,9 @@ aws_nacl_name: "{{ aws_resources_prefix }}-nacl" # Cloud-init general configurations admin_username: admin admin_password: null # pragma: allowlist secret -vbond_port: 12346 -# vbond_transport_private_ip: null # note that default: 192.168.1.199 -# vbond_transport_public_ip: null # note that default: 192.168.1.199 +validator_port: 12346 +# validator_transport_private_ip: null # note that default: 192.168.1.199 +# validator_transport_public_ip: null # note that default: 192.168.1.199 @@ -84,40 +84,40 @@ vbond_port: 12346 # Controllers # ############################### -# vManage -aws_vmanage_ami_id: null -aws_vmanage_instance_type: "c5.9xlarge" +# Manager +aws_manager_ami_id: null +aws_manager_instance_type: "c5.9xlarge" -site_id_vmanage: 100 +site_id_manager: 100 -vmanage_instances: - - hostname: "{{ aws_resources_prefix }}-vManage" +manager_instances: + - hostname: "{{ aws_resources_prefix }}-Manager" system_ip: 192.168.1.1 - site_id: "{{ site_id_vmanage }}" + site_id: "{{ site_id_manager }}" -# vBond -aws_vbond_ami_id: null -aws_vbond_instance_type: "c5.large" +# Validator +aws_validator_ami_id: null +aws_validator_instance_type: "c5.large" -site_id_vbond: 200 +site_id_validator: 200 -vbond_instances: - - hostname: "{{ aws_resources_prefix }}-vBond" +validator_instances: + - hostname: "{{ aws_resources_prefix }}-Validator" system_ip: 192.168.3.1 - site_id: "{{ site_id_vbond }}" + site_id: "{{ site_id_validator }}" -# vSmart -aws_vsmart_ami_id: null -aws_vsmart_instance_type: "c5.large" +# Controller +aws_controller_ami_id: null +aws_controller_instance_type: "c5.large" -site_id_vsmart: 300 +site_id_controller: 300 -vsmart_instances: - - hostname: "{{ aws_resources_prefix }}-vSmart" +controller_instances: + - hostname: "{{ aws_resources_prefix }}-Controller" system_ip: 192.168.2.1 - site_id: "{{ site_id_vsmart }}" + site_id: "{{ site_id_controller }}" diff --git a/playbooks/azure_sdwan_config.yml b/playbooks/azure_sdwan_config.yml index d6757df..3eceafb 100644 --- a/playbooks/azure_sdwan_config.yml +++ b/playbooks/azure_sdwan_config.yml @@ -28,38 +28,38 @@ az_allowed_subnets: null admin_password: null -# vManage -az_vmanage_image_vhd_source: null -az_vmanage_vm_size: "Standard_F16s_v2" +# Manager +az_manager_image_vhd_source: null +az_manager_vm_size: "Standard_F16s_v2" -site_id_vmanage: 100 +site_id_manager: 100 -vmanage_instances: - - hostname: "{{ az_resources_prefix }}-vManage" +manager_instances: + - hostname: "{{ az_resources_prefix }}-Manager" system_ip: 192.168.1.1 - site_id: "{{ site_id_vmanage }}" + site_id: "{{ site_id_manager }}" -# vBond -az_vbond_image_vhd_source: null -site_id_vbond: 200 +# Validator +az_validator_image_vhd_source: null +site_id_validator: 200 -vbond_instances: - - hostname: "{{ az_resources_prefix }}-vBond" +validator_instances: + - hostname: "{{ az_resources_prefix }}-Validator" system_ip: 192.168.3.1 - site_id: "{{ site_id_vbond }}" + site_id: "{{ site_id_validator }}" -# vSmart -az_vsmart_image_vhd_source: null -az_vsmart_vm_size: "Standard_F4s_v2" +# Controller +az_controller_image_vhd_source: null +az_controller_vm_size: "Standard_F4s_v2" -site_id_vsmart: 300 +site_id_controller: 300 -vsmart_instances: - - hostname: "{{ az_resources_prefix }}-vSmart" +controller_instances: + - hostname: "{{ az_resources_prefix }}-Controller" system_ip: 192.168.2.1 - site_id: "{{ site_id_vsmart }}" + site_id: "{{ site_id_controller }}" ################################ diff --git a/playbooks/template_cloudinit_config.yml b/playbooks/template_cloudinit_config.yml index 0fd216a..19b419e 100644 --- a/playbooks/template_cloudinit_config.yml +++ b/playbooks/template_cloudinit_config.yml @@ -19,41 +19,41 @@ cloud_provider: null # can be either aws or azure # Cloud-init general configurations admin_username: admin admin_password: dummypassword # pragma: allowlist secret -vbond_port: 12346 -vbond_transport_private_ip: X.X.X.X -vbond_transport_public_ip: Y.Y.Y.Y +validator_port: 12346 +validator_transport_private_ip: X.X.X.X +validator_transport_public_ip: Y.Y.Y.Y ############################### # Controllers # ############################### -# vManage -site_id_vmanage: 100 +# Manager +site_id_manager: 100 -vmanage_instances: - - hostname: terraformvmanage1 # "{{ resources_prefix }}-vManage" +manager_instances: + - hostname: terraformmanager1 # "{{ resources_prefix }}-Manager" system_ip: 192.168.1.1 - site_id: "{{ site_id_vmanage }}" + site_id: "{{ site_id_manager }}" vpn0_default_gateway: 10.0.2.1 # has to be set if cloud_provider == "azure" -# vBond -site_id_vbond: 200 +# Validator +site_id_validator: 200 -vbond_instances: - - hostname: terraformvbond1 # "{{ resources_prefix }}-vBond" +validator_instances: + - hostname: terraformvalidator1 # "{{ resources_prefix }}-Validator" system_ip: 192.168.3.1 - site_id: "{{ site_id_vbond }}" + site_id: "{{ site_id_validator }}" vpn0_default_gateway: 10.0.2.1 # has to be set if cloud_provider == "azure" -# vSmart -site_id_vsmart: 300 +# Controller +site_id_controller: 300 -vsmart_instances: - - hostname: terraformvsmart1 # "{{ resources_prefix }}-vSmart" +controller_instances: + - hostname: terraformcontroller1 # "{{ resources_prefix }}-Controller" system_ip: 192.168.2.1 - site_id: "{{ site_id_vsmart }}" + site_id: "{{ site_id_controller }}" vpn0_default_gateway: 10.0.2.1 # has to be set if cloud_provider == "azure" @@ -68,4 +68,4 @@ edge_instances: site_id: 1002 system_ip: 192.168.102.1 uuid: XXXX-XXXX-XXXX - vbond: 1.1.1.1 + validator: 1.1.1.1 diff --git a/roles/aws_controllers/README.md b/roles/aws_controllers/README.md index 7595261..77650d6 100644 --- a/roles/aws_controllers/README.md +++ b/roles/aws_controllers/README.md @@ -1,12 +1,12 @@ # Ansible Role: aws_controllers -The `aws_controllers` Ansible role is designed to deploy a Cisco SD-WAN controller topology on AWS cloud infrastructure. It follows the topology outlined in the official Cisco documentation and currently supports the deployment of vManage, vBond, and vSmart instances. +The `aws_controllers` Ansible role is designed to deploy a Cisco SD-WAN controller topology on AWS cloud infrastructure. It follows the topology outlined in the official Cisco documentation and currently supports the deployment of Manager, Validator, and Controller instances. NOTE: Role must be used on localhost - API requests to AWS via boto are done from local machine. ## Role description -The `aws_controllers` role automates the deployment of Cisco SD-WAN controllers (vManage, vBond, and vSmart) in AWS. Key functionalities include: +The `aws_controllers` role automates the deployment of Cisco SD-WAN controllers (Manager, Validator, and Controller) in AWS. Key functionalities include: - Validating AWS dependencies and user sessions. - Discovering or using provided network infrastructure settings. @@ -21,7 +21,7 @@ The `aws_controllers` role automates the deployment of Cisco SD-WAN controllers - Ansible AWS modules (`amazon.aws` collection) installed. - Boto3 and Botocore Python libraries installed on the controlling machine to interact with AWS APIs. - AWS CLI configured with the appropriate permissions to create and manage AWS resources. -- AWS EC2 AMIs for vManage, vBond, and vSmart instances must be available in your AWS account. +- AWS EC2 AMIs for Manager, Validator, and Controller instances must be available in your AWS account. ## Dependencies @@ -36,14 +36,14 @@ The `aws_controllers` role automates the deployment of Cisco SD-WAN controllers - `az_subnets`: A list of subnet definitions for the Azure Virtual Network. - `aws_vpc_name`, `aws_security_group_name`: Default naming convention for VPC and security group. - `aws_tag_creator`: Tag used to mark resources created in AWS. -- `vbond_port`, `default_vbond_ip`: Default port and IP for vBond. -- `site_id_vmanage`, `site_id_vbond`, `site_id_vsmart`: Default site IDs for each controller. +- `validator_port`, `default_validator_ip`: Default port and IP for Validator. +- `site_id_manager`, `site_id_validator`, `site_id_controller`: Default site IDs for each controller. ### Vars (`vars/main.yml`) - `results_dir`: Directory to store deployment results. - `aws_deployed_controllers_data`: File to store data of deployed controllers. -- `userdata_vmanage_path`, `userdata_vbond_path`, `userdata_vsmart_path`: Paths to user data configurations for each controller type. +- `userdata_manager_path`, `userdata_validator_path`, `userdata_controller_path`: Paths to user data configurations for each controller type. ### Required Variables diff --git a/roles/aws_controllers/defaults/main.yml b/roles/aws_controllers/defaults/main.yml index d908cfb..a978f94 100644 --- a/roles/aws_controllers/defaults/main.yml +++ b/roles/aws_controllers/defaults/main.yml @@ -27,8 +27,8 @@ aws_resources_prefix: "{{ organization_name }}" # Cloud-init general configurations admin_username: admin admin_password: null # pragma: allowlist secret -vbond_port: 12346 -default_vbond_ip: 192.168.1.199 # default ips from official Cisco guides +validator_port: 12346 +default_validator_ip: 192.168.1.199 # default ips from official Cisco guides # vpn0_interface_color: default @@ -36,28 +36,28 @@ default_vbond_ip: 192.168.1.199 # default ips from official Cisco guides # Controllers # ############################### -# vManage -aws_vmanage_ami_id: null -aws_vmanage_instance_type: "c5.9xlarge" +# Manager +aws_manager_ami_id: null +aws_manager_instance_type: "c5.9xlarge" -vmanage_default_persona: "COMPUTE_AND_DATA" -site_id_vmanage: 100 +manager_default_persona: "COMPUTE_AND_DATA" +site_id_manager: 100 -vmanage_instances: [] +manager_instances: [] -# vBond -aws_vbond_ami_id: null -aws_vbond_instance_type: "c5.large" +# Validator +aws_validator_ami_id: null +aws_validator_instance_type: "c5.large" -site_id_vbond: 200 +site_id_validator: 200 -vbond_instances: [] +validator_instances: [] -# vSmart -aws_vsmart_ami_id: null -aws_vsmart_instance_type: "c5.large" +# Controller +aws_controller_ami_id: null +aws_controller_instance_type: "c5.large" -site_id_vsmart: 300 +site_id_controller: 300 -vsmart_instances: [] +controller_instances: [] diff --git a/roles/aws_controllers/tasks/aws_vsmart_ec2_instance.yml b/roles/aws_controllers/tasks/aws_controller_ec2_instance.yml similarity index 69% rename from roles/aws_controllers/tasks/aws_vsmart_ec2_instance.yml rename to roles/aws_controllers/tasks/aws_controller_ec2_instance.yml index db57d84..6d74f03 100644 --- a/roles/aws_controllers/tasks/aws_vsmart_ec2_instance.yml +++ b/roles/aws_controllers/tasks/aws_controller_ec2_instance.yml @@ -3,7 +3,7 @@ --- -# For vsmart +# For Controller # # 2 aws_network_interface # 2 aws_network_interface_attachment @@ -20,7 +20,7 @@ # There are already few deployments that failed because of # 'error: code: InvalidNetworkInterfaceID.NotFound' # For that we add retry to proceed, can be debugged later -- name: Create network interfaces for vsmart +- name: Create network interfaces for Controller amazon.aws.ec2_eni: subnet_id: "{{ subnet_item.id }}" description: Network interface for SD-WAN Controller @@ -31,18 +31,18 @@ Creator: "{{ aws_tag_creator }}" Machine: "{{ hostname }}" VPN: "{{ subnet_item.tags.VPN }}" - register: network_interfaces_vsmart + register: network_interfaces_controller loop: "{{ [aws_mgmt_subnet, aws_transport_subnet] }}" loop_control: loop_var: subnet_item label: "nic-{{ subnet_item.tags.Name }}" # retries: 3 # delay: 3 - # until: network_interfaces_vsmart.results | map(attribute='rc') | all(is_same=True, test_value=0) + # until: network_interfaces_controller.results | map(attribute='rc') | all(is_same=True, test_value=0) -- name: Set aws_network_interfaces fact with a list of interfaces for vSmart +- name: Set aws_network_interfaces fact with a list of interfaces for Controller ansible.builtin.set_fact: - aws_network_interfaces: "{{ network_interfaces_vsmart.results | map(attribute='interface') | list }}" + aws_network_interfaces: "{{ network_interfaces_controller.results | map(attribute='interface') | list }}" - name: Filter aws_network_interfaces for instance creation. Set aws_mgmt_nic and aws_transport_nic facts ansible.builtin.set_fact: @@ -66,32 +66,32 @@ loop_control: loop_var: interface_item label: "eip-for-{{ interface_item.tags.Name }}" - register: eip_vsmart + register: eip_controller retries: 3 delay: 3 - until: eip_vsmart is succeeded + until: eip_controller is succeeded # cloud-init - name: Set path for bootstrap configuration ansible.builtin.set_fact: - generated_userdata_vsmart: "{{ userdata_vsmart_path }}-{{ hostname }}" + generated_userdata_controller: "{{ userdata_controller_path }}-{{ hostname }}" changed_when: true -- name: Template userdata file for vSmart +- name: Template userdata file for Controller ansible.builtin.template: - src: ./userdata_vsmart.j2 - dest: "{{ generated_userdata_vsmart }}" + src: ./userdata_controller.j2 + dest: "{{ generated_userdata_controller }}" mode: "0644" -# vManage -- name: Launch vsmart +# Manager +- name: Launch Controller amazon.aws.ec2_instance: count: 1 - instance_type: "{{ aws_vsmart_instance_type }}" + instance_type: "{{ aws_controller_instance_type }}" image: - id: "{{ aws_vsmart_ami_id }}" + id: "{{ aws_controller_ami_id }}" state: present vpc_subnet_id: "{{ aws_mgmt_subnet.id }}" region: "{{ aws_region }}" @@ -109,55 +109,55 @@ tags: Name: "{{ hostname }}" Creator: "{{ aws_tag_creator }}" - user_data: "{{ lookup('file', generated_userdata_vsmart) }}" + user_data: "{{ lookup('file', generated_userdata_controller) }}" volumes: - device_name: /dev/xvda ebs: volume_size: 23 delete_on_termination: true - register: ec2_vsmart + register: ec2_controller # TODO: -# Note that the variable: ec2_vsmart.instances[0].network_interfaces is returning a list of interfaces +# Note that the variable: ec2_controller.instances[0].network_interfaces is returning a list of interfaces # but that list can be different than device_index (so mgmt and transport are mixed) -- name: Store vSmart instance details for deployment_results +- name: Store Controller instance details for deployment_results ansible.builtin.set_fact: instance: hostname: "{{ hostname }}" system_ip: "{{ system_ip }}" admin_username: "{{ admin_username }}" admin_password: "{{ admin_password }}" - mgmt_public_ip: "{{ eip_vsmart.results[0].public_ip }}" - transport_public_ip: "{{ eip_vsmart.results[1].public_ip }}" + mgmt_public_ip: "{{ eip_controller.results[0].public_ip }}" + transport_public_ip: "{{ eip_controller.results[1].public_ip }}" changed_when: true notify: Show deployment_facts - register: _vsmart_facts + register: _controller_facts retries: 3 delay: 3 - until: _vsmart_facts is succeeded + until: _controller_facts is succeeded -- name: Update deployment facts - vSmart - that will be consumed by vManage-client in Ansible +- name: Update deployment facts - Controller - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: - vsmart_instances: "{{ deployment_facts.vsmart_instances + [instance] }}" - vmanage_instances: "{{ deployment_facts.vmanage_instances }}" - vbond_instances: "{{ deployment_facts.vbond_instances }}" + controller_instances: "{{ deployment_facts.controller_instances + [instance] }}" + manager_instances: "{{ deployment_facts.manager_instances }}" + validator_instances: "{{ deployment_facts.validator_instances }}" -- name: Copy ec2 vSmart resources information to log file +- name: Copy ec2 Controller resources information to log file ansible.builtin.blockinfile: create: true state: present mode: "0644" insertafter: EOF dest: "{{ aws_deployed_controllers_data }}" - marker: "\n-------------- ec2 vsmart --------------\n" - content: "{{ ec2_vsmart | to_nice_yaml }}" + marker: "\n-------------- ec2 controller --------------\n" + content: "{{ ec2_controller | to_nice_yaml }}" -- name: Allow traffic outside VPC for vSmart IP addresses +- name: Allow traffic outside VPC for Controller IP addresses amazon.aws.ec2_security_group: name: "{{ aws_security_group_config.group_name }}" description: "Security Group for SD-WAN instances" @@ -168,10 +168,10 @@ purge_rules_egress: false rules: - proto: all - cidr_ip: "{{ eip_vsmart.results[0].public_ip }}/32" + cidr_ip: "{{ eip_controller.results[0].public_ip }}/32" rule_desc: "{{ hostname }} - mgmt (VPN 512)" - proto: all - cidr_ip: "{{ eip_vsmart.results[1].public_ip }}/32" + cidr_ip: "{{ eip_controller.results[1].public_ip }}/32" rule_desc: "{{ hostname }} - transport (VPN 0)" rules_egress: [] register: allow_traffic diff --git a/roles/aws_controllers/tasks/aws_vmanage_ec2_instance.yml b/roles/aws_controllers/tasks/aws_manager_ec2_instance.yml similarity index 71% rename from roles/aws_controllers/tasks/aws_vmanage_ec2_instance.yml rename to roles/aws_controllers/tasks/aws_manager_ec2_instance.yml index 16ed9ac..5710a51 100644 --- a/roles/aws_controllers/tasks/aws_vmanage_ec2_instance.yml +++ b/roles/aws_controllers/tasks/aws_manager_ec2_instance.yml @@ -3,7 +3,7 @@ --- -# For vManage: +# For Manager: # 2 aws_network_interface # 2 aws_network_interface_attachment # 2 aws_eip @@ -20,7 +20,7 @@ # Note that we don't have mechanism yet to detect if there are already required interfaces present on AWS for # that particular machine. We should include here some check to verify that they exist and skip if present, # because ec2_eni module is not so idempotent - meaning it required eni id to detect if it exists. We don't have it. -- name: Create network interfaces for vManage +- name: Create network interfaces for Manager amazon.aws.ec2_eni: subnet_id: "{{ subnet_item.id }}" description: Network interface for SD-WAN Controller @@ -31,7 +31,7 @@ Creator: "{{ aws_tag_creator }}" Machine: "{{ hostname }}" VPN: "{{ subnet_item.tags.VPN }}" - register: network_interfaces_vmanage + register: network_interfaces_manager loop: > {{ [aws_mgmt_subnet, aws_transport_subnet] @@ -41,9 +41,9 @@ loop_var: subnet_item label: "nic-{{ subnet_item.tags.Name }}" -- name: Set aws_network_interfaces fact with a list of interfaces for vManage +- name: Set aws_network_interfaces fact with a list of interfaces for Manager ansible.builtin.set_fact: - aws_network_interfaces: "{{ network_interfaces_vmanage.results | map(attribute='interface') | list }}" + aws_network_interfaces: "{{ network_interfaces_manager.results | map(attribute='interface') | list }}" - name: Filter aws_network_interfaces for instance creation. Set NIC facts ansible.builtin.set_fact: @@ -51,10 +51,10 @@ aws_transport_nic: "{{ aws_network_interfaces | selectattr('tags.Name', 'search', 'transport') | list | first }}" aws_cluster_nic: "{{ aws_network_interfaces | selectattr('tags.Name', 'search', 'cluster') | list | first | default(omit) }}" -- name: Set vmanage cluster related facts +- name: Set Manager cluster related facts ansible.builtin.set_fact: - vmanage_cluster_private_ip: "{{ aws_cluster_nic.private_ip_address }}" - vmanage_cluster_prefix: "{{ aws_cluster_subnet.cidr_block.split('/')[1] }}" + manager_cluster_private_ip: "{{ aws_cluster_nic.private_ip_address }}" + manager_cluster_prefix: "{{ aws_cluster_subnet.cidr_block.split('/')[1] }}" when: - aws_cluster_nic is defined - aws_cluster_subnet is defined @@ -76,27 +76,27 @@ loop_control: loop_var: interface_item label: "eip-for-{{ interface_item.tags.Name }}" - register: eip_vmanage + register: eip_manager retries: 3 delay: 3 - until: eip_vmanage is succeeded + until: eip_manager is succeeded # cloud-init -- name: Set path for bootstrap configuration and vmanage persona +- name: Set path for bootstrap configuration and Manager persona ansible.builtin.set_fact: - generated_userdata_vmanage: "{{ userdata_vmanage_path }}-{{ hostname }}" - vmanage_persona: "{{ persona | default(vmanage_default_persona) }}" + generated_userdata_manager: "{{ userdata_manager_path }}-{{ hostname }}" + manager_persona: "{{ persona | default(manager_default_persona) }}" changed_when: true -- name: Template userdata file for vManage +- name: Template userdata file for Manager ansible.builtin.template: - src: ./userdata_vmanage.j2 - dest: "{{ generated_userdata_vmanage }}" + src: ./userdata_manager.j2 + dest: "{{ generated_userdata_manager }}" mode: "0644" -- name: Set vManage interfaces list +- name: Set Manager interfaces list ansible.builtin.set_fact: - vmanage_interfaces: + manager_interfaces: - id: "{{ aws_mgmt_nic.id }}" device_index: 0 description: "{{ aws_mgmt_nic.tags.Name }}" @@ -104,30 +104,30 @@ device_index: 1 description: "{{ aws_transport_nic.tags.Name }}" -- name: Add vManage cluster interface to vManage interfaces list +- name: Add Manager cluster interface to Manager interfaces list ansible.builtin.set_fact: - vmanage_interfaces: "{{ vmanage_interfaces + [{'id': aws_cluster_nic.id, 'device_index': 2, 'description': aws_cluster_nic.tags.Name}] }}" + manager_interfaces: "{{ manager_interfaces + [{'id': aws_cluster_nic.id, 'device_index': 2, 'description': aws_cluster_nic.tags.Name}] }}" when: aws_cluster_nic is defined -# vManage -- name: Launch vManage +# Manager +- name: Launch Manager amazon.aws.ec2_instance: count: 1 - instance_type: "{{ aws_vmanage_instance_type }}" + instance_type: "{{ aws_manager_instance_type }}" image: - id: "{{ aws_vmanage_ami_id }}" + id: "{{ aws_manager_ami_id }}" state: present vpc_subnet_id: "{{ aws_mgmt_subnet.id }}" region: "{{ aws_region }}" key_name: "{{ aws_key_name | default('') | bool | ternary(aws_key_name, omit) }}" network: assign_public_ip: false - interfaces: "{{ vmanage_interfaces }}" + interfaces: "{{ manager_interfaces }}" name: "{{ hostname }}" tags: Name: "{{ hostname }}" Creator: "{{ aws_tag_creator }}" - user_data: "{{ lookup('file', generated_userdata_vmanage) }}" + user_data: "{{ lookup('file', generated_userdata_manager) }}" volumes: - device_name: /dev/xvda ebs: @@ -137,57 +137,57 @@ ebs: volume_size: 60 delete_on_termination: true - register: ec2_vmanage + register: ec2_manager -- name: Store vManage instance details for deployment_results +- name: Store Manager instance details for deployment_results ansible.builtin.set_fact: instance: hostname: "{{ hostname }}" system_ip: "{{ system_ip }}" admin_username: "{{ admin_username }}" admin_password: "{{ admin_password }}" - mgmt_public_ip: "{{ eip_vmanage.results[0].public_ip }}" - transport_public_ip: "{{ eip_vmanage.results[1].public_ip }}" + mgmt_public_ip: "{{ eip_manager.results[0].public_ip }}" + transport_public_ip: "{{ eip_manager.results[1].public_ip }}" cluster_private_ip: "{{ aws_cluster_nic.private_ip_address | default(omit) }}" - persona: "{{ vmanage_persona }}" + persona: "{{ manager_persona }}" changed_when: true notify: Show deployment_facts - register: _vmanage_facts + register: _manager_facts retries: 3 delay: 5 - until: _vmanage_facts is succeeded + until: _manager_facts is succeeded -- name: Update deployment facts - vManage - that will be consumed by vManage-client in Ansible +- name: Update deployment facts - Manager - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: - vmanage_instances: "{{ deployment_facts.vmanage_instances + [instance] }}" - vbond_instances: "{{ deployment_facts.vbond_instances }}" - vsmart_instances: "{{ deployment_facts.vsmart_instances }}" + manager_instances: "{{ deployment_facts.manager_instances + [instance] }}" + validator_instances: "{{ deployment_facts.validator_instances }}" + controller_instances: "{{ deployment_facts.controller_instances }}" -- name: Copy ec2 vManage resources information to log file +- name: Copy ec2 Manager resources information to log file ansible.builtin.blockinfile: create: true state: present mode: "0644" insertafter: EOF dest: "{{ aws_deployed_controllers_data }}" - marker: "\n-------------- ec2 vManage --------------\n" - content: "{{ ec2_vmanage | to_nice_yaml }}" + marker: "\n-------------- ec2 Manager --------------\n" + content: "{{ ec2_manager | to_nice_yaml }}" - name: Set security group rules ansible.builtin.set_fact: sg_rules: - proto: all # proto all means: `ports: all` - cidr_ip: "{{ eip_vmanage.results[0].public_ip }}/32" + cidr_ip: "{{ eip_manager.results[0].public_ip }}/32" rule_desc: "{{ hostname }} - mgmt (VPN 512)" - proto: all - cidr_ip: "{{ eip_vmanage.results[1].public_ip }}/32" + cidr_ip: "{{ eip_manager.results[1].public_ip }}/32" rule_desc: "{{ hostname }} - transport (VPN 0)" - name: Update security group rules to handle cluster traffic ansible.builtin.set_fact: - sg_rules: "{{ sg_rules + [{'proto': 'all', 'cidr_ip': vmanage_cluster_private_ip + '/32', 'rule_desc': hostname + ' - cluster (VPN 0)'}] }}" - when: vmanage_cluster_private_ip is defined + sg_rules: "{{ sg_rules + [{'proto': 'all', 'cidr_ip': manager_cluster_private_ip + '/32', 'rule_desc': hostname + ' - cluster (VPN 0)'}] }}" + when: manager_cluster_private_ip is defined - name: Configure security group amazon.aws.ec2_security_group: diff --git a/roles/aws_controllers/tasks/aws_vbond_ec2_instance.yml b/roles/aws_controllers/tasks/aws_validator_ec2_instance.yml similarity index 68% rename from roles/aws_controllers/tasks/aws_vbond_ec2_instance.yml rename to roles/aws_controllers/tasks/aws_validator_ec2_instance.yml index dadd598..46e65b4 100644 --- a/roles/aws_controllers/tasks/aws_vbond_ec2_instance.yml +++ b/roles/aws_controllers/tasks/aws_validator_ec2_instance.yml @@ -3,7 +3,7 @@ --- -# For vBond +# For Validator # # 2 aws_network_interface # 2 aws_network_interface_attachment @@ -17,7 +17,7 @@ aws_mgmt_subnet: "{{ aws_subnets_config | selectattr('tags.VPN', 'equalto', '512') | list | first }}" aws_transport_subnet: "{{ aws_subnets_config | selectattr('tags.VPN', 'equalto', '0') | list | first }}" -- name: Create network interfaces for vBond +- name: Create network interfaces for Validator amazon.aws.ec2_eni: subnet_id: "{{ subnet_item.id }}" description: Network interface for SD-WAN Controller @@ -28,15 +28,15 @@ Creator: "{{ aws_tag_creator }}" Machine: "{{ hostname }}" VPN: "{{ subnet_item.tags.VPN }}" - register: network_interfaces_vbond + register: network_interfaces_validator loop: "{{ [aws_mgmt_subnet, aws_transport_subnet] }}" loop_control: loop_var: subnet_item label: "nic-{{ subnet_item.tags.Name }}" -- name: Set aws_network_interfaces fact with a list of interfaces for vBond +- name: Set aws_network_interfaces fact with a list of interfaces for Validator ansible.builtin.set_fact: - aws_network_interfaces: "{{ network_interfaces_vbond.results | map(attribute='interface') | list }}" + aws_network_interfaces: "{{ network_interfaces_validator.results | map(attribute='interface') | list }}" - name: Filter aws_network_interfaces for instance creation. Set aws_mgmt_nic and aws_transport_nic facts ansible.builtin.set_fact: @@ -61,41 +61,41 @@ loop_control: loop_var: interface_item label: "eip-for-{{ interface_item.tags.Name }}" - register: eip_vbond + register: eip_validator retries: 3 delay: 3 - until: eip_vbond is succeeded + until: eip_validator is succeeded -# vbond_mgmt_private_ip -- name: Set vbond_mgmt_private_ip fact +# validator_mgmt_private_ip +- name: Set validator_mgmt_private_ip fact ansible.builtin.set_fact: - vbond_mgmt_private_ip: "{{ aws_mgmt_nic.private_ip_address }}" - vbond_transport_private_ip: "{{ aws_transport_nic.private_ip_address }}" - vbond_mgmt_public_ip: "{{ eip_vbond.results[0].public_ip }}" - vbond_transport_public_ip: "{{ eip_vbond.results[1].public_ip }}" + validator_mgmt_private_ip: "{{ aws_mgmt_nic.private_ip_address }}" + validator_transport_private_ip: "{{ aws_transport_nic.private_ip_address }}" + validator_mgmt_public_ip: "{{ eip_validator.results[0].public_ip }}" + validator_transport_public_ip: "{{ eip_validator.results[1].public_ip }}" # template cloud init with proper ip assigned to EiP # cloud-init - name: Set path for bootstrap configuration ansible.builtin.set_fact: - generated_userdata_vbond: "{{ userdata_vbond_path }}-{{ hostname }}" + generated_userdata_validator: "{{ userdata_validator_path }}-{{ hostname }}" changed_when: true -- name: Template userdata file for vBond +- name: Template userdata file for Validator ansible.builtin.template: - src: ./userdata_vbond.j2 - dest: "{{ generated_userdata_vbond }}" + src: ./userdata_validator.j2 + dest: "{{ generated_userdata_validator }}" mode: "0644" -# vBond -- name: Launch vBond +# Validator +- name: Launch Validator amazon.aws.ec2_instance: count: 1 - instance_type: "{{ aws_vbond_instance_type }}" + instance_type: "{{ aws_validator_instance_type }}" image: - id: "{{ aws_vbond_ami_id }}" + id: "{{ aws_validator_ami_id }}" state: present vpc_subnet_id: "{{ aws_mgmt_subnet.id }}" region: "{{ aws_region }}" @@ -113,36 +113,36 @@ tags: Name: "{{ hostname }}" Creator: "{{ aws_tag_creator }}" - user_data: "{{ lookup('file', generated_userdata_vbond) }}" + user_data: "{{ lookup('file', generated_userdata_validator) }}" volumes: - device_name: /dev/xvda ebs: volume_size: 23 delete_on_termination: true - register: ec2_vbond + register: ec2_validator -- name: Store vBond instance details for deployment_results +- name: Store Validator instance details for deployment_results ansible.builtin.set_fact: instance: hostname: "{{ hostname }}" system_ip: "{{ system_ip }}" admin_username: "{{ admin_username }}" admin_password: "{{ admin_password }}" - mgmt_public_ip: "{{ eip_vbond.results[0].public_ip }}" - transport_public_ip: "{{ eip_vbond.results[1].public_ip }}" + mgmt_public_ip: "{{ eip_validator.results[0].public_ip }}" + transport_public_ip: "{{ eip_validator.results[1].public_ip }}" changed_when: true notify: Show deployment_facts - register: _vbond_facts + register: _validator_facts retries: 3 delay: 5 - until: _vbond_facts is succeeded + until: _validator_facts is succeeded -- name: Update deployment facts - vBond - that will be consumed by vManage-client in Ansible +- name: Update deployment facts - Validator - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: - vbond_instances: "{{ deployment_facts.vbond_instances + [instance] }}" - vmanage_instances: "{{ deployment_facts.vmanage_instances }}" - vsmart_instances: "{{ deployment_facts.vsmart_instances }}" + validator_instances: "{{ deployment_facts.validator_instances + [instance] }}" + manager_instances: "{{ deployment_facts.manager_instances }}" + controller_instances: "{{ deployment_facts.controller_instances }}" - name: Copy resources information to log file ansible.builtin.blockinfile: @@ -151,10 +151,10 @@ mode: "0644" insertafter: EOF dest: "{{ aws_deployed_controllers_data }}" - marker: "\n-------------- ec2 vBond --------------\n" - content: "{{ ec2_vbond | to_nice_yaml }}" + marker: "\n-------------- ec2 Validator --------------\n" + content: "{{ ec2_validator | to_nice_yaml }}" -- name: Allow traffic outside VPC for vBond IP addresses +- name: Allow traffic outside VPC for Validator IP addresses amazon.aws.ec2_security_group: name: "{{ aws_security_group_config.group_name }}" description: "Security Group for SD-WAN instances" @@ -165,10 +165,10 @@ purge_rules_egress: false rules: - proto: all - cidr_ip: "{{ eip_vbond.results[0].public_ip }}/32" + cidr_ip: "{{ eip_validator.results[0].public_ip }}/32" rule_desc: "{{ hostname }} - mgmt (VPN 512)" - proto: all - cidr_ip: "{{ eip_vbond.results[1].public_ip }}/32" + cidr_ip: "{{ eip_validator.results[1].public_ip }}/32" rule_desc: "{{ hostname }} - transport (VPN 0)" rules_egress: [] register: allow_traffic diff --git a/roles/aws_controllers/tasks/main.yml b/roles/aws_controllers/tasks/main.yml index 0218b19..4d11bb9 100644 --- a/roles/aws_controllers/tasks/main.yml +++ b/roles/aws_controllers/tasks/main.yml @@ -52,66 +52,67 @@ name: common tasks_from: aws_existing_instances.yml vars: - instances_marked_for_deployment: "{{ vmanage_instances + vbond_instances + vsmart_instances }}" + instances_marked_for_deployment: "{{ manager_instances + validator_instances + controller_instances }}" -# cloud-init vBond data requires information about private IP assigned to mgmt interface -# cloud-init templates require information about vBond IP -# vbond_mgmt_private_ip & ec2_vbond_mgmt_public_ip -# That are the reasons why vBond has to go up first (if we will use static IPs it can be changed) +# cloud-init Validator data requires information about private IP assigned to mgmt interface +# cloud-init templates require information about Validator IP +# validator_mgmt_private_ip & ec2_validator_mgmt_public_ip +# That are the reasons why Validator has to go up first (if we will use static IPs it can be changed) -- name: Define deployment facts - that will be consumed by vManage-client in Ansible +- name: Define deployment facts - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: - vbond_instances: [] - vmanage_instances: [] - vsmart_instances: [] + validator_instances: [] + manager_instances: [] + controller_instances: [] -- name: Deploy vBond - Create ec2 instances - ansible.builtin.include_tasks: aws_vbond_ec2_instance.yml +- name: Deploy Validator - Create ec2 instances + ansible.builtin.include_tasks: aws_validator_ec2_instance.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" - loop: "{{ vbond_instances }}" + loop: "{{ validator_instances }}" loop_control: loop_var: instance_item - when: vbond_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) + when: validator_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) -- name: Deploy vManage - Create ec2 instances - ansible.builtin.include_tasks: aws_vmanage_ec2_instance.yml +- name: Deploy Manager - Create ec2 instances + ansible.builtin.include_tasks: aws_manager_ec2_instance.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" persona: "{{ instance_item.persona }}" - loop: "{{ vmanage_instances }}" + loop: "{{ manager_instances }}" loop_control: loop_var: instance_item - when: vmanage_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) + when: manager_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) -- name: Deploy vSmart - Create ec2 instances - ansible.builtin.include_tasks: aws_vsmart_ec2_instance.yml +- name: Deploy Controller - Create ec2 instances + ansible.builtin.include_tasks: aws_controller_ec2_instance.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" - loop: "{{ vsmart_instances }}" + loop: "{{ controller_instances }}" loop_control: loop_var: instance_item - when: vsmart_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) + when: controller_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) - name: Extract deployment facts ansible.builtin.include_role: name: common tasks_from: generate_deployment_facts_controllers.yml - when: deployment_facts.vbond_instances | length > 0 or deployment_facts.vmanage_instances | length > 0 or deployment_facts.vsmart_instances | length > 0 + when: > + deployment_facts.validator_instances | length > 0 or deployment_facts.manager_instances | length > 0 or deployment_facts.controller_instances | length > 0 -- name: Check reachability of vManage instance with SSH probe +- name: Check reachability of Manager instance with SSH probe ansible.builtin.include_role: name: common tasks_from: wait_for_ssh_readiness vars: ssh_readiness_delay: 60 ssh_readiness_timeout: 600 - ssh_readiness_instances: "{{ deployment_facts.vmanage_instances }}" - when: vmanage_instances is defined and deployment_facts.vmanage_instances | length > 0 + ssh_readiness_instances: "{{ deployment_facts.manager_instances }}" + when: manager_instances is defined and deployment_facts.manager_instances | length > 0 diff --git a/roles/aws_controllers/templates/userdata_vsmart.j2 b/roles/aws_controllers/templates/userdata_controller.j2 similarity index 96% rename from roles/aws_controllers/templates/userdata_vsmart.j2 rename to roles/aws_controllers/templates/userdata_controller.j2 index f479626..07125de 100644 --- a/roles/aws_controllers/templates/userdata_vsmart.j2 +++ b/roles/aws_controllers/templates/userdata_controller.j2 @@ -32,7 +32,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_public_ip | default(default_vbond_ip) }} + {{ validator_transport_public_ip | default(default_validator_ip) }} diff --git a/roles/aws_controllers/templates/userdata_vmanage.j2 b/roles/aws_controllers/templates/userdata_manager.j2 similarity index 94% rename from roles/aws_controllers/templates/userdata_vmanage.j2 rename to roles/aws_controllers/templates/userdata_manager.j2 index f81906a..33ee19f 100644 --- a/roles/aws_controllers/templates/userdata_vmanage.j2 +++ b/roles/aws_controllers/templates/userdata_manager.j2 @@ -33,7 +33,7 @@ write_files: - path: /opt/web-app/etc/persona owner: vmanage:vmanage-admin permissions: '0644' - content: '{"persona":"{{ vmanage_persona }}"}' + content: '{"persona":"{{ manager_persona }}"}' - path: /etc/default/personality content: "vmanage\n" - path: /etc/default/inited @@ -50,7 +50,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_public_ip | default(default_vbond_ip) }} + {{ validator_transport_public_ip | default(default_validator_ip) }} local @@ -98,12 +98,12 @@ write_files: -{% if vmanage_cluster_private_ip is defined %} +{% if manager_cluster_private_ip is defined %} - path: /home/admin/customized.cfg content: | vpn 0 interface eth2 - ip address {{ vmanage_cluster_private_ip }}/{{ vmanage_cluster_prefix }} + ip address {{ manager_cluster_private_ip }}/{{ manager_cluster_prefix }} no shutdown ! ! diff --git a/roles/aws_controllers/templates/userdata_vbond.j2 b/roles/aws_controllers/templates/userdata_validator.j2 similarity index 96% rename from roles/aws_controllers/templates/userdata_vbond.j2 rename to roles/aws_controllers/templates/userdata_validator.j2 index 49a320e..19ea2bb 100644 --- a/roles/aws_controllers/templates/userdata_vbond.j2 +++ b/roles/aws_controllers/templates/userdata_validator.j2 @@ -32,7 +32,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_private_ip | default(default_vbond_ip) }} + {{ validator_transport_private_ip | default(default_validator_ip) }} diff --git a/roles/aws_controllers/vars/main.yml b/roles/aws_controllers/vars/main.yml index f2d38c0..6e421a5 100644 --- a/roles/aws_controllers/vars/main.yml +++ b/roles/aws_controllers/vars/main.yml @@ -13,6 +13,6 @@ aws_deployed_controllers_data: "{{ results_dir }}/.aws_deployed_controllers_data # Path to templated userdata config -userdata_vmanage_path: "{{ results_dir }}/.userdata_vmanage" -userdata_vbond_path: "{{ results_dir }}/.userdata_vbond" -userdata_vsmart_path: "{{ results_dir }}/.userdata_vsmart" +userdata_manager_path: "{{ results_dir }}/.userdata_manager" +userdata_validator_path: "{{ results_dir }}/.userdata_validator" +userdata_controller_path: "{{ results_dir }}/.userdata_controller" diff --git a/roles/aws_device_params/README.md b/roles/aws_device_params/README.md index a775725..cc6a4ed 100644 --- a/roles/aws_device_params/README.md +++ b/roles/aws_device_params/README.md @@ -11,7 +11,7 @@ The `aws_device_params` role generates deployment facts for already deployed cEd - `mgmt_public_ip` - `transport_public_ip` - `service_interfaces` -Additionally the role sets the `manager_authentication` variable, which can be used for logging to vManage in other roles. +Additionally the role sets the `manager_authentication` variable, which can be used for logging to Manager in other roles. ## Requirements diff --git a/roles/aws_device_params/tasks/main.yml b/roles/aws_device_params/tasks/main.yml index 2c5459e..918e668 100644 --- a/roles/aws_device_params/tasks/main.yml +++ b/roles/aws_device_params/tasks/main.yml @@ -13,21 +13,21 @@ region: "{{ aws_region }}" filters: "tag:Creator": "{{ aws_tag_creator }}" - "tag:Name": "*vManage*" - register: vmanage_ec2_info + "tag:Name": "*Manager*" + register: manager_ec2_info -- name: Get EIPs associated with the vManage instances +- name: Get EIPs associated with the Manager instances amazon.aws.ec2_eip_info: region: "{{ aws_region }}" filters: "tag:Creator": "{{ aws_tag_creator }}" - tag:Machine: "*{{ vmanage_ec2_info.instances | map(attribute='tags.Name') | list | first }}*" - register: vmanage_eip_info + tag:Machine: "*{{ manager_ec2_info.instances | map(attribute='tags.Name') | list | first }}*" + register: manager_eip_info - name: Set manager authentication fact ansible.builtin.set_fact: manager_authentication: - url: "{{ vmanage_eip_info.addresses | selectattr('tags.VPN', 'equalto', '512') | map(attribute='public_ip') | first }}" + url: "{{ manager_eip_info.addresses | selectattr('tags.VPN', 'equalto', '512') | map(attribute='public_ip') | first }}" username: "admin" password: "{{ admin_password }}" diff --git a/roles/aws_edges/README.md b/roles/aws_edges/README.md index 1a7ecb2..d6d531e 100644 --- a/roles/aws_edges/README.md +++ b/roles/aws_edges/README.md @@ -24,7 +24,7 @@ The `aws_edges` role is an essential component of the `cisco.sdwan_deployment` c - Ansible AWS modules (`amazon.aws` collection) installed. - Boto3 and Botocore Python libraries installed on the controlling machine to interact with AWS APIs. - AWS CLI configured with the appropriate permissions to create and manage AWS resources. -- AWS EC2 AMIs for vManage, vBond, and vSmart instances must be available in your AWS account. +- AWS EC2 AMIs for Manager, Validator, and Controller instances must be available in your AWS account. ## Dependencies @@ -37,7 +37,7 @@ The `aws_edges` role is an essential component of the `cisco.sdwan_deployment` c - `aws_vpc_name`, `aws_security_group_name`: Defaults for naming VPC and security group resources. - `aws_tag_creator`: Tag for identifying the creator of AWS resources. -- `vbond_port`, `default_vbond_ip`: Default vBond communication settings. +- `validator_port`, `default_validator_ip`: Default Validator communication settings. - `edge_instances`: List of edge device instances to be deployed. ### Vars (`vars/main.yml`) diff --git a/roles/aws_edges/defaults/main.yml b/roles/aws_edges/defaults/main.yml index 637183f..d94c2fb 100644 --- a/roles/aws_edges/defaults/main.yml +++ b/roles/aws_edges/defaults/main.yml @@ -27,8 +27,8 @@ aws_resources_prefix: "{{ organization_name }}" # Cloud-init general configurations admin_username: admin admin_password: null # pragma: allowlist secret -vbond_port: 12346 -default_vbond_ip: 192.168.1.199 # default ips from official Cisco guides +validator_port: 12346 +default_validator_ip: 192.168.1.199 # default ips from official Cisco guides # vpn0_interface_color: default diff --git a/roles/aws_edges/tasks/aws_cedge_ec2_instance.yml b/roles/aws_edges/tasks/aws_cedge_ec2_instance.yml index 9f2179f..2cbff23 100644 --- a/roles/aws_edges/tasks/aws_cedge_ec2_instance.yml +++ b/roles/aws_edges/tasks/aws_cedge_ec2_instance.yml @@ -156,7 +156,7 @@ delay: 5 until: _edge_facts is succeeded -- name: Update deployment facts - that will be consumed by vManage-client in Ansible +- name: Update deployment facts - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: deployed_edge_instances: "{{ deployment_facts.deployed_edge_instances + [instance] }}" diff --git a/roles/aws_edges/tasks/main.yml b/roles/aws_edges/tasks/main.yml index 3b56d1e..5e384f4 100644 --- a/roles/aws_edges/tasks/main.yml +++ b/roles/aws_edges/tasks/main.yml @@ -49,7 +49,7 @@ vars: instances_marked_for_deployment: "{{ edge_instances }}" -- name: Define deployment facts - that will be consumed by vManage-client in Ansible +- name: Define deployment facts - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: deployed_edge_instances: [] @@ -60,7 +60,7 @@ hostname: "{{ instance_item.hostname }}" uuid: "{{ instance_item.uuid }}" otp: "{{ instance_item.otp }}" - vbond: "{{ instance_item.vbond }}" + validator: "{{ instance_item.validator }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" loop: "{{ edge_instances }}" diff --git a/roles/aws_edges/templates/bootstrap_cedge.j2 b/roles/aws_edges/templates/bootstrap_cedge.j2 index 40802e6..693d439 100644 --- a/roles/aws_edges/templates/bootstrap_cedge.j2 +++ b/roles/aws_edges/templates/bootstrap_cedge.j2 @@ -12,7 +12,7 @@ vinitparam: - uuid : {{ uuid }} - otp : {{ otp }} - org : {{ organization_name }} - - vbond: {{ vbond }} + - vbond: {{ validator }} --===============0630588950316195806== @@ -44,7 +44,7 @@ Content-Disposition: attachment; filename="config-{{ uuid }}.txt" config-template-name Default_Azure_vWAN_C8000V_Template_V01 no on-demand enable on-demand idle-timeout 10 - vbond {{ vbond }} port {{ vbond_port }} + vbond {{ validator }} port {{ validator_port }} ! bfd color lte hello-interval 1000 diff --git a/roles/aws_network_infrastructure/defaults/main.yml b/roles/aws_network_infrastructure/defaults/main.yml index 084c45e..376fecb 100644 --- a/roles/aws_network_infrastructure/defaults/main.yml +++ b/roles/aws_network_infrastructure/defaults/main.yml @@ -37,7 +37,7 @@ aws_subnets: | subnet_cidr: "10.0.2.0/24" # default ips from official Cisco guides VPN: 0 type: transport - {% if vmanage_instances is defined and vmanage_instances | length > 2 %} + {% if manager_instances is defined and manager_instances | length > 2 %} - name: "{{ aws_resources_prefix }}-cluster-subnet-0" subnet_cidr: "10.0.3.0/24" VPN: 0 diff --git a/roles/azure_controllers/README.md b/roles/azure_controllers/README.md index c71cff9..a3561d3 100644 --- a/roles/azure_controllers/README.md +++ b/roles/azure_controllers/README.md @@ -1,12 +1,12 @@ # Ansible Role: azure_controllers -The `azure_controllers` role is designed to deploy SD-WAN controller instances, specifically vManage, vBond, and vSmart, on the Azure cloud platform. It ensures that instances are deployed according to specific configurations. +The `azure_controllers` role is designed to deploy SD-WAN controller instances, specifically Manager, Validator, and Controller, on the Azure cloud platform. It ensures that instances are deployed according to specific configurations. NOTE: This role should be executed on localhost as it performs API requests to Azure via the Ansible Azure modules from the local machine. ## Role Description -The `azure_controllers` role automates the deployment of Cisco SD-WAN controllers (vManage, vBond, and vSmart) in Azure. Key functionalities include: +The `azure_controllers` role automates the deployment of Cisco SD-WAN controllers (Manager, Validator, and Controller) in Azure. Key functionalities include: - Verifying the active Azure user session. - Asserting that all required variables for Azure controller deployment are set. @@ -15,9 +15,9 @@ The `azure_controllers` role automates the deployment of Cisco SD-WAN controller - Preparing a directory to store results and deployment data. - Checking for existing instances in the specified Azure Virtual Network (VN) to avoid conflicts. - Defining the deployment facts for Ansible to consume. -- Creating Azure VMs for vBond, vSmart, and vManage instances. +- Creating Azure VMs for Validator, Controller, and Manager instances. - Extracting deployment facts post-deployment. -- Checking the reachability of the vManage instance via SSH to confirm deployment success. +- Checking the reachability of the Manager instance via SSH to confirm deployment success. ## Requirements @@ -43,15 +43,15 @@ The `azure_controllers` role automates the deployment of Cisco SD-WAN controller - `az_subnets`: Definitions for Azure subnets within the Virtual Network. - `az_network_security_group`: Name of the Azure Network Security Group. - `az_allowed_subnets`: VPN subnets allowed to connect to Azure public IPs. -- 'az_vmanage_image_vhd_source' -- `az_vmanage_vm_size`, `az_vbond_vm_size`, `az_vsmart_vm_size`: Azure VM sizes for vManage, vBond, and vSmart instances. -- `site_id_vmanage`, `site_id_vbond`, `site_id_vsmart`: Default site IDs for vManage, vBond, and vSmart instances. -- `vmanage_instances`, `vbond_instances`, `vsmart_instances`: Lists for instance configurations. +- 'az_manager_image_vhd_source' +- `az_manager_vm_size`, `az_validator_vm_size`, `az_controller_vm_size`: Azure VM sizes for Manager, Validator, and Controller instances. +- `site_id_manager`, `site_id_validator`, `site_id_controller`: Default site IDs for Manager, Validator, and Controller instances. +- `manager_instances`, `validator_instances`, `controller_instances`: Lists for instance configurations. ### Vars (`vars/main.yml`) - `results_dir`: Directory where deployment results are stored. -- `userdata_vmanage_path`, `userdata_vbond_path`, `userdata_vsmart_path`: Paths to templated userdata configurations for each controller type. +- `userdata_manager_path`, `userdata_validator_path`, `userdata_controller_path`: Paths to templated userdata configurations for each controller type. ### Required Variables diff --git a/roles/azure_controllers/defaults/main.yml b/roles/azure_controllers/defaults/main.yml index 7575f96..ef24618 100644 --- a/roles/azure_controllers/defaults/main.yml +++ b/roles/azure_controllers/defaults/main.yml @@ -31,7 +31,7 @@ az_subnets: | cidr: "10.0.2.0/24" VPN: 0 type: transport - {% if vmanage_instances is defined and vmanage_instances | length > 2 %} + {% if manager_instances is defined and manager_instances | length > 2 %} - name: "{{ az_resources_prefix }}-cluster-subnet-0" cidr: "10.0.3.0/24" VPN: 0 @@ -60,8 +60,8 @@ az_allowed_subnets: null # Cloud-init general configurations admin_username: admin admin_password: null # pragma: allowlist secret -vbond_port: 12346 -default_vbond_ip: 192.168.1.199 +validator_port: 12346 +default_validator_ip: 192.168.1.199 # vpn0_interface_color: default @@ -69,35 +69,35 @@ default_vbond_ip: 192.168.1.199 # Controllers # ############################### -# vManage -az_vmanage_vm_size: "Standard_F16s_v2" -site_id_vmanage: 100 -az_vmanage_image_vhd_source: null -vmanage_default_persona: "COMPUTE_AND_DATA" +# Manager +az_manager_vm_size: "Standard_F16s_v2" +site_id_manager: 100 +az_manager_image_vhd_source: null +manager_default_persona: "COMPUTE_AND_DATA" -vmanage_instances: [] - # - hostname: "{{ az_resources_prefix }}-vManage" +manager_instances: [] + # - hostname: "{{ az_resources_prefix }}-Manager" # system_ip: 192.168.1.1 - # site_id: "{{ site_id_vmanage }}" + # site_id: "{{ site_id_manager }}" -# vBond -az_vbond_vm_size: "Standard_F4s_v2" -site_id_vbond: 200 -az_vbond_image_vhd_source: null +# Validator +az_validator_vm_size: "Standard_F4s_v2" +site_id_validator: 200 +az_validator_image_vhd_source: null -vbond_instances: [] - # - hostname: "{{ az_resources_prefix }}-vBond" +validator_instances: [] + # - hostname: "{{ az_resources_prefix }}-Validator" # system_ip: 192.168.3.1 - # site_id: "{{ site_id_vbond }}" + # site_id: "{{ site_id_validator }}" -# vSmart -az_vsmart_vm_size: "Standard_F4s_v2" -site_id_vsmart: 300 -az_vsmart_image_vhd_source: null +# Controller +az_controller_vm_size: "Standard_F4s_v2" +site_id_controller: 300 +az_controller_image_vhd_source: null -vsmart_instances: [] - # - hostname: "{{ az_resources_prefix }}-vSmart" +controller_instances: [] + # - hostname: "{{ az_resources_prefix }}-Controller" # system_ip: 192.168.2.1 - # site_id: "{{ site_id_vsmart }}" + # site_id: "{{ site_id_controller }}" diff --git a/roles/azure_controllers/tasks/azure_vsmart_vm.yml b/roles/azure_controllers/tasks/azure_controller_vm.yml similarity index 66% rename from roles/azure_controllers/tasks/azure_vsmart_vm.yml rename to roles/azure_controllers/tasks/azure_controller_vm.yml index ba7d587..46963a5 100644 --- a/roles/azure_controllers/tasks/azure_vsmart_vm.yml +++ b/roles/azure_controllers/tasks/azure_controller_vm.yml @@ -3,7 +3,7 @@ --- -- name: "Set facts for subnets used in vManage deployment" +- name: "Set facts for subnets used in Manager deployment" ansible.builtin.set_fact: transport_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'transport') | first }}" mgmt_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'mgmt') | first }}" @@ -77,26 +77,26 @@ loop_var: public_ip_state index_var: my_idx label: public_ip_state.state.name - register: vsmart_nics + register: controller_nics -- name: "Set az_network_interfaces_vsmart fact with a list of interfaces for vSmart" +- name: "Set az_network_interfaces_controller fact with a list of interfaces for Controller" ansible.builtin.set_fact: - az_network_interfaces_vsmart: "{{ vsmart_nics.results | map(attribute='state') | list }}" - az_public_ip_addresses_vsmart: "{{ public_ip_addresses.results | map(attribute='state') | list }}" + az_network_interfaces_controller: "{{ controller_nics.results | map(attribute='state') | list }}" + az_public_ip_addresses_controller: "{{ public_ip_addresses.results | map(attribute='state') | list }}" -- name: "Filter az_network_interfaces_vsmart for instance creation. Set az_mgmt_nic and az_transport_nic facts" +- name: "Filter az_network_interfaces_controller for instance creation. Set az_mgmt_nic and az_transport_nic facts" ansible.builtin.set_fact: - az_mgmt_nic: "{{ az_network_interfaces_vsmart | selectattr('tags.VPN', 'equalto', '512') | list | first }}" - az_transport_nic: "{{ az_network_interfaces_vsmart | selectattr('tags.VPN', 'equalto', '0') | list | first }}" - az_mgmt_public_ip: "{{ az_public_ip_addresses_vsmart | selectattr('tags.VPN', 'equalto', '512') | list | first }}" - az_transport_public_ip: "{{ az_public_ip_addresses_vsmart | selectattr('tags.VPN', 'equalto', '0') | list | first }}" + az_mgmt_nic: "{{ az_network_interfaces_controller | selectattr('tags.VPN', 'equalto', '512') | list | first }}" + az_transport_nic: "{{ az_network_interfaces_controller | selectattr('tags.VPN', 'equalto', '0') | list | first }}" + az_mgmt_public_ip: "{{ az_public_ip_addresses_controller | selectattr('tags.VPN', 'equalto', '512') | list | first }}" + az_transport_public_ip: "{{ az_public_ip_addresses_controller | selectattr('tags.VPN', 'equalto', '0') | list | first }}" -- name: "Set vsmart facts" +- name: "Set controller facts" ansible.builtin.set_fact: - vsmart_mgmt_private_ip: "{{ az_mgmt_nic.ip_configuration.private_ip_address }}" - vsmart_transport_private_ip: "{{ az_transport_nic.ip_configuration.private_ip_address }}" - vsmart_mgmt_public_ip: "{{ az_mgmt_public_ip.ip_address }}" - vsmart_transport_public_ip: "{{ az_transport_public_ip.ip_address }}" + controller_mgmt_private_ip: "{{ az_mgmt_nic.ip_configuration.private_ip_address }}" + controller_transport_private_ip: "{{ az_transport_nic.ip_configuration.private_ip_address }}" + controller_mgmt_public_ip: "{{ az_mgmt_public_ip.ip_address }}" + controller_transport_public_ip: "{{ az_transport_public_ip.ip_address }}" - name: "Set vpn0_default_gateway fact from VPN 0 subnet value" ansible.builtin.set_fact: @@ -108,31 +108,31 @@ loop_var: subnet_item when: subnet_item.VPN == 0 -- name: "Set path for bootstrap configuration: {{ userdata_vsmart_path }}-{{ hostname }}" +- name: "Set path for bootstrap configuration: {{ userdata_controller_path }}-{{ hostname }}" ansible.builtin.set_fact: - generated_userdata_vsmart: "{{ userdata_vsmart_path }}-{{ hostname }}" + generated_userdata_controller: "{{ userdata_controller_path }}-{{ hostname }}" changed_when: true -- name: "Template userdata file for vSmart: {{ hostname }}" +- name: "Template userdata file for Controller: {{ hostname }}" ansible.builtin.template: - src: ./userdata_vsmart.j2 - dest: "{{ generated_userdata_vsmart }}" + src: ./userdata_controller.j2 + dest: "{{ generated_userdata_controller }}" mode: "0644" -- name: "Create an image from a VHD for vSmart: {{ hostname }}-image" +- name: "Create an image from a VHD for Controller: {{ hostname }}-image" azure.azcollection.azure_rm_image: resource_group: "{{ az_resource_group }}" name: "{{ hostname }}-image" location: "{{ az_location }}" os_type: "Linux" hyper_v_generation: "V1" - source: "{{ az_vsmart_image_vhd_source }}" + source: "{{ az_controller_image_vhd_source }}" -- name: "Create vSmart VM: {{ hostname }}" +- name: "Create Controller VM: {{ hostname }}" azure.azcollection.azure_rm_virtualmachine: resource_group: "{{ az_resource_group }}" name: "{{ hostname }}" - vm_size: "{{ az_vsmart_vm_size }}" + vm_size: "{{ az_controller_vm_size }}" admin_username: "{{ admin_username }}-tmp" # Not included in cloud init admin_password: "{{ admin_password }}" managed_disk_type: "Premium_LRS" @@ -154,23 +154,23 @@ Name: "{{ hostname }}" Creator: "{{ az_tag_creator }}" Organization: "{{ organization_name }}" - custom_data: "{{ lookup('file', generated_userdata_vsmart) }}" + custom_data: "{{ lookup('file', generated_userdata_controller) }}" -- name: "Store vSmart instance details for deployment_results" +- name: "Store Controller instance details for deployment_results" ansible.builtin.set_fact: instance: hostname: "{{ hostname }}" system_ip: "{{ system_ip }}" admin_username: "{{ admin_username }}" admin_password: "{{ admin_password }}" - mgmt_public_ip: "{{ vsmart_mgmt_public_ip }}" - transport_public_ip: "{{ vsmart_transport_public_ip }}" + mgmt_public_ip: "{{ controller_mgmt_public_ip }}" + transport_public_ip: "{{ controller_transport_public_ip }}" changed_when: true notify: Show deployment_facts -- name: "Update deployment facts - vSmart - that will be consumed by vManage-client in Ansible" +- name: "Update deployment facts - Controller - that will be consumed by Manager-client in Ansible" ansible.builtin.set_fact: deployment_facts: - vsmart_instances: "{{ deployment_facts.vsmart_instances + [instance] }}" - vmanage_instances: "{{ deployment_facts.vmanage_instances }}" - vbond_instances: "{{ deployment_facts.vbond_instances }}" + controller_instances: "{{ deployment_facts.controller_instances + [instance] }}" + manager_instances: "{{ deployment_facts.manager_instances }}" + validator_instances: "{{ deployment_facts.validator_instances }}" diff --git a/roles/azure_controllers/tasks/azure_vmanage_vm.yml b/roles/azure_controllers/tasks/azure_manager_vm.yml similarity index 76% rename from roles/azure_controllers/tasks/azure_vmanage_vm.yml rename to roles/azure_controllers/tasks/azure_manager_vm.yml index e6d4a1e..5218e30 100644 --- a/roles/azure_controllers/tasks/azure_vmanage_vm.yml +++ b/roles/azure_controllers/tasks/azure_manager_vm.yml @@ -3,7 +3,7 @@ --- -- name: "Set facts for subnets used in vManage deployment" +- name: "Set facts for subnets used in Manager deployment" ansible.builtin.set_fact: transport_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'transport') | first }}" mgmt_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'mgmt') | first }}" @@ -82,7 +82,7 @@ loop_var: public_ip_state index_var: my_idx label: public_ip_state.state.name - register: vmanage_nics + register: manager_nics when: - public_ip_state.state is defined @@ -102,7 +102,7 @@ Organization: "{{ organization_name }}" VPN: "{{ cluster_subnet.VPN }}" type: "{{ cluster_subnet.type }}" - register: cluster_vmanage_nic + register: cluster_manager_nic when: - cluster_subnet is defined - cluster_subnet != "" @@ -121,11 +121,11 @@ resource_group: "{{ az_resource_group }}" name: "{{ az_network_security_group }}" rules: - - name: "{{ cluster_vmanage_nic.state.name }}" + - name: "{{ cluster_manager_nic.state.name }}" protocol: "*" destination_port_range: "*" source_port_range: "*" - source_address_prefix: "{{ cluster_vmanage_nic.state.ip_configuration.private_ip_address }}" + source_address_prefix: "{{ cluster_manager_nic.state.ip_configuration.private_ip_address }}" access: Allow priority: "{{ 2500 + ((az_res_gr.securitygroups | first).rules | length) + 1 }}" direction: Inbound @@ -137,18 +137,18 @@ - cluster_subnet is defined - cluster_subnet != "" -- name: Set az_network_interfaces_vmanage fact with a list of interfaces for vmanage +- name: Set az_network_interfaces_manager fact with a list of interfaces for Manager ansible.builtin.set_fact: - az_network_interfaces_vmanage: "{{ (vmanage_nics.results + [cluster_vmanage_nic]) | selectattr('state', 'defined') | map(attribute='state') | list }}" - az_public_ip_addresses_vmanage: "{{ public_ip_addresses.results | selectattr('state', 'defined') | map(attribute='state') | list }}" + az_network_interfaces_manager: "{{ (manager_nics.results + [cluster_manager_nic]) | selectattr('state', 'defined') | map(attribute='state') | list }}" + az_public_ip_addresses_manager: "{{ public_ip_addresses.results | selectattr('state', 'defined') | map(attribute='state') | list }}" -- name: Filter az_network_interfaces_vmanage for instance creation. Set az_mgmt_nic and az_transport_nic facts +- name: Filter az_network_interfaces_manager for instance creation. Set az_mgmt_nic and az_transport_nic facts ansible.builtin.set_fact: - az_mgmt_nic: "{{ az_network_interfaces_vmanage | selectattr('tags.type', 'equalto', 'mgmt') | list | first }}" - az_transport_nic: "{{ az_network_interfaces_vmanage | selectattr('tags.type', 'equalto', 'transport') | list | first }}" - az_cluster_nic: "{{ az_network_interfaces_vmanage | selectattr('tags.type', 'equalto', 'cluster') | list | first | default(omit) }}" - az_mgmt_public_ip: "{{ az_public_ip_addresses_vmanage | selectattr('tags.type', 'equalto', 'mgmt') | list | first }}" - az_transport_public_ip: "{{ az_public_ip_addresses_vmanage | selectattr('tags.type', 'equalto', 'transport') | list | first }}" + az_mgmt_nic: "{{ az_network_interfaces_manager | selectattr('tags.type', 'equalto', 'mgmt') | list | first }}" + az_transport_nic: "{{ az_network_interfaces_manager | selectattr('tags.type', 'equalto', 'transport') | list | first }}" + az_cluster_nic: "{{ az_network_interfaces_manager | selectattr('tags.type', 'equalto', 'cluster') | list | first | default(omit) }}" + az_mgmt_public_ip: "{{ az_public_ip_addresses_manager | selectattr('tags.type', 'equalto', 'mgmt') | list | first }}" + az_transport_public_ip: "{{ az_public_ip_addresses_manager | selectattr('tags.type', 'equalto', 'transport') | list | first }}" - name: Prepare nics_ids_list variable for VM creation ansible.builtin.set_fact: @@ -167,18 +167,18 @@ label: "{{ nic_item.id | default(omit) }}" when: nic_item.id is defined -- name: "Set vmanage facts" +- name: "Set Manager facts" ansible.builtin.set_fact: - vmanage_mgmt_private_ip: "{{ az_mgmt_nic.ip_configuration.private_ip_address }}" - vmanage_transport_private_ip: "{{ az_transport_nic.ip_configuration.private_ip_address }}" - vmanage_mgmt_public_ip: "{{ az_mgmt_public_ip.ip_address }}" - vmanage_transport_public_ip: "{{ az_transport_public_ip.ip_address }}" - vmanage_persona: "{{ persona | default(vmanage_default_persona) }}" + manager_mgmt_private_ip: "{{ az_mgmt_nic.ip_configuration.private_ip_address }}" + manager_transport_private_ip: "{{ az_transport_nic.ip_configuration.private_ip_address }}" + manager_mgmt_public_ip: "{{ az_mgmt_public_ip.ip_address }}" + manager_transport_public_ip: "{{ az_transport_public_ip.ip_address }}" + manager_persona: "{{ persona | default(manager_default_persona) }}" -- name: "Set vmanage cluster related facts" +- name: "Set Manager cluster related facts" ansible.builtin.set_fact: - vmanage_cluster_private_ip: "{{ az_cluster_nic.ip_configuration.private_ip_address }}" - vmanage_cluster_prefix: "{{ cluster_subnet.cidr | ansible.utils.ipaddr('prefix') }}" + manager_cluster_private_ip: "{{ az_cluster_nic.ip_configuration.private_ip_address }}" + manager_cluster_prefix: "{{ cluster_subnet.cidr | ansible.utils.ipaddr('prefix') }}" when: - az_cluster_nic is defined - cluster_subnet is defined @@ -193,32 +193,32 @@ - subnet.VPN == 0 - subnet.type == "transport" -- name: "Set path for bootstrap configuration: {{ userdata_vmanage_path }}-{{ hostname }}" +- name: "Set path for bootstrap configuration: {{ userdata_manager_path }}-{{ hostname }}" ansible.builtin.set_fact: - generated_userdata_vmanage: "{{ userdata_vmanage_path }}-{{ hostname }}" + generated_userdata_manager: "{{ userdata_manager_path }}-{{ hostname }}" changed_when: true -- name: "Template userdata file for vmanage: {{ hostname }}" +- name: "Template userdata file for Manager: {{ hostname }}" ansible.builtin.template: - src: ./userdata_vmanage.j2 - dest: "{{ generated_userdata_vmanage }}" + src: ./userdata_manager.j2 + dest: "{{ generated_userdata_manager }}" mode: "0644" -- name: "Create an image from a VHD for vManage: {{ hostname }}-image" +- name: "Create an image from a VHD for Manager: {{ hostname }}-image" azure.azcollection.azure_rm_image: resource_group: "{{ az_resource_group }}" name: "{{ hostname }}-image" location: "{{ az_location }}" os_type: "Linux" hyper_v_generation: "V1" - source: "{{ az_vmanage_image_vhd_source }}" + source: "{{ az_manager_image_vhd_source }}" -- name: "Create VM for vmanage: {{ hostname }}" +- name: "Create VM for Manager: {{ hostname }}" azure.azcollection.azure_rm_virtualmachine: resource_group: "{{ az_resource_group }}" name: "{{ hostname }}" - vm_size: "{{ az_vmanage_vm_size }}" + vm_size: "{{ az_manager_vm_size }}" admin_username: "{{ admin_username }}-tmp" # Not included in cloud init admin_password: "{{ admin_password }}" managed_disk_type: "Premium_LRS" @@ -243,25 +243,25 @@ Name: "{{ hostname }}" Creator: "{{ az_tag_creator }}" Organization: "{{ organization_name }}" - custom_data: "{{ lookup('file', generated_userdata_vmanage) }}" + custom_data: "{{ lookup('file', generated_userdata_manager) }}" -- name: "Store vManage instance details for deployment_results" +- name: "Store Manager instance details for deployment_results" ansible.builtin.set_fact: instance: hostname: "{{ hostname }}" system_ip: "{{ system_ip }}" admin_username: "{{ admin_username }}" admin_password: "{{ admin_password }}" - mgmt_public_ip: "{{ vmanage_mgmt_public_ip }}" - transport_public_ip: "{{ vmanage_transport_public_ip }}" - cluster_private_ip: "{{ vmanage_cluster_private_ip | default(omit) }}" - persona: "{{ vmanage_persona }}" + mgmt_public_ip: "{{ manager_mgmt_public_ip }}" + transport_public_ip: "{{ manager_transport_public_ip }}" + cluster_private_ip: "{{ manager_cluster_private_ip | default(omit) }}" + persona: "{{ manager_persona }}" changed_when: true notify: Show deployment_facts -- name: "Update deployment facts - vManage - that will be consumed by vManage-client in Ansible" +- name: "Update deployment facts - Manager - that will be consumed by Manager-client in Ansible" ansible.builtin.set_fact: deployment_facts: - vmanage_instances: "{{ deployment_facts.vmanage_instances + [instance] }}" - vbond_instances: "{{ deployment_facts.vbond_instances }}" - vsmart_instances: "{{ deployment_facts.vsmart_instances }}" + manager_instances: "{{ deployment_facts.manager_instances + [instance] }}" + validator_instances: "{{ deployment_facts.validator_instances }}" + controller_instances: "{{ deployment_facts.controller_instances }}" diff --git a/roles/azure_controllers/tasks/azure_vbond_vm.yml b/roles/azure_controllers/tasks/azure_validator_vm.yml similarity index 68% rename from roles/azure_controllers/tasks/azure_vbond_vm.yml rename to roles/azure_controllers/tasks/azure_validator_vm.yml index 6411ca0..1c7b63e 100644 --- a/roles/azure_controllers/tasks/azure_vbond_vm.yml +++ b/roles/azure_controllers/tasks/azure_validator_vm.yml @@ -3,7 +3,7 @@ --- -- name: "Set facts for subnets used in vManage deployment" +- name: "Set facts for subnets used in Manager deployment" ansible.builtin.set_fact: transport_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'transport') | first }}" mgmt_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'mgmt') | first }}" @@ -77,27 +77,27 @@ loop_var: public_ip_state index_var: my_idx label: public_ip_state.state.name - register: vbond_nics + register: validator_nics -- name: Set az_network_interfaces_vbond fact with a list of interfaces for vBond +- name: Set az_network_interfaces_validator fact with a list of interfaces for Validator ansible.builtin.set_fact: - az_network_interfaces_vbond: "{{ vbond_nics.results | map(attribute='state') | list }}" - az_public_ip_addresses_vbond: "{{ public_ip_addresses.results | map(attribute='state') | list }}" + az_network_interfaces_validator: "{{ validator_nics.results | map(attribute='state') | list }}" + az_public_ip_addresses_validator: "{{ public_ip_addresses.results | map(attribute='state') | list }}" -- name: Filter az_network_interfaces_vbond for instance creation. Set az_mgmt_nic and az_transport_nic facts +- name: Filter az_network_interfaces_validator for instance creation. Set az_mgmt_nic and az_transport_nic facts ansible.builtin.set_fact: - az_mgmt_nic: "{{ az_network_interfaces_vbond | selectattr('tags.VPN', 'equalto', '512') | list | first }}" - az_transport_nic: "{{ az_network_interfaces_vbond | selectattr('tags.VPN', 'equalto', '0') | list | first }}" - az_mgmt_public_ip: "{{ az_public_ip_addresses_vbond | selectattr('tags.VPN', 'equalto', '512') | list | first }}" - az_transport_public_ip: "{{ az_public_ip_addresses_vbond | selectattr('tags.VPN', 'equalto', '0') | list | first }}" + az_mgmt_nic: "{{ az_network_interfaces_validator | selectattr('tags.VPN', 'equalto', '512') | list | first }}" + az_transport_nic: "{{ az_network_interfaces_validator | selectattr('tags.VPN', 'equalto', '0') | list | first }}" + az_mgmt_public_ip: "{{ az_public_ip_addresses_validator | selectattr('tags.VPN', 'equalto', '512') | list | first }}" + az_transport_public_ip: "{{ az_public_ip_addresses_validator | selectattr('tags.VPN', 'equalto', '0') | list | first }}" -# vbond_mgmt_private_ip -- name: "Set ip addresses vbond facts" +# validator_mgmt_private_ip +- name: "Set ip addresses validator facts" ansible.builtin.set_fact: - vbond_mgmt_private_ip: "{{ az_mgmt_nic.ip_configuration.private_ip_address }}" - vbond_transport_private_ip: "{{ az_transport_nic.ip_configuration.private_ip_address }}" - vbond_mgmt_public_ip: "{{ az_mgmt_public_ip.ip_address }}" - vbond_transport_public_ip: "{{ az_transport_public_ip.ip_address }}" + validator_mgmt_private_ip: "{{ az_mgmt_nic.ip_configuration.private_ip_address }}" + validator_transport_private_ip: "{{ az_transport_nic.ip_configuration.private_ip_address }}" + validator_mgmt_public_ip: "{{ az_mgmt_public_ip.ip_address }}" + validator_transport_public_ip: "{{ az_transport_public_ip.ip_address }}" - name: "Set vpn0_default_gateway fact from VPN 0 subnet value" ansible.builtin.set_fact: @@ -109,15 +109,15 @@ loop_var: subnet_item when: subnet_item.VPN == 0 -- name: "Set path for bootstrap configuration: {{ userdata_vbond_path }}-{{ hostname }}" +- name: "Set path for bootstrap configuration: {{ userdata_validator_path }}-{{ hostname }}" ansible.builtin.set_fact: - generated_userdata_vbond: "{{ userdata_vbond_path }}-{{ hostname }}" + generated_userdata_validator: "{{ userdata_validator_path }}-{{ hostname }}" changed_when: true -- name: "Template userdata file for vBond: {{ hostname }}" +- name: "Template userdata file for Validator: {{ hostname }}" ansible.builtin.template: - src: ./userdata_vbond.j2 # ./bond.j2 ./userdata_vbond.j2 - dest: "{{ generated_userdata_vbond }}" + src: ./userdata_validator.j2 # ./bond.j2 ./userdata_validator.j2 + dest: "{{ generated_userdata_validator }}" mode: "0644" # # Note for image: @@ -129,20 +129,20 @@ # # For custom images, the name of the image. To narrow the search to a specific resource group, a dict with the keys name and resource_group. # # For Marketplace images, a dict with the keys publisher, offer, sku, and version. -- name: "Create an image from a VHD for vBond: {{ hostname }}-image" +- name: "Create an image from a VHD for Validator: {{ hostname }}-image" azure.azcollection.azure_rm_image: resource_group: "{{ az_resource_group }}" name: "{{ hostname }}-image" location: "{{ az_location }}" os_type: "Linux" hyper_v_generation: "V1" - source: "{{ az_vbond_image_vhd_source }}" + source: "{{ az_validator_image_vhd_source }}" -- name: "Create vBond VM: {{ hostname }}" +- name: "Create Validator VM: {{ hostname }}" azure.azcollection.azure_rm_virtualmachine: resource_group: "{{ az_resource_group }}" name: "{{ hostname }}" - vm_size: "{{ az_vbond_vm_size }}" + vm_size: "{{ az_validator_vm_size }}" ssh_password_enabled: true admin_username: "{{ admin_username }}-tmp" admin_password: "{{ admin_password }}" @@ -167,23 +167,23 @@ Name: "{{ hostname }}" Creator: "{{ az_tag_creator }}" Organization: "{{ organization_name }}" - custom_data: "{{ lookup('file', generated_userdata_vbond) }}" + custom_data: "{{ lookup('file', generated_userdata_validator) }}" -- name: Store vBond instance details for deployment_results +- name: Store Validator instance details for deployment_results ansible.builtin.set_fact: instance: hostname: "{{ hostname }}" system_ip: "{{ system_ip }}" admin_username: "{{ admin_username }}" admin_password: "{{ admin_password }}" - mgmt_public_ip: "{{ vbond_mgmt_public_ip }}" - transport_public_ip: "{{ vbond_transport_public_ip }}" + mgmt_public_ip: "{{ validator_mgmt_public_ip }}" + transport_public_ip: "{{ validator_transport_public_ip }}" changed_when: true notify: Show deployment_facts -- name: Update deployment facts - vBond - that will be consumed by vManage-client in Ansible +- name: Update deployment facts - Validator - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: - vbond_instances: "{{ deployment_facts.vbond_instances + [instance] }}" - vmanage_instances: "{{ deployment_facts.vmanage_instances }}" - vsmart_instances: "{{ deployment_facts.vsmart_instances }}" + validator_instances: "{{ deployment_facts.validator_instances + [instance] }}" + manager_instances: "{{ deployment_facts.manager_instances }}" + controller_instances: "{{ deployment_facts.controller_instances }}" diff --git a/roles/azure_controllers/tasks/generate_deployment_facts.yml b/roles/azure_controllers/tasks/generate_deployment_facts.yml index 2ee7b0e..9cbdbb9 100644 --- a/roles/azure_controllers/tasks/generate_deployment_facts.yml +++ b/roles/azure_controllers/tasks/generate_deployment_facts.yml @@ -11,7 +11,7 @@ ansible.builtin.set_fact: _additional: organization_name: "{{ organization_name }}" - vbond_transport_public_ip: "{{ vbond_transport_public_ip | default('null', true) }}" + validator_transport_public_ip: "{{ validator_transport_public_ip | default('null', true) }}" - name: Update deployment facts with additional variables ansible.builtin.set_fact: diff --git a/roles/azure_controllers/tasks/main.yml b/roles/azure_controllers/tasks/main.yml index 3377640..8ce2678 100644 --- a/roles/azure_controllers/tasks/main.yml +++ b/roles/azure_controllers/tasks/main.yml @@ -18,7 +18,7 @@ - instance_item.hostname | length > 0 - instance_item.hostname | length <= 32 fail_msg: "Verification for hostname failed, wrong hostname: {{ instance_item.hostname }}" - loop: "{{ vmanage_instances + vbond_instances + vsmart_instances }}" + loop: "{{ manager_instances + validator_instances + controller_instances }}" loop_control: loop_var: instance_item label: "{{ instance_item.hostname }}" @@ -38,98 +38,99 @@ name: common tasks_from: az_existing_instances.yml vars: - instances_marked_for_deployment: "{{ vmanage_instances + vbond_instances + vsmart_instances }}" + instances_marked_for_deployment: "{{ manager_instances + validator_instances + controller_instances }}" -- name: Define deployment facts - that will be consumed by vManage-client in Ansible +- name: Define deployment facts - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: - vbond_instances: [] - vmanage_instances: [] - vsmart_instances: [] + validator_instances: [] + manager_instances: [] + controller_instances: [] -- name: Deploy vBond - Create Virtual Machines - ansible.builtin.include_tasks: azure_vbond_vm.yml +- name: Deploy Validator - Create Virtual Machines + ansible.builtin.include_tasks: azure_validator_vm.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" - loop: "{{ vbond_instances }}" + loop: "{{ validator_instances }}" loop_control: loop_var: instance_item - when: vbond_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) + when: validator_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) -- name: "Check if vbond_transport_public_ip is defined" +- name: "Check if validator_transport_public_ip is defined" ansible.builtin.pause: prompt: | - Current run of playbook will not deploy or redeploy vBond machine. - In order to correctly build overlay network, vbond transport public ip is required. - Please provide value for vbond_transport_public_ip or leave empty for default one (192.168.1.199) + Current run of playbook will not deploy or redeploy Validator machine. + In order to correctly build overlay network, validator transport public ip is required. + Please provide value for validator_transport_public_ip or leave empty for default one (192.168.1.199) when: - - vbond_transport_public_ip is not defined - - vbond_instances is defined - - (vbond_instances | first).hostname in instances_info or instances_info[(vbond_instances | first).hostname] + - validator_transport_public_ip is not defined + - validator_instances is defined + - (validator_instances | first).hostname in instances_info or instances_info[(validator_instances | first).hostname] register: user_response -- name: "Verify user input for vbond_transport_public_ip if provided" +- name: "Verify user input for validator_transport_public_ip if provided" when: - user_response is defined - user_response.user_input is defined block: - - name: "Set vbond_transport_public_ip variable from user input if provided" + - name: "Set validator_transport_public_ip variable from user input if provided" ansible.builtin.set_fact: - vbond_transport_public_ip: "{{ user_response.user_input if user_response.user_input != '' else default_vbond_ip }}" + validator_transport_public_ip: "{{ user_response.user_input if user_response.user_input != '' else default_validator_ip }}" - - name: "Validate vbond_transport_public_ip input" + - name: "Validate validator_transport_public_ip input" ansible.builtin.fail: - msg: "Invalid input '{{ vbond_transport_public_ip }}'. You must enter valid ip address or leave empty for default." + msg: "Invalid input '{{ validator_transport_public_ip }}'. You must enter valid ip address or leave empty for default." when: - - not (vbond_transport_public_ip is ansible.utils.ipv4) + - not (validator_transport_public_ip is ansible.utils.ipv4) - - name: "Show provided value for vbond_transport_public_ip" + - name: "Show provided value for validator_transport_public_ip" ansible.builtin.debug: msg: | - User provided value for vbond_transport_public_ip: + User provided value for validator_transport_public_ip: - {{ vbond_transport_public_ip }} + {{ validator_transport_public_ip }} -- name: "Deploy vSmart - Create Virtual Machines" - ansible.builtin.include_tasks: azure_vsmart_vm.yml +- name: "Deploy Controller - Create Virtual Machines" + ansible.builtin.include_tasks: azure_controller_vm.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" - loop: "{{ vsmart_instances }}" + loop: "{{ controller_instances }}" loop_control: loop_var: instance_item - when: vsmart_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) + when: controller_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) -- name: "Deploy vManage - Create Virtual Machines" - ansible.builtin.include_tasks: azure_vmanage_vm.yml +- name: "Deploy Manager - Create Virtual Machines" + ansible.builtin.include_tasks: azure_manager_vm.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" persona: "{{ instance_item.persona }}" - loop: "{{ vmanage_instances }}" + loop: "{{ manager_instances }}" loop_control: loop_var: instance_item - when: vmanage_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) + when: manager_instances is defined and (instance_item.hostname not in instances_info or not instances_info[instance_item.hostname]) - name: "Extract deployment facts" ansible.builtin.include_role: name: common tasks_from: generate_deployment_facts_controllers.yml - when: deployment_facts.vbond_instances | length > 0 or deployment_facts.vmanage_instances | length > 0 or deployment_facts.vsmart_instances | length > 0 + when: > + deployment_facts.validator_instances | length > 0 or deployment_facts.manager_instances | length > 0 or deployment_facts.controller_instances | length > 0 -- name: "Check reachability of vManage instance with SSH probe" +- name: "Check reachability of Manager instance with SSH probe" ansible.builtin.include_role: name: common tasks_from: wait_for_ssh_readiness vars: ssh_readiness_delay: 60 ssh_readiness_timeout: 900 - ssh_readiness_instances: "{{ deployment_facts.vmanage_instances }}" - when: vmanage_instances is defined and deployment_facts.vmanage_instances | length > 0 + ssh_readiness_instances: "{{ deployment_facts.manager_instances }}" + when: manager_instances is defined and deployment_facts.manager_instances | length > 0 diff --git a/roles/azure_controllers/templates/userdata_vsmart.j2 b/roles/azure_controllers/templates/userdata_controller.j2 similarity index 96% rename from roles/azure_controllers/templates/userdata_vsmart.j2 rename to roles/azure_controllers/templates/userdata_controller.j2 index 31f9274..4f637e2 100644 --- a/roles/azure_controllers/templates/userdata_vsmart.j2 +++ b/roles/azure_controllers/templates/userdata_controller.j2 @@ -27,7 +27,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_public_ip | default(default_vbond_ip) }} + {{ validator_transport_public_ip | default(default_validator_ip) }} diff --git a/roles/azure_controllers/templates/userdata_vmanage.j2 b/roles/azure_controllers/templates/userdata_manager.j2 similarity index 94% rename from roles/azure_controllers/templates/userdata_vmanage.j2 rename to roles/azure_controllers/templates/userdata_manager.j2 index 623d0ec..f0d607a 100644 --- a/roles/azure_controllers/templates/userdata_vmanage.j2 +++ b/roles/azure_controllers/templates/userdata_manager.j2 @@ -28,7 +28,7 @@ write_files: - path: /opt/web-app/etc/persona owner: vmanage:vmanage-admin permissions: '0644' - content: '{"persona":"{{ vmanage_persona }}"}' + content: '{"persona":"{{ manager_persona }}"}' - path: /etc/default/personality content: "vmanage\n" - path: /etc/default/inited @@ -45,7 +45,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_public_ip | default(default_vbond_ip) }} + {{ validator_transport_public_ip | default(default_validator_ip) }} local @@ -101,12 +101,12 @@ write_files: -{% if vmanage_cluster_private_ip is defined %} +{% if manager_cluster_private_ip is defined %} - path: /home/admin/customized.cfg content: | vpn 0 interface eth2 - ip address {{ vmanage_cluster_private_ip }}/{{ vmanage_cluster_prefix }} + ip address {{ manager_cluster_private_ip }}/{{ manager_cluster_prefix }} no shutdown ! ! diff --git a/roles/azure_controllers/templates/userdata_vbond.j2 b/roles/azure_controllers/templates/userdata_validator.j2 similarity index 96% rename from roles/azure_controllers/templates/userdata_vbond.j2 rename to roles/azure_controllers/templates/userdata_validator.j2 index d1d4e8b..424d037 100644 --- a/roles/azure_controllers/templates/userdata_vbond.j2 +++ b/roles/azure_controllers/templates/userdata_validator.j2 @@ -27,7 +27,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_private_ip | default(default_vbond_ip) }} + {{ validator_transport_private_ip | default(default_validator_ip) }} diff --git a/roles/azure_controllers/vars/main.yml b/roles/azure_controllers/vars/main.yml index ea398a1..1cd2b00 100644 --- a/roles/azure_controllers/vars/main.yml +++ b/roles/azure_controllers/vars/main.yml @@ -9,6 +9,6 @@ results_dir: "{{ playbook_dir }}/results" # Path to templated userdata config -userdata_vmanage_path: "{{ results_dir }}/.userdata_vmanage" -userdata_vbond_path: "{{ results_dir }}/.userdata_vbond" -userdata_vsmart_path: "{{ results_dir }}/.userdata_vsmart" +userdata_manager_path: "{{ results_dir }}/.userdata_manager" +userdata_validator_path: "{{ results_dir }}/.userdata_validator" +userdata_controller_path: "{{ results_dir }}/.userdata_controller" diff --git a/roles/azure_device_params/README.md b/roles/azure_device_params/README.md index 2abb6f5..bcff0bf 100644 --- a/roles/azure_device_params/README.md +++ b/roles/azure_device_params/README.md @@ -11,7 +11,7 @@ The `azure_device_params` role generates deployment facts for already deployed c - `mgmt_public_ip` - `transport_public_ip` - `service_interfaces` -Additionally the role sets the `manager_authentication` variable, which can be used for logging to vManage in other roles. +Additionally the role sets the `manager_authentication` variable, which can be used for logging to Manager in other roles. ## Requirements diff --git a/roles/azure_device_params/tasks/main.yml b/roles/azure_device_params/tasks/main.yml index a2a6460..a340ac3 100644 --- a/roles/azure_device_params/tasks/main.yml +++ b/roles/azure_device_params/tasks/main.yml @@ -17,7 +17,7 @@ ansible.builtin.set_fact: manager_authentication: url: "{{ public_ip_info.publicipaddresses | - selectattr('tags.Machine', 'search', 'vManage') | + selectattr('tags.Machine', 'search', 'Manager') | selectattr('tags.type', 'equalto', 'mgmt') | map(attribute='ip_address') | list | first }}" diff --git a/roles/azure_edges/README.md b/roles/azure_edges/README.md index b879d85..46afbf6 100644 --- a/roles/azure_edges/README.md +++ b/roles/azure_edges/README.md @@ -43,7 +43,7 @@ Variables with default values that can be overridden by the user: - `az_resource_group`, `az_virtual_network`, `az_vn_address_prefixes_cidr`, `az_subnets`, `az_network_security_group`: Default configurations for Azure networking resources. - `az_allowed_subnets`: VPN subnets allowed for Azure public IP connections. Should be defined by the user. - `admin_username`, `admin_password`: Default admin credentials for cEdge instances. -- `vbond_port`, `default_vbond_ip`: Default configurations for vBond. +- `validator_port`, `default_validator_ip`: Default configurations for Validator. - `az_cedge_vm_size`: Default Azure VM size for cEdge instances. - `edge_instances`: List of cEdge instance configurations. If not provided, instances will be created based on PnP Portal information. diff --git a/roles/azure_edges/defaults/main.yml b/roles/azure_edges/defaults/main.yml index 97df05b..cd792e8 100644 --- a/roles/azure_edges/defaults/main.yml +++ b/roles/azure_edges/defaults/main.yml @@ -31,7 +31,7 @@ az_subnets: | cidr: "10.0.2.0/24" VPN: 0 type: transport - {% if vmanage_instances is defined and vmanage_instances | length > 2 %} + {% if manager_instances is defined and manager_instances | length > 2 %} - name: "{{ az_resources_prefix }}-cluster-subnet-0" cidr: "10.0.3.0/24" VPN: 0 @@ -60,8 +60,8 @@ az_allowed_subnets: null # Cloud-init general configurations admin_username: admin admin_password: example_password # pragma: allowlist secret -vbond_port: 12346 -default_vbond_ip: 192.168.1.199 +validator_port: 12346 +default_validator_ip: 192.168.1.199 # vpn0_interface_color: default ################################ diff --git a/roles/azure_edges/tasks/azure_cedge_vm.yml b/roles/azure_edges/tasks/azure_cedge_vm.yml index 67378e9..96ebd64 100644 --- a/roles/azure_edges/tasks/azure_cedge_vm.yml +++ b/roles/azure_edges/tasks/azure_cedge_vm.yml @@ -3,7 +3,7 @@ --- -- name: "Set facts for subnets used in vManage deployment" +- name: "Set facts for subnets used in Manager deployment" ansible.builtin.set_fact: transport_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'transport') | first }}" mgmt_subnet: "{{ az_subnets | selectattr('type', 'equalto', 'mgmt') | first }}" @@ -227,7 +227,7 @@ changed_when: true notify: Show deployment_facts -- name: Update deployment facts - cedge - that will be consumed by vManage-client in Ansible +- name: Update deployment facts - cedge - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: deployed_edge_instances: "{{ deployment_facts.deployed_edge_instances + [instance] }}" diff --git a/roles/azure_edges/tasks/main.yml b/roles/azure_edges/tasks/main.yml index f61e244..0120fa9 100644 --- a/roles/azure_edges/tasks/main.yml +++ b/roles/azure_edges/tasks/main.yml @@ -40,7 +40,7 @@ vars: instances_marked_for_deployment: "{{ edge_instances }}" -- name: Define deployment facts - that will be consumed by vManage-client in Ansible +- name: Define deployment facts - that will be consumed by Manager-client in Ansible ansible.builtin.set_fact: deployment_facts: deployed_edge_instances: [] @@ -51,7 +51,7 @@ hostname: "{{ instance_item.hostname | replace('_', '-') }}" uuid: "{{ instance_item.uuid }}" otp: "{{ instance_item.otp }}" - vbond: "{{ instance_item.vbond }}" + validator: "{{ instance_item.validator }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" loop: "{{ edge_instances }}" diff --git a/roles/azure_edges/templates/userdata_cedge.j2 b/roles/azure_edges/templates/userdata_cedge.j2 index 40802e6..693d439 100644 --- a/roles/azure_edges/templates/userdata_cedge.j2 +++ b/roles/azure_edges/templates/userdata_cedge.j2 @@ -12,7 +12,7 @@ vinitparam: - uuid : {{ uuid }} - otp : {{ otp }} - org : {{ organization_name }} - - vbond: {{ vbond }} + - vbond: {{ validator }} --===============0630588950316195806== @@ -44,7 +44,7 @@ Content-Disposition: attachment; filename="config-{{ uuid }}.txt" config-template-name Default_Azure_vWAN_C8000V_Template_V01 no on-demand enable on-demand idle-timeout 10 - vbond {{ vbond }} port {{ vbond_port }} + vbond {{ validator }} port {{ validator_port }} ! bfd color lte hello-interval 1000 diff --git a/roles/azure_network_infrastructure/defaults/main.yml b/roles/azure_network_infrastructure/defaults/main.yml index 0d8ef89..ba9365c 100644 --- a/roles/azure_network_infrastructure/defaults/main.yml +++ b/roles/azure_network_infrastructure/defaults/main.yml @@ -31,7 +31,7 @@ az_subnets: | cidr: "10.0.2.0/24" VPN: 0 type: transport - {% if vmanage_instances is defined and vmanage_instances | length > 2 %} + {% if manager_instances is defined and manager_instances | length > 2 %} - name: "{{ az_resources_prefix }}-cluster-subnet-0" cidr: "10.0.3.0/24" VPN: 0 diff --git a/roles/common/defaults/aws_required_vars_controllers.yml b/roles/common/defaults/aws_required_vars_controllers.yml index 00de4e6..5a94b1b 100644 --- a/roles/common/defaults/aws_required_vars_controllers.yml +++ b/roles/common/defaults/aws_required_vars_controllers.yml @@ -11,6 +11,6 @@ required_variables: aws_vpc_config: "{{ aws_vpc_config }}" aws_security_group_config: "{{ aws_security_group_config }}" aws_subnets_config: "{{ aws_subnets_config }}" - aws_vmanage_ami_id: "{{ aws_vmanage_ami_id }}" - aws_vbond_ami_id: "{{ aws_vbond_ami_id }}" - aws_vsmart_ami_id: "{{ aws_vsmart_ami_id }}" + aws_manager_ami_id: "{{ aws_manager_ami_id }}" + aws_validator_ami_id: "{{ aws_validator_ami_id }}" + aws_controller_ami_id: "{{ aws_controller_ami_id }}" diff --git a/roles/common/defaults/required_vars_cloudinit.yml b/roles/common/defaults/required_vars_cloudinit.yml index e953623..273ad68 100644 --- a/roles/common/defaults/required_vars_cloudinit.yml +++ b/roles/common/defaults/required_vars_cloudinit.yml @@ -4,18 +4,18 @@ --- required_variables: "{{ (required_variables_options['core'] - | combine(required_variables_options['vbond'] if vbond_instances | default({}) else {}) - | combine(required_variables_options['vmanage'] if vmanage_instances | default({}) else {}) - | combine(required_variables_options['vsmart'] if vsmart_instances | default({}) else {})) }}" + | combine(required_variables_options['validator'] if validator_instances | default({}) else {}) + | combine(required_variables_options['manager'] if manager_instances | default({}) else {}) + | combine(required_variables_options['controller'] if controller_instances | default({}) else {})) }}" required_variables_options: core: organization_name: "{{ organization_name }}" admin_username: "{{ admin_username }}" admin_password: "{{ admin_password }}" - vbond: - vbond_transport_private_ip: "{{ vbond_transport_private_ip }}" - vmanage: - vbond_transport_public_ip: "{{ vbond_transport_public_ip }}" - vsmart: - vbond_transport_public_ip: "{{ vbond_transport_public_ip }}" + validator: + validator_transport_private_ip: "{{ validator_transport_private_ip }}" + manager: + validator_transport_public_ip: "{{ validator_transport_public_ip }}" + controller: + validator_transport_public_ip: "{{ validator_transport_public_ip }}" diff --git a/roles/common/tasks/generate_deployment_facts_controllers.yml b/roles/common/tasks/generate_deployment_facts_controllers.yml index 2ee7b0e..9cbdbb9 100644 --- a/roles/common/tasks/generate_deployment_facts_controllers.yml +++ b/roles/common/tasks/generate_deployment_facts_controllers.yml @@ -11,7 +11,7 @@ ansible.builtin.set_fact: _additional: organization_name: "{{ organization_name }}" - vbond_transport_public_ip: "{{ vbond_transport_public_ip | default('null', true) }}" + validator_transport_public_ip: "{{ validator_transport_public_ip | default('null', true) }}" - name: Update deployment facts with additional variables ansible.builtin.set_fact: diff --git a/roles/template_cloudinit/README.md b/roles/template_cloudinit/README.md index 063e760..50183b3 100644 --- a/roles/template_cloudinit/README.md +++ b/roles/template_cloudinit/README.md @@ -10,14 +10,14 @@ The `template_cloudinit` role executes the following tasks: - Validates the cloud provider input. - Asserts the presence of all required variables for cloudinit generation. - Prepares a directory to store the generated cloudinit files. -- Generates cloudinit templates for vBond, vManage, vSmart, and cEdge instances. +- Generates cloudinit templates for Validator, Manager, Controller, and cEdge instances. - Displays the location and list of generated cloudinit files to the user. ## Requirements - The `cisco.sdwan_deployment` collection installed. - Ansible 2.16 or higher. -- Jinja2 templates for cloud-init userdata scripts corresponding to each type of device (vBond, vManage, vSmart, cEdge). +- Jinja2 templates for cloud-init userdata scripts corresponding to each type of device (Validator, Manager, Controller, cEdge). ## Dependencies @@ -30,13 +30,13 @@ The `template_cloudinit` role executes the following tasks: Variables with default values that the user may need to override: - `results_dir`: Directory to store generated cloudinit files. -- `userdata_vmanage_path`, `userdata_vbond_path`, `userdata_vsmart_path`: Paths to templated userdata configurations for respective SD-WAN controllers. +- `userdata_manager_path`, `userdata_validator_path`, `userdata_controller_path`: Paths to templated userdata configurations for respective SD-WAN controllers. - `admin_username`, `admin_password`: Default admin credentials used in userdata scripts. -- `vbond_port`, `default_vbond_ip`: Default configurations for vBond. -- `vbond_transport_private_ip`, `vbond_transport_public_ip`: IPs for vBond, to be defined by the user if static IPs are used. -- `site_id_vmanage`, `vmanage_instances`: Site ID and list of vManage instances. -- `site_id_vbond`, `vbond_instances`: Site ID and list of vBond instances. -- `site_id_vsmart`, `vsmart_instances`: Site ID and list of vSmart instances. +- `validator_port`, `default_validator_ip`: Default configurations for Validator. +- `validator_transport_private_ip`, `validator_transport_public_ip`: IPs for Validator, to be defined by the user if static IPs are used. +- `site_id_manager`, `manager_instances`: Site ID and list of Manager instances. +- `site_id_validator`, `validator_instances`: Site ID and list of Validator instances. +- `site_id_controller`, `controller_instances`: Site ID and list of Controller instances. - `edge_instances`: List of cEdge instances. ### Required Variables @@ -44,8 +44,8 @@ Variables with default values that the user may need to override: - `organization_name`: The name of your organization, referenced in the cloud init configuration. - `admin_username`: The administrative username for initial server setup. - `admin_password`: The administrative password for initial server setup. -- `vbond_transport_private_ip`: The private IP address for vBond's transport interface. -- `vbond_transport_public_ip`: The public IP address for vBond's transport interface. +- `validator_transport_private_ip`: The private IP address for Validator's transport interface. +- `validator_transport_public_ip`: The public IP address for Validator's transport interface. ## Example Playbook diff --git a/roles/template_cloudinit/defaults/main.yml b/roles/template_cloudinit/defaults/main.yml index 80afaf0..c4f94f2 100644 --- a/roles/template_cloudinit/defaults/main.yml +++ b/roles/template_cloudinit/defaults/main.yml @@ -10,9 +10,9 @@ organization_name: null # has to be set by user results_dir: "{{ playbook_dir }}/results" # Path to templated userdata config -userdata_vmanage_path: "{{ results_dir }}/.userdata_vmanage" -userdata_vbond_path: "{{ results_dir }}/.userdata_vbond" -userdata_vsmart_path: "{{ results_dir }}/.userdata_vsmart" +userdata_manager_path: "{{ results_dir }}/.userdata_manager" +userdata_validator_path: "{{ results_dir }}/.userdata_validator" +userdata_controller_path: "{{ results_dir }}/.userdata_controller" ########################################## @@ -22,27 +22,27 @@ userdata_vsmart_path: "{{ results_dir }}/.userdata_vsmart" # Cloud-init general configurations admin_username: admin admin_password: example_password # pragma: allowlist secret -vbond_port: 12346 -default_vbond_ip: 192.168.1.199 # default ips from official Cisco guides -vbond_transport_private_ip: null -vbond_transport_public_ip: null +validator_port: 12346 +default_validator_ip: 192.168.1.199 # default ips from official Cisco guides +validator_transport_private_ip: null +validator_transport_public_ip: null ############################### # Controllers # ############################### -# vManage -site_id_vmanage: 100 -vmanage_instances: [] +# Manager +site_id_manager: 100 +manager_instances: [] -# vBond -site_id_vbond: 200 -vbond_instances: [] +# Validator +site_id_validator: 200 +validator_instances: [] -# vSmart -site_id_vsmart: 300 -vsmart_instances: [] +# Controller +site_id_controller: 300 +controller_instances: [] # cedge C8000K edge_instances: [] diff --git a/roles/template_cloudinit/tasks/main.yml b/roles/template_cloudinit/tasks/main.yml index 4a4fed3..bfb6773 100644 --- a/roles/template_cloudinit/tasks/main.yml +++ b/roles/template_cloudinit/tasks/main.yml @@ -44,52 +44,52 @@ ansible.builtin.set_fact: generated_files: [] -# cloud-init vBond data requires information about private IP assigned to mgmt interface -# cloud-init templates require information about vBond IP -# vbond_mgmt_private_ip & ec2_vbond_mgmt_public_ip -# That are the reasons why vBond has to go up first (if we will use static IPs it can be changed) +# cloud-init Validator data requires information about private IP assigned to mgmt interface +# cloud-init templates require information about Validator IP +# validator_mgmt_private_ip & ec2_validator_mgmt_public_ip +# That are the reasons why Validator has to go up first (if we will use static IPs it can be changed) -- name: "Generate cloudinit template for vBond instances" +- name: "Generate cloudinit template for Validator instances" ansible.builtin.include_tasks: template_cloudinit.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" vpn0_default_gateway: "{{ instance_item.vpn0_default_gateway }}" - template_path: "./userdata_vbond.j2" + template_path: "./userdata_validator.j2" generated_cloudinit_path: "{{ cloudinit_path | default('') }}" - loop: "{{ vbond_instances }}" + loop: "{{ validator_instances }}" loop_control: loop_var: instance_item - when: vbond_instances is defined + when: validator_instances is defined -- name: "Generate cloudinit template for vManage instances" +- name: "Generate cloudinit template for Manager instances" ansible.builtin.include_tasks: template_cloudinit.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" vpn0_default_gateway: "{{ instance_item.vpn0_default_gateway }}" - template_path: "./userdata_vmanage.j2" + template_path: "./userdata_manager.j2" generated_cloudinit_path: "{{ cloudinit_path | default('') }}" - loop: "{{ vmanage_instances }}" + loop: "{{ manager_instances }}" loop_control: loop_var: instance_item - when: vmanage_instances is defined + when: manager_instances is defined -- name: "Generate cloudinit template for vSmart instances" +- name: "Generate cloudinit template for Controller instances" ansible.builtin.include_tasks: template_cloudinit.yml vars: hostname: "{{ instance_item.hostname }}" system_ip: "{{ instance_item.system_ip }}" site_id: "{{ instance_item.site_id }}" vpn0_default_gateway: "{{ instance_item.vpn0_default_gateway }}" - template_path: "./userdata_vsmart.j2" + template_path: "./userdata_controller.j2" generated_cloudinit_path: "{{ cloudinit_path | default('') }}" - loop: "{{ vsmart_instances }}" + loop: "{{ controller_instances }}" loop_control: loop_var: instance_item - when: vsmart_instances is defined + when: controller_instances is defined - name: "Generate cloudinit template for cEdge instances" ansible.builtin.include_tasks: template_cloudinit.yml @@ -99,7 +99,7 @@ site_id: "{{ instance_item.site_id }}" otp: "{{ instance_item.otp }}" uuid: "{{ instance_item.uuid }}" - vbond: "{{ instance_item.vbond }}" + validator: "{{ instance_item.validator }}" template_path: "./userdata_cedge.j2" generated_cloudinit_path: "{{ cloudinit_path | default('') }}" loop: "{{ edge_instances }}" diff --git a/roles/template_cloudinit/templates/userdata_cedge.j2 b/roles/template_cloudinit/templates/userdata_cedge.j2 index 40802e6..693d439 100644 --- a/roles/template_cloudinit/templates/userdata_cedge.j2 +++ b/roles/template_cloudinit/templates/userdata_cedge.j2 @@ -12,7 +12,7 @@ vinitparam: - uuid : {{ uuid }} - otp : {{ otp }} - org : {{ organization_name }} - - vbond: {{ vbond }} + - vbond: {{ validator }} --===============0630588950316195806== @@ -44,7 +44,7 @@ Content-Disposition: attachment; filename="config-{{ uuid }}.txt" config-template-name Default_Azure_vWAN_C8000V_Template_V01 no on-demand enable on-demand idle-timeout 10 - vbond {{ vbond }} port {{ vbond_port }} + vbond {{ validator }} port {{ validator_port }} ! bfd color lte hello-interval 1000 diff --git a/roles/template_cloudinit/templates/userdata_vsmart.j2 b/roles/template_cloudinit/templates/userdata_controller.j2 similarity index 96% rename from roles/template_cloudinit/templates/userdata_vsmart.j2 rename to roles/template_cloudinit/templates/userdata_controller.j2 index e58aeb5..f2fb6dc 100644 --- a/roles/template_cloudinit/templates/userdata_vsmart.j2 +++ b/roles/template_cloudinit/templates/userdata_controller.j2 @@ -32,7 +32,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_public_ip | default(default_vbond_ip) }} + {{ validator_transport_public_ip | default(default_validator_ip) }} diff --git a/roles/template_cloudinit/templates/userdata_vmanage.j2 b/roles/template_cloudinit/templates/userdata_manager.j2 similarity index 95% rename from roles/template_cloudinit/templates/userdata_vmanage.j2 rename to roles/template_cloudinit/templates/userdata_manager.j2 index a06bb58..c72b484 100644 --- a/roles/template_cloudinit/templates/userdata_vmanage.j2 +++ b/roles/template_cloudinit/templates/userdata_manager.j2 @@ -63,9 +63,9 @@ write_files: {{ system_ip }} {{ organization_name }} {{ organization_name }} - {{ site_id_vmanage }} + {{ site_id_manager }} - {{ vbond_transport_public_ip | default(default_vbond_ip) }} + {{ validator_transport_public_ip | default(default_validator_ip) }} local diff --git a/roles/template_cloudinit/templates/userdata_vbond.j2 b/roles/template_cloudinit/templates/userdata_validator.j2 similarity index 96% rename from roles/template_cloudinit/templates/userdata_vbond.j2 rename to roles/template_cloudinit/templates/userdata_validator.j2 index 4a884ac..227b8e5 100644 --- a/roles/template_cloudinit/templates/userdata_vbond.j2 +++ b/roles/template_cloudinit/templates/userdata_validator.j2 @@ -32,7 +32,7 @@ write_files: {{ organization_name }} {{ site_id }} - {{ vbond_transport_private_ip | default(default_vbond_ip) }} + {{ validator_transport_private_ip | default(default_validator_ip) }}