What’s New in Acorn v0.8

Aug 31, 2023 by Craig Jellick
What’s New in Acorn v0.8

Today we’re announcing the release of Acorn v0.8. In addition to loads of bug fixes, enhancements, and architectural changes, we’re introducing several exciting features. Read on to learn more!

More control over your acorns with jobs

Now you can list and restart jobs via the acorn cli. Jobs are often tasks that need to run along side your more traditional web-based applications to perform some finite operation. In the past, to rerun a job, you’d need to update your entire app. Now, you can list and rerun jobs independently. Here’s what the new jobs command looks like in action:

# List apps (this isn't new) $ acorn ps NAME IMAGE COMMIT CREATED ENDPOINTS MESSAGE jobs-demo 6be064a7db18 8de2e868e101 5m19s ago http://app-jobs-demo-b64cd67e.local.oss-acorn.io OK # Checkout the jobs that were deployed as part of the app $ acorn jobs NAME STATE LAST RUN NEXT RUN CREATED jobs-demo.migrate-db completed 5m22s ago N/A 5m22s ago jobs-demo.purge-cache completed 34s ago 4m25s from now 5m22s ago # Restart the purge cache job $ acorn jobs restart jobs-demo.purge-cache # Note the more recent "LAST RUN" $ acorn jobs NAME STATE LAST RUN NEXT RUN CREATED jobs-demo.migrate-db completed 5m38s ago N/A 5m38s ago jobs-demo.purge-cache completed 5s ago 4m9s from now 5m38s ago

More image control via the acorn copy command

Say goodbye to arduous pull, tag, push command sequences. Now, you can copy images between remote repositories with the acorn copy command. This little quality-of-life improvement saves you keystrokes and potential typo mistakes. It can be used in a few different ways. Here are some examples:

# First, note that this command is just on the client-side, so you must log into the registry locally $ acorn login --local-storage ghcr.io # Prompt for username and password ensues... # Copy an image from Docker Hub to GHCR: $ acorn copy docker.io/cjellick/myimage:v1 ghcr.io/cjellick/myimage:v1 # Copy the 'main' tag on an image to the 'prod' tag on the same image, and overwrite if it already exists: $ acorn copy ghcr.io/cjellick/myimage:main prod --force # Copy all tags on a particular image repo in Docker Hub to GHCR: $ acorn copy --all-tags docker.io/cjellick/myimage ghcr.io/cjellick/myimage

More visibility with custom metrics configuration

You can now configure you containers with custom metrics endpoints. This will result in prometheus scrape annotations getting added to the underlying workloads. Note that you’ll still need to run Prometheus (or other agent) in your cluster and configure it to look for such annotations. Here’s what the configuration looks like in your Acornfile:

containers: "mycontainer": { image: "nginx" ports: ["80/http", "8080/http"] metrics: { port: 8080 path: "/metrics" } }

You can find more details in the docs.

Experimental depot.dev integration

Depot is a cloud-based image building service that can really speed things up. We’ve been experimenting with this service internally and wanted to make it available as an experimental feature to others. You’ll first need a depot account. Once you have that, you can integrate it into your acorn build process. Here’s the process for enabling the integration once you have an account:

# First, your builds will need to be pushed to an external registry, # so configure acorn to use one by default $ acorn install --internal-registry-prefix ghcr.io/cjellick/build-demo # Next, you'll need to log into the registry you just specified $ acorn login ghcr.io # Prompt for username and password ensues... # Next, create a secret with the creds needed to talk to your depot account # The secret must be named exactly "depot-builder-key" and must exist in the project you're # building from. Obtain the PROJECT_ID and TOKEN values from the depot UI $ acorn secret create depot-builder-key --data projectId=${PROJECT_ID},token=${TOKEN} # Kick-off a build and let acorn and depot do the rest $ acorn build -t my-image:v1 .

Wrapping Up

That wraps up this overview of the new features in the Acorn v0.8 release. This release was one of our larger ones, but many of those changes were architectural, setting us up for big things to come. For the full changelog and additional details, please checkout our release notes.

As always, you can reach us on Github, [Slack(https://slack.acorn.io/)], Twitter, and LinkedIn with feedback or questions! Please join us for one of our live trainings if you’d like to get a hands-on overview of Acorn.

Craig Jellick is a software architect and engineering manager at Acorn Labs. He has extensive experience building and supporting teams that build and support open source infrastructure and developer tools. You can follow him on Twitter or connect on LinkedIn.

Header Photo by Corey Agopian on Unsplash