Applications

An Application is a logical grouping of related Workloads that runs in the same Kubernetes Namespace . Allowing you to manage and deploy your code in a more organized and efficient manner.

Applications in Humanitec are created and configured using the Humanitec UI, CLI, or API. Because of this, you can manage your entire Application without editing YAML files or running kubectl commands.

Humanitec provides a user-friendly interface for configuring and managing Applications, including setting up continuous integration and deployment pipelines , managing dependencies and secrets , and monitoring the health and performance of Applications.

Manage Applications

Use Applications to add and manage Workloads, Environments, and Shared Resources.

Create Applications

Create an Application to group related Workloads together.

  1. From the Applications overview , select Create new application.
  2. Enter an ID for your Application and select Create new application to continue.

Use the humctl create command to create an Application in the current context.

humctl create app $APP_ID --name="${APP_NAME}"

Where the following environment variables are set:

Variable Example Description
APP_ID my-app The ID of the App. Must be lower case letters, numbers or dashes. Cannot start or end with a dash.
APP_NAME My App A Human friendly name for the App. Can contain any characters.

curl "https://api.humanitec.io/orgs/${HUMANITEC_ORG}/apps" \
  -X POST \
  -H "Authorization: Bearer ${HUMANITEC_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "'${APP_ID}'",
  "name": "'${APP_NAME}'"
}'

Where the following Environment variables are set:

Variable Example Description
HUMANITEC_TOKEN lsakdjhcals A Humanitec token of a user with at least Manager role on the Organization.
HUMANITEC_ORG my-org The Humanitec organization the Application is in.
APP_ID my-app The ID of the App. Must be lowercase letters, numbers or dashes. Cannot start or end with a dash.
APP_NAME My App A Human friendly name for the App. Can contain any characters.

resource "humanitec_application" "example" {
  id   = "my-app"
  name = "My App"
}

For information on Application naming constraints, see Application names .

Delete Applications

Delete an Application to remove it from your Organization’s list of Applications.

  1. From the Applications overview , select the name of the Application you’d like to delete.
  2. Under Delete section, choose Delete application.
  3. To delete the Application, enter the name of your Application and select Delete application.

Use the humctl delete command to delete an Application.

humctl delete app {$APP_ID}

Where the following Environment variables are set:

Variable Example Description
APP_ID my-app The ID of the App. Must be lower case letters, numbers or dashes. Cannot start or end with a dash.

curl "https://api.humanitec.io/orgs/${HUMANITEC_ORG}/apps/${APP_ID}" \
  -X DELETE \
  -H "Authorization: Bearer ${HUMANITEC_TOKEN}"

Where the following environment variables are set:

Variable Example Description
HUMANITEC_TOKEN lsakdjhcals A Humanitec token of a user with at least Owner role on the Application.
HUMANITEC_ORG my-org The Humanitec organization the Application is in.
APP_ID my-app The ID of the App. Must be lower case letters, numbers or dashes. Cannot start or end with a dash.

Applications are deleted via a terraform destroy.

Results: The Application along with its resources will be deleted and removed from your Organization’s list of Applications.

Manage Application roles

User Roles for existing members can be changed on the Application Members list.

The user who created the Application assumes the Owner Role by default.

Role Description
Viewer Has read-only access to the App.
Developer Can update Configuration, Shared Values, and Secrets, create and delete Environments.
Owner Same as the Developer Role, but can additionally configure Webhooks, invite and remove Users from the App and delete the App.

To manage users in an Application, you must be signed in to the Administrator role within your Organization or the Owner role on the Application.

Add user to an Application

Add a user to an Application to give them access to the Application.

  1. From the Applications overview , select an existing Application you want to add users to.
  2. Under People section, select Add members.
  3. Enter the following details and choose Add to send an invitation to a user.
    1. Enter a name or email.
    2. From the Role dropdown, choose a role type.

There is no specific command to manage roles on an Application in the CLI, but the api command can be used to perform the action.

humctl api post "/orgs/${HUMANITEC_ORG}/apps/${APP_ID}/users" -d '{
  "id": "'${USER_ID}'",
  "role": "'${APP_ROLE}'"
}'

Where the following environment variables are set:

Variable Example Description
APP_ID my-app The ID of the App.
USER_ID 61048226-642c-438e-974f-ce5c013d94f8 The User ID. The User must already have a role on the Organization.
APP_ROLE developer The role to assign. Must be one of viewer, developer or owner.

curl "https://api.humanitec.io/orgs/${HUMANITEC_ORG}/apps/${APP_ID}/users" \
  -X POST \
  -H "Authorization: Bearer ${HUMANITEC_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "'${USER_ID}'",
  "role": "'${APP_ROLE}'"
}'

