Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I am personally still on the fence about whether it would be beneficial or detrimental to give the user access to the Docker CLI, so I have foregone that as a possible pro / con in the following scenarios.

Table of Contents

Testing Docker on Jenkins

Upon first starting Jenkins, you will be asked to enter the admin password that has been printed to the Jenkins log file.

After entering this admin password, you will be prompted to set up an administrative user - you can skip this for now and continue as "admin", whose password was printed in the log.

Plugins

You will be asked if you want the recommended plugins or if you want to select your own - go ahead and select the recommended plugins and you should see them slowly install one by one.

You can install new plugins at any time by choosing "Manage Jenkins" from the dashboard and choosing to "Manage Plugins" from the menu.

Create a Job

Once Jenkins is ready, you will be dropped at the Dashboard with a "create new job" link in the center of the page.

  1. Click this link and set up a new "Freestyle job" - name the new job whatever you would like and click "Ok"
  2. Under Point this build job at the Git repository containing the Dockerfile you would like to build (for example, https://github.com/bodom0015/jenkins-experiment)
  3. Scroll down and add a build step of "Execute shell":

    Code Block
    languagebash
    docker build -t test .
  4. Click Apply / Save

You should be dropped at the "Job Details" screen viewing your newly created job

Run a Build

On the "Job Details" screen, you will see a "Build Now" button on the left side. Click this button to perform a new build.

After a few seconds, you will see your new build status appear under the Build Progress queue.

Click the link to navigate to the "Build Details" screen, where you can view more details about a particular run of a build job.

Click the "Console Output" link on the left side to view the output of this build job.

If a build fails, you will likely need to view this output in order to fix the broken build.

Solution A: Per-User Docker Sidecar

...

Result: Ideal and seemingly low-effort solution

Solution B: Per-User Docker +

...

Jenkins Spec

Summary: Allow user to run and manage their own Jenkins instance using their personal docker instance/socket

...

Result: I feel like this should be a service that we offer on NDS Labs, but not necessarily force it on users or manage it for them

Solution C: Centralized Internal

...

Jenkins

SummaryRun a centralized jenkins instance within Kubernetes to run Docker builds on all users' behalf

...

Result: Tight Coupling => Not Ideal

Solution D: Exo-Kubernetes

...

Jenkins

Summary: Spin up a raw VM on Nebula and run a jenkins instance on it outside of Kubernetes

...