App Lifecycle Manager lets you design a modular SaaS architecture by packaging each
independently managed component as a *unit kind* . You can map components to
separate unit kinds or cover your entire SaaS offering with one. To choose an
approach, see [Design the SaaS offering](https://docs.cloud.google.com/app-lifecycle-manager/design-saas-offering.md.txt#saas-model). You can create unit kinds
directly by using the Google Cloud CLI. Alternatively, import
Application Design Center composite templates by following
[Populate unit kinds using an existing composite template](https://docs.cloud.google.com/app-lifecycle-manager/design-saas-offering.md.txt#unit-kind-adc).

## Before you begin

1. Ensure you have created a [SaaS offering](https://docs.cloud.google.com/app-lifecycle-manager/create-saas-offering.md.txt) for your SaaS application.
2. Ensure you have the service accounts with the required permissions. For details, see [App Lifecycle Manager service accounts](https://docs.cloud.google.com/app-lifecycle-manager/service-accounts.md.txt).
3. For each SaaS offering you create, ensure you have a composite template. For details, see [Design the SaaS offering](https://docs.cloud.google.com/app-lifecycle-manager/design-saas-offering.md.txt#saas-model).

## Design the SaaS offering

To design the SaaS offering, determine how many unit kinds to create and
the relationship between them.

For example, you might create two unit kinds: one unit kind for the
infrastructure such as a VM, and one unit kind for the application deployed
onto the infrastructure.

To decide how to design the SaaS offering using unit kinds, consider the
following:

- Review the dependencies between components of the SaaS offering. For example, if a SaaS offering includes an application deployed onto a shared Kubernetes cluster, then consider using a unit kind to represent this shared cluster.
- Consider the release and maintenance cycle of the components of the SaaS offering. If there are components that are managed together, such as the infrastructure, then consider grouping these components into one unit kind.

After you determine this design, define each unit kind in your composite
template.

## Create a unit kind

You can create a unit kind by [using composite templates](https://docs.cloud.google.com/app-lifecycle-manager/design-saas-offering.md.txt#unit-kind-adc).

## Create a new composite template

You can manage unit kinds using App Design Center composite templates.

To create a new composite template using App Lifecycle Manager:

1. In the Google Cloud console, go to **App Lifecycle Manager** \> **SaaS offerings**.

   [Go to SaaS offerings](https://console.cloud.google.com/saas/saasOfferings)
2. Click **Create new template**.

3. On the **Create a new composite template** page:

   1. In the **Template ID** field, enter an identifier for your template.

      > [!NOTE]
      > **Note:** **Template ID** must start with a lowercase letter followed by up to 30 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.

   2. Optional: In the **Template name** field, enter a name for the template.

   3. Optional: In the **Description** field, enter a short description of the template.

   4. Click **Create template**. App Lifecycle Manager takes a few minutes to
      create the template.

4. When the template has been created successfully, you'll see your template's
   details in the **Connected application template** section of the **SaaS offering details**
   page.

   You've successfully created a composite template using App Lifecycle Manager.

## Populate unit kinds using an existing composite template

You can populate unit kinds by using App Design Center
composite templates.

To populate unit kinds from an existing composite template:

1. In the Google Cloud console, go to **App Lifecycle Manager** \> **SaaS offerings**.

   [Go to SaaS offerings](https://console.cloud.google.com/saas/saasOfferings)
2. Click **Connect existing template**.

3. On the **Connect a composite application template** page, set up the template connection:

   1. In the **Space** list, select the App Design Center space with your composite template.
   2. In the **Composite application template** list, select a composite template.
   3. In the **Revision** list, select the template revision that you want to use to populate your SaaS offering's unit kinds.
   4. Click **Connect**.
4. App Lifecycle Manager takes a few minutes to import the composite template
   from App Design Center. After App Lifecycle Manager imports
   the template correctly, the **Unit kinds** tab displays the unit kinds
   defined in your composite template.

   You've successfully populated your SaaS offering's unit kinds using a
   composite template.

## What's next

- After you design the SaaS offering, you can [deploy a unit instance](https://docs.cloud.google.com/app-lifecycle-manager/deploy-saas-offering.md.txt).
- To learn more about App Lifecycle Manager, see the [App Lifecycle Manager overview](https://docs.cloud.google.com/app-lifecycle-manager/overview.md.txt).
- For more details about the service accounts needed when using App Lifecycle Manager, see [App Lifecycle Manager service accounts](https://docs.cloud.google.com/app-lifecycle-manager/service-accounts.md.txt).