When you set up App Hub, you create an administrative boundary for your applications. This boundary is either the management project or the collection of host and service projects you configured for application management, depending on your setup model. Services and workloads are registered as applications inside this administrative boundary.
To avoid configuration drift and maintain a clear source of truth, we recommend that you manage your application resources in the environment where they were originally defined:
For applications deployed from an Application Design Center template: Use Application Design Center to manage and update the application. You can either revise the template for application design changes or create an application revision to update settings such as application and component details.
For applications created by registering resources in App Hub: Manage the application, its services, and workloads directly within App Hub.
This page describes how to manage applications that were registered directly within App Hub. You can perform these actions using either the Google Cloud console or the Google Cloud CLI. For applications deployed from a template, see Application Design Center documentation.
Before you begin
Before you can list, view, update, and delete applications in App Hub, complete the following steps:
- Set up App Hub using one of the supported setup models.
- Create an application and register supported resources to the application you want to manage.
Required roles
To get the permissions that you need to manage applications in App Hub, ask your administrator to grant you the following IAM roles on the application administrative boundary from your setup model (the management project or the host and service projects) :
-
Update and delete applications:
App Hub Editor (
roles/apphub.editor
) -
View applications:
App Hub Viewer (
roles/apphub.viewer
)
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
For more information about App Hub roles, see App Hub IAM roles and permissions.
List applications
Follow these steps to list and filter all the applications within your App Hub administrative boundary:
Console
In the Welcome page of the Google Cloud console, use the project picker to select your management project or host project:
Navigate to the App Hub Applications page:
The page displays a list of your applications.
To filter the list, use the Filter field. You can filter by attributes such as Criticality or Environment.
gcloud
Find the project ID of your management project or host project.
Display a list of your applications using one of the following options:
List all applications:
gcloud apphub applications list \ --project=PROJECT_ID \ --location=LOCATION
Replace the following:
PROJECT_ID
: the ID of your host project or management project.LOCATION
: the location of your applications. Useglobal
for global applications or a specific region, such asus-east1
, for regional applications.
Filter the list of applications based on attributes, using the
--filter
flag:gcloud apphub applications list \ --project=PROJECT_ID \ --location=LOCATION \ --filter=FILTER_EXPRESSION \
Replace the following:
PROJECT_ID
: the ID of your host project or management project.LOCATION
: the location of your applications. Useglobal
for global applications or a specific region, such asus-east1
, for regional applications.FILTER_EXPRESSION
: the filter expression to specify attributes. For example, to list all applications with aPRODUCTION
environment type, useattributes.environment.type=PRODUCTION
.
View application details
Follow these steps to view the detailed information of a specific application, including its attributes and metadata:
Console
In the Welcome page of the Google Cloud console, use the project picker to select your management project or host project:
Navigate to the App Hub Applications page:
The page displays a list of your applications.
Click the name of the application you want to view.
The application's Details tab is displayed.
gcloud
Find the project ID of your management project or host project.
Describe an application:
gcloud apphub applications describe APPLICATION_NAME \ --project=PROJECT_ID \ --location=LOCATION
Replace the following:
APPLICATION_NAME
: the name of your application. You specify this value when you create an application.PROJECT_ID
: the ID of your host project or management project.LOCATION
: the location of your application. Useglobal
for global applications or a specific region, such asus-east1
, for regional applications.
Update application attributes
Follow these steps to modify the user-defined attributes of an application after it has been created:
Console
In the Welcome page of the Google Cloud console, use the project picker to select your management project or host project:
Navigate to the App Hub Applications page:
The page displays a list of your applications.
For the application you want to update, click
Edit.In the Edit application pane, modify the fields as needed.
Click Save.
gcloud
Find the project ID of your management project or host project.
Update application attributes. You can update any of the mutable attributes, such as
display-name
,criticality-type
,environment-type
, and owners:gcloud apphub applications update APPLICATION_NAME \ --project=PROJECT_ID \ --location=LOCATION \ --display-name=DISPLAY_NAME \ --criticality-type=CRITICALITY_LEVEL \ --environment-type=ENVIRONMENT \ --developer-owners=display-name=DEV_NAME,email=DEV_EMAIL \ --operator-owners=display-name=OPERATOR_NAME,email=OPERATOR_EMAIL \ --business-owners=display-name=BUSINESS_NAME,email=BUSINESS_EMAIL
Replace the following:
- Required:
APPLICATION_NAME
: the name of your application. You specify this value when you create an application. - Required:
PROJECT_ID
: the ID of your host project or management project. - Required:
LOCATION
: the location of your application. Useglobal
for global applications or a specific region, such asus-east1
, for regional applications. - Optional:
DISPLAY_NAME
: the display name of your application. Optional:
CRITICALITY_LEVEL
: the importance level of the application. Use one of the following values:MISSION_CRITICAL
HIGH
MEDIUM
LOW
Optional:
ENVIRONMENT
: the stage of the software lifecycle. Use one of the following values:PRODUCTION
STAGING
DEVELOPMENT
TEST
Optional:
DEV_NAME
andDEV_EMAIL
: the display name and email address of the developer owner, respectively.Optional:
OPERATOR_NAME
andOPERATOR_EMAIL
: the display name and email address of the operator owner, respectively.Optional:
BUSINESS_NAME
andBUSINESS_EMAIL
: the display name and email address of the business owner, respectively.
- Required:
Delete an application
Before you can delete an application, you must first unregister all of its associated services and workloads. Then, follow these steps to delete the application:
Console
In the Welcome page of the Google Cloud console, use the project picker to select your management project or host project:
Navigate to the App Hub Applications page:
The page displays a list of your applications.
Click the name of the application you want to delete.
Go to the Services and workloads tab and make sure you have unregistered all the application's associated resources. For more information, see Unregister services and workloads.
After all services and workloads are unregistered, navigate back to the application details and click Delete.
gcloud
Find the project ID of your management project or host project.
Make sure you have unregistered all the application's associated resources. For more information, see Unregister services and workloads.
After the application has no registered resources, delete it:
gcloud apphub applications delete APPLICATION_NAME \ --project=PROJECT_ID \ --location=LOCATION
Replace the following:
APPLICATION_NAME
: the name of your application. You specify this value when you create an application.PROJECT_ID
: the ID of your host project or management project.LOCATION
: the location of your application. Useglobal
for global applications or a specific region, such asus-east1
, for regional applications.
What's next
- Manage services and workloads
- Optimize an application with design recommendations
- Monitor your applications