blob: c97f55d5fae0b8cc3beefa575f4bc0b0937fa705 [file] [log] [blame]
Hung-Wei Chiu77c969e2020-10-23 18:13:07 +00001..
2 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
Zack Williams794532a2021-03-18 17:38:36 -07005Aether Runtime Deployment
6=========================
7
8This section describes how to install Aether edge runtime and Aether managed
9applications.
10
11We will be using GitOps based Aether CD pipeline for this, so we just need to
12create a patch to **aether-pod-configs** repository.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070013
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070014Download aether-pod-configs repository
Zack Williams794532a2021-03-18 17:38:36 -070015--------------------------------------
16
17Download the ``aether-pod-configs`` repository if you don't have it already in
18your development machine.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070019
20.. code-block:: shell
21
22 $ cd $WORKDIR
23 $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-pod-configs"
24
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080025Update global resource maps
Zack Williams794532a2021-03-18 17:38:36 -070026---------------------------
27
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080028.. 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
33Add a new ACE information at the end of the following global resource maps.
34
35* user_map.tfvars
36* cluster_map.tfvars
37
Zack Williams794532a2021-03-18 17:38:36 -070038As a note, you can find several other global resource maps under the
39`production` directory. Resource definitions that need to be shared among
40clusters or are better managed in a single file to avoid configuration
41conflicts are maintained in this way.
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080042
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 Moon56093f62020-11-23 19:54:29 -080091You'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 Moona79c7422020-11-18 04:52:56 -0800106Create runtime configurations
Zack Williams794532a2021-03-18 17:38:36 -0700107-----------------------------
108
109In this step, we will add several Terraform configurations and overriding
110values for the managed applications.
111
112Run the following commands to auto-generate necessary files under the target
113ACE directory.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700114
115.. code-block:: shell
116
Hyunsun Moona79c7422020-11-18 04:52:56 -0800117 $ cd $WORKDIR/aether-pod-configs/tools
Hyunsun Moon0e080e42020-11-18 12:53:13 -0800118 $ cp ace_env /tmp/ace_env
119 $ vi /tmp/ace_env
Hyunsun Moona79c7422020-11-18 04:52:56 -0800120 # Set environment variables
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700121
Hyunsun Moon0e080e42020-11-18 12:53:13 -0800122 $ source /tmp/ace_env
Hyunsun Moona79c7422020-11-18 04:52:56 -0800123 $ make runtime
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800124 Created ../production/ace-test
Hyunsun Moona79c7422020-11-18 04:52:56 -0800125 Created ../production/ace-test/main.tf
126 Created ../production/ace-test/variables.tf
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800127 Created ../production/ace-test/gcp_fw.tf
Hyunsun Moona79c7422020-11-18 04:52:56 -0800128 Created ../production/ace-test/cluster.tf
129 Created ../production/ace-test/alerts.tf
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800130 Created ../production/ace-test/backend.tf
131 Created ../production/ace-test/cluster_val.tfvars
132 Created ../production/ace-test/app_values
Hyunsun Moona79c7422020-11-18 04:52:56 -0800133 Created ../production/ace-test/app_values/ace-coredns.yml
134 Created ../production/ace-test/app_values/omec-upf-pfcp-agent.yml
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700135
136Create a review request
Zack Williams794532a2021-03-18 17:38:36 -0700137-----------------------
138
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700139.. code-block:: shell
140
Hyunsun Moona79c7422020-11-18 04:52:56 -0800141 $ cd $WORKDIR/aether-pod-configs
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700142 $ git status
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700143
144 Untracked files:
145 (use "git add <file>..." to include in what will be committed)
146
Hyunsun Moona79c7422020-11-18 04:52:56 -0800147 production/ace-test/alerts.tf
148 production/ace-test/app_values/
149 production/ace-test/cluster.tf
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700150
151 $ git add .
Hyunsun Moona79c7422020-11-18 04:52:56 -0800152 $ git commit -m "Add test ACE runtime configs"
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700153 $ git review
Hyunsun Moona79c7422020-11-18 04:52:56 -0800154
155Once the review request is accepted and merged,
156CD pipeline will start to deploy K8S and Aether managed applications on it.