Hung-Wei Chiu | 77c969e | 2020-10-23 18:13:07 +0000 | [diff] [blame] | 1 | .. |
| 2 | SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 3 | SPDX-License-Identifier: Apache-2.0 |
| 4 | |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 5 | Aether Runtime Deployment |
| 6 | ========================= |
| 7 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 8 | This section describes how to install Aether edge runtime and Aether managed applications |
| 9 | including monitoring and logging system, as well as User Plane Function(UPF). |
| 10 | We will be using GitOps based Aether CI/CD system for this and all you need to do is to |
| 11 | create several patches to Aether GitOps repositories. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 12 | |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 13 | Download aether-pod-configs repository |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 14 | -------------------------------------- |
| 15 | |
| 16 | Download the ``aether-pod-configs`` repository if you don't have it already in |
| 17 | your development machine. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 18 | |
| 19 | .. code-block:: shell |
| 20 | |
| 21 | $ cd $WORKDIR |
| 22 | $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-pod-configs" |
| 23 | |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 24 | Update global resource maps |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 25 | --------------------------- |
| 26 | |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 27 | .. attention:: |
| 28 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 29 | Skip this section and go to :ref:`Create runtime configurations <create_runtime_configs>` |
| 30 | if you have already done the same in the |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 31 | :ref:`Update Global Resources Map for VPN <update_global_resource>` section. |
| 32 | |
| 33 | Add a new ACE information at the end of the following global resource maps. |
| 34 | |
| 35 | * user_map.tfvars |
| 36 | * cluster_map.tfvars |
| 37 | |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 38 | As a note, you can find several other global resource maps under the |
| 39 | `production` directory. Resource definitions that need to be shared among |
| 40 | clusters or are better managed in a single file to avoid configuration |
| 41 | conflicts are maintained in this way. |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 42 | |
| 43 | .. code-block:: diff |
| 44 | |
| 45 | $ cd $WORKDIR/aether-pod-configs/production |
| 46 | $ vi user_map.tfvars |
| 47 | |
| 48 | # Add the new cluster admin user at the end of the map |
| 49 | $ git diff user_map.tfvars |
| 50 | --- a/production/user_map.tfvars |
| 51 | +++ b/production/user_map.tfvars |
| 52 | @@ user_map = { |
| 53 | username = "menlo" |
| 54 | password = "changeme" |
| 55 | global_roles = ["user-base", "catalogs-use"] |
| 56 | + }, |
| 57 | + test_admin = { |
| 58 | + username = "test" |
| 59 | + password = "changeme" |
| 60 | + global_roles = ["user-base", "catalogs-use"] |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | .. code-block:: diff |
| 65 | |
| 66 | $ cd $WORKDIR/aether-pod-configs/production |
| 67 | $ vi cluster_map.tfvars |
| 68 | |
| 69 | # Add the new K8S cluster information at the end of the map |
| 70 | $ git diff cluster_map.tfvars |
| 71 | --- a/production/cluster_map.tfvars |
| 72 | +++ b/production/cluster_map.tfvars |
| 73 | @@ cluster_map = { |
| 74 | kube_dns_cluster_ip = "10.53.128.10" |
| 75 | cluster_domain = "prd.menlo.aetherproject.net" |
| 76 | calico_ip_detect_method = "can-reach=www.google.com" |
| 77 | + }, |
| 78 | + ace-test = { |
| 79 | + cluster_name = "ace-test" |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 80 | + management_subnets = ["10.32.4.0/24"] |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 81 | + k8s_version = "v1.18.8-rancher1-1" |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 82 | + k8s_pod_range = "10.33.0.0/17" |
| 83 | + k8s_cluster_ip_range = "10.33.128.0/17" |
| 84 | + kube_dns_cluster_ip = "10.33.128.10" |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 85 | + cluster_domain = "prd.test.aetherproject.net" |
| 86 | + calico_ip_detect_method = "can-reach=www.google.com" |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
Hyunsun Moon | 56093f6 | 2020-11-23 19:54:29 -0800 | [diff] [blame] | 91 | You'll have to get this change merged before proceeding. |
| 92 | |
| 93 | .. code-block:: shell |
| 94 | |
| 95 | $ git status |
| 96 | On branch tools |
| 97 | Changes not staged for commit: |
| 98 | |
| 99 | modified: cluster_map.tfvars |
| 100 | modified: user_map.tfvars |
| 101 | |
| 102 | $ git add . |
| 103 | $ git commit -m "Add test ACE" |
| 104 | $ git review |
| 105 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 106 | .. _create_runtime_configs: |
| 107 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 108 | Create runtime configurations |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 109 | ----------------------------- |
| 110 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 111 | Run the following commands to auto-generate Terraform configurations needed to |
| 112 | create K8S cluster in Rancher and add servers and switches to the cluster. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 113 | |
| 114 | .. code-block:: shell |
| 115 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 116 | # Create ace_cofig.yaml file if you haven't yet |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 117 | $ cd $WORKDIR/aether-pod-configs/tools |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 118 | $ cp ace_config.yaml.example ace_config.yaml |
| 119 | $ vi ace_config.yaml |
| 120 | # Set all values |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 121 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 122 | $ make runtime |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 123 | Created ../production/ace-test/provider.tf |
| 124 | Created ../production/ace-test/member.tf |
| 125 | Created ../production/ace-test/rke-bare-metal.tf |
| 126 | Created ../production/ace-test/addon-manifests.yml.tpl |
| 127 | Created ../production/ace-test/project.tf |
| 128 | |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 129 | |
| 130 | Create a review request |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 131 | ----------------------- |
| 132 | |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 133 | .. code-block:: shell |
| 134 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 135 | $ cd $WORKDIR/aether-pod-configs |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 136 | $ git status |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 137 | $ git add . |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 138 | $ git commit -m "Add test ACE runtime configs" |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 139 | $ git review |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 140 | |
Hyunsun Moon | a703edf | 2021-07-29 15:55:15 -0700 | [diff] [blame^] | 141 | Once the review request is accepted and merged, the post-merge job will start to deploy K8S. |
| 142 | Wait until the cluster is **Active** status in Rancher. |