Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GoCD server/agent install to Linux ARM / aarch64 system architectures #8544

Closed
richbos opened this issue Sep 11, 2020 · 10 comments · Fixed by #11341
Closed

Enable GoCD server/agent install to Linux ARM / aarch64 system architectures #8544

richbos opened this issue Sep 11, 2020 · 10 comments · Fixed by #11341

Comments

@richbos
Copy link

richbos commented Sep 11, 2020

Issue Type

Feature proposal

Summary

Enable installation of GoCD server and agent to ARM / aarch64 based systems (i.e to run on a Raspberry Pi)

Environment

Raspberry Pi 4 Model B Rev 1.2

Basic environment details
  • Go Version: go-server 20.7.0-12097
  • JAVA Version: OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
  • OS: Ubuntu 20 LTS
Steps to Reproduce
  1. Followed installation instructions for Debian (Ubuntu) at https://docs.gocd.org/current/installation/install/server/linux.html (repo/apt method).
Expected Results

GoCD server service to start.

Actual Results

Installation did not complete and server service unable to start due to the following -

Unable to locate any of the following binaries:
  /usr/share/go-server/bin/../wrapper/wrapper-linux-armhf-64
  /usr/share/go-server/bin/../wrapper/wrapper-linux-armhf-32
  /usr/share/go-server/bin/../wrapper/wrapper
@maheshp
Copy link
Contributor

maheshp commented Sep 14, 2020

GoCD installers are bundled with an appropriate JRE. Looks like the bundled JRE is targeted towards x64 and hence would not work on a ARM based systems.

I was talking to @marques-work, we were wondering if we can download an appropriate JRE and try to bring up the server without using the installer. One of us will try it out and update the issue.

@marques-work
Copy link
Member

marques-work commented Sep 14, 2020

@richbos

I've run GoCD on a Raspberry Pi4 on Raspberry Pi OS (formerly Raspbian) freshly imaged with 2020-08-20-raspios-buster-armhf-lite.

As such, even though RPi4 is aarch64 with hardware FPU, Raspberry Pi OS is 32-bit. Thus, the JDK I used was built for arm32. I'm pretty confident that if you installed Ubuntu for aarch64, it should also work if you install a 64-bit JDK for aarch64.

Using OpenJDK 11:

$ curl -LO https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.8_10.tar.gz
$ tar zxf OpenJDK11U-jdk_arm_linux_hotspot_11.0.8_10.tar.gz
$ export JAVA_HOME="$(pwd)/jdk-11.0.8+10"
$ $JAVA_HOME/bin/java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)

GoCD Server:

$ cd go-server-20.7.0
$ $JAVA_HOME/bin/java -server -jar lib/go.jar

GoCD Agent:

$ cd go-agent-20.7.0
$ $JAVA_HOME/bin/java -server -jar lib/agent-bootstrapper.jar -serverUrl "http://localhost:8153/go"

Successfully created and ran a pipeline:

image

/cc @maheshp

@richbos
Copy link
Author

richbos commented Sep 14, 2020 via email

@marques-work
Copy link
Member

marques-work commented Sep 14, 2020

@richbos cool - so I would go ahead and try the java invocations to start the either the server, agent, or both depending on your needs. It should work as GoCD is primarily a Java application. Let us know how it goes!

If you're running the server, I would give it at least 1GB of heap unless you are just exploring. More is better, of course.

@stale
Copy link

stale bot commented Dec 13, 2020

This issue has been automatically marked as stale because it has not had activity in the last 90 days.
If you can still reproduce this error on the master branch using local development environment or on the latest GoCD Release, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

@stale stale bot added the stale label Dec 13, 2020
@stale stale bot closed this as completed Dec 20, 2020
@Preen
Copy link

Preen commented Jun 23, 2022

Is there any news on this? I cant see any docker images for agents that supports ARM?

@chadlwilson
Copy link
Member

chadlwilson commented Jun 23, 2022

Related to #9029

This is a closed ticket (which I'll reopen for continuity) so no progress expected, however there are multiple aspects to this.

(Updated Mar 2023)

While the first is a pre-requisite for the others, prioritising the rest is probably required. I think it's likely non-trivial to get all the various image variants working and tested and supported relative to the resources the project has right now unless we drop some of the variants.

@chadlwilson chadlwilson reopened this Jun 23, 2022
@stale stale bot removed the stale label Jun 23, 2022
@chadlwilson chadlwilson added installers no stalebot Don't mark this stale. labels Jun 23, 2022
@chadlwilson chadlwilson changed the title Enable GoCD server/agent install to ARM / aarch64 system architectures Enable GoCD server/agent install to Linux ARM / aarch64 system architectures Oct 17, 2022
@chadlwilson chadlwilson linked a pull request Mar 4, 2023 that will close this issue
2 tasks
@chadlwilson chadlwilson added this to the Release 23.1.0 milestone Mar 4, 2023
@chadlwilson
Copy link
Member

I've closed this for now, as the GoCD server and agent has been validated on linux arm64 as of 23.1.0. There are a couple of pieces left noted at #8544 (comment) which will be addressed separately.

  1. The Linux packages declare themselves as noarch/all but actually seem to include an x64 JRE now, which is not ideal. Need to decide whether to include the wrapper binaries for arm64 in the same existing packages (and rely on folks overriding the x64 packaged JRE to an arm64 JRE of their choice installed separately) OR create separate arm64 packages OR rely on folks using docker on Linux and run a pre-built/validated image.
  2. For the docker images, Alpine will be amd64-only for now, due to multiple challenges specific to Alpine and musl libc vs glibc. Will try and raise/track that separately.

@alanzheng88
Copy link

this might help for anyone visiting this post in the future. i was able to get it to run on ARM architecture by passing: --platform linux/x86_64 to my docker command

@chadlwilson
Copy link
Member

chadlwilson commented May 6, 2023

@alanzheng88 the Alpine server and agent images are not stable or performant in my experience (or supported) via qemu emulation like this requires. If it works for you, fine, but you're on your own and would not run in production like this :)

Also not necessary with 23.1.0, assuming you are referring to arm64 (not arm32 or other variants) - use the centos-9 server image or non-alpine agent images which are multi-arch images also built for arm64, and are thus supported/tested/validated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants