Skip to content

Rezney/freeipa-ci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published