blob: f693936b972248aedff20fa852999910e479c87e [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
5==========================
6Aether Run-Time Deployment
7==========================
Hyunsun Moona79c7422020-11-18 04:52:56 -08008This section describes how to install Aether edge runtime and Aether managed applications.
9We will be using GitOps based Aether CD pipeline for this,
10so we just need to create a patch to **aether-pod-configs** repository.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070011
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070012Download aether-pod-configs repository
13======================================
Hyunsun Moon0e080e42020-11-18 12:53:13 -080014Download aether-pod-configs repository if you don't have it already in your develop machine.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070015
16.. code-block:: shell
17
18 $ cd $WORKDIR
19 $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-pod-configs"
20
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080021Update 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
28Add a new ACE information at the end of the following global resource maps.
29
30* user_map.tfvars
31* cluster_map.tfvars
32
33As a note, you can find several other global resource maps under the `production` directory.
34Resource definitions that need to be shared among clusters or are better managed in a
35single 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 Moona79c7422020-11-18 04:52:56 -080085Create runtime configurations
86=============================
87In this step, we will add several Terraform configurations and overriding values for the managed applications.
88Run the following commands to auto-generate necessary files under the target ACE directory.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070089
90.. code-block:: shell
91
Hyunsun Moona79c7422020-11-18 04:52:56 -080092 $ cd $WORKDIR/aether-pod-configs/tools
Hyunsun Moon0e080e42020-11-18 12:53:13 -080093 $ cp ace_env /tmp/ace_env
94 $ vi /tmp/ace_env
Hyunsun Moona79c7422020-11-18 04:52:56 -080095 # Set environment variables
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070096
Hyunsun Moon0e080e42020-11-18 12:53:13 -080097 $ source /tmp/ace_env
Hyunsun Moona79c7422020-11-18 04:52:56 -080098 $ make runtime
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080099 Created ../production/ace-test
Hyunsun Moona79c7422020-11-18 04:52:56 -0800100 Created ../production/ace-test/main.tf
101 Created ../production/ace-test/variables.tf
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800102 Created ../production/ace-test/gcp_fw.tf
Hyunsun Moona79c7422020-11-18 04:52:56 -0800103 Created ../production/ace-test/cluster.tf
104 Created ../production/ace-test/alerts.tf
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800105 Created ../production/ace-test/backend.tf
106 Created ../production/ace-test/cluster_val.tfvars
107 Created ../production/ace-test/app_values
Hyunsun Moona79c7422020-11-18 04:52:56 -0800108 Created ../production/ace-test/app_values/ace-coredns.yml
109 Created ../production/ace-test/app_values/omec-upf-pfcp-agent.yml
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700110
111Create a review request
Hyunsun Moona79c7422020-11-18 04:52:56 -0800112=======================
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700113.. code-block:: shell
114
Hyunsun Moona79c7422020-11-18 04:52:56 -0800115 $ cd $WORKDIR/aether-pod-configs
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700116 $ git status
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700117
118 Untracked files:
119 (use "git add <file>..." to include in what will be committed)
120
Hyunsun Moona79c7422020-11-18 04:52:56 -0800121 production/ace-test/alerts.tf
122 production/ace-test/app_values/
123 production/ace-test/cluster.tf
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700124
125 $ git add .
Hyunsun Moona79c7422020-11-18 04:52:56 -0800126 $ git commit -m "Add test ACE runtime configs"
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700127 $ git review
Hyunsun Moona79c7422020-11-18 04:52:56 -0800128
129Once the review request is accepted and merged,
130CD pipeline will start to deploy K8S and Aether managed applications on it.