ReleaseEngineering/How To/Heroku CLI

From MozillaWiki
Jump to: navigation, search

How to create the Heroku account

  1. Register with Heroku (use your mozilla email!)
  2. Go to: https://mozillians.org and login your Mozilla LDAP account.
  3. Go to: https://mozillians.org/en-US/group/heroku-members/ and click Request Access.
  4. Wait for the request to join the group to be approved. Usually takes a day or less.
  5. DO THE NEXT STEPS ONLY AFTER YOU ARE APPROVED!
  6. Activate SSO via this HEROKU Link
  7. Bookmark THIS LINK. Once you activate SSO, you won't be able to login using the normal login page! So make sure the bookmark is in place!
  8. Install Heroku for your OS.
  9. Open your favorite terminal and type heroku login. The page should tell you that you can safely logout and the terminal should tell you that you have logged in on your account.
  10. When you are done with the previous steps, login on heroku's website/dashboard and see if you are member of 'mozillacorporation' team.

Heroku CLI commands

You can check your DUO session using the following command:

heroku auth:token

To login use this command:

heroku login

You can update heroku with the following command:

heroku update

If you need to reboot a TC Heroku dyno(s) you can do it with the following command:

heroku dyno:restart --app <heroku-service-name>

Between dyno:restart and --app, you can add a specific dyno name which will restart only the selected dyno:

heroku dyno:restart <dyno-name> --app <heroku-service-name>

When do we restart the dynos (processes)?

Whenever you feel something is not right.

It is okay, and recommended, to restart all dynos (eg don't provide a name between dyno:restart and --app). If you need to restart more services, lets say 3 of them, there is no order that the restart needs to follow. Simply reboot them, all should go smooth.

How do you know that a services is responsible for a problem?

  1. Usually if treeherder is not running, well we know we need to reboot taskcluster-treeherder
  2. If tests have issues with cache, we need to reboot taskcluster-purge-cache
  3. If tests have issues with secrets, we need to reboot taskcluster-secrets
  4. If there are problems with queue (machines not picking up tests, or the tests are "unscheduled" or decision tasks not running) well, we will reboot queue-taskcluster-net.

As you might have noticed, the issue will show you exactly what service you need to restart.