Developing Apps within an Organization
Last updated 01 June 2016
This feature is currently available in Heroku Enterprise
Developing and deploying applications within an organization account is largely the same experience as doing so in your personal account. Git-based deploys, command line scaling, add-ons etc… are all the same. However, just as with account administration, there are a few additions to the experience you should be aware of when working within an org.
Joining an org
Org accounts centralize the management of users and roles. If you wish to join an org, an admin user must add you directly.
Once you have been added to an org, you can also pick an org in the dashboard to view its applications. All orgs that you have some role in, are displayed in the sidebar.
As an org member, you have the ability to list and access all applications in the org. You can simply click on an app in the app list to view basic details about the app including who can give you more permissions on the app. You need additional permissions on an app to be able to deploy, scale, work with add-ons etc. Going to an app’s access page will show you what access you currently have on the app. Org admins and users with ‘manage’ permission on the app can grant you additional permissions.
Leaving an app
Once you are no longer working with an application on a regular basis, you can leave the app. This will revoke all your permissions on the app, though you can always click on it again to get basic view access to it.
From the CLI, use the
$ heroku apps:leave --app acme-website Leaving application acme-website... done
Or, in the org dashboard, go to the Access tab of the app and remove yourself from the list of members.
Adding apps to an org
If you have existing apps you’ve been developing under your personal account, you will need to transfer them to your org in order for them to be consider a part of the org and billed against the org.
You can use the CLI to transfer apps to your org (where
acme-widgets is your org name and
deep-spring-4274 is the app):
$ heroku apps:transfer acme-widgets --app deep-spring-4274 Transferring deep-spring-4274 to acme-widgets... done
You can also use the app settings page in Dashboard to transfer app ownership.
Apps can also be created directly in the org:
$ heroku create --org acme-widgets Creating frozen-wave-4030 in organization acme-inc...done, stack is cedar-14 http://frozen-wave-4030.herokuapp.com/ | firstname.lastname@example.org:frozen-wave-4030.git Git remote heroku added
The Heroku CLI defaults to your personal account and requires the
--org flag when performing org actions. If you generally work under an organization, you can set the
HEROKU_ORGANIZATION environment variable in order to default to that organization.
$ export HEROKU_ORGANIZATION=acme-widgets $ heroku apps === Apps joined in organization acme-widgets frozen-wave-4030 salty-depths-3445
This won’t persist when you open a new shell, however. For that you can add this setting to your profile file. For Unix machines using bash, this will likely be
~/.bashrc. For Windows you can set environment variables on the Advanced tab of System in Control Panel.
This guide gives you a high-level overview of developing applications within an organization account. To learn how to manage an org as an administrator more see one of the articles on creating and managing an org or managing org users and app access.