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 | |
| 8 | This section describes how to install Aether edge runtime and Aether managed |
| 9 | applications. |
| 10 | |
| 11 | We will be using GitOps based Aether CD pipeline for this, so we just need to |
| 12 | create a patch to **aether-pod-configs** repository. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 13 | |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 14 | Download aether-pod-configs repository |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 15 | -------------------------------------- |
| 16 | |
| 17 | Download the ``aether-pod-configs`` repository if you don't have it already in |
| 18 | your development machine. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 19 | |
| 20 | .. code-block:: shell |
| 21 | |
| 22 | $ cd $WORKDIR |
| 23 | $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-pod-configs" |
| 24 | |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 25 | Update global resource maps |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 26 | --------------------------- |
| 27 | |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 28 | .. attention:: |
| 29 | |
| 30 | Skip this section if you have already done the same step in the |
| 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" |
| 80 | + management_subnets = ["10.91.0.0/24"] |
| 81 | + k8s_version = "v1.18.8-rancher1-1" |
| 82 | + k8s_pod_range = "10.66.0.0/17" |
| 83 | + k8s_cluster_ip_range = "10.66.128.0/17" |
| 84 | + kube_dns_cluster_ip = "10.66.128.10" |
| 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 | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 106 | Create runtime configurations |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 107 | ----------------------------- |
| 108 | |
| 109 | In this step, we will add several Terraform configurations and overriding |
| 110 | values for the managed applications. |
| 111 | |
| 112 | Run the following commands to auto-generate necessary files under the target |
| 113 | ACE directory. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 114 | |
| 115 | .. code-block:: shell |
| 116 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 117 | $ cd $WORKDIR/aether-pod-configs/tools |
Hyunsun Moon | 0e080e4 | 2020-11-18 12:53:13 -0800 | [diff] [blame] | 118 | $ cp ace_env /tmp/ace_env |
| 119 | $ vi /tmp/ace_env |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 120 | # Set environment variables |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 121 | |
Hyunsun Moon | 0e080e4 | 2020-11-18 12:53:13 -0800 | [diff] [blame] | 122 | $ source /tmp/ace_env |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 123 | $ make runtime |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 124 | Created ../production/ace-test |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 125 | Created ../production/ace-test/main.tf |
| 126 | Created ../production/ace-test/variables.tf |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 127 | Created ../production/ace-test/gcp_fw.tf |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 128 | Created ../production/ace-test/cluster.tf |
| 129 | Created ../production/ace-test/alerts.tf |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 130 | Created ../production/ace-test/backend.tf |
| 131 | Created ../production/ace-test/cluster_val.tfvars |
| 132 | Created ../production/ace-test/app_values |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 133 | Created ../production/ace-test/app_values/ace-coredns.yml |
| 134 | Created ../production/ace-test/app_values/omec-upf-pfcp-agent.yml |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 135 | |
| 136 | Create a review request |
Zack Williams | 794532a | 2021-03-18 17:38:36 -0700 | [diff] [blame] | 137 | ----------------------- |
| 138 | |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 139 | .. code-block:: shell |
| 140 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 141 | $ cd $WORKDIR/aether-pod-configs |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 142 | $ git status |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 143 | |
| 144 | Untracked files: |
| 145 | (use "git add <file>..." to include in what will be committed) |
| 146 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 147 | production/ace-test/alerts.tf |
| 148 | production/ace-test/app_values/ |
| 149 | production/ace-test/cluster.tf |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 150 | |
| 151 | $ git add . |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 152 | $ git commit -m "Add test ACE runtime configs" |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 153 | $ git review |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 154 | |
| 155 | Once the review request is accepted and merged, |
| 156 | CD pipeline will start to deploy K8S and Aether managed applications on it. |