|
| 1 | +# Organizations (Enterprise) |
| 2 | + |
| 3 | +> Note: Organizations requires a [Premium license](./licensing.md). For more |
| 4 | +> details, [contact your account team](https://coder.com/contact). |
| 5 | +
|
| 6 | +Organizations can be used to segment and isolate resources inside a Coder |
| 7 | +deployment for different user groups or projects. |
| 8 | + |
| 9 | +## Example |
| 10 | + |
| 11 | +Here is an example of how one could use organizations to run a Coder deployment |
| 12 | +with multiple platform teams, all with unique resources: |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +## The default organization |
| 17 | + |
| 18 | +All Coder deployments start with one organization called `Default`. |
| 19 | + |
| 20 | +To edit the organization details, navigate to `Deployment -> Organizations` in |
| 21 | +the top bar: |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +From there, you can manage the name, icon, description, users, and groups: |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +## Additional organizations |
| 30 | + |
| 31 | +Any additional organizations have unique admins, users, templates, provisioners, |
| 32 | +groups, and workspaces. Each organization must have at least one |
| 33 | +[provisioner](./provisioners.md) as the built-in provisioner only applies to the |
| 34 | +default organization. |
| 35 | + |
| 36 | +## Creating an organization |
| 37 | + |
| 38 | +### Prerequisites |
| 39 | + |
| 40 | +- Coder v2.16+ deployment with Premium license with Organizations enabled |
| 41 | + ([contact your account team](https://coder.com/contact)) for more details. |
| 42 | +- User with `Owner` role |
| 43 | + |
| 44 | +### 1. Create the organization |
| 45 | + |
| 46 | +Within the sidebar, click `New organization` to create an organization. In this |
| 47 | +example, we'll create the `data-platform` org. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +From there, let's deploy a provisioner and template for this organization. |
| 52 | + |
| 53 | +### 2. Deploy a provisioner |
| 54 | + |
| 55 | +[Provisioners](../admin/provisioners.md) are organization-scoped and are |
| 56 | +responsible for executing Terraform/OpenTofu to provision the infrastructure for |
| 57 | +workspaces and testing templates. Before creating templates, we must deploy at |
| 58 | +least one provisioner as the built-in provisioners are scoped to the default |
| 59 | +organization. |
| 60 | + |
| 61 | +Using Coder CLI, run the following command to create a key that will be used to |
| 62 | +authenticate the provisioner: |
| 63 | + |
| 64 | +```sh |
| 65 | +coder provisioner keys create data-cluster-key --org data-platform |
| 66 | +Successfully created provisioner key data-cluster! Save this authentication token, it will not be shown again. |
| 67 | + |
| 68 | +< key omitted > |
| 69 | +``` |
| 70 | + |
| 71 | +Next, start the provisioner with the key on your desired platform. In this |
| 72 | +example, we'll start it using the Coder CLI on a host with Docker. For |
| 73 | +instructions on using other platforms like Kubernetes, see our |
| 74 | +[provisioner documentation](../admin/provisioners.md). |
| 75 | + |
| 76 | +```sh |
| 77 | +export CODER_URL=https://<your-coder-url> |
| 78 | +export CODER_PROVISIONER_DAEMON_KEY=<key> |
| 79 | +coder provisionerd start --org <org-name> |
| 80 | +``` |
| 81 | + |
| 82 | +### 3. Create a template |
| 83 | + |
| 84 | +Once you've started a provisioner, you can create a template. You'll notice the |
| 85 | +"Create Template" screen now has an organization dropdown: |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +### 5. Add members |
| 90 | + |
| 91 | +Navigate to `Deployment->Organizations` to add members to your organization. |
| 92 | +Once added, they will be able to see the organization-specific templates. |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | +### 6. Create a workspace |
| 97 | + |
| 98 | +Now, users in the data platform organization will see the templates related to |
| 99 | +their organization. Users can be in multiple organizations. |
| 100 | + |
| 101 | + |
0 commit comments