# Application Catalog

The <code class="expression">space.vars.product\_acronym</code> Application Catalog, also known as the App Catalog, is the key orchestration component that enables automation of advance use cases. The App catalog enables creation of applications that are composed of one or more virtual machines, networks, storage volumes, and other components that need to be created and managed as a single unit.

The App Catalog uses Terraform as the technology under the hood to enable application automation. The catalog requires and integrates with a user supplied Github repository to manage and deploy Terraform based applications.

{% hint style="info" %}
**NOTE**

The App Catalog is currently in beta for <code class="expression">space.vars.product\_name</code>
{% endhint %}

Following steps describe how to connect a repository, create application templates, and deploy applications from those templates.

#### Step 1: Connect a repository

The <code class="expression">space.vars.product\_name</code> App Catalog requires a Github repository to read and optionally write terraform templates. Ensure you have administrator access to connect your repository and create templates from your Terraform modules.

1. Log in to your <code class="expression">space.vars.product\_name</code> console using your credentials.
2. Navigate to **Orchestration >** **Repository** and then select **Add Repository** to access **Repository Configuration.**
3. On the **Repository Configuration**, enter the required information.

| **Field**       | **Description**                                        |
| --------------- | ------------------------------------------------------ |
| Repository URL  | Enter the complete URL to your repository              |
| SSH Key Name    | Enter a descriptive name for your SSH key              |
| Description     | Add details about the repository contents              |
| SSH Key Type    | Select the appropriate SSH key type for authentication |
| Private SSH Key | Enter your private SSH key content                     |

4. Select **Validate SSH Key** to verify the connection. The system validates your SSH key and repository access before proceeding.
5. Select **Add Repository** to complete the configuration.

Your successfully added repository will be visible on **Orchestration > Repository**. <code class="expression">space.vars.product\_acronym</code> now has access to your Terraform modules from this repository for template creation.

#### Step 2: Create a template from your repository

Create reusable Terraform based templates from modules stored in your connected repository. The Terraform module defined in each template serves as the source of truth for application deployments.

1. Navigate to **Orchestration > Apps > Templates** and then select **Create a Template**.
2. To create a new template, enter the required details.

| **Field**            | **Description**                                                                                                                                                                                                                                                                                                                               |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Template Name        | Enter a descriptive name for your template                                                                                                                                                                                                                                                                                                    |
| Description          | It is recommended you provide details about the template like the purpose and configuration                                                                                                                                                                                                                                                   |
| Upload Template Icon | <p>To upload a template icon, perform the following steps:<br><br>- Choose <strong>Click to upload</strong> or <strong>drag and drop</strong> a file.<br>- <code class="expression">space.vars.product\_name</code> console only supports .jpg and .png files<br>- You can preview the uploaded template icon in <strong>PREVIEW</strong></p> |

3. Select **Next** to continue configuring the Terraform module.
4. **Specify Terraform Module** is already selected by default. Continue to enter the required details.

| Field                     | Description                                                                                                                                                  |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Terraform Module path** | Specify the path to your module within the repository. If your module is located in the base path of the repository, you are not required to enter the path. |
| **Branch**                | Select Tag to identify the specific version or branch                                                                                                        |

5. Select **Fetch Your Terraform Module.** When successful, you will see a preview of the module contents.
6. Define **Terraform Variables** You can choose customize your Terraform template by adding **Key** and **Value** to the module
7. Select **Create Template** to finalize the template.

Your successfully added template will be visible on **Orchestration > Apps > Templates**.

#### Step 3: Create an application from a template

Deploy new applications using your predefined templates. This process creates application instances derived from the Terraform modules in your templates.

1. Navigate to **Orchestration > Apps > My Apps**.
2. Select **Create New App**.

{% hint style="info" %}
**NOTE**

Ensure you have at least one existing template available for deployment.
{% endhint %}

3. To configure a new application from a template, enter the following details.

| **Field**         | **Description**                                            |
| ----------------- | ---------------------------------------------------------- |
| Application Name  | Enter a unique name for your application                   |
| Template          | Select from the dropdown menu of available templates       |
| Creation Strategy | **Use default template properties** is selected by default |

4. Review the configuration. <code class="expression">space.vars.product\_acronym</code> populates the configuration based on your selected template where you can review the VM specifications, networking settings, and resource allocations.
5. Select **Create Application** to start the deployment process.

Your successfully deployed application will be visible on **Orchestration > Apps > My Apps** or **Orchestration > Apps > All Apps**.

#### Step 4: Manage your deployed applications

Manage your deployed applications through the App Catalog. Only you as the application administrator or authorized users can perform these operations.

1. Navigate to **Orchestration > Apps > My Apps**.
2. Application Operations:

| **Operations** | **Actions**                                                                                                                                                                                                                                             |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Play**       | <p>Start the application and power on all VMs in the correct sequence<br><br>- Powers on all virtual machines within the application<br>- Follows any predefined startup dependencies between VMs<br>- Application is operational and ready for use</p> |
| **Stop**       | <p>Shuts down the running application and all associated VMs<br><br>- Performs a clean shutdown of all virtual machines<br>- Preserves data and configurations for the next startup<br>- Application becomes unavailable until restarted</p>            |
| **Resume**     | <p>Restart suspended VM instances<br><br>- Restore suspended VMs to their previous running state<br>- VMs continue from where they were suspended<br>- All processes and memory contents are restored</p>                                               |

3. Advanced application management:

* **Clone** : Create a duplicate application instance using the same configuration.
  * Select **Clone** corresponding to any specific application.
  * The cloned application appears with the same template configuration.
* **Web Server Cluster - VMs** : View and manage individual VM instances within the configured application.
  * Access detailed VM level controls to stop or resume operations.
  * Monitor individual VM performance and status.

4. Application Monitoring:

* View real-time application status and resource utilization
* Monitor CPU, memory, storage, and network usage across all VMs
* Track application deployment history and current state

Applications remain linked to their original templates, but any customizations you make apply only to your specific app instance. You can deploy the same template multiple times, with each instance consuming its own resource quota.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/orchestration/app-catalog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
