Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,756
Community Members
 
Community Events
168
Community Groups

Bamboo Agent in Openshift

I'm trying to run the basic dockerfile of bamboo agent on the Openshift 3.4 cluster. 

 

Image: https://hub.docker.com/r/atlassian/bamboo-agent-base

I've added the docker init script equivalent to Openshift using the command and args in the deployment config settings. The issue I have is each time it starts up the pod (container) I get an output message of 

starting container process caused "exec: \"atlassian/bamboo-agent-base\": stat atlassian/bamboo-agent-base: no such file or directory"

I've also setup the volume mount for the  configuration from the cluster to persist for "

/home/bamboo/bamboo-agent-home


Any suggestions on why I would be seeing this error on the basic build example from the docker file running in Openshift? Appreciate any help.

 

1 answer

0 votes
Boris Van Hardeveld Marketplace Partner Jul 20, 2020

Hello @Charles S., would it be possible to share your full Pod specification? I'm expecting there to be something wrong with the volume(mounts), but can't tell from the information you provided.

As a reference, below you can find the specs as used by our Kubernetes agents plugin (which uses a PVC, but this is not a requirement). I'm not an expert in OpenShift though, so not sure how this would translate.

apiVersion: v1
kind: Pod
metadata:
name: bamboo-agent-standalone
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: bamboo-agent
image: atlassian/bamboo-agent-base:6.8.0
imagePullPolicy: Always
args: ["<bamboo-server-url>"]
volumeMounts:
- name: agent-home
mountPath: /home/bamboo/bamboo-agent-home
volumes:
- name: agent-home
persistentVolumeClaim:
claimName: bamboo-agent-pvc
restartPolicy: OnFailure

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: bamboo-agent-pvc
spec:
resources:
requests:
storage: 1Gi
accessModes:
- ReadWriteOnce

Here is the spec section of the config

spec:
replicas: 1
revisionHistoryLimit: 10
selector:
app: bambooslave
deploymentconfig: bambooslave
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 1200
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
labels:
app: bambooslave
deploymentconfig: bambooslave
version: '8'
spec:
containers:
- args:
- 'https://bamboo.internal.com:8447/'
command:
- atlassian/bamboo-agent-base
image: >-
<removed_for_posting>@sha256:eb9f83f427044a9df77024f332b37bcd927999f175ce6dac7720ff06df9ed720
imagePullPolicy: Always
name: bambooslave
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
- containerPort: 8447
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 30
resources:
limits:
cpu: '1'
memory: 1G
requests:
cpu: '1'
memory: 1G
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /home/bamboo/bamboo-agent-home
name: bambooagent
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: bambooagent
persistentVolumeClaim:
claimName: bamboo-slave 

. *Apologies, the formatting is stripped when pasting - but assure the indention is correct on the config file. 

Boris Van Hardeveld Marketplace Partner Jul 20, 2020

@Charles S. what is the purpose of specifying a command (atlassian/bamboo-agent-base) for the container? The image definition contains an ENTRYPOINT (see https://bitbucket.org/atlassian-docker/docker-bamboo-agent-base/src/d18838b1b7cba21c8207b307d223432f0e736028/Dockerfile#lines-41), which starts the agent script. However, by providing a command in your spec, you are essentially overriding this (see https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes ). Obvioulsy, atlassian/bamboo-agent-base is not an executable, which should explain the error message you are seeing.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 9.0 is now available

Hey there, Data Center community! I'm Martyna Wojtas and I am the Product Manager for Bamboo Data Center. I’m excited to share that Bamboo 9.0 is now available. We purpose-built this platform to help...

301 views 0 7
Read article

Atlassian Community Events