Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Add Heroku-24 and ARM support#33

Merged
schneems merged 1 commit into
mainfrom
schneems/heroku-24
May 23, 2024
Merged

Add Heroku-24 and ARM support#33
schneems merged 1 commit into
mainfrom
schneems/heroku-24

Conversation

@schneems

@schneems schneems commented May 21, 2024

Copy link
Copy Markdown
Contributor

@schneems
schneems force-pushed the schneems/heroku-24 branch 14 times, most recently from 0cd6cdc to 7f6e7b4 Compare May 23, 2024 13:27
@schneems schneems changed the title Heroku-24 WIP Heroku-24 and ARM support May 23, 2024
@schneems schneems changed the title Heroku-24 and ARM support Add Heroku-24 and ARM support May 23, 2024
- Rewrites the project to use a pre-built JRuby binary. Links to downloads are at https://www.jruby.org/download.
- Adds the heroku-24 base image as a build target
- Re-uses the ARM url format for S3 that was introduced in heroku/docker-heroku-ruby-builder#38. Both the Ruby classic buildpack and CNB are tightly coupled to this format and will attempt to download binaries from S3 with cpu architecture information on heroku-24. Once built and uploaded to S3 there should be no changes needed to the buildpack to acquire support for heroku-24 and ARM due to:
  - heroku/heroku-buildpack-ruby#1439
  - heroku/buildpacks-ruby#284
@schneems
schneems force-pushed the schneems/heroku-24 branch from 7f6e7b4 to db4c775 Compare May 23, 2024 13:34
Comment thread dockerfiles/Dockerfile.heroku-24
@schneems
schneems marked this pull request as ready for review May 23, 2024 13:37
@schneems
schneems requested a review from a team as a code owner May 23, 2024 13:37

@edmorley edmorley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

I've mostly only skim read through quickly, since I presume you've tested this (or will shortly) :-)

@schneems
schneems merged commit 5d6f856 into main May 23, 2024
@schneems
schneems deleted the schneems/heroku-24 branch May 23, 2024 18:42
schneems added a commit that referenced this pull request May 23, 2024
* Add Heroku-24 and ARM support

- Rewrites the project to use a pre-built JRuby binary. Links to downloads are at https://www.jruby.org/download.
- Adds the heroku-24 base image as a build target
- Re-uses the ARM url format for S3 that was introduced in heroku/docker-heroku-ruby-builder#38. Both the Ruby classic buildpack and CNB are tightly coupled to this format and will attempt to download binaries from S3 with cpu architecture information on heroku-24. Once built and uploaded to S3 there should be no changes needed to the buildpack to acquire support for heroku-24 and ARM due to:
  - heroku/heroku-buildpack-ruby#1439
  - heroku/buildpacks-ruby#284

* Remove unused directory

Prior to #33 a script was generated for every Ruby version on every stack to execute docker. This is no longer needed, we can get rid of this directory.
@edmorley

Copy link
Copy Markdown
Member

Confirmed working with the Ruby CNB in:
heroku/buildpacks-ruby#286

Confirmed working with the classic Ruby buildpack via:

$ git clone https://github.com/heroku/jruby-getting-started && cd jruby-getting-started
$ hs create --stack heroku-24
$ git push heroku main
...
remote: -----> Building on the Heroku-24 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Ruby app detected
remote:
remote:        ## Warning: Your app needs java
remote:
remote:        The Ruby buildpack determined your app needs java installed
remote:        we recommend you add the jvm buildpack to your application:
remote:
remote:          $ heroku buildpacks:add heroku/jvm --index=1
remote:
remote: -----> Installing Java
remote:
remote: -----> Downloading Buildpack: heroku/jvm
remote: -----> Detected Framework: JVM Common
remote: -----> Installing OpenJDK 1.8... done
remote: -----> Installing bundler 2.4.22
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-3.1.0-jruby-9.4.1.0
remote: -----> Installing dependencies using bundler 2.4.22
...
remote:        Bundle completed (99.34s)
remote:        Cleaning up the bundler cache.
remote:
remote: ###### WARNING:
remote:
remote:        Installing a default version (20.9.0) of Node.js.
remote:        This version is not pinned and can change over time, causing unexpected failures.
remote:
remote:        Heroku recommends placing the `heroku/nodejs` buildpack in front of
remote:        `heroku/ruby` to install a specific version of node:
remote:
remote:        https://devcenter.heroku.com/articles/ruby-support#node-js-support
remote:
remote: -----> Installing node-v20.9.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
...
remote:        Asset precompilation completed (13.11s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote: -----> Detecting rails configuration
remote:
remote: ###### WARNING:
remote:
remote:        Installing a default version (20.9.0) of Node.js.
remote:        This version is not pinned and can change over time, causing unexpected failures.
remote:
remote:        Heroku recommends placing the `heroku/nodejs` buildpack in front of
remote:        `heroku/ruby` to install a specific version of node:
remote:
remote:        https://devcenter.heroku.com/articles/ruby-support#node-js-support
remote:
remote: ###### WARNING:
remote:
remote:        There is a more recent Ruby version available for you to use:
remote:
remote:
remote:
remote:        The latest version will include security and bug fixes. We always recommend
remote:        running the latest version of your minor release.
remote:
remote:        Please upgrade your Ruby version.
remote:
remote:        For all available Ruby versions see:
remote:          https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote:
remote:
remote: -----> Discovering process types
remote:        Procfile declares types     -> web
remote:        Default types for buildpack -> console, rake
remote:
remote: -----> Compressing...
remote:        Done: 138.5M
...
$ curl -I https://afternoon-waters-10754-b47c641c8e18.herokuapp.com/
HTTP/1.1 200 OK
...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants