jenkins-configuration-as-code-workshop-prerequisites

This project provides the prerequisites for Jenkins Configuration as Code workshop. It was tested on recent Linux and macOS platforms.

Users of Windows platform are advised to use most recent Windows 10 with Windows Subsystem for Linux or use Linux virtual machines as an alternative. See WSL.md file for more details.

Prerequisites

This project was tested with Docker Engine release 18.06.0+, which supports Compose file format 3.7.

$ docker version --format '{{.Server.Version}}'
19.03.11
$ docker-compose version --short
1.25.4

Getting Started

  • Clone this project.

  • Use the commands are given in the Makefile.

  • Get Docker Compose up and running.

make

GitHub

  • Test your SSH connection GitHub.

Jenkins

curl --silent --show-error --include localhost:8080 \
    | tr --delete '\r' \
    | sed --quiet --regexp-extended 's/^X-Jenkins: (.*)/\1/p'
2.235.3

Nexus

curl --silent --show-error --include localhost:8081 \
    | tr --delete '\r' \
    | sed -En 's/^Server: (.*)/\1/p'
Nexus/3.25.1-04 (OSS)

Lightweight Directory Access Protocol (LDAP)

$ curl --silent --show-error --include localhost:8090 \
    | tr --delete '\r' \
    | sed -En 's/^Server: (.*)/\1/p'
Apache
curl --silent --show-error --include localhost:8090 \
    | tail -n +18 \
    | sed "s/\&nbsp\;//g" \
    | xmlstarlet sel \
    -N n="http://www.w3.org/1999/xhtml" \
    -t -m "//n:div[@id='ajFOOT']" -v . -n
1.2.5

Login phpLDAPadmin using the following credentials.

Login DN: cn=admin,dc=acme,dc=local

Password: changeit

Expand the +--> dc=acme,dc=local (3) sign on top on left pane to see the following generated LDAP users and groups.

+--> dc=acme,dc=local (3)
---> cn=admin
+--> ou=Groups (4)
| ---> cn=Acme Managers
| ---> cn=Acme Servicers
| ---> cn=Acme Superusers
| ---> cn=Acme Users
| ---> Create new entry here
+--> ou=Users (4)
| ---> cn=manager
| ---> cn=service
| ---> cn=superuser
| ---> cn=user
| ---> Create new entry here
---> Create new entry here

If we have ldapsearch command available (e.g. from openldap-clients package on Fedora Linux), we can list the generated LDAP users and groups.

ldapsearch \
    -x \
    -h localhost:389 \
    -b "dc=acme,dc=local" \
    -s sub "objectclass=*"

Summary

If all the above mentioned services are up and running, we are ready for the Jenkins Configuration as Code workshop.

License

GNU General Public License v3.0