Skip to content

Commit

Permalink
new playbooks for cluster deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
przsus committed Oct 24, 2024
1 parent c036623 commit 5a08373
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 28 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ mock_roles:
- cisco.catalystwan.software_upgrades_remote
- cisco.catalystwan.api_ready
- cisco.catalystwan.administration_settings
- cisco.catalystwan.cluster
- cisco.catalystwan.onboarding_controllers
- cisco.catalystwan.sync_pnp_edges
- cisco.catalystwan.activate_edges
Expand Down
101 changes: 101 additions & 0 deletions playbooks/aws/cluster_deploy_and_configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Copyright 2024 Cisco Systems, Inc. and its affiliates
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)


# Deploy Cisco SD-WAN on AWS
- name: Deploy Cisco SD-WAN versions 20.13 on AWS
hosts: localhost
gather_facts: false
vars_files:
./aws_sdwan_config.yml
tasks:
roles:
- cisco.sdwan_deployment.aws_network_infrastructure
- cisco.sdwan_deployment.aws_controllers


- name: Verify server connectivity, set initial configuration, onboard controllers
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
roles:
- cisco.catalystwan.api_ready
- cisco.catalystwan.administration_settings
- cisco.catalystwan.onboarding_controllers


- name: Cluster configuration
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
roles:
- cisco.catalystwan.cluster


- name: Generate bootstrap configuration for synced edges
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
roles:
- cisco.catalystwan.sync_pnp_edges


# Deploying edges requires vbond_mgmt_public_ip, otp and uuid!
- name: Deploy Edge devices based on generated boostrap configuration
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ deployment_edges_config }}"
roles:
- cisco.sdwan_deployment.aws_edges


# Onboard edge devices and wait for their reachability
- name: Activate and validate edge devices
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ results_path_edges }}"
roles:
- cisco.catalystwan.activate_edges


# Attach templates with running-config for all devices
- name: Set vmanage mode for all devices
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ results_path_edges }}"
vars:
edge_instances: "{{ deployed_edge_instances }}"
roles:
- cisco.catalystwan.vmanage_mode

# After assigning templates, we should add check there to verify that device is managed by templates
# add to vmanage_mode role.

# Health checks
- name: Verify control connections and BFD, OMP
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ results_path_edges }}"
roles:
- cisco.catalystwan.health_checks
14 changes: 0 additions & 14 deletions playbooks/aws/full_deploy_and_configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@
- cisco.catalystwan.onboarding_controllers


- name: Cluster configuration
hosts: localhost
gather_facts: false
vars_files:
- ./aws_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
tasks:
- name: Configure cluster setup if required
ansible.builtin.include_role:
name: cisco.catalystwan.cluster
when: (vmanage_instances | first).cluster_private_ip is defined


- name: Generate bootstrap configuration for synced edges
hosts: localhost
gather_facts: false
Expand Down
101 changes: 101 additions & 0 deletions playbooks/azure/cluster_deploy_and_configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Copyright 2024 Cisco Systems, Inc. and its affiliates
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)


# Deploy Cisco SD-WAN version 20.13 on Azure
- name: Deploy Cisco SD-WAN versions 20.13 on Azure
hosts: localhost
gather_facts: false
vars_files:
./azure_sdwan_config.yml
tasks:
roles:
- cisco.sdwan_deployment.azure_network_infrastructure
- cisco.sdwan_deployment.azure_controllers


- name: Verify server connectivity, set initial configuration, onboard controllers
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
roles:
- cisco.catalystwan.api_ready
- cisco.catalystwan.administration_settings
- cisco.catalystwan.onboarding_controllers


- name: Cluster configuration
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
roles:
- cisco.catalystwan.cluster


- name: Generate bootstrap configuration for synced edges
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
roles:
- cisco.catalystwan.sync_pnp_edges


# Deploying edges requires vbond_mgmt_public_ip, otp and uuid!
- name: Deploy Edge devices based on generated boostrap configuration
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ deployment_edges_config }}"
roles:
- cisco.sdwan_deployment.azure_edges


# Onboard edge devices and wait for their reachability
- name: Activate and validate edge devices
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ results_path_edges }}"
roles:
- cisco.catalystwan.activate_edges


# Attach templates with running-config for all devices
- name: Set vmanage mode for all devices
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ results_path_edges }}"
vars:
edge_instances: "{{ deployed_edge_instances }}"
roles:
- cisco.catalystwan.vmanage_mode

# After assigning templates, we should add check there to verify that device is managed by templates
# add to vmanage_mode role.

# Health checks
- name: Verify control connections and BFD, OMP
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- "{{ results_path_controllers }}"
- "{{ results_path_edges }}"
roles:
- cisco.catalystwan.health_checks
14 changes: 0 additions & 14 deletions playbooks/azure/full_deploy_and_configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@
- cisco.catalystwan.onboarding_controllers


- name: Cluster configuration
hosts: localhost
gather_facts: false
vars_files:
- ./azure_sdwan_config.yml
- ./pnp_credentials.yml
- "{{ results_path_controllers }}"
tasks:
- name: Configure cluster setup if required
ansible.builtin.include_role:
name: cisco.catalystwan.cluster
when: (vmanage_instances | first).cluster_private_ip is defined


- name: Generate bootstrap configuration for synced edges
hosts: localhost
gather_facts: false
Expand Down

0 comments on commit 5a08373

Please sign in to comment.