Provide ARM support for Backstage Showcase with PostgreSQL
billmania42 opened this issue · comments
When I attempt to deploy this chart, the backstage application pod fails to run. I tried the latest image, as well as some of the older image tags as well.
$ oc logs -f po/backstage-5cf5cb6ccd-ppwcv
exec /usr/bin/node: exec format error
$ oc describe deployment/backstage
Name: backstage
Namespace: default
CreationTimestamp: Mon, 30 Jan 2023 10:23:16 -0600
Labels: app.kubernetes.io/instance=backstage
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=backstage
app.kubernetes.io/version=v1.7.0
helm.sh/chart=backstage-0.1.6
Annotations: deployment.kubernetes.io/revision: 7
meta.helm.sh/release-name: backstage
meta.helm.sh/release-namespace: default
Selector: app.kubernetes.io/instance=backstage,app.kubernetes.io/name=backstage
Replicas: 1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 25% max unavailable, 25% max surge
Pod Template:
Labels: app.kubernetes.io/instance=backstage
app.kubernetes.io/name=backstage
Service Account: backstage
Containers:
backstage:
Image: ghcr.io/janus-idp/redhat-backstage-build:500312b32dc375b5326550c498aadeeeac1b33f9
Port: 8080/TCP
Host Port: 0/TCP
Command:
node
packages/backend
--config
/config/app-config.yaml
Limits:
cpu: 100m
memory: 128Mi
Requests:
cpu: 100m
memory: 128Mi
Liveness: http-get http://:http/ delay=0s timeout=1s period=10s #success=1 #failure=3
Readiness: http-get http://:http/ delay=0s timeout=1s period=10s #success=1 #failure=3
Environment:
POSTGRES_ADMIN_PASSWORD: <set to the key 'databasePassword' in secret 'backstage-postgresql'> Optional: false
POSTGRES_HOST: backstage-postgresql.default.svc
POSTGRES_USER: postgres
POSTGRES_PORT: 5432
Mounts:
/config from backstage-config (ro)
Volumes:
backstage-config:
Type: Secret (a volume populated by a Secret)
SecretName: backstage-config
Optional: false
Conditions:
Type Status Reason
Progressing True NewReplicaSetAvailable
Available False MinimumReplicasUnavailable
OldReplicaSets:
NewReplicaSet: backstage-5cf5cb6ccd (1/1 replicas created)
Events:
Type Reason Age From Message
Normal ScalingReplicaSet 39m deployment-controller Scaled down replica set backstage-5cf5cb6ccd to 0
Normal ScalingReplicaSet 2m6s (x2 over 2d18h) deployment-controller Scaled up replica set backstage-5cf5cb6ccd to 1
Hey @billmania42 Exec format error
can occur if your computer architecture is different than what the image was built for. Can you please confirm what cpu architecture you are using?
The image specified in the values.yaml
for this chart is https://quay.io/repository/janus-idp/redhat-backstage-build?tab=tags&tag=latest
That image currently only supports arm64
and amd64
cpu architectures.
I get the same error.
I am attempting to run locally with Red Hat OpenShift Local on my Mac, which uses the Apple M1 Pro chip. It uses the arm64 architecture.
The log file in the postgres pod gives the following error:
exec /usr/bin/container-entrypoint: exec format error
Hi @MonicaG , what container image are you deploying? Also redhat-backstage-build
or backstage-showcase
? Why am I asking.. this chart very recently switched the default image from redhat-backstage-build
to backstage-showcase
and that may be the source of your problems since this image is x86_64
only at this moment.
In any case we need to look into this 🙂
Hi @tumido - The janus-idp/backstage-showcase
image. I copied the values.yaml file and updated the apps.example.com
to .apps-crc.testing
. Other than that change, the file was the same.
I tried with the redhat-backstage-build
image as well. I received the same error.
Could it be something with the fedora/postgresql-15 image? It is the postgresql pod that is displaying the error in the log.
I'll try it on OCP local on M1 and get back to you.🙂 Sorry for the inconvenience.
@MonicaG I've created this experimental ARM image can you please try it?
And you are also right that the fedora/postgresql-15
is not ARM compatible either. Fortunately, there's an alternative already available within OpenShift Local.
Can you please try following values:
helm install oci://ghcr.io/janus-idp/helm-backstage/backstage \
--generate-name \
--set upstream.backstage.image.repository=tcoufal/backstage-showcase \
--set upstream.backstage.image.tag=arm \
--set upstream.postgresql.image.registry=default-route-openshift-image-registry.apps-crc.testing \
--set upstream.postgresql.image.repository=openshift/postgresql
The command above doesn't address proper hostname configuration, but it should at least properly deploy. At least it does on my machine. I hope we can simplify the hostname configuration via #63 🤷
Hi @tumido - yes, it works on my computer! Thank you for this fix!