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.
- Upload your SSH public key to your GitHub account.
- Install Docker.
- Install Docker Compose.
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
-
Clone this project.
-
Use the commands are given in the Makefile.
-
Get Docker Compose up and running.
make
- Test your SSH connection GitHub.
- Jenkins should be locally available on http://localhost:8080.
curl --silent --show-error --include localhost:8080 \
| tr --delete '\r' \
| sed --quiet --regexp-extended 's/^X-Jenkins: (.*)/\1/p'
2.235.3
- Nexus should be locally available on http://localhost:8081.
curl --silent --show-error --include localhost:8081 \
| tr --delete '\r' \
| sed -En 's/^Server: (.*)/\1/p'
Nexus/3.25.1-04 (OSS)
- The phpLDAPadmin service should be locally available on http://localhost:8090.
$ 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/\ \;//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=*"
If all the above mentioned services are up and running, we are ready for the Jenkins Configuration as Code workshop.