forked from freeipa/freeipa-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
114 lines (105 loc) · 4.6 KB
/
README
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
These are test definitions for FreeIPA.
Currently included are Jenkins job definitions for Fedora, in
jenkins-job-builder YAML format.
Contributions for other CI systems, platforms and setups are welcome.
To install jenkins-job-builder (by the OpenStack project).
See http://ci.openstack.org/jenkins-job-builder/index.html for docs.
Sample usage:
install:
pip install --user jenkins-job-builder
test:
mkdir -p /tmp/jenkins-jobs
jenkins-jobs test ./jenkins-job-builder/ -o /tmp/jenkins-jobs
(examine /tmp/jenkins-jobs)
configuration file for talking to Jenkins (default: /etc/jenkins_jobs/jenkins_jobs.ini):
[jenkins]
user=USERNAME
password=PASSWORD
url=JENKINS_URL
project configuration file:
Copy 'project.yaml.example' to <my-project>.yaml and customize it to your needs
commit to Jenkins:
jenkins-jobs update -r ./jenkins-job-builder/:PATH/TO/<my-project>.yaml
Please change the recipient in the "mail-on-fail" publisher.
This config provides job descriptions. Other required Jenkins configuration is:
These environment variables need to be set on build nodes:
export FREEIPACI_DNS_FORWARDER=<IP address of a DNS server>
export FREEIPACI_DNS_REVERSE_ZONE=<Reverse zone to use in IPA installation>
export FREEIPACI_PASSWORD=12345678
export FREEIPACI_REALM=EXAMPLE.COM
export FREEIPACI_DOMAIN=example.com
export FREEIPACI_BASEDN=dc=example,dc=com
export FREEIPACI_STAR_CERT=<URL of a valid wildcard certificate (PKCS#12)>
export FREEIPACI_STAR_CERT_PIN=<password for FREEIPACI_STAR_CERT>
export FREEIPACI_CA_CERT=<URL of certificate that signed FREEIPACI_STAR_CERT (DER)>
export FREEIPACI_PREPARE_HOSTS_URL=<URL, see Controller scripts below>
export FREEIPACI_SHUTDOWN_HOSTS_URL=<URL, see Controller scripts below>
Required Jenkins nodes:
- master:
should have Publican, pip and sloccount installed
- freeipa-builder-{f19,f20}
- freeipa-runner-{f19,f20}
- freeipa-webui-{f19,f20}
- freeipa-controller-{f19,f20} (see Controller scripts below)
Installed Jenkins plugins:
# TODO: Not all of these are needed. Prune.
- Ant Plugin
- Backup Plugin
- Copy Artifact Plugin
- Credentials Plugin
- Dashboard View
- External Monitor Job Type Plugin
- Green Balls
- Hudson Build-Publisher plugin
- Hudson Post build task
- Javadoc Plugin
- Jenkins Beaker builder
- Jenkins build timeout plugin
- Jenkins BuildResultTrigger Plug-in
- Jenkins GIT client plugin
- Jenkins GIT plugin
- Jenkins instant-messaging plugin
- Jenkins IRC Plugin
- Jenkins Job Configuration History Plugin
- Jenkins Mailer Plugin
- Jenkins Priority Sorter Plugin
- Jenkins SLOCCount Plug-in
- Jenkins SSH Slaves plugin
- Jenkins Workspace Cleanup Plugin
- LDAP Plugin
- Matrix Authorization Strategy Plugin
- Maven Integration plugin
- PAM Authentication plugin
- Periodic Backup
- Plot plugin
- SCM API Plugin
- SCM Sync Configuration Plugin
- Simple Theme Plugin
- SSH Agent Plugin
- SSH Credentials Plugin
- Static Analysis Utilities
- Warnings Plug-in
- xUnit plugin
Controller scripts
Jenkins only allows a single slave for each test. For multi-machine testing,
we use a "controller" machine that manages nodes.
The controller uses two scripts, which it downloads from URLs specified
by envoronment variables (see above).
prepare-hosts:
Receives a test config JSON template on stdin,
where each host entry only has 'name' and 'role' specified.
The script brings up the mentioned machines and fills
in 'external_hostname' and 'ip'.
Also, fills in 'dns_forwarder', 'ntp_server', and either
'root_ssh_key_filename' or 'root_password', and may change
any other configuration.
It also installs built packages on the machines. These are found
in ./dist/rpms when prepare-hosts runs.
It also handles the assigment of static test nodes. These are
specified by using special role names, such as TRUST_IPA for IPA domain
that AD is configured to establish trusts with, or trust_master for the
actual IPA master. These fake values are substituted by the script.
Output can be YAML or JSON.
shutdown-hosts
Recieves a IPA test config file which the prepare-hosts script produced,
and brings down all machines specified in it.