logo

Heroku

This guide shows how to interact with workloads and resources in the Heroku Platform.

Requirements

  1. Have a heroku account to run basic workloads
  1. Install the heroku command line
  1. Install Hoop Command Line

Login / Signup to Hoop

shell
hoop login

Create an agent authentication key

shell
AGENT_NAME=dev HOOP_KEY=$(hoop create agent $AGENT_NAME --mode embedded)

Clone the heroku ruby getting started repository

shell
APP_NAME=demo-ruby-$(hexdump -e '/1 "%02x"' -n3 < /dev/urandom) git clone https://github.com/heroku/ruby-getting-started.git && cd ruby-getting-started

Create an application using the heroku/ruby buildpack

shell
heroku apps:create --buildpack heroku/ruby $APP_NAME
create a new heroku app using the heroku buildpack

Add the hoop buildpack

shell
heroku buildpacks:add --app $APP_NAME \ --index 1 https://github.com/hoophq/heroku-hoop-buildpack

Configure the required environment variables

The agent key is the required credentials to authenticate the agent within hoop.
shell
heroku config:set HOOP_KEY=$HOOP_KEY

Edit the main Procfile to start hoop in the background

shell
echo 'web: hoopstart -- bundle exec puma -C config/puma.rb' > Procfile # deploy it git commit -am 'add hoopstart' git push heroku main

Connect It

Create the connection and associate with the agent
shell
hoop admin create connection $APP_NAME -a $AGENT_NAME
Now it’s possible to open an interactive console with the deployed application.
shell
hoop connect $APP_NAME
Or run ad-hoc commands
shell
hoop exec $APP_NAME <<EOF rails runner "puts Hello World" EOF

See FeaturesFeatures to explore how to enhance the experience of connections

Powered by Notaku