Hi, 

I am trying to create GoCD custom elastic agent which supports Buildah for 
building docker images and pushing to ECR and SBT and JAVA 11 for 
compilation.

Below dockerfile I plan to use as GoCD elastic agent.

FROM eclipse-temurin:11.0.24_8-jdk-jammy # Install required packages 
including Buildah dependencies RUN apt-get update && \ apt-get install -y \ 
curl 
\ git \ zip \ unzip \ jq \ buildah \ runc \ fuse-overlayfs \ iptables && \ 
apt-get 
clean && \ rm -rf /var/lib/apt/lists/* # Install sbt ARG SBT_VERSION=1.5.6 ENV 
SBT_HOME /usr/local/sbt ENV PATH ${PATH}:${SBT_HOME}/bin RUN curl -sL 
"https://github.com/sbt/sbt/releases/download/v1.5.6/sbt-1.5.6.tgz"; | 
gunzip | tar -x -C /usr/local && \ echo -ne "- with sbt $SBT_VERSION\n" >> 
/root/.built # Setup GoCD user and environment ENV HOME /var/go RUN 
groupadd -g 496 go && \ useradd -c "go user" -d $HOME -m go -g 496 -u 498 
VOLUME 
/var/go WORKDIR /var/go USER go 
However the agent is not getting registered.
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal 
Scheduled 2m15s default-scheduler Successfully assigned 
gocd/k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 to 
ip-10-75-110-207.ec2.internal Normal Pulled 33s (x5 over 2m15s) kubelet 
Container image 
"366611831214.dkr.ecr.us-east-1.amazonaws.com/gocd/agent:es-jdk11-build" 
already present on machine Normal Created 33s (x5 over 2m15s) kubelet 
Created container k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 Normal 
Started 32s (x5 over 2m15s) kubelet Started container 
k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 Warning BackOff 3s (x10 over 
2m8s) kubelet Back-off restarting failed container 
k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 in pod 
k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017_gocd(8fe96d7b-ea06-4f80-a17b-13042f59c548)
 

[image: Screenshot 2024-09-11 at 12.39.49 PM.png]

Can you please help me here, with what are the minimum requirements to 
create an custom elastic agent 

 

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/cd320acc-2836-4d87-9a30-fa1d7233ce94n%40googlegroups.com.

Reply via email to