This message was deleted.
# ask-for-help
s
This message was deleted.
🙏 1
d
I can provide more info if necessary
a
cc @jjmachan
j
have you set the environment variables
HEROKU_EMAIL
and
HEROKU_API_KEY
with the mail and API key you used?
The heroku plugin uses loads the credential set via these variables to authenticate the calls
d
Hmm... I know how to set environment variables for an existing app. But in this case, the app isn't instantiated until I run the
bentoctl build
command (which results in the HEROKU_EMAIL error). How should I correctly set the environment variables/credentials in this situation @jjmachan?
Would I set them in the deployment_config yaml file? Something like this:
Copy code
api_version: v1
name: nowasteapi
HEROKU_EMAIL: email
HEROKU_API_KEY: key
operator:
  name: heroku

template: terraform
spec:
  dyno_counts: 1
  dyno_type: free
j
you can set the env vars for the shell you are using
Copy code
export HEROKU_EMAIL=<you_email>
export HEROKU_API_KEY=<api_key>
alternatively you can use something like to load these env var when you cd into the project https://direnv.net/ You don't have to specify the env vars in the deployment-config
👍 1
d
Great, it worked! Thank you. The only problem now is that can't run terraform apply -var-file=bentoctl.tfvars -auto-approve because free dynos are no longer available.
Copy code
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # heroku_formation.formation will be created
  + resource "heroku_formation" "formation" {
      + app_id   = "68a15430-f90d-4e2f-9723-f11a9e79d2aa"
      + id       = (known after apply)
      + quantity = 1
      + size     = "Free"
      + type     = "web"
    }

Plan: 1 to add, 0 to change, 0 to destroy.
heroku_formation.formation: Creating...
╷
│ Error: Patch "<https://api.heroku.com/apps/68a15430-f90d-4e2f-9723-f11a9e79d2aa/formation/web>": Free dynos are no longer available. Subscribe to Eco to get your app running. Learn more at <https://blog.heroku.com/new-low-cost-plans>
│ 
│   with heroku_formation.formation,
│   on <http://main.tf|main.tf> line 72, in resource "heroku_formation" "formation":
│   72: resource "heroku_formation" "formation" {
│
j
Thanks for bringing up this issue. this is a list of dynos and dyno types https://devcenter.heroku.com/articles/dyno-types you can try editing the generated bentoctl.tf_vars file with the correct dyno and try it out?
d
It worked! I was able to deploy the model successfully... However, the application soon exceeded the dyno memory limit - so I will be working on that for a bit.
j
happy to help, I'll update the documentation with this, can I tag you to review the PR ? if you give me your github it would be really helpful.
d
Sorry for the late response... here's my github: https://github.com/ATX24
Hey, @jjmachan - do you know if BentoML has any open positions for summer interns?
j
@Sean would have a better idea.
s
@Dhilan Shah yes, we do. Let’s chat in direct messages.