Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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. 

@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 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

555 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you