Skip to content

Commit

Permalink
Merge pull request #24 from cisco-open/fr/cluster
Browse files Browse the repository at this point in the history
cluster deployment
  • Loading branch information
przsus authored Oct 30, 2024
2 parents 13652fd + cc5f77f commit 9be4d3d
Show file tree
Hide file tree
Showing 9 changed files with 222 additions and 5 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ playbooks/catalystwan.log
playbooks/sdwan_config_dev.yml
playbooks/templates_examples/output_backup_device_configuration
playbooks/templates_examples/output_backup_running_config
.idea
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace: cisco
name: sdwan
version: 0.2.1
version: 0.3.0
readme: README.md
authors:
- Arkadiusz Cichon <[email protected]>
Expand Down
7 changes: 7 additions & 0 deletions playbooks/aws/aws_sdwan_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ vmanage_instances:
- hostname: "{{ aws_resources_prefix }}-vManage"
system_ip: 192.168.1.1
site_id: 111
# uncomment for cluster deployment
# - hostname: "{{ aws_resources_prefix }}-vManage2"
# system_ip: 192.168.4.1
# site_id: 112
# - hostname: "{{ aws_resources_prefix }}-vManage3"
# system_ip: 192.168.5.1
# site_id: 113


# vBond
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
8 changes: 7 additions & 1 deletion playbooks/azure/azure_sdwan_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ vmanage_instances:
- hostname: "{{ az_resources_prefix }}-vManage"
system_ip: 192.168.1.1
site_id: "{{ site_id_vmanage }}"

# uncomment for cluster deployment
# - hostname: "{{ az_resources_prefix }}-vManage2"
# system_ip: 192.168.4.1
# site_id: "{{ site_id_vmanage | int + 1 }}"
# - hostname: "{{ az_resources_prefix }}-vManage3"
# system_ip: 192.168.5.1
# site_id: "{{ site_id_vmanage | int + 2 }}"

# vBond
az_vbond_image_vhd_source: null
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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ azure-storage-blob==12.13.0
bcrypt==4.1.2
boto3==1.34.78
botocore==1.34.78
catalystwan==0.34.0.dev5
catalystwan==0.35.5dev3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
Expand Down
4 changes: 2 additions & 2 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ collections:
- name: azure.azcollection
version: 1.19.0
- name: cisco.catalystwan
version: 0.2.1
version: 0.3.0
- name: cisco.sdwan_deployment
version: 0.2.0
version: 0.3.0

0 comments on commit 9be4d3d

Please sign in to comment.