sabre1041 / ose-jenkins-cluster

[DEPRECATED] Jenkins slave cluster on OpenShift
17 stars 64 forks source link

cannot create slave for external jenkins , rhel repo problem in configuration files #8

Open iahmad-khan opened 7 years ago

iahmad-khan commented 7 years ago

hi ,

i am getting this error while creating jenkins slave.


[root@0024a16aa43d ose-jenkins-cluster]# oc logs -f bc/jenkins-slave
Cloning "https://github.com/sabre1041/ose-jenkins-cluster.git" ...
        Commit: 196113910a6ea2bcc2949b5e6ad8729c98e089c4 (Corrected name of IP address property)
        Author: Andrew Block <andy.block@gmail.com>
        Date:   Mon Aug 1 23:56:01 2016 -0400
Step 1 : FROM registry.access.redhat.com/rhel7/rhel@sha256:143c1c3d776154667cc9314b0ce8fdb9df1cf8d154b680dd1d61542b1f3fa358
Trying to pull repository registry.access.redhat.com/rhel7/rhel ... 
Pulling from registry.access.redhat.com/rhel7/rhel
Pulling fs layer
Pulling fs layer
Downloading [==================================================>]    730 B/730 B
Download complete
Downloading 557.1 kB
Downloading 1.114 MB
...
...
Digest: sha256:143c1c3d776154667cc9314b0ce8fdb9df1cf8d154b680dd1d61542b1f3fa358
Status: Downloaded newer image for registry.access.redhat.com/rhel7/rhel@sha256:143c1c3d776154667cc9314b0ce8fdb9df1cf8d154b680dd1d61542b1f3fa358
 ---> f98706e16e41
Step 2 : ENV JENKINS_SWARM_VERSION 2.0
 ---> Running in 424fdd8b7099
 ---> fed7b116efe4
Removing intermediate container 424fdd8b7099
Step 3 : ENV JNLP_SLAVE_VERSION 2.52
 ---> Running in 85fab260d49b
 ---> 95613eb49b85
Removing intermediate container 85fab260d49b
Step 4 : ENV HOME /opt/jenkins-slave
 ---> Running in fc372df5ca94
 ---> 807d651ef1b0
Removing intermediate container fc372df5ca94
Step 5 : ENV MAVEN_VERSION 3.3.3
 ---> Running in e99fe75670c9
 ---> 9d47b1bd0506
Removing intermediate container e99fe75670c9
Step 6 : ENV JAVA_HOME /usr/lib/jvm/java
 ---> Running in f04ed5e51032
 ---> e6280c82f19e
Removing intermediate container f04ed5e51032
Step 7 : RUN yum install -y git tar zip unzip which java-1.8.0-openjdk-devel &&     yum clean all &&     useradd -u 1001 -r -m -d ${HOME} -s /sbin/nologin -c "Jenkins Slave" jenkins-slave &&     mkdir -p /opt/jenkins-slave/bin /var/lib/jenkins &&     curl -fsSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share       && mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven       && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
 ---> Running in 6a64a7155c2a
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>
error: build error: The command '/bin/sh -c yum install -y git tar zip unzip which java-1.8.0-openjdk-devel &&     yum clean all &&     useradd -u 1001 -r -m -d ${HOME} -s /sbin/nologin -c "Jenkins Slave" jenkins-slave &&     mkdir -p /opt/jenkins-slave/bin /var/lib/jenkins &&     curl -fsSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share       && mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven       && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn' returned a non-zero code: 1
manuelrinaldi commented 7 years ago

Hi i solved by create a private repository and did some modification to use centos7 instead of redHat if you want and you still need i can give you some tips

spicysomtam commented 7 years ago

Yes, I am getting the same. Maybe you can fork this repo and publish your changes? I'll have a go at tweaking it to centos, but thanks for the tip!

Seems like this is already built into openshift, so might be the case of just exporting it and then adapting it? See this. Specifically:

oc edit template jenkins-ephemeral -n openshift
manuelrinaldi commented 7 years ago

Hi I solved than my problem I reach to make it work with an external master and I did also reach the point of deploying a Java microservice give me a day or two to remember how I finally solved and I come back to you anyway the standard one should work than you have to use the PodTemplate from the pipeline to create a slave with the containers you need for your project

bandruid8 commented 6 years ago

SLAVE134-D1#1

bandruid8 commented 6 years ago

How do I get rid of slave134

bandruid8 commented 6 years ago

I know nothing that I'm doing somehow my phone had this?