Manage catalogs

When you create application templates and import component templates in a space, your templates can be accessed by other space members. This document helps you share templates outside of your space by publishing templates to a catalog, and sharing that catalog with appropriate spaces.

Each space contains a single catalog where you can add templates and control sharing. You can share a catalog from the space that you created in your initial app-enabled folder to the spaces in descendant app-enabled folders.

For steps to create descendant spaces, see Create spaces.

Before you begin

You must have the Application Design Center Admin (roles/designcenter.admin) role on the app-enabled folder or management project.

Publish an application template to a catalog

Before you can share a template with other spaces, publish the template to your catalog.

Design canvas

  1. From the navigation menu, click Catalogs.

    Go to Catalogs

  2. Click Add templates.

  3. In the Add templates to Default Catalog area, do the following:

    1. To find a specific template, type the template name in the Filter field.
    2. To add a template to this catalog, in the Actions column, click Add to catalog.
  4. Click Done. The spaces that have access to the catalog have access to the selected templates.

  5. To share the catalog, see Share a catalog with a space.

gcloud CLI

  1. Identify the catalog ID for the catalog where you want to add your template.

    gcloud design-center spaces catalogs list \
    --project=PROJECT \
    --location=LOCATION \
    --space=SPACE
    

    Replace the following:

    • PROJECT: Your management project ID.
    • LOCATION: The catalog region.
    • SPACE: Your space ID.

    For more information, see gcloud design-center spaces catalogs list.

  2. Identify the template ID for the template that you want to add to your catalog. For example, the following command lists application templates.

    gcloud design-center spaces application-templates list \
    --project=PROJECT \
    --location=LOCATION \
    --space=SPACE \
    --filter=FILTER
    

    Replace the following:

    • PROJECT: Your management project ID.
    • LOCATION: The catalog region.
    • SPACE: Your space ID.
    • FILTER: A filter to help you narrow the search results. For example, "displayName:my-app-template*"

    For more information, see gcloud design-center spaces application-templates list.

  3. Commit the application template.

     gcloud design-center spaces application-templates commit TEMPLATE \
     --project=PROJECT \
     --location=LOCATION \
     --space=SPACE
    

    Replace the following:

    • TEMPLATE: The template ID for the template to commit.
    • PROJECT: Your management project ID.
    • LOCATION: The application template region.
    • SPACE: Your space ID.

    For more information, see gcloud design-center spaces application-templates commit.

  4. Copy the name output from the commit command. You'll specify this name as the application-template-revision-source value when you create your catalog template revision.

  5. Make sure that the application template is not already in the catalog.

    gcloud design-center spaces catalogs templates list \
    --catalog=CATALOG \
    --project=PROJECT \
    --location=LOCATION \
    --space=SPACE
    

    Replace the following:

    • CATALOG: Your catalog ID. For example, default-catalog.
    • PROJECT: Your management project ID.
    • LOCATION: The catalog region.
    • SPACE: Your space ID.

    For more information, see gcloud design-center spaces catalogs templates list.

  6. If the application template isn't in the catalog, create the catalog template.

    gcloud design-center spaces catalogs templates create CATALOG_TEMPLATE \
    --project=PROJECT \
    --location=LOCATION \
    --space=SPACE \
    --catalog=CATALOG \
    --template-category=TEMPLATE_CATEGORY
    

    Replace the following:

    • CATALOG_TEMPLATE: The catalog template ID for the catalog template that you want to create.
    • PROJECT: Your management project ID.
    • LOCATION: The catalog region.
    • SPACE: Your space ID.
    • CATALOG: Your catalog ID.
    • TEMPLATE_CATEGORY: The template category. For example, application-template.

    For more information, see gcloud design-center spaces catalogs templates create.

  7. Create a catalog template revision. This creates the first revision, which developers use as a source for an application.

    gcloud design-center spaces catalogs templates revisions create REVISION \
    --project=PROJECT \
    --location=LOCATION \
    --space=SPACE \
    --catalog=CATALOG \
    --template=CATALOG_TEMPLATE \
    --application-template-revision-source=APPLICATION_TEMPLATE_REVISION_SOURCE
    

    Replace the following:

    • REVISION: The revision ID for the revision that you want to create. For example, r1.
    • PROJECT: Your management project ID.
    • LOCATION: The catalog region.
    • SPACE: Your space ID.
    • CATALOG: Your catalog ID.
    • CATALOG_TEMPLATE: The template ID.
    • APPLICATION_TEMPLATE_REVISION_SOURCE: The application template revision source. You copied this value you when you committed your application template. For example, projects/my-project/locations/us-central1/spaces/my-space/applicationTemplates/my-app-template/revisions/r1.

    For more information, see gcloud design-center spaces catalogs templates revisions create.

