https://www.schneems.com/rubyconf-2024-hackday/ [?] Join my mailing List Toot me on Mastodon Watch my Conf Talks Fork me on GitHub Read about me Subscribe to my RSS @-me on Twitter --------------------------------------------------------------------- Author of How to Open Source (.dev). A book to take you from coder to contributor. Creator of CodeTriage, a free service helping developers contribute to open source. Core committer to ruby/ruby. Married to Ruby, literally. (c) Richard Schneeman RubyConf 2024: Cloud Native Buildpack Hackday (and other Ruby deploy tools, too!) 11 Nov 2024 Twitter Reddit Lobste.rs Hacker News --------------------------------------------------------------------- I've spent the last decade+ working on Ruby deploy tooling, including (but not limited to) the Heroku classic and upcoming Cloud Native Buildpack. If you want to contribute to a Ruby deployment or packaging tool (even if it's not one I maintain), I can help. If you want to learn more about Cloud Native Buildpacks (CNBs) and maybe get a green square on GitHub (or TWO!), keep reading for more resources. Note: This post is for an in-person hackday event at RubyConf 2024 happening on Thursday, November 14th. If you found this but are away from the event, you can still follow along, but I won't be available for in-person collaboration. What is a buildpack? If you're new to Cloud Native Buildpacks, it's a way to generate OCI images (like docker) without a Dockerfile. Buildpacks take your application code on disk as input and inspect it to determine that it's a Ruby app and needs to install gems with a bundler. Install before you go Know before you go! Not strictly required, but will make your life better with iffy-wifi * Docker * pack cli brew install buildpacks/tap/pack * Set the default builder: $ pack config default-builder heroku/builder:24 * Run these commands to pre-fetch docker images: $ docker pull "heroku/heroku:24" $ docker pull "heroku/builder:24" * Optional: If you're going to want to modify the buildpack, you'll need rust installed: $ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh And clone the repo and install dependencies: $ git clone https://github.com/heroku/buildpacks-ruby $ cd buildpacks-ruby $ cargo build $ cargo test Getting started If you've never heard of a buildpack, here are some getting-started guides you can try if you find a bug or run into questions. I can help. * What is a CNB? + Follow buildpacks.io tutorial https://buildpacks.io/docs/ * Using a CNB - + RECOMMENDED: heroku/Ruby tutorial https://github.com/heroku/ buildpacks/blob/main/docs/ruby/README.md + Tutorials for using CNBs with other languages (.NET, Go, Java (Gradle), Java (Maven), Node.JS, PHP, Python, Scala) are available here. + Paketo Ruby tutorial https://paketo.io/docs/howto/ruby/ Hacking ideas Once you've played with a buildpack, you're ready for prime-time. Below, you'll find some sample things to hack on. You can tackle one by yourself, if you're ready, or heroku/ruby-buildpack issues * Anything on https://github.com/heroku/buildpacks-ruby/issues. Look for the "help wanted" tag. Deny unknown fields A well-scoped-out task with a change example involves modifying code but requires minimal rust knowledge. * Link: https://github.com/heroku/buildpacks-ruby/issues/272 * Effort: Low * Impact: Medium * Requires: Code editor, installing rust Test drive Hanami with a Ruby CNB Test drive Hanami with a Ruby CNB, document the experience and suggest changes or fixes. * Effort: low * Impact: low * Requires: Ruby Update error messages https://github.com/heroku/buildpacks-ruby/issues/333 * Effort low * Impact: low * Requires: Code editor, installing rust Warn when no bin/rails file found https://github.com/heroku/buildpacks-ruby/issues/298 * Effort: Medium * Impact: Medium * Requires: Writing Rust Build a CNB with Rust, bash, or Ruby No link. Write a Cloud Native Buildpack. Bash tutorial at https:// buildpacks.io/docs/. For ideas of possible buildpack ideas, you can look at "classic" buildpacks existing Heroku "classic" buildpacks * Effort: Medium * Impact: Unknown Add .ruby-version support * Link: https://github.com/heroku/buildpacks-ruby/issues/346 * Effort High * Impact: High * Requires: Rust proficiency Share on Twitter Reddit Lobste.rs Hacker News [schneems-p] Subscribe to my Newsletter Join thousands of developers who get new code, writing, and programming links from me delivered to their inboxes. [ ] [ ] [Subscribe] --------------------------------------------------------------------- Keep Reading * My Red Hot ADHD Programming 'Affliction' Sorry, Dave, ADHD is real, and (not acknowledging it) can hurt you. Hi. I'm Richard. I'm a Ruby Core Contributor. I also code in Rust, and enjoy giving talks and writing books about How to (Contribute to) Open Source. I was diagnosed with ADHD in my late 30's. What does it mean that I was "diagnosed" with ADHD? Am I simply a speed junkie? What even is ADHD, and why is there so much misinformation and misunderstanding about it? Keep reading to find out. Read More * Docker without Dockerfile: Build a Ruby on Rails application image in 5 minutes with Cloud Native Buildpacks (CNB) I love the power of containers, but I've never loved Dockerfile. In this post we'll build a working OCI image of a Ruby on Rails application that can run locally without the need to write or maintain a Dockerfile. You will learn about the Cloud Native Buildpack (CNB) ecosystem, and how to utilize the pack CLI to build images. Let's get to it! Read More * It's dangerous to go alone, `pub` `mod` `use` this.rs What exactly does use and mod do in Rust? And how exactly do I "require" that other file I just made? This article is what I wish I could have given a younger me. Read More * What is github.com/zombocom and why most of my Ruby libraries there? The other day I got another question about the zombocom org on GitHub that prompted me to write this post. This org, github.com/ zombocom, holds most all of my popular libraries). Why put them in a custom GitHub org, and why name it zombocom? Let's find out. Read More * Pairing on Open Source I came to love pairing after I hurt my hands and couldn't type. I had to finish up the last 2 months of a graduate CS course without the ability to use a keyboard. I had never paired before but enlisted several other developers to type for me. After I got the hang of the workflow, I was surprised that even when coding in a language my pair had never written in (C or C++), they could spot bugs and problems as we went. Toward the end, I finished the assignments faster when I wasn't touching the keyboard, than I was by myself. Talking aloud forced me to refine my thoughts before typing anything. It might be intimidating to try pairing for the first time, but as Ben puts "it's just a way of working together." Read More