This page describes how to set up an app-enabled folder to build, operate, and manage App Hub applications on Google Cloud, as well as support users who set up and administer App Hub.
Overview of app-enabled folders
Application-centric Google Cloud offers application management capabilities to organize, deploy, and view Google Cloud resources in a way that aligns with business functions.
The app-enabled folder is a standard Google Cloud folder where you enable application management. This folder acts as an administrative boundary for applications and contains a Google-created management project to store application metadata and configurations.
By setting up App Hub with an app-enabled folder, you can organize resources from your Google Cloud projects, such as services and workloads, into logical applications.
You use Resource Manager to configure and manage app-enabled folders. For more information about this application-centric model and its resource organization, see Application-centric Google Cloud.
Configure an app-enabled folder
This section summarizes the essential steps for administrators to configure an app-enabled folder with Resource Manager and start using App Hub. Each step requires roles that depend on the user's responsibilities during the configuration process.
Enable application management on a folder
This initial action configures a standard Google Cloud folder for application-centric management. It automatically creates a dedicated management project and enables the required APIs to store application metadata and configurations. After enabling application management, the folder is referred to as the app-enabled folder.
For detailed instructions, see Enable application management.
Optional: Link a billing account
You can start using App Hub's core features for organizing and observing your applications at no cost.
Optionally, to unlock all application lifecycle features, including paid APIs and services like Application Design Center, or to use the service for production-scale workloads, you can link an active billing account to the management project.
- For detailed instructions, see Link a billing account to the management project.
- For an overview of potential costs associated with application management, see Understanding costs.
Optional: Enable recommended APIs
When you set up an app-enabled folder, the required APIs for application-centric capabilities are enabled automatically in the management project to provide basic features.
However, you can choose to expand application management capabilities by enabling additional recommended APIs. While optional, these APIs provide the full application lifecycle experience, including advanced design, deployment, and observability features. Review the recommended APIs listed on the Enable APIs on a management project page to understand their benefits, enablement steps, and associated costs.
Optional: Grant roles to users
Depending on your team's responsibilities, assign appropriate application-centric IAM roles to your team members, such as platform administrators, application developers, and operators. This step provides the necessary permissions to manage, develop, and monitor applications.
For a list of recommended roles for different application-centric user responsibilities at the project or folder level, see Grant application-centric roles to your users. To learn how to grant permissions for varying levels of application access, see Grant permissions to applications.
Configure the observability scope
After configuring an app-enabled folder, you can let services like Cloud Hub display telemetry data from all projects associated with your applications.
The observability scope determines where the Google Cloud console searches for telemetry data to display. Each Google Cloud project has a single observability scope, which identifies the default log and trace scopes. For metric data, the project's metrics scope determines where the Google Cloud console searches for data.
To view or analyze all of your application's telemetry data, configure the observability scope and the metrics scope for the management project. By configuring these scopes, Cloud Hub and other services can find and display your application's log, metric, and trace data, even when that data is stored in multiple projects.
This section summarizes the required configuration. For detailed instructions, see Set up application monitoring. The following table shows the required configuration scopes.
| Scope component | Configuration scenario | Key actions and considerations |
|---|---|---|
| Log scope | You use an aggregated sink to route all logs in the organization to a central log bucket. |
|
| You don't have an organization-level aggregated sink, and the app-enabled folder doesn't have nested folders. |
|
|
| You don't want to use an aggregated sink. | Configure the default log scope on the management project to list the storage locations of your application's log data. | |
| Metrics scope | You configured an app-enabled folder containing all the projects that store the metric data you want to view. | Google Cloud Observability attempts to synchronize the list of projects in your app-enabled folder with the list of projects on the scope of the metrics. As long as the number of projects in the app-enabled folder doesn't exceed your metric scope quota, Google Cloud Observability can keep the list of projects on the scope of the metrics updated when you add or remove projects in the app-enabled folder. |
| Trace scope | You want to monitor application trace data across multiple projects. |
|
Disable application management
You can disable application management from your Google Cloud folder if you don't want it to be an app-enabled folder anymore. For detailed instructions, see Disable application management.
Create an application
After configuring the app-enabled folder, application developers can use App Hub to perform the following tasks:
Create an application: Create a regional or global application that will serve as a logical container for your services and workloads. After you create an application, you can't change the application scope. For more information about global and regional applications, see Global and regional App Hub applications.
Register services and workloads: Discover the available infrastructure resources within the projects in your app-enabled folder and register them to your application. This action formally associates your underlying infrastructure with the logical application in App Hub.
If you have Gemini Cloud Assist, after configuring an App Hub application in an app-enabled folder, you can use natural language assistance to retrieve information about your application. For more information, see Use Gemini Cloud Assist in the Google Cloud console.
You can also use Application Design Center to design new applications from templates.
Follow these steps to create an application:
Console
- Make sure that you're in an app-enabled folder.
In the Google Cloud console, go to the App Hub Applications page.
Click Create application.
On the Create application page, in the Choose application region and name pane, based on the scope of services and workloads you'd like to register to the application, do one of the following:
To create an application that lets you register services and workloads from a global location, select Global.
To create an application that lets you register services and workloads from a single location:
- Select Regional.
- Select a Region.
Enter the Application name and click Continue.
Optional: In the Add attributes section, enter the Display name.
Optional: In the Criticality list, to indicate the importance of the application, select one of the following:
- Mission critical
- High
- Medium
- Low
Optional: In the Environment list, to indicate the stage of the software lifecycle, select one of the following:
- Production
- Staging
- Development
- Test
Optional: Add the following details as required for Developer Owners, Operator Owners, and Business Owners. Note that you must enter the owner's email address if you add a display name.
- Enter an owner's display name.
- Enter the owner's email address. This value must have
the format
username@yourdomain, for example,222larabrown@gmail.com.
Repeat these steps for each developer, operator, and business owner.
Click Create.
gcloud
Create a new application called
APPLICATION_NAMEand give it a display name,APPLICATION_DISPLAY_NAME.gcloud apphub applications create APPLICATION_NAME \ --display-name='APPLICATION_DISPLAY_NAME' \ --scope-type=SCOPE_TYPE \ --criticality-type='CRITICALITY_LEVEL' \ --environment-type='ENVIRONMENT' \ --developer-owners=display-name=DISPLAY-NAME-DEVELOPER,email=EMAIL-DEVELOPER \ --operator-owners=display-name=DISPLAY-NAME-OPERATOR,email=EMAIL-OPERATOR \ --business-owners=display-name=DISPLAY-NAME-BUSINESS,email=EMAIL-BUSINESS \ --project=MANAGEMENT_PROJECT_ID \ --location=REGIONReplace the following:
APPLICATION_NAME: the name of your application. The name must include only lowercase alphanumeric characters without spaces.APPLICATION_DISPLAY_NAME: the display name of your application.SCOPE_TYPE: the scope of your application that defines which services and workloads are available for you to register to the application. Use one of the following values:REGIONALGLOBAL
CRITICALITY_LEVEL: (optional) indicates how critical an application, service, or workload is to your business operations. Provide one of the following values:MISSION_CRITICALHIGHMEDIUMLOW
ENVIRONMENT: (optional) indicates the stages of the software lifecycle. Provide one of the following values:PRODUCTIONSTAGINGDEVELOPMENTTEST
DISPLAY-NAME-DEVELOPER,DISPLAY-NAME-OPERATOR, andDISPLAY-NAME-BUSINESS: (optional) display names of the developer, operator, and business owners, respectively.EMAIL-NAME-DEVELOPER,EMAIL-NAME-OPERATOR, andEMAIL-NAME-BUSINESS: (optional) email addresses of the developer, operator, and business owners, respectively. These values must have the formatusername@yourdomain, for example,222larabrown@gmail.com.MANAGEMENT_PROJECT_ID: the ID of the management project in the formatgoogle-mpf-FOLDER_ID.REGION: the region of the application. Depending on the--scope-type, give this the valueus-east1orglobal.
For example:
gcloud apphub applications create my-application \ --display-name='application-display-name' \ --scope-type=REGIONAL \ --criticality-type='MEDIUM' \ --environment-type='STAGING' \ --developer-owners=display-name=developer-name,email=username@yourdomain \ --project=host-project \ --location=us-east1List the applications in your app-enabled folder.
gcloud apphub applications list \ --project=MANAGEMENT_PROJECT_ID \ --location=REGIONThe output is similar to the following:
ID DISPLAY_NAME CREATE_TIME APPLICATION_NAME APPLICATION_DISPLAY_NAME 2023-10-31T18:33:48
Register services and workloads
When you register infrastructure services and workloads to an application, the services and workloads get registered as App Hub resources. Use a global application to register resources that are global or spread across multiple regions. Use a regional application to register resources from the same region as the application.
Console
In the Google Cloud console, go to the App Hub Applications page.
Click the name of your application. The Services and workloads tab is displayed with a list of registered services and workloads that are in your app-enabled folder.
For each service or workload you want to register, do the following:
- On the Services and workloads tab, click Register service/workload.
- On the Register service or workload page, in the Select resource pane, click Browse to select the service or workload as a Resource.
- In the Select resource pane, choose a service or workload and click Select.
- In the Select resource pane, enter a Name for the service or workload and click Continue.
- Optionally, in the Add attributes pane, add more details for the service or workload in the fields that follow. For more information, in this document, see Create an application. Note that you can select values for Criticality and Environment fields that are different from the values you set when you create the application.
- Click Continue.
- Optionally, in the Add owners section, add more details about the owners of the service or workload in the fields that follow. For more information, in this document, see Create an application.
- Click Register.
The Services and workloads tab displays the registered service or workload. For more information about the registration statuses, see the properties and attributes of App Hub.
gcloud
List discovered services from an app-enabled folder. In the following command, you optionally specify the
filterflag to return services from the specified project that are available to be registered to an application.gcloud apphub discovered-services list \ --filter='FILTER_RESOURCES' \ --project=MANAGEMENT_PROJECT_ID \ --location=REGIONReplace
FILTER_RESOURCESwith filters such as:service_properties.gcp_project=projects/PROJECT_IDservice_properties.gcp_project=projects/PROJECT_ID AND service_reference.uri~"forwardingRules"The output is similar to the following:
ID SERVICE_REFERENCE SERVICE_PROPERTIES [DISCOVERED_SERVICE_ID] {'uri': '//compute.googleapis.com/projects/[PROJECT_NUMBER]/regions/REGION/forwardingRules/forwarding-rule'} {'gcpProject': 'projects/PROJECT_1', 'location': 'REGION'}Copy the service ID,
DISCOVERED_SERVICE_IDfrom the output to use in the next step.Register the forwarding rule,
forwarding-rule-name` in a project as a service to your application.gcloud apphub applications services create SERVICE_NAME \ --discovered-service='projects/MANAGEMENT_PROJECT_ID/locations/REGION/discoveredServices/DISCOVERED_SERVICE' \ --display-name='SERVICE_DISPLAY_NAME' \ --application=APPLICATION_NAME \ --criticality-type='CRITICALITY_LEVEL' \ --environment-type='ENVIRONMENT' \ --developer-owners=display-name=DISPLAY-NAME-DEVELOPER,email=EMAIL-DEVELOPER \ --operator-owners=display-name=DISPLAY-NAME-OPERATOR,email=EMAIL-OPERATOR \ --business-owners=display-name=DISPLAY-NAME-BUSINESS,email=EMAIL-BUSINESS \ --project=MANAGEMENT_PROJECT_ID \ --location=REGIONReplace the following:
SERVICE_NAME: a name to register the service as.DISCOVERED_SERVICE_ID: the service ID from the output of the previous step.SERVICE_DISPLAY_NAME: the display name of your application.
Notes:
criticality-typeandenvironment-type: (optional) You must provide one of the specified values but these values can be different from the values you set when you create the application. For more information, in this document, see Create an application.developer-owners,operator-owners, andbusiness-owners: (optional). For more information, in this document, see Create an application.
For example:
gcloud apphub applications services create my-service \ --display-name='mywebserver-service' \ --application=my-application \ --criticality-type='MEDIUM' \ --environment-type='STAGING' \ --developer-owners=display-name=developer-name,email=username@yourdomain \ --folder=folder-ID \ --location=us-east1List discovered workloads from an app-enabled folder. In the following command, you optionally specify the
filterflag to return workloads from the specified project that are available to be registered to an application.gcloud apphub discovered-workloads list \ --filter='FILTER_RESOURCES' \ --project=MANAGEMENT_PROJECT_ID \ --location=REGIONReplace
FILTER_RESOURCESwith a filter such asworkload_properties.gcp_project=projects/PROJECT_ID.You see output similar to the following, which includes an unregistered MIG:
ID WORKLOAD_REFERENCE WORKLOAD_PROPERTIES [DISCOVERED_WORKLOAD] {'uri': '//compute.googleapis.com/projects/[PROJECT_NUMBER]/regions/REGION/instanceGroups/mig-name'} {'gcpProject': 'projects/PROJECT', 'location': 'REGION'}Copy the workload ID from the output to use in the next step.
Register the MIG,
mig-namefrom the project as a workload to your application.gcloud apphub applications workloads create WORKLOAD_NAME \ --discovered-workload='projects/MANAGEMENT_PROJECT_ID/locations/REGION/discoveredWorkloads/DISCOVERED_WORKLOAD_ID' \ --display-name=WORKLOAD_DISPLAY_NAME' \ --application=APPLICATION_NAME \ --criticality-type='CRITICALITY_LEVEL' \ --environment-type='ENVIRONMENT' \ --developer-owners=display-name=DISPLAY-NAME-DEVELOPER,email=EMAIL-DEVELOPER \ --operator-owners=display-name=DISPLAY-NAME-OPERATOR,email=EMAIL-OPERATOR \ --business-owners=display-name=DISPLAY-NAME-BUSINESS,email=EMAIL-BUSINESS \ --project=MANAGEMENT_PROJECT_ID \ --location=REGIONReplace the following:
WORKLOAD_NAME: a name to register the workload as.DISCOVERED_WORKLOAD_ID: the workload ID from the output of the previous step.WORKLOAD_DISPLAY_NAME: the display name of your application.
Notes:
criticality-typeandenvironment-type: (optional) You must provide one of the specified values but these values can be different from the values you set when you create the application. For more information, in this document, see Create an application.developer-owners,operator-owners, andbusiness-owners: (optional). For more information, in this document, see Create an application.
For example:
gcloud apphub applications workloads create my-workload \ --display-name='mywebserver-deployment1' \ --application=my-application \ --criticality-type='MEDIUM' \ --environment-type='STAGING' \ --developer-owners=display-name=developer-name,email=username@yourdomain \ --folder=folder-ID \ --location=us-east1
The App Hub setup process is complete.
Manage projects in your app-enabled folder
App-enabled folders automatically make infrastructure resources from all descendant projects available to group into an application. You don't need to attach projects manually.
To control which resources are available, you can modify the folder hierarchy in the following ways:
- Create or delete projects: Add or remove projects in the app-enabled folder or its subfolders.
- Move projects: Move existing projects into or out of the app-enabled folder or its subfolders.
- Move folders: Move entire folders of projects into or out of the app-enabled folder or its subfolders.
Create or delete projects
You can add new projects to your app-enabled folder's hierarchy or delete existing ones. For detailed instructions, see the Resource Manager documentation:
Move projects or folders
You can move existing projects and folders into or out of your app-enabled folder's hierarchy. For detailed instructions, see the Resource Manager documentation:
What's next
- Set up application monitoring
- Modify App Hub resources
- App Hub IAM roles and permissions
- App Hub overview