blob: 2ac0225a6ff04b0b42b65beeb24f7498298b4c2a [file] [log] [blame]
Charles Chan4a107222020-10-30 17:23:48 -07001..
2 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
5===============
6TOST Deployment
7===============
8
9Update aether-pod-config
10========================
11
12Aether-pod-configs is a git project hosted on **gerrit.opencord.org** and we placed the following materials in it.
13
14- Terraform scripts to install TOST applications on Rancher, including ONOS, Stratum and Telegraf.
15- Customized configuration for each application (helm values).
16- Application specific configuration files, including ONOS network configuration and Stratum chassis config.
17
18Here is an example folder structure:
19
20.. code-block:: console
21
22 ╰─$ tree staging/ace-menlo/tost
23 staging/ace-menlo/tost
24 ├── app_map.tfvars
25 ├── backend.tf
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +000026 ├── deepinsight
27 │   ├── README.md
28 │   ├── deepinsight-topo.json
29 │   └── deepinsight-topo.json.license
30 ├── main.tf -> ../../../common/tost/main.tf
Charles Chan4a107222020-10-30 17:23:48 -070031 ├── onos
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +000032 │   ├── app_map.tfvars
33 │   ├── backend.tf
34 │   ├── main.tf -> ../../../../common/tost/apps/onos/main.tf
35 │   ├── onos-netcfg.json
36 │   ├── onos-netcfg.json.license
37 │   ├── onos.yaml
38 │   └── variables.tf -> ../../../../common/tost/apps/onos/variables.tf
Charles Chan4a107222020-10-30 17:23:48 -070039 ├── stratum
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +000040 │   ├── app_map.tfvars
41 │   ├── backend.tf
42 │   ├── main.tf -> ../../../../common/tost/apps/stratum/main.tf
43 │   ├── menlo-staging-leaf-1-chassis-config.pb.txt
44 │   ├── menlo-staging-leaf-2-chassis-config.pb.txt
45 │   ├── menlo-staging-spine-1-chassis-config.pb.txt
46 │   ├── menlo-staging-spine-2-chassis-config.pb.txt
47 │   ├── stratum.yaml
48 │   ├── tost-dev-chassis-config.pb.txt
49 │   └── variables.tf -> ../../../../common/tost/apps/stratum/variables.tf
Charles Chan4a107222020-10-30 17:23:48 -070050 ├── telegraf
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +000051 │   ├── app_map.tfvars
52 │   ├── backend.tf
53 │   ├── main.tf -> ../../../../common/tost/apps/telegraf/main.tf
54 │   ├── telegraf.yaml
55 │   └── variables.tf -> ../../../../common/tost/apps/telegraf/variables.tf
56 └── variables.tf -> ../../../common/tost/variables.tf
Charles Chan4a107222020-10-30 17:23:48 -070057
58There are four Terraform scripts inside **tost** directory and are responsible for managing each service.
59
60Root folder
61^^^^^^^^^^^
62Terraform reads **app_map.tfvars** to know which application will be installed on Rancher
63and which version and customized values need to apply to.
64
Hyunsun Moonfc751aa2020-11-11 18:49:47 -080065Here is the example of **app_map.tfvars** which defines prerequisite apps for TOST
66as well as project and namespace in which TOST apps will be provisioned.
67Note that currently we don't have any prerequisite so we left this blank intentionally.
68It can be used to specify prerequisites in the future.
Charles Chan4a107222020-10-30 17:23:48 -070069
70.. code-block::
71
72 project_name = "tost"
73 namespace_name = "tost"
74
Hyunsun Moonfc751aa2020-11-11 18:49:47 -080075 app_map = {}
Charles Chan4a107222020-10-30 17:23:48 -070076
77ONOS folder
78^^^^^^^^^^^
79All files under **onos** directory are related to ONOS application.
Hyunsun Moonfc751aa2020-11-11 18:49:47 -080080The **app_map.tfvars** in this folder describes the information about ONOS helm chart.
Charles Chan4a107222020-10-30 17:23:48 -070081
82In this example, we specify the **onos-tost** helm chart version to **0.1.18** and load **onos.yaml**
83as custom value files.
84
85.. code-block::
86
87 apps = ["onos"]
88
89 app_map = {
90 onos = {
91 app_name = "onos-tost"
92 project_name = "tost"
93 target_namespace = "onos-tost"
94 catalog_name = "onos"
95 template_name = "onos-tost"
96 template_version = "0.1.18"
97 values_yaml = ["onos.yaml"]
98 }
99 }
100
101**onos.yaml** used to custom your ONOS-tost Helm chart values and please pay attention to the last section, config.
102
103.. code-block:: yaml
104
105 onos-classic:
106 image:
107 tag: master
108 pullPolicy: Always
109 replicas: 1
110 atomix:
111 replicas: 1
112 logging:
113 config: |
114 # Common pattern layout for appenders
115 log4j2.stdout.pattern = %d{RFC3339} %-5level [%c{1}] %msg%n%throwable
116
117 # Root logger
118 log4j2.rootLogger.level = INFO
119
120 # OSGi appender
121 log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
122 log4j2.appender.osgi.type = PaxOsgi
123 log4j2.appender.osgi.name = PaxOsgi
124 log4j2.appender.osgi.filter = *
125
126 # stdout appender
127 log4j2.rootLogger.appenderRef.Console.ref = Console
128 log4j2.appender.console.type = Console
129 log4j2.appender.console.name = Console
130 log4j2.appender.console.layout.type = PatternLayout
131 log4j2.appender.console.layout.pattern = ${log4j2.stdout.pattern}
132
133 # SSHD logger
134 log4j2.logger.sshd.name = org.apache.sshd
135 log4j2.logger.sshd.level = INFO
136
137 # Spifly logger
138 log4j2.logger.spifly.name = org.apache.aries.spifly
139 log4j2.logger.spifly.level = WARN
140
141 # SegmentRouting logger
142 log4j2.logger.segmentrouting.name = org.onosproject.segmentrouting
143 log4j2.logger.segmentrouting.level = DEBUG
144
145 config:
146 server: gerrit.opencord.org
147 repo: aether-pod-configs
148 folder: staging/ace-menlo/tost/onos
149 file: onos-netcfg.json
150 netcfgUrl: http://onos-tost-onos-classic-hs.tost.svc:8181/onos/v1/network/configuration
151 clusterUrl: http://onos-tost-onos-classic-hs.tost.svc:8181/onos/v1/cluster
152
153Once the **onos-tost** containers are deployed into Kubernetes,
154it will read **onos-netcfg.json** file from the **aether-pod-config** and please change the folder name to different location if necessary.
155
156**onos-netcfg.json** is environment dependent and please change it to fit your environment.
157
158..
159 TODO: Add an example based on the recommended topology
160
161Stratum folder
162^^^^^^^^^^^^^^
163Stratum uses a similar directory structure as ONOS for Terraform and its configuration files.
164
165The customize value file is named **stratum.yaml**
166
167.. code-block::
168
169 app_map = {
170 stratum= {
171 app_name = "stratum"
172 project_name = "tost"
173 target_namespace = "stratum"
174 catalog_name = "stratum"
175 template_name = "stratum"
176 template_version = "0.1.9"
177 values_yaml = ["stratum.yaml"]
178 }
179 }
180
181Like ONOS, **stratum.yaml** used to customize Stratum Helm Chart and please pay attention to the config section.
182
183.. code-block:: yaml
184
185 image:
186 registry: registry.aetherproject.org
187 repository: tost/stratum-bfrt
188 tag: 9.2.0-4.14.49
189 pullPolicy: Always
190 pullSecrets:
191 - aether-registry-credential
192
193 extraParams:
194 - "-max_log_size=0"
195 - '-write_req_log_file=""'
196 - '-read_req_log_file=""'
197 - "-v=0"
198 - "-stderrthreshold=0"
199 - "-bf_switchd_background=false"
200
201 nodeSelector:
202 node-role.aetherproject.org: switch
203
204 tolerations:
205 - effect: NoSchedule
206 value: switch
207 key: node-role.aetherproject.org
208
209 config:
210 server: gerrit.opencord.org
211 repo: aether-pod-configs
212 folder: staging/ace-onf-menlo/tost/stratum
213
214Stratum has the same deployment workflow as ONOS.
215Once it is deployed to Kubernetes, it will read switch-dependent config files from the aether-pod-configs repo.
216The key folder indicates that relative path of configs.
217
218.. attention::
219
220 The switch-dependent config file should be named as **${hostname}-chassis-config.pb.txt**.
221 For example, if the host name of your Tofino switch is **my-leaf**, please name config file **my-leaf-config.pb.txt**.
222
223..
224 TODO: Add an example based on the recommended topology
225
226Telegraf folder
227^^^^^^^^^^^^^^^
228
229The app_map.tfvars specify the Helm Chart version and the filename of the custom Helm value file.
230
231.. code-block::
232
233 apps=["telegraf"]
234
235 app_map = {
236 telegraf= {
237 app_name = "telegraf"
238 project_name = "tost"
239 target_namespace = "telegraf"
240 catalog_name = "influxdata"
241 template_name = "telegraf"
242 template_version = "1.7.23"
243 values_yaml = ["telegraf.yaml"]
244 }
245 }
246
247The **telegraf.yaml** used to override the Telegraf Helm Chart and its environment-dependent.
248Please pay attention to the **inputs.addresses** section.
249Telegraf will read data from stratum so we need to specify all Tofino switch’s IP addresses here.
250Taking Menlo staging pod as example, there are four switches so we fill out 4 IP addresses.
251
252.. code-block:: yaml
253
254 podAnnotations:
255 field.cattle.io/workloadMetrics: '[{"path":"/metrics","port":9273,"schema":"HTTP"}]'
256
257 config:
258 outputs:
259 - prometheus_client:
260 metric_version: 2
261 listen: ":9273"
262 inputs:
263 - cisco_telemetry_gnmi:
264 addresses:
265 - 10.92.1.81:9339
266 - 10.92.1.82:9339
267 - 10.92.1.83:9339
268 - 10.92.1.84:9339
269 redial: 10s
270 - cisco_telemetry_gnmi.subscription:
271 name: stratum_counters
272 origin: openconfig-interfaces
273 path: /interfaces/interface[name=*]/state/counters
274 sample_interval: 5000ns
275 subscription_mode: sample
276
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000277
278Create Your Own Configs
279^^^^^^^^^^^^^^^^^^^^^^^
280
281The easiest way to create your own configs is running the template script.
282
283Assumed we would like to set up the **ace-example** pod in the production environment.
284
2851. open the **tools/ace_env**
2862. fill out all required variables
2873. import the environment variables from **tools/ace_env**
2884. perform the makefile command to generate configuration and directory for TOST
2895. update **onos-netcfg.json** for ONOS
2906. update **${hostname}-chassis-config.pb.txt** for Stratum
2917. update all switch IPs in **telegraf.yaml**
2928. commit your change and open the Gerrit patch
293
294.. code-block:: console
295
296 vim tools/ace_env
297 source tools/ace_env
298 make -C tools/ tost
299 vim production/ace-example/tost/onos/onos-netcfg.json
300 vim production/ace-example/tost/stratum/*${hostname}-chassis-config.pb.txt**
301 vim production/ace-example/tost/telegraf/telegraf.yam
302 git add commit
303 git review
304
305
Charles Chan4a107222020-10-30 17:23:48 -0700306Quick recap
307^^^^^^^^^^^
308
309To recap, most of the files in **tost** folder can be copied from existing examples.
310However, there are a few files we need to pay extra attentions to.
311
312- **onos-netcfg.json** in **onos** folder
313- Chassis config in **stratum** folder
Zack Williams794532a2021-03-18 17:38:36 -0700314 There should be one chassis config for each switch. The file name needs to be
315 **${hostname}-chassis-config.pb.txt**
316- **telegraf.yaml** in **telegraf** folder need to be updated with all switch
317 IP addresses
Charles Chan4a107222020-10-30 17:23:48 -0700318
319Double check these files and make sure they have been updated accordingly.
320
321
322Create a review request
323^^^^^^^^^^^^^^^^^^^^^^^
Zack Williams794532a2021-03-18 17:38:36 -0700324We also need to create a gerrit review request, similar to what we have done in
325the **Aether Runtime Deployment**.
326
327Please refer to :doc:`Aether Runtime Deployment <runtime_deployment>` to
328create a review request.
Charles Chan4a107222020-10-30 17:23:48 -0700329
330
331Create TOST deployment job in Jenkins
332=====================================
Zack Williams794532a2021-03-18 17:38:36 -0700333There are three major components in the Jenkins system, the Jenkins pipeline
334and Jenkins Job Builder and Jenkins Job.
Charles Chan4a107222020-10-30 17:23:48 -0700335
Zack Williams794532a2021-03-18 17:38:36 -0700336We follow the Infrastructure as Code principle to place three major components
337in a Git repo, ``aether-ci-management``
338
339Download the ``aether-ci-management`` repository.
Charles Chan4a107222020-10-30 17:23:48 -0700340
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000341.. code-block:: shell
342
343 $ cd $WORKDIR
344 $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-ci-management"
345
346
Zack Williams794532a2021-03-18 17:38:36 -0700347Here is the example of folder structure, we put everything related to three
348major components under the jjb folder.
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000349
350.. code-block:: console
351
352 $ tree -d jjb
353 jjb
354 ├── ci-management
355 ├── global
356 │   ├── jenkins-admin -> ../../global-jjb/jenkins-admin
357 │   ├── jenkins-init-scripts -> ../../global-jjb/jenkins-init-scripts
358 │   ├── jjb -> ../../global-jjb/jjb
359 │   └── shell -> ../../global-jjb/shell
360 ├── pipeline
361 ├── repos
362 ├── shell
363 └── templates
Charles Chan4a107222020-10-30 17:23:48 -0700364
365
366Jenkins pipeline
367^^^^^^^^^^^^^^^^
Zack Williams794532a2021-03-18 17:38:36 -0700368Jenkins pipeline runs the Terraform scripts to install desired applications
369into the specified Kubernetes cluster.
Charles Chan4a107222020-10-30 17:23:48 -0700370
Zack Williams794532a2021-03-18 17:38:36 -0700371Both ONOS and Stratum will read configuration files (network config, chassis
372config) from aether-pod-config.
373
374The default git branch is master. For testing purpose, we also provide two
375parameters to specify the number of reviews and patchset.
376
Charles Chan4a107222020-10-30 17:23:48 -0700377We will explain more in the next section.
378
379.. note::
380
381 Currently, we don’t perform the incremental upgrade for TOST application.
382 Instead, we perform the clean installation.
Zack Williams794532a2021-03-18 17:38:36 -0700383 In the pipeline script, Terraform will destroy all existing resources and
384 then create them again.
Charles Chan4a107222020-10-30 17:23:48 -0700385
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000386
Zack Williams794532a2021-03-18 17:38:36 -0700387We put all pipeline scripts under the pipeline directory, the language of the
388pipeline script is groovy.
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000389
390.. code-block:: console
391
392 $ tree pipeline
393 pipeline
394 ├── aether-in-a-box.groovy
395 ├── artifact-release.groovy
396 ├── cd-pipeline-charts-postrelease.groovy
397 ├── cd-pipeline-dockerhub-postrelease.groovy
398 ├── cd-pipeline-postrelease.groovy
399 ├── cd-pipeline-terraform.groovy
400 ├── docker-publish.groovy
401 ├── ng40-func.groovy
402 ├── ng40-scale.groovy
403 ├── reuse-scan-gerrit.groovy
404 ├── reuse-scan-github.groovy
405 ├── tost-onos.groovy
406 ├── tost-stratum.groovy
407 ├── tost-telegraf.groovy
408 └── tost.groovy
409
410Currently, we had four pipeline scripts for TOST deployment.
411
4121. tost-onos.groovy
4132. tost-stratum.groovy
4143. tost-telegraf.groovy
4154. tost.groovy
416
Zack Williams794532a2021-03-18 17:38:36 -0700417tost-[onos/stratum/telegraf].groovy are used to deploy the individual
418application respectively, and tost.groovy is a high level script, used to
419deploy the TOST application, it will execute the above three scripts in its
420pipeline script.
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000421
422
Charles Chan4a107222020-10-30 17:23:48 -0700423Jenkins jobs
424^^^^^^^^^^^^
425
426Jenkins job is the task unit in the Jenkins system. A Jenkins job contains the following information:
427
428- Jenkins pipeline
429- Parameters for Jenkins pipeline
430- Build trigger
431- Source code management
432
433We created one Jenkins job for each TOST component, per Aether edge.
Charles Chan4a107222020-10-30 17:23:48 -0700434
Zack Williams794532a2021-03-18 17:38:36 -0700435We have four Jenkins jobs (HostPath provisioner, ONOS, Stratum and Telegraf)
436for each edge as of today.
437
438There are 10+ parameters in Jenkins jobs and they can be divided into two
439parts, cluster-level and application-level.
440
Charles Chan4a107222020-10-30 17:23:48 -0700441Here is an example of supported parameters.
442
443.. image:: images/jenkins-onos-params.png
444 :width: 480px
445
446Application level
447"""""""""""""""""
448
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000449- **GERRIT_CHANGE_NUMBER/GERRIT_PATCHSET_NUMBER**: tell the pipeline script to read
450 the config for aether-pod-configs repo from a specified gerrit review, instead of the
451 HEAD branch. It’s good for developer to test its change before merge.
452- **onos_user**: used to login ONOS controller
Zack Williams794532a2021-03-18 17:38:36 -0700453- **git_repo/git_server/git_user/git_password_env**: information of git
454 repository, **git_password_env** is a key for Jenkins Credential system.
Charles Chan4a107222020-10-30 17:23:48 -0700455
456Cluster level
457"""""""""""""
Zack Williams794532a2021-03-18 17:38:36 -0700458- **gcp_credential**: Google Cloud Platform credential for remote storage, used
459 by Terraform.
Charles Chan4a107222020-10-30 17:23:48 -0700460- **terraform_dir**: The root directory of the TOST directory.
461- **rancher_cluster**: target Rancher cluster name.
462- **rancher_api_env**: Rancher credential to access Rancher, used by Terraform.
Charles Chan4a107222020-10-30 17:23:48 -0700463
464.. note::
465
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000466 Typically, developer only focus on **GERRIT_CHANGE_NUMBER** and **GERRIT_PATCHSET_NUMBER**. The rest of them are managed by OPs.
Charles Chan4a107222020-10-30 17:23:48 -0700467
468Jenkins Job Builder (JJB)
469^^^^^^^^^^^^^^^^^^^^^^^^^
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000470
Zack Williams794532a2021-03-18 17:38:36 -0700471We prefer to apply the IaC (Infrastructure as Code) for everything. We use the
472JJB (Jenkins Job Builder) to create new Jenkins Job, including the Jenkins
473pipeline. We need to clone a set of Jenkins jobs when a new edge is deployed.
Charles Chan4a107222020-10-30 17:23:48 -0700474
Zack Williams794532a2021-03-18 17:38:36 -0700475In order to provide the flexibility and avoid re-inventing the wheel, we used
476the job template to declare your job. Thanks to the JJB, we can use the
477parameters in the job template to render different kinds of jobs easily.
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000478
479All the template files are placed under templates directory.
480
481.. code-block:: console
482
483 ╰─$ tree templates
484 templates
485 ├── aether-in-a-box.yaml
486 ├── archive-artifacts.yaml
487 ├── artifact-release.yml
488 ├── cd-pipeline-terraform.yaml
489 ├── docker-publish-github.yaml
490 ├── docker-publish.yaml
491 ├── helm-lint.yaml
492 ├── make-test.yaml
493 ├── ng40-nightly.yaml
494 ├── ng40-test.yaml
495 ├── private-docker-publish.yaml
496 ├── private-make-test.yaml
497 ├── publish-helm-repo.yaml
498 ├── reuse-gerrit.yaml
499 ├── reuse-github.yaml
500 ├── sync-dir.yaml
501 ├── tost.yaml
502 ├── verify-licensed.yaml
503 └── versioning.yaml
504
Zack Williams794532a2021-03-18 17:38:36 -0700505We defined all TOST required job templates in tost.yaml and here is its partial
506content.
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000507
508.. code-block:: yaml
509
510 - job-template:
511 name: "{name}-onos"
512 id: "deploy-onos"
513 project-type: pipeline
514 dsl: !include-raw-escape: jjb/pipeline/tost-onos.groovy
515 triggers:
516 - onf-infra-tost-gerrit-trigger:
517 gerrit-server-name: '{gerrit-server-name}'
518 trigger_command: "apply"
519 pattern: "{terraform_dir}/tost/onos/.*"
520 logrotate:
521 daysToKeep: 7
522 numToKeep: 10
523 artifactDaysToKeep: 7
524 artifactNumToKeep: 10
525 parameters:
526 - string:
527 name: gcp_credential
528 default: "{google_bucket_access}"
529 - string:
530 name: rancher_cluster
531 default: "{rancher_cluster}"
532 - string:
533 name: rancher_api_env
534 default: "{rancher_api}"
535 - string:
536 name: git_repo
537 default: "aether-pod-configs"
538 - string:
539 name: git_server
540 default: "gerrit.opencord.org"
541 - string:
542 name: git_ssh_user
543 default: "jenkins"
544
545
546
547
548Once we have the job template, we need to tell the JJB, we want to use the job template to create our own jobs.
549Here comes the concept of project, you need to define job templates you want to use and the values of all parameters.
550
551
552We put all project yaml files under the repo directory and here is the example
553
554.. code-block:: console
555
556 ╰─$ tree repos 130 ↵
557 repos
558 ├── aether-helm-charts.yaml
559 ├── aether-in-a-box.yaml
560 ├── cd-pipeline-terraform.yaml
561 ├── ng40-test.yaml
562 ├── spgw.yaml
563 └── tost.yaml
564
565
566Following is the example of tost projects, we defined three projects here, and each project has different
567parameters and Jenkins jobs it wants to use.
568
569.. code-block:: yaml
570
571 - project:
572 name: deploy-menlo-tost-dev
573 rancher_cluster: "menlo-tost-dev"
574 terraform_dir: "testing/menlo-tost"
575 rancher_api: "{rancher_testing_access}"
576 jobs:
577 - "deploy"
578 - "deploy-onos"
579 - "deploy-stratum"
580 - "deploy-telegraf"
581 - project:
582 name: deploy-menlo-tost-staging
583 rancher_cluster: "ace-menlo"
584 terraform_dir: "staging/ace-menlo"
585 rancher_api: "{rancher_staging_access}"
586 jobs:
587 - "deploy"
588 - "deploy-onos"
589 - "deploy-stratum"
590 - "deploy-telegraf"
591 - project:
592 name: deploy-menlo-production
593 rancher_cluster: "ace-menlo"
594 terraform_dir: "production/ace-menlo"
595 rancher_api: "{rancher_production_access}"
596 jobs:
597 - "deploy"
598 - "deploy-onos"
599 - "deploy-stratum"
600 - "deploy-telegraf"
601
602
603Create Your Own Jenkins Job
604^^^^^^^^^^^^^^^^^^^^^^^^^^^
605
606Basically, if you don't need to customize the Jenkins pipeline script and the job configuration, the only thing
607you need to do is modify the repos/tost.yaml to add your project.
608
609For example, we would like to deploy the TOST to our production pod, let's assume it named "tost-example".
610Add the following content into repos/tost.yaml
611
612.. code-block:: yaml
613
614 - project:
615 name: deploy-tost-example-production
616 rancher_cluster: "ace-test-example"
617 terraform_dir: "production/tost-example"
618 rancher_api: "{rancher_production_access}"
619 jobs:
620 - "deploy"
621 - "deploy-onos"
622 - "deploy-stratum"
623 - "deploy-telegraf"
624
625
626.. note::
627
628 The **terraform_dir** indicates the directory location in aether-pod-configs repo, please ensure your Terraform scripts
629 already there before running the Jenkins job.
630
Charles Chan4a107222020-10-30 17:23:48 -0700631
632Trigger TOST deployment in Jenkins
633==================================
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000634Whenever a change is merged into **aether-pod-config**,
Charles Chan4a107222020-10-30 17:23:48 -0700635the Jenkins job should be triggered automatically to (re)deploy TOST.
Charles Chan4a107222020-10-30 17:23:48 -0700636
Hung-Wei Chiuf7cadb32020-11-19 04:49:35 +0000637You can also type the comment **apply** in the Gerrit patch, it will trigger Jenkins jobs to deploy TOST for you.
Charles Chan4a107222020-10-30 17:23:48 -0700638
Charles Chan2cb05c72020-12-09 16:31:20 -0800639
640Verification
641============
642Fabric connectivity should be fully ready at this point.
643We should verify that **all servers**, including compute nodes and the management server,
644have an IP address and are **able to reach each other via fabric interface** before continuing the next step.
645
646This can be simply done by running a **ping** command from one server to another server's fabric IP.
647
648
Charles Chan4a107222020-10-30 17:23:48 -0700649Troubleshooting
650===============
651
652The deployment process involves the following steps:
653
6541. Jenkins Job
6552. Jenkins Pipeline
6563. Clone Git Repository
6574. Execute Terraform scripts
6585. Rancher start to install applications
6596. Applications be deployed into Kubernetes cluster
6607. ONOS/Stratum will read the configuration (network config, chassis config)
6618. Pod become running
662
663Taking ONOS as an example, here's what you can do to troubleshoot.
664
665You can see the log message of the first 4 steps in Jenkins console.
666If something goes wrong, the status of the Jenkins job will be in red.
667If Jenkins doesn't report any error message, the next step is going to Rancher's portal
668to ensure the Answers is same as the *onos.yaml* in *aether-pod-configs*.