Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 1 | .. |
| 2 | SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 3 | SPDX-License-Identifier: Apache-2.0 |
| 4 | |
| 5 | VPN Bootstrap |
| 6 | ============= |
| 7 | |
Hyunsun Moon | db739a3 | 2021-08-12 01:59:21 -0700 | [diff] [blame] | 8 | This section guides you through setting up a VPN connection between Aether |
| 9 | Central in GCP and ACE. |
Hyunsun Moon | 049b505 | 2021-07-30 12:41:03 -0700 | [diff] [blame] | 10 | We will be using GitOps based Aether CI/CD system for this and what you need to do is |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 11 | create a patch for the new edge in ``aether-pod-configs``, where all edge infrastructure |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 12 | configuration is stored. |
| 13 | |
| 14 | Here is a brief overview of each step. Note that some of the steps described here are not |
| 15 | directly related to setting up a VPN, but are prerequisites for adding a new edge. |
| 16 | |
| 17 | **1. Add deployment jobs** |
Hyunsun Moon | db739a3 | 2021-08-12 01:59:21 -0700 | [diff] [blame] | 18 | Each edge has its own Jenkins jobs that build and execute an infrastructure change plan |
| 19 | based on the configurations specified in aether-pod-configs. |
| 20 | In this step, you'll add those jobs to Aether CI/CD system for the new edge. |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 21 | |
| 22 | **2. Update global resource maps** |
| 23 | aether-pod-configs maintains complete list of clusters, VPN connections, and users |
| 24 | in separate global resource files. Before adding edge specific configurations, |
| 25 | it is required to update those global resource maps first. |
| 26 | |
| 27 | **3. Generate Ansible and Terraform configs** |
| 28 | In this step, you'll add Ansible and Terraform configs necessary to install and |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 29 | configure VPN software at the edge and set up VPN gateway, router, and firewall |
| 30 | on GCP. |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 31 | |
| 32 | **4. Submit your changes** |
Hyunsun Moon | db739a3 | 2021-08-12 01:59:21 -0700 | [diff] [blame] | 33 | Finally, submit your aether-pod-configs changes to run the deployment job added |
| 34 | in the first step. |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 35 | |
| 36 | .. attention:: |
| 37 | |
| 38 | If you are adding another ACE to an existing VPN connection, go to |
Hyunsun Moon | db739a3 | 2021-08-12 01:59:21 -0700 | [diff] [blame] | 39 | :ref:`Add ACE to an existing VPN connection <add_ace_to_vpn>`. |
| 40 | |
| 41 | .. attention:: |
| 42 | |
| 43 | Make sure that UDP port 500, UDP port 4500, and ESP from **gcpvpn1.infra.aetherproject.net(35.242.47.15)** |
| 44 | and **gcpvpn2.infra.aetherproject.net(34.104.68.78)** are allowed in the firewall at the edge. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 45 | |
Hyunsun Moon | 049b505 | 2021-07-30 12:41:03 -0700 | [diff] [blame] | 46 | .. _add_deployment_jobs: |
| 47 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 48 | Add deployment jobs |
| 49 | ------------------- |
Hyunsun Moon | fabe974 | 2021-08-01 06:41:44 -0700 | [diff] [blame] | 50 | First, you need to add Jenkins jobs to Aether CI/CD system that build and apply infrastructure change |
Hyunsun Moon | 049b505 | 2021-07-30 12:41:03 -0700 | [diff] [blame] | 51 | plans for the new edge. This can be done by creating a patch to **aether-ci-management** repository. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 52 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 53 | Download **aether-ci-management** repository. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 54 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 55 | .. code-block:: shell |
| 56 | |
| 57 | $ cd $WORKDIR |
| 58 | $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-ci-management" |
| 59 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 60 | Add the jobs for the new cluster at the end of the ``cd-pipeline-terraform-ace`` project job list. |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 61 | Make sure to add both pre-merge and post-merge jobs. |
| 62 | Note that the cluster name specified here will be used in the rest of the deployment procedure. |
| 63 | |
| 64 | .. code-block:: diff |
| 65 | |
| 66 | $ cd $WORKDIR/aether-ci-management |
| 67 | $ vi jjb/repos/cd-pipeline-terraform.yaml |
| 68 | |
| 69 | # Add jobs for the new cluster |
| 70 | diff jjb/repos/cd-pipeline-terraform.yamll |
| 71 | --- a/jjb/repos/cd-pipeline-terraform.yaml |
| 72 | +++ b/jjb/repos/cd-pipeline-terraform.yaml |
| 73 | @@ -227,3 +227,9 @@ |
| 74 | - 'cd-pipeline-terraform-postmerge-cluster': |
| 75 | pod: 'production' |
| 76 | cluster: 'ace-eks' |
| 77 | + - 'cd-pipeline-terraform-premerge-cluster': |
| 78 | + pod: 'production' |
| 79 | + cluster: 'ace-test' |
| 80 | + - 'cd-pipeline-terraform-postmerge-cluster': |
| 81 | + pod: 'production' |
| 82 | + cluster: 'ace-test' |
| 83 | |
Hyunsun Moon | 2b2bf9a | 2021-08-01 05:29:48 -0700 | [diff] [blame] | 84 | Submit your change and wait for the jobs you just added available in Aether Jenkins. |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 85 | |
| 86 | .. code-block:: shell |
| 87 | |
| 88 | $ git status |
| 89 | Changes not staged for commit: |
| 90 | |
| 91 | modified: jjb/repos/cd-pipeline-terraform.yaml |
| 92 | |
| 93 | $ git add . |
| 94 | $ git commit -m "Add test ACE deployment job" |
| 95 | $ git review |
| 96 | |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 97 | |
Andy Bavier | 802cce5 | 2021-07-29 12:15:15 -0700 | [diff] [blame] | 98 | Get access to encrypted files in aether-pod-configs repository |
| 99 | -------------------------------------------------------------- |
| 100 | |
Andy Bavier | 718fd90 | 2021-07-30 10:10:55 -0700 | [diff] [blame] | 101 | `git-crypt <https://github.com/AGWA/git-crypt>`_ is used to securely store encrypted files |
| 102 | in the aether-pod-configs repository. Before proceeding, (1) install git-crypt and `gpg <https://gnupg.org/>`_, |
Andy Bavier | 6fc0ff1 | 2021-08-02 09:29:25 -0700 | [diff] [blame] | 103 | (2) create a GPG keypair, and (3) ask a member of the Aether OPs team to add your public key |
Andy Bavier | 802cce5 | 2021-07-29 12:15:15 -0700 | [diff] [blame] | 104 | to the aether-pod-configs keyring. To create the keypair follow these steps: |
| 105 | |
| 106 | .. code-block:: shell |
| 107 | |
| 108 | $ gpg --full-generate-key |
| 109 | $ gpg --output <key-name>.gpg --armor --export <your-email-address> |
| 110 | |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 111 | .. _update_global_resource: |
| 112 | |
| 113 | Update global resource maps |
| 114 | --------------------------- |
| 115 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 116 | Download aether-pod-configs repository. |
| 117 | |
| 118 | .. code-block:: shell |
| 119 | |
| 120 | $ cd $WORKDIR |
| 121 | $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-pod-configs" |
Andy Bavier | 802cce5 | 2021-07-29 12:15:15 -0700 | [diff] [blame] | 122 | $ git-crypt unlock |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 123 | |
Hyunsun Moon | fabe974 | 2021-08-01 06:41:44 -0700 | [diff] [blame] | 124 | Add the new cluster information at the end of the following global resource maps. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 125 | |
| 126 | * ``user_map.tfvars`` |
| 127 | * ``cluster_map.tfvars`` |
| 128 | * ``vpn_map.tfvars`` |
| 129 | |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 130 | .. code-block:: diff |
| 131 | |
| 132 | $ cd $WORKDIR/aether-pod-configs/production |
| 133 | $ vi user_map.tfvars |
| 134 | |
| 135 | # Add the new cluster admin user at the end of the map |
| 136 | $ git diff user_map.tfvars |
| 137 | --- a/production/user_map.tfvars |
| 138 | +++ b/production/user_map.tfvars |
| 139 | @@ user_map = { |
| 140 | username = "menlo" |
| 141 | password = "changeme" |
| 142 | global_roles = ["user-base", "catalogs-use"] |
| 143 | + }, |
| 144 | + test_admin = { |
| 145 | + username = "test" |
| 146 | + password = "changeme" |
| 147 | + global_roles = ["user-base", "catalogs-use"] |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | .. code-block:: diff |
| 152 | |
| 153 | $ cd $WORKDIR/aether-pod-configs/production |
| 154 | $ vi cluster_map.tfvars |
| 155 | |
| 156 | # Add the new K8S cluster information at the end of the map |
| 157 | $ git diff cluster_map.tfvars |
| 158 | --- a/production/cluster_map.tfvars |
| 159 | +++ b/production/cluster_map.tfvars |
| 160 | @@ cluster_map = { |
| 161 | kube_dns_cluster_ip = "10.53.128.10" |
| 162 | cluster_domain = "prd.menlo.aetherproject.net" |
| 163 | calico_ip_detect_method = "can-reach=www.google.com" |
| 164 | + }, |
| 165 | + ace-test = { |
| 166 | + cluster_name = "ace-test" |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 167 | + management_subnets = ["10.32.4.0/24"] |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 168 | + k8s_version = "v1.18.8-rancher1-1" |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 169 | + k8s_pod_range = "10.33.0.0/17" |
| 170 | + k8s_cluster_ip_range = "10.33.128.0/17" |
| 171 | + kube_dns_cluster_ip = "10.33.128.10" |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 172 | + cluster_domain = "prd.test.aetherproject.net" |
| 173 | + calico_ip_detect_method = "can-reach=www.google.com" |
| 174 | } |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | .. code-block:: diff |
| 179 | |
| 180 | $ cd $WORKDIR/aether-pod-configs/production |
| 181 | $ vi vpn_map.tfvars |
| 182 | |
| 183 | # Add VPN and tunnel information at the end of the map |
| 184 | $ git diff vpn_map.tfvars |
| 185 | --- a/production/vpn_map.tfvars |
| 186 | +++ b/production/vpn_map.tfvars |
| 187 | @@ vpn_map = { |
| 188 | bgp_peer_ip_address_1 = "169.254.0.6" |
| 189 | bgp_peer_ip_range_2 = "169.254.1.5/30" |
| 190 | bgp_peer_ip_address_2 = "169.254.1.6" |
| 191 | + }, |
| 192 | + ace-test = { |
| 193 | + peer_name = "production-ace-test" |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 194 | + peer_vpn_gateway_address = "66.201.42.222" |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 195 | + tunnel_shared_secret = "UMAoZA7blv6gd3IaArDqgK2s0sDB8mlI" |
| 196 | + bgp_peer_asn = "65003" |
| 197 | + bgp_peer_ip_range_1 = "169.254.0.9/30" |
| 198 | + bgp_peer_ip_address_1 = "169.254.0.10" |
| 199 | + bgp_peer_ip_range_2 = "169.254.1.9/30" |
| 200 | + bgp_peer_ip_address_2 = "169.254.1.10" |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | .. note:: |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 205 | Use `this site <https://cloud.google.com/network-connectivity/docs/vpn/how-to/generating-pre-shared-key/>`_ |
| 206 | to generate a strong tunnel shared secret. |
| 207 | |
| 208 | .. note:: |
Hyunsun Moon | 35868bc | 2021-08-11 15:01:13 -0700 | [diff] [blame] | 209 | Unless you have a specific requirement, set ASN to the next available value in the map. |
| 210 | For BGP peer IP range and address, use the next available /30 subnet in the map. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 211 | |
| 212 | |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 213 | Generate Ansible and Terraform configurations |
| 214 | --------------------------------------------- |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 215 | |
Hyunsun Moon | fabe974 | 2021-08-01 06:41:44 -0700 | [diff] [blame] | 216 | In this step, we will create a directory under ``production`` with the same name |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 217 | as the cluster, and add Ansible and Terraform configurations needed |
| 218 | to configure a VPN in ACE and GCP using a tool. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 219 | |
| 220 | .. code-block:: shell |
| 221 | |
| 222 | $ cd $WORKDIR/aether-pod-configs/tools |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 223 | $ cp ace_config.yaml.example ace_config.yaml |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 224 | |
| 225 | # Set all values in ace_config.yaml |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 226 | $ vi ace_config.yaml |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 227 | |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 228 | $ make vpn |
| 229 | Created ../production/ace-test |
Hyunsun Moon | 049b505 | 2021-07-30 12:41:03 -0700 | [diff] [blame] | 230 | Created ../production/ace-test/provider.tf |
| 231 | Created ../production/ace-test/cluster.tf |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 232 | Created ../production/ace-test/gcp_ha_vpn.tf |
Hyunsun Moon | 049b505 | 2021-07-30 12:41:03 -0700 | [diff] [blame] | 233 | Created ../production/ace-test/gcp_fw.tf |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 234 | Created ../production/ace-test/backend.tf |
| 235 | Created ../production/ace-test/cluster_val.tfvars |
Hyunsun Moon | 049b505 | 2021-07-30 12:41:03 -0700 | [diff] [blame] | 236 | Created ../production/ace-test/ansible |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 237 | Created ../production/ace-test/ansible/hosts.ini |
| 238 | Created ../production/ace-test/ansible/extra_vars.yml |
| 239 | |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 240 | |
Hyunsun Moon | 2b2bf9a | 2021-08-01 05:29:48 -0700 | [diff] [blame] | 241 | Submit your change |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 242 | ------------------ |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 243 | |
| 244 | .. code-block:: shell |
| 245 | |
| 246 | $ cd $WORKDIR/aether-pod-configs/production |
| 247 | $ git status |
| 248 | On branch tools |
| 249 | Changes not staged for commit: |
| 250 | |
| 251 | modified: cluster_map.tfvars |
| 252 | modified: user_map.tfvars |
| 253 | modified: vpn_map.tfvars |
| 254 | |
| 255 | Untracked files: |
| 256 | (use "git add <file>..." to include in what will be committed) |
| 257 | |
| 258 | ace-test/ |
| 259 | |
| 260 | $ git add . |
| 261 | $ git commit -m "Add test ACE" |
| 262 | $ git review |
| 263 | |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 264 | Wait for a while until the post-merge job finishes after the change is merged. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 265 | |
| 266 | Verify VPN connection |
| 267 | --------------------- |
| 268 | |
Hyunsun Moon | fabe974 | 2021-08-01 06:41:44 -0700 | [diff] [blame] | 269 | You can verify the VPN connections by checking |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 270 | the routing table from the management server and trying to ping to one of the |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 271 | central cluster VMs. |
| 272 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 273 | Be sure there are two tunnel interfaces, ``gcp_tunnel1`` and ``gcp_tunnel2``, |
Hyunsun Moon | bbad67d | 2021-08-12 00:47:27 -0700 | [diff] [blame] | 274 | and three additional routing entries via one of the tunnel interfaces. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 275 | |
| 276 | .. code-block:: shell |
| 277 | |
| 278 | # Verify routings |
| 279 | $ netstat -rn |
| 280 | Kernel IP routing table |
| 281 | Destination Gateway Genmask Flags MSS Window irtt Iface |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 282 | 0.0.0.0 66.201.42.209 0.0.0.0 UG 0 0 0 eno1 |
| 283 | 10.32.4.0 0.0.0.0 255.255.255.128 U 0 0 0 eno2 |
| 284 | 10.32.4.128 0.0.0.0 255.255.255.128 U 0 0 0 mgmt800 |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 285 | 10.45.128.0 169.254.0.9 255.255.128.0 UG 0 0 0 gcp_tunnel1 |
| 286 | 10.52.128.0 169.254.0.9 255.255.128.0 UG 0 0 0 gcp_tunnel1 |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 287 | 10.33.128.0 10.32.4.138 255.255.128.0 UG 0 0 0 mgmt800 |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 288 | 10.168.0.0 169.254.0.9 255.255.240.0 UG 0 0 0 gcp_tunnel1 |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 289 | 66.201.42.208 0.0.0.0 255.255.252.0 U 0 0 0 eno1 |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 290 | 169.254.0.8 0.0.0.0 255.255.255.252 U 0 0 0 gcp_tunnel1 |
| 291 | 169.254.1.8 0.0.0.0 255.255.255.252 U 0 0 0 gcp_tunnel2 |
| 292 | |
| 293 | # Verify ACC VM access |
| 294 | $ ping 10.168.0.6 |
| 295 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 296 | # Verify ACC K8S Service access |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 297 | $ nslookup kube-dns.kube-system.svc.prd.acc.gcp.aetherproject.net 10.52.128.10 |
| 298 | |
Hyunsun Moon | fabe974 | 2021-08-01 06:41:44 -0700 | [diff] [blame] | 299 | You can also login to GCP console and check if the edge subnets exist in |
| 300 | **VPC Network > Routes > Dynamic**. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 301 | |
| 302 | |
| 303 | Post VPN setup |
| 304 | -------------- |
| 305 | |
Hyunsun Moon | fabe974 | 2021-08-01 06:41:44 -0700 | [diff] [blame] | 306 | Once you verify the VPN connections, update ``ansible`` directory name to |
| 307 | ``_ansible`` to prevent the ansible playbook from being rerun. |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 308 | |
| 309 | .. code-block:: shell |
| 310 | |
| 311 | $ cd $WORKDIR/aether-pod-configs/production/$ACE_NAME |
| 312 | $ mv ansible _ansible |
| 313 | $ git add . |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 314 | $ git commit -m "Ansible done for test ACE" |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 315 | $ git review |
| 316 | |
| 317 | .. _add_ace_to_vpn: |
| 318 | |
| 319 | Add another ACE to an existing VPN connection |
| 320 | """"""""""""""""""""""""""""""""""""""""""""" |
| 321 | |
| 322 | VPN connections can be shared when there are multiple ACE clusters in a site. |
Hyunsun Moon | fabe974 | 2021-08-01 06:41:44 -0700 | [diff] [blame] | 323 | In order to add another cluster to an existing VPN connection, you'll have to SSH into the |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 324 | management node and manually update BIRD configuration. |
| 325 | |
| 326 | .. note:: |
| 327 | |
| 328 | This step needs improvements in the future. |
| 329 | |
| 330 | .. code-block:: shell |
| 331 | |
| 332 | $ sudo vi /etc/bird/bird.conf |
| 333 | protocol static { |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 334 | # Routings for the existing cluster |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 335 | ... |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 336 | route 10.33.128.0/17 via 10.32.4.138; |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 337 | |
| 338 | # Add routings for the new ACE's K8S cluster IP range via cluster nodes |
| 339 | # TODO: Configure iBGP peering with Calico nodes and dynamically learn these routings |
| 340 | route <NEW-ACE-CLUSTER-IP> via <SERVER1> |
| 341 | route <NEW-ACE-CLUSTER-IP> via <SERVER2> |
| 342 | route <NEW-ACE-CLUSTER-IP> via <SERVER3> |
| 343 | } |
| 344 | |
| 345 | filter gcp_tunnel_out { |
| 346 | # Add the new ACE's K8S cluster IP range and the management subnet if required to the list |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame] | 347 | if (net ~ [ 10.32.4.0/24, 10.33.128.0/17, <NEW-ACE-CLUSTER-MGMT-SUBNET>, <NEW-ACE-CLUSTER-IP-RANGE> ]) then accept; |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 348 | else reject; |
| 349 | } |
| 350 | # Save and exit |
| 351 | |
| 352 | $ sudo birdc configure |
| 353 | |
| 354 | # Confirm the static routes are added |
| 355 | $ sudo birdc show route |
| 356 | |