Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image management jenkins slave #12

Merged
merged 2 commits into from
Jan 4, 2017

Conversation

sabre1041
Copy link
Contributor

What is this PR About?

Adds a Jenkins slave image to perform image management (promotions using skopeo)

How do we test this?

A template has been provided to automate the building process

Execute the following from within the jenkins-slaves/templates folder to instantiate the template to create the requisite imagestreams and buildconfig

oc process -v=SOURCE_REPOSITORY_URL=https://github.com/sabre1041/containers-quickstarts.git,SOURCE_REPOSITORY_REF=jenkins-slave-image-mgmt -f jenkins-slave-image-mgmt-template.json | oc create -f-

cc: @redhat-cop/containerize-it @etsauer

@sabre1041 sabre1041 changed the title Initial commit of image management jenkins slave Image management jenkins slave Jan 3, 2017
@etsauer
Copy link
Contributor

etsauer commented Jan 3, 2017

@sabre1041 can we put some basic instructions in a readme?

@etsauer
Copy link
Contributor

etsauer commented Jan 3, 2017

@sabre1041 i've tested the build of the image, and everything seems to build fine, but when I start a pod from the image, the skopeo utility doesn't appear to exist:

[esauer@localhost containers-quickstarts]$ oc new-app jenkins-slave-image-mgmt
--> Found image e403db9 (4 minutes old) in image stream jenkins-slave-image-mgmt under tag "latest" for "jenkins-slave-image-mgmt"

    Jenkins Slave Image Management 
    ------------------------------ 
    Image management tools on top of the jenkins slave base image

    Tags: openshift, jenkins, slave, copy

    * This image will be deployed in deployment config "jenkins-slave-image-mgmt"
    * The image does not expose any ports - if you want to load balance or send traffic to this component
      you will need to create a service with 'expose dc/jenkins-slave-image-mgmt --port=[port]' later

--> Creating resources with label app=jenkins-slave-image-mgmt ...
    deploymentconfig "jenkins-slave-image-mgmt" created
--> Success
    Run 'oc status' to view your app.
[esauer@localhost containers-quickstarts]$ oc get pods
NAME                                READY     STATUS             RESTARTS   AGE
jenkins-slave-image-mgmt-1-build    0/1       Completed          0          5m
jenkins-slave-image-mgmt-1-deploy   1/1       Running            0          32s
jenkins-slave-image-mgmt-1-gs1jg    0/1       CrashLoopBackOff   1          29s
[esauer@localhost containers-quickstarts]$ oc rsh jenkins-slave-image-mgmt-1-deploy
sh-4.2$ 
sh-4.2$ 
sh-4.2$ 
sh-4.2$ error: error executing remote command: error executing command in container: Error executing in Docker Container: 137
[esauer@localhost containers-quickstarts]$ skopeo inspect docker://docker.io/fedora
bash: skopeo: command not found...
Install package 'skopeo' to provide command 'skopeo'? [N/y] n

@sabre1041
Copy link
Contributor Author

@etsauer it appears that you are attempting to rsh into the deploy pod. but your actual execution of skopeo is occuring on your local machine

The slave image cannot be run as standalone by default as it expects to be launched from Jenkins and then connect back to the running instance. You can validate skopeo is installed by launching a debug pod

oc debug dc/jenkins-slave-image-mgmt

@etsauer
Copy link
Contributor

etsauer commented Jan 3, 2017

retracted. looks good. just the README

@sabre1041
Copy link
Contributor Author

@etsauer Added README

@etsauer
Copy link
Contributor

etsauer commented Jan 4, 2017

lgtm.

@etsauer etsauer merged commit 8a6c190 into redhat-cop:master Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants