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 | |
| 5 | ========================== |
| 6 | Aether Run-Time Deployment |
| 7 | ========================== |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 8 | This section describes how to install Aether edge runtime and Aether managed applications. |
| 9 | We will be using GitOps based Aether CD pipeline for this, |
| 10 | so we just need to create a patch to **aether-pod-configs** repository. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 11 | |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 12 | Download aether-pod-configs repository |
| 13 | ====================================== |
Hyunsun Moon | 0e080e4 | 2020-11-18 12:53:13 -0800 | [diff] [blame] | 14 | Download aether-pod-configs repository if you don't have it already in your develop machine. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 15 | |
| 16 | .. code-block:: shell |
| 17 | |
| 18 | $ cd $WORKDIR |
| 19 | $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-pod-configs" |
| 20 | |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame^] | 21 | Update global resource maps |
| 22 | =========================== |
| 23 | .. attention:: |
| 24 | |
| 25 | Skip this section if you have already done the same step in the |
| 26 | :ref:`Update Global Resources Map for VPN <update_global_resource>` section. |
| 27 | |
| 28 | Add a new ACE information at the end of the following global resource maps. |
| 29 | |
| 30 | * user_map.tfvars |
| 31 | * cluster_map.tfvars |
| 32 | |
| 33 | As a note, you can find several other global resource maps under the `production` directory. |
| 34 | Resource definitions that need to be shared among clusters or are better managed in a |
| 35 | single file to avoid configuration conflicts are maintained in this way. |
| 36 | |
| 37 | .. code-block:: diff |
| 38 | |
| 39 | $ cd $WORKDIR/aether-pod-configs/production |
| 40 | $ vi user_map.tfvars |
| 41 | |
| 42 | # Add the new cluster admin user at the end of the map |
| 43 | $ git diff user_map.tfvars |
| 44 | --- a/production/user_map.tfvars |
| 45 | +++ b/production/user_map.tfvars |
| 46 | @@ user_map = { |
| 47 | username = "menlo" |
| 48 | password = "changeme" |
| 49 | global_roles = ["user-base", "catalogs-use"] |
| 50 | + }, |
| 51 | + test_admin = { |
| 52 | + username = "test" |
| 53 | + password = "changeme" |
| 54 | + global_roles = ["user-base", "catalogs-use"] |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | .. code-block:: diff |
| 59 | |
| 60 | $ cd $WORKDIR/aether-pod-configs/production |
| 61 | $ vi cluster_map.tfvars |
| 62 | |
| 63 | # Add the new K8S cluster information at the end of the map |
| 64 | $ git diff cluster_map.tfvars |
| 65 | --- a/production/cluster_map.tfvars |
| 66 | +++ b/production/cluster_map.tfvars |
| 67 | @@ cluster_map = { |
| 68 | kube_dns_cluster_ip = "10.53.128.10" |
| 69 | cluster_domain = "prd.menlo.aetherproject.net" |
| 70 | calico_ip_detect_method = "can-reach=www.google.com" |
| 71 | + }, |
| 72 | + ace-test = { |
| 73 | + cluster_name = "ace-test" |
| 74 | + management_subnets = ["10.91.0.0/24"] |
| 75 | + k8s_version = "v1.18.8-rancher1-1" |
| 76 | + k8s_pod_range = "10.66.0.0/17" |
| 77 | + k8s_cluster_ip_range = "10.66.128.0/17" |
| 78 | + kube_dns_cluster_ip = "10.66.128.10" |
| 79 | + cluster_domain = "prd.test.aetherproject.net" |
| 80 | + calico_ip_detect_method = "can-reach=www.google.com" |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 85 | Create runtime configurations |
| 86 | ============================= |
| 87 | In this step, we will add several Terraform configurations and overriding values for the managed applications. |
| 88 | Run the following commands to auto-generate necessary files under the target ACE directory. |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 89 | |
| 90 | .. code-block:: shell |
| 91 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 92 | $ cd $WORKDIR/aether-pod-configs/tools |
Hyunsun Moon | 0e080e4 | 2020-11-18 12:53:13 -0800 | [diff] [blame] | 93 | $ cp ace_env /tmp/ace_env |
| 94 | $ vi /tmp/ace_env |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 95 | # Set environment variables |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 96 | |
Hyunsun Moon | 0e080e4 | 2020-11-18 12:53:13 -0800 | [diff] [blame] | 97 | $ source /tmp/ace_env |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 98 | $ make runtime |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame^] | 99 | Created ../production/ace-test |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 100 | Created ../production/ace-test/main.tf |
| 101 | Created ../production/ace-test/variables.tf |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame^] | 102 | Created ../production/ace-test/gcp_fw.tf |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 103 | Created ../production/ace-test/cluster.tf |
| 104 | Created ../production/ace-test/alerts.tf |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame^] | 105 | Created ../production/ace-test/backend.tf |
| 106 | Created ../production/ace-test/cluster_val.tfvars |
| 107 | Created ../production/ace-test/app_values |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 108 | Created ../production/ace-test/app_values/ace-coredns.yml |
| 109 | Created ../production/ace-test/app_values/omec-upf-pfcp-agent.yml |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 110 | |
| 111 | Create a review request |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 112 | ======================= |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 113 | .. code-block:: shell |
| 114 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 115 | $ cd $WORKDIR/aether-pod-configs |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 116 | $ git status |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 117 | |
| 118 | Untracked files: |
| 119 | (use "git add <file>..." to include in what will be committed) |
| 120 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 121 | production/ace-test/alerts.tf |
| 122 | production/ace-test/app_values/ |
| 123 | production/ace-test/cluster.tf |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 124 | |
| 125 | $ git add . |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 126 | $ git commit -m "Add test ACE runtime configs" |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 127 | $ git review |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 128 | |
| 129 | Once the review request is accepted and merged, |
| 130 | CD pipeline will start to deploy K8S and Aether managed applications on it. |