blob: 96fa059c1e4b744082f619dd7b6b2b5f7883a5a5 [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
Hyunsun Moona703edf2021-07-29 15:55:15 -07008This section describes how to install Aether edge runtime and Aether managed applications
9including monitoring and logging system, as well as User Plane Function(UPF).
10We will be using GitOps based Aether CI/CD system for this and all you need to do is to
11create several patches to Aether GitOps repositories.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070012
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070013Download aether-pod-configs repository
Zack Williams794532a2021-03-18 17:38:36 -070014--------------------------------------
15
16Download the ``aether-pod-configs`` repository if you don't have it already in
17your development machine.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -070018
19.. code-block:: shell
20
21 $ cd $WORKDIR
22 $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-pod-configs"
23
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080024Update global resource maps
Zack Williams794532a2021-03-18 17:38:36 -070025---------------------------
26
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080027.. attention::
28
Hyunsun Moona703edf2021-07-29 15:55:15 -070029 Skip this section and go to :ref:`Create runtime configurations <create_runtime_configs>`
30 if you have already done the same in the
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080031 :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"
Hyunsun Moona703edf2021-07-29 15:55:15 -070080 + management_subnets = ["10.32.4.0/24"]
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080081 + k8s_version = "v1.18.8-rancher1-1"
Hyunsun Moona703edf2021-07-29 15:55:15 -070082 + k8s_pod_range = "10.33.0.0/17"
83 + k8s_cluster_ip_range = "10.33.128.0/17"
84 + kube_dns_cluster_ip = "10.33.128.10"
Hyunsun Moon5c1e0b02020-11-20 11:09:00 -080085 + 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 Moona703edf2021-07-29 15:55:15 -0700106.. _create_runtime_configs:
107
Hyunsun Moona79c7422020-11-18 04:52:56 -0800108Create runtime configurations
Zack Williams794532a2021-03-18 17:38:36 -0700109-----------------------------
110
Hyunsun Moona703edf2021-07-29 15:55:15 -0700111Run the following commands to auto-generate Terraform configurations needed to
112create K8S cluster in Rancher and add servers and switches to the cluster.
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700113
114.. code-block:: shell
115
Hyunsun Moona703edf2021-07-29 15:55:15 -0700116 # Create ace_cofig.yaml file if you haven't yet
Hyunsun Moona79c7422020-11-18 04:52:56 -0800117 $ cd $WORKDIR/aether-pod-configs/tools
Hyunsun Moona703edf2021-07-29 15:55:15 -0700118 $ cp ace_config.yaml.example ace_config.yaml
119 $ vi ace_config.yaml
120 # Set all values
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700121
Hyunsun Moona79c7422020-11-18 04:52:56 -0800122 $ make runtime
Hyunsun Moona703edf2021-07-29 15:55:15 -0700123 Created ../production/ace-test/provider.tf
124 Created ../production/ace-test/member.tf
125 Created ../production/ace-test/rke-bare-metal.tf
126 Created ../production/ace-test/addon-manifests.yml.tpl
127 Created ../production/ace-test/project.tf
128
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700129
130Create a review request
Zack Williams794532a2021-03-18 17:38:36 -0700131-----------------------
132
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700133.. code-block:: shell
134
Hyunsun Moona79c7422020-11-18 04:52:56 -0800135 $ cd $WORKDIR/aether-pod-configs
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700136 $ git status
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700137 $ git add .
Hyunsun Moona79c7422020-11-18 04:52:56 -0800138 $ git commit -m "Add test ACE runtime configs"
Hyunsun Moon5ca6bfb2020-10-29 22:29:12 -0700139 $ git review
Hyunsun Moona79c7422020-11-18 04:52:56 -0800140
Hyunsun Moona703edf2021-07-29 15:55:15 -0700141Once the review request is accepted and merged, the post-merge job will start to deploy K8S.
142Wait until the cluster is **Active** status in Rancher.