blob: 513f1fb273eca226b8f382f1d8c470ea2572f85e [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 Moon56093f62020-11-23 19:54:29 -080085You'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 Moona79c7422020-11-18 04:52:56 -0800100Create runtime configurations
101=============================
102In this step, we will add several Terraform configurations and overriding values for the managed applications.
103Run the following commands to auto-generate necessary files under the target ACE directory.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700104
105.. code-block:: shell
106
Hyunsun Moona79c7422020-11-18 04:52:56 -0800107 $ cd $WORKDIR/aether-pod-configs/tools
Hyunsun Moon0e080e42020-11-18 12:53:13 -0800108 $ cp ace_env /tmp/ace_env
109 $ vi /tmp/ace_env
Hyunsun Moona79c7422020-11-18 04:52:56 -0800110 # Set environment variables
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700111
Hyunsun Moon0e080e42020-11-18 12:53:13 -0800112 $ source /tmp/ace_env
Hyunsun Moona79c7422020-11-18 04:52:56 -0800113 $ make runtime
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800114 Created ../production/ace-test
Hyunsun Moona79c7422020-11-18 04:52:56 -0800115 Created ../production/ace-test/main.tf
116 Created ../production/ace-test/variables.tf
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800117 Created ../production/ace-test/gcp_fw.tf
Hyunsun Moona79c7422020-11-18 04:52:56 -0800118 Created ../production/ace-test/cluster.tf
119 Created ../production/ace-test/alerts.tf
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -0800120 Created ../production/ace-test/backend.tf
121 Created ../production/ace-test/cluster_val.tfvars
122 Created ../production/ace-test/app_values
Hyunsun Moona79c7422020-11-18 04:52:56 -0800123 Created ../production/ace-test/app_values/ace-coredns.yml
124 Created ../production/ace-test/app_values/omec-upf-pfcp-agent.yml
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700125
126Create a review request
Hyunsun Moona79c7422020-11-18 04:52:56 -0800127=======================
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700128.. code-block:: shell
129
Hyunsun Moona79c7422020-11-18 04:52:56 -0800130 $ cd $WORKDIR/aether-pod-configs
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700131 $ git status
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700132
133 Untracked files:
134 (use "git add <file>..." to include in what will be committed)
135
Hyunsun Moona79c7422020-11-18 04:52:56 -0800136 production/ace-test/alerts.tf
137 production/ace-test/app_values/
138 production/ace-test/cluster.tf
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700139
140 $ git add .
Hyunsun Moona79c7422020-11-18 04:52:56 -0800141 $ git commit -m "Add test ACE runtime configs"
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700142 $ git review
Hyunsun Moona79c7422020-11-18 04:52:56 -0800143
144Once the review request is accepted and merged,
145CD pipeline will start to deploy K8S and Aether managed applications on it.