This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
forked from open-estuary/ci-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
how_to_setup_ci.txt
65 lines (54 loc) · 5.8 KB
/
how_to_setup_ci.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
1. All the installation are based on the git repo in github, the address is https://github.com/open-estuary/ci-scripts
1.1 Install Jenkins
For the whole CI environment scheduler, it will call the lava to run the boot
tasks and application tasks. And will push the test results to the KernelCi.
The script about installing Jenkins locates in the ci-scripts/install-scripts/jenkins-ubuntu-install.sh, or you can directly refer to the jenkins official webpage.
1.2 Install KernelCi
KernelCI is mainly used for showing the test results, this includes showing the build, boot success or not. The kernel ci includes two parts: one is the frontend and another is the backend. The installation of them are in ci-scripts/install-scripts/, their name are kernelci-backend-install.sh and kernelci-frontend-install.sh.
1.3 Install Lava
Lava work for booting the system automatically. So the function of LAVA is to boot the boards automatically and run kinds of applications. The installation of it can refer to http://www.linaro.org/projects/test-validation/ . For Ubuntu 14.04, you can refer to the installation commands in ci-scripts/install-scripts/lava-install
1.4 Install the file server
The file server is mainly used to store the bianry files which will be used for the lava jobs. The installation is in the file named of ci-scripts/install-scripts/fileserver_install.sh. The fileserver use ngnix to provide the service.
1.5 Install the tftp server
The lava server needs the tftp service to make the board can boot successfully. So the tftp service need to deploy in the LAVA instance. That means you need to install dhcp service, nfs service and ftp service.
About the Estuary jobs:
estuary-trigger: For automatically trigger the build of estuary
estuary-build: to build all the platforms and all distros
estuary-build-complete: After building, push all the information about build to the kernelci backend database. If we don't use the kernelci to read the results. then we don't need this job.
estaury-boot: Do the boot as much as possible. And run the test cases automatically and collect the test results. Then push the results to the file server
estuary-trigger
|
|
| push distro, toolchain, binaries
estuary-build -------------------------------------> file server
|
|
| push build results
estuary-build-complete -------------------------> kernelci backend server (optional)
|
|
| pull distro, binaries
estaury-boot <-----------------------------------file server
'----------------------------------------> kernelci backend server(optional)
push boot results
2. The jenkins job parameters useage and descriptions.
For the estuary build, we have some parameters, so that we can 'Build with Parameters'. So in This part, the usage of these parameters will be described.
TREE_NAME: in the job, It mainly stand for the projects name. In the later process, it will be used to work as the root directory in the file server. String
SHELL_PLATFORM: Which Platform will be build. Such as 'D02', 'D01' or 'D02 D01' and so on. Notes: it is case sensitive. The value must be the subset of the build.sh supported.
SHELL_DISTRO: which distro will be built. Such as 'Ubuntu', 'Fedora' or 'Ubuntu Fedora'. Notes: It is a string parameter and case sensitive; the value of it must be the subset of the build.sh supported.
VERSION: String Parameter, the value of it must be one value of the estaury tag list. If not set it, the ci will use the uefi_${uefi_commit_id}_grub_${grub_commit_id}_kernel_${kernel_commit_it} to instead of it.
BOOT_PLAN: string parameter, It must be one value or a subset of the directories located in ci-scripts/boot-app-scripts/templates. Actually the default value of it is 'boot'. When lava run this job in boards, it will deploy the sata disk with the predefined distribution so that in the later process boards can boot from sata disks and run all apps in the file system which located in the sata disks.
APP_PLAN: string parameter. select which kind of applications will run on the boards. Must be one value or a subset of directories names located in ci-scripts/boot-app-scripts/templates.
USER: the username of lava server host name.
HOST: the ip address of lava server host. This parameter and the above one can be ignored when the board ip address is stable after every boot. If in that way, the scripts of estuary-boot can be simplify.
LAVA_SERVER: The url of LAVA_SERVER, such as 'http://http://htsat.vicp.cc:800/RPC2'
LAVA_USER: The lava user, which can log in the lava website.
LAVA_STREAM: The lava Bundle Stream, which is used to upload the lava result.
LAVA_TOKEN: It is used for LAVA_USER to submit the jobs with it. Different users have different tokens, it can be generated in the lava website.
KERNELCI_TOKEN: the token for people to upload files to the kernelci backend.
KERNELCI_SERVER: the kernelci backend url, such as 'http://192.168.1.108:8888'
FTP_SERVER: the file server used to store all the build binaries, such as 'http://192.168.1.108:8083'
ARCH_MAP: the string parameter. Actually, it describe the map between the board and its architecture. Such as 'd03 arm64 d02 arm64 d02 arm64'. It also can be written in the config.yaml which locate in the ci-scripts/boot-app-scripts.
TFTP_DIR: The tftp directory for pxe boot. In this project, the host and username of tftp directory are ignored because of the TFTP locating in the LAVA server host.
FTP_DIR: The directory for the file server. The host and username are ignored because of the file server located in the Jenkins server.
Notes: All the parameters above can be configured in the ci-scripts/boot-app-scripts/config.yaml.