Share revised templates

If you make changes to a template, those changes are not automatically published to the catalog. To share the latest revision, publish the template to the catalog again.

Remove templates from a catalog

If you no longer want to share a specific template with a space, remove it from the catalog.

Design canvas

  1. From the navigation menu, click Catalogs.

    Go to Catalogs

  2. To manage the templates in this catalog, click Templates in catalog.

  3. To remove a template, click Actions and select Remove from catalog.

    1. In the field, enter the name of the template.
    2. Click Remove.

gcloud CLI

Remove a template from your catalog.

gcloud design-center spaces catalogs templates delete CATALOG_TEMPLATE \
--catalog=CATALOG \
--project=PROJECT \
--location=LOCATION \
--space=SPACE

Replace the following:

  • CATALOG_TEMPLATE: The catalog template ID for the template that you want to remove from the catalog.
  • CATALOG: Your catalog ID.
  • PROJECT: Your management project ID.
  • LOCATION: The catalog region.
  • SPACE: Your space ID.

For more information, see gcloud design-center spaces catalogs templates delete.

Share a catalog with a space

You can share a catalog from your initial space to descendant spaces. For example, you might create a catalog of application templates that are relevant to your entire organization and share it with all spaces.

For steps to create descendant spaces, see Create spaces.

To share your catalog with a space, do the following:

Design canvas

  1. From the navigation menu, click Catalogs.

    Go to Catalogs

  2. Click Share catalog.

  3. In the Filter field, enter the name of the space where you want to share the catalog.

  4. In the Spaces table, in the Actions column, click Share catalog.

    Users can view the templates from a shared catalog by opening their space in App Design Center and clicking Shared templates from the navigation menu.

gcloud CLI

Share a catalog with a space.

gcloud design-center spaces catalogs shares create SHARE \
--project=PROJECT \
--space=SPACE \
--location=LOCATION \
--catalog=CATALOG \
--destination-space=DESTINATION_SPACE

Replace the following:

  • SHARE: The share ID for the share that you want to delete.
  • PROJECT: Your management project ID.
  • SPACE: Your space ID.
  • LOCATION: The catalog region.
  • CATALOG: The catalog ID for the catalog that you're sharing.
  • DESTINATION_SPACE: The fully qualified space name for the space that you're sharing to. For example, projects/my-project/locations/us-central1/spaces/my-space.

For more information, see gcloud design-center spaces catalogs shares create.

Stop sharing a catalog with a space

If you no longer want to share a catalog with a space, stop sharing the catalog by doing the following:

Design canvas

  1. From the navigation menu, click Catalogs.

    Go to Catalogs

  2. Click Spaces shared with.

  3. To stop sharing this catalog with a space, click

    Actions and select Stop sharing.

    1. In the field, enter the space name.
    2. Click Stop sharing.

gcloud CLI

Stop sharing a catalog with a space.

gcloud design-center spaces catalogs shares delete SHARE \
--project=PROJECT \
--location=LOCATION \
--space=SPACE \
--catalog=CATALOG

Replace the following:

  • SHARE: The share ID for the share that you want to delete.
  • PROJECT: Your management project ID.
  • LOCATION: The catalog region.
  • SPACE: Your space ID.
  • CATALOG: The catalog ID for the catalog that you're sharing.

For more information, see gcloud design-center spaces catalogs shares delete.

Edit catalog metadata

To manage your catalog, you can give it a descriptive name and description by doing the following:

Design canvas

  1. From the navigation menu, click Catalogs.

    Go to Catalogs

  2. Examine the catalog details.

  3. To modify the Display name, do the following:

    1. Click Edit Display name.
    2. In the Display name field, enter the new name.
    3. Click Save.
  4. To modify the Description, do the following:

    1. Click Edit Description.
    2. In the Description field, enter the new description.
    3. Click Save.

gcloud CLI

gcloud design-center spaces catalogs update CATALOG \
--project=PROJECT \
--location=LOCATION \
--space=SPACE \
--description=DESCRIPTION \
--display-name=DISPLAY_NAME

Replace the following:

  • CATALOG: Your catalog ID.
  • PROJECT: Your management project ID.
  • LOCATION: The catalog region.
  • SPACE: Your space ID.
  • DESCRIPTION: The catalog description.
  • DISPLAY_NAME: The catalog display name.

For more information, see gcloud design-center spaces catalogs update.

What's next