Where the following environment variables are set:

Variable Example Description
HUMANITEC_TOKEN lsakdjhcals A Humanitec token of a user with at least Owner role on the Application.
HUMANITEC_ORG my-org The Humanitec organization the Application is in.
APP_ID my-app The ID of the App.
USER_ID 61048226-642c-438e-974f-ce5c013d94f8 The User ID. The User must already have a role on the Organization.
APP_ROLE developer The role to assign. Must be one of viewer, developer or owner.

This action cannot be performed via Terraform as it involves creating ephemeral objects.

Results: You’ve added a user with a role on the Application.

Update user’s role

Update a user’s role on an Application to change their level of access.

  1. From the Applications overview , select the name of the Application you’d like to add users to.
  2. Select People tab.
  3. Find the name of the member you’d like to update and select the pencil icon.
  4. From the Role drown-down, choose a new role.
  5. Choose Confirm.

There is no specific command to manage roles on an Application in the CLI, but the api command can be used to perform the action.

humctl api patch "/orgs/${HUMANITEC_ORG}/apps/${APP_ID}/users/${USER_ID}" -d '{
  "role": "'${APP_ROLE}'"
}'

Where the following environment variables are set:

Variable Example Description
APP_ID my-app The ID of the App.
USER_ID 61048226-642c-438e-974f-ce5c013d94f8 The User ID. The User must already have a role on the Organization.
APP_ROLE developer The role to assign. Must be one of viewer, developer or owner.

curl "https://api.humanitec.io/orgs/${HUMANITEC_ORG}/apps/${APP_ID}/users/${USER_ID}" \
  -X PATCH \
  -H "Authorization: Bearer ${HUMANITEC_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "'${APP_ROLE}'"
}'

Where the following environment variables are set:

Variable Example Description
HUMANITEC_TOKEN lsakdjhcals A Humanitec token of a user with at least Owner role on the Application.
HUMANITEC_ORG my-org The Humanitec organization the Application is in.
APP_ID my-app The ID of the App.
USER_ID 61048226-642c-438e-974f-ce5c013d94f8 The User ID. The User must already have a role on the Organization.
APP_ROLE developer The role to assign. Must be one of viewer, developer or owner.

This action cannot be performed via Terraform as it involves updating ephemeral objects.

Results: You’ve successfully updated a user’s role on the Application.

Remove user from Application

Remove a user from an Application to revoke their access to the Application.

  1. From the Applications overview , select the name of the Application you’d like to remove users from.
  2. Select People tab.
  3. Find the name of the member you’d like to remove and select the trashcan icon.
  4. Choose Delete.

There is no specific command to manage roles on an Application in the CLI, but the api command can be used to perform the action.

humctl api delete "/orgs/${HUMANITEC_ORG}/apps/${APP_ID}/users/${USER_ID}"

Where the following environment variables are set:

Variable Example Description
APP_ID my-app The ID of the App.
USER_ID 61048226-642c-438e-974f-ce5c013d94f8 The User ID. The User must already have a role on the Organization.

curl "https://api.humanitec.io/orgs/${HUMANITEC_ORG}/apps/${APP_ID}/users/${USER_ID}" \
  -X DELETE \
  -H "Authorization: Bearer ${HUMANITEC_TOKEN}"

Where the following environment variables are set:

Variable Example Description
HUMANITEC_TOKEN lsakdjhcals A Humanitec token of a user with at least Owner role on the Application.
HUMANITEC_ORG my-org The Humanitec organization the Application is in.
APP_ID my-app The ID of the App.
USER_ID 61048226-642c-438e-974f-ce5c013d94f8 The User ID. The User must already have a role on the Organization.

This action cannot be performed via Terraform as it involves deleting ephemeral objects.

Results: You’ve successfully removed a user from an Application.

Manage Application configurations

Some coding languages and frameworks rely on the configuration provided in a file on the Application level.

Create an Application configuration file

You can create new Configuration Files for each Container within your Workload. When creating a new Configuration File you need to enter the following elements:

  • The Path to the file including the filename and extension.
  • The Mode for the file to define the access permission.
  • The Content of the file which you can enter into a code editor window that opens once you specified the Path and Mode for the file to be created.

Update an Application configuration file

You can review, edit, and delete existing Configuration Files on the Workload Details Screen. The content of the file can be viewed by clicking on the chevron icon on the left of the file.

To edit its content, select the pencil icon. The content of the file can be edited in the code editor window that opens. Once you are done editing the file, select Save to save the changes.

Delete an Application configuration file

You can delete existing Configuration Files on the Workload Details Screen. Select the trash can icon next to the Configuration File you want to delete.

Top