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 | 56093f6 | 2020-11-23 19:54:29 -0800 | [diff] [blame] | 85 | You'll have to get this change merged before proceeding. |
| 86 | |
| 87 | .. code-block:: shell |
| 88 | |
| 89 | $ git status |
| 90 | On branch tools |
| 91 | Changes not staged for commit: |
| 92 | |
| 93 | modified: cluster_map.tfvars |
| 94 | modified: user_map.tfvars |
| 95 | |
| 96 | $ git add . |
| 97 | $ git commit -m "Add test ACE" |
| 98 | $ git review |
| 99 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 100 | Create runtime configurations |
| 101 | ============================= |
| 102 | In this step, we will add several Terraform configurations and overriding values for the managed applications. |
| 103 | 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] | 104 | |
| 105 | .. code-block:: shell |
| 106 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 107 | $ cd $WORKDIR/aether-pod-configs/tools |
Hyunsun Moon | 0e080e4 | 2020-11-18 12:53:13 -0800 | [diff] [blame] | 108 | $ cp ace_env /tmp/ace_env |
| 109 | $ vi /tmp/ace_env |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 110 | # Set environment variables |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 111 | |
Hyunsun Moon | 0e080e4 | 2020-11-18 12:53:13 -0800 | [diff] [blame] | 112 | $ source /tmp/ace_env |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 113 | $ make runtime |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 114 | Created ../production/ace-test |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 115 | Created ../production/ace-test/main.tf |
| 116 | Created ../production/ace-test/variables.tf |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 117 | Created ../production/ace-test/gcp_fw.tf |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 118 | Created ../production/ace-test/cluster.tf |
| 119 | Created ../production/ace-test/alerts.tf |
Hyunsun Moon | 5c1e0b0 | 2020-11-20 11:09:00 -0800 | [diff] [blame] | 120 | Created ../production/ace-test/backend.tf |
| 121 | Created ../production/ace-test/cluster_val.tfvars |
| 122 | Created ../production/ace-test/app_values |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 123 | Created ../production/ace-test/app_values/ace-coredns.yml |
| 124 | Created ../production/ace-test/app_values/omec-upf-pfcp-agent.yml |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 125 | |
| 126 | Create a review request |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 127 | ======================= |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 128 | .. code-block:: shell |
| 129 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 130 | $ cd $WORKDIR/aether-pod-configs |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 131 | $ git status |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 132 | |
| 133 | Untracked files: |
| 134 | (use "git add <file>..." to include in what will be committed) |
| 135 | |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 136 | production/ace-test/alerts.tf |
| 137 | production/ace-test/app_values/ |
| 138 | production/ace-test/cluster.tf |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 139 | |
| 140 | $ git add . |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 141 | $ git commit -m "Add test ACE runtime configs" |
Hyunsun Moon | 5ca6bfb | 2020-10-29 22:29:12 -0700 | [diff] [blame] | 142 | $ git review |
Hyunsun Moon | a79c742 | 2020-11-18 04:52:56 -0800 | [diff] [blame] | 143 | |
| 144 | Once the review request is accepted and merged, |
| 145 | CD pipeline will start to deploy K8S and Aether managed applications on it. |