Skip to main content
Version: 10.3.1

Set Docker CI/CD

Requirements​

OSCPURAMDisk space
RedHat/CentOS 9.x28 GB100 GB

The server's capacity and storage size depend on the number of implementations to be running at the same time.

Architecture​

Docker Compose is the main part of this project architecture. Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.

With the Compose commands, you can manage the whole lifecycle of your application:

  • Start, stop, and rebuild services.
  • View the status of running services.
  • Stream the log output of running services.
  • Run a one-off command on a service.

Resources​

Services​

ServiceLicenseVersion
DockerApache License Version 2.019.03.11
Docker-ComposeApache License Version 2.01.25.5
JenkinsMIT2.222.4 (LTS)
Nexus Repository Manager OSSEclipse Public License Version 1.02.14.18-01
SonarqubeGNU Lesser GPL License Version 38.3.1
MavenGNU Lesser GPL License Version 33.5.4
JavaOpenJDK / Oracle JDK1.8.0_242

Plugins​

PluginLicenseVersion
JacocoMIT3.0.6
Sonar-ScannerGNU Lesser GPL License Version 34.3.0.2102

Dependencies​

For additional information, see Installing ODF 2 dependencies to on-premises Nexus.

Installation​

Go to https://git.workfusion.com/scm/sit/site-reliability.git for the Git repository with source files.

  1. Download the sources to the Linux server: cicd.tar.gz.

  2. Create the installation folder.

    $ mkdir -p /opt/cicd
  3. Unpack the downloaded package to the directory.

    $ tar -xvzf cicd.tar.gz -C /opt/cicd/ --strip 1
  4. Add the server.crt and server.key SSL certificates to the /opt/cicd/nginx/ssl directory.

  5. Go to the installation directory and execute the installation script:

    $ cd /opt/cicd
    $ chmod 755 install.sh
    $ ./install.sh

Cleanup​

Go to the installation directory and execute the cleanup script:

$ cd /opt/cicd
$ chmod 755 clean.sh
$ ./clean.sh

Git repository configuration​

  1. Download the source files: git_files.tgz.

  2. In the following files, replace SERVER_ADDR with your server's DNS:

    deploy.sh:source="https://SERVER_ADDR/nexus/content/sites/cicd-mvp-release"
    jenkins/ci_cd_declerative.jenkinsfile: nexus_dns = 'SERVER_ADDR'
    pom.xml: <url>https://SERVER_ADDR/nexus/content/repositories/wf-dependencies/</url>
    pom.xml: <url>https://SERVER_ADDR/nexus/content/repositories/wf-dependencies/</url>
  3. Add the files to your Git Repository.

  4. Commit and push the changes.

Post-installation steps​

Updating secure credentials​

To update the secure credentials in the Jenkins web UI, follow the steps below:

  1. Go to Jenkins > Credentials > System > Global credentials (unrestricted).

  2. Click Add Credentials and enter the credentials for the Control Tower user.

  3. Add another record with credentials for the Git repository. Use a username with the password or SSH keys.

Defining Git Repository for Jenkins pipeline​

To define a Git repository for the Jenkins pipeline configuration, follow the steps below:

  1. Go to Jenkins > ci_cd-declerative pipeline > Configure.

  2. In the Pipeline section, set Repository URL, Credentials, and Branch Specifier.

  3. Save the changes.