# Deployments

The **Deployment section** is available for each environment. It contains a list of all deployed projects, including personal deployments created in the IDE and common deployments created via HOME, along with their respective statuses. Within this section, you can view and manage your deployments, deploy projects to any environment for future use of Swagger or WSDL files, and access keys.

{% hint style="info" %}
The deployment section is only available to owners and administrators.
{% endhint %}

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FdnbEbP2VgtYeou13Ss9U%2FEnvironments%20team%20tab%20(2).png?alt=media&#x26;token=b6934602-928d-421d-baa8-425b1b8c51dc" alt=""><figcaption></figcaption></figure>

The General tab is divided into two parts.

**The left part of the General tab** includes the following information:

1. Info block:
   * Deployment name
   * URL. A public URL provides access to a specific deployment of your application and is used for calling the application via an external service.
   * API key. API key code is used to identify and call an application. Used for calling the application via external service.
   * Author - the email address of the user who performed the deployment.
   * Type. The type can be personal or common. The deployment type will be "personal" if made from IDE, or "Common" if launched from Home.
   * Status. The deployment status can have one of four values:
     1. “Starting” (during the development process).
     2. “Running” (during the use of development).
     3. “Failed” (if the development process failed).
     4. “Removing” (during the removal of the deployment).
   * Step. The deployment process includes the following steps: “Compiling”, “Deploying”, and “Waiting for application”.
     1. Compiling - a code generation process based on a JSON model. Compilation is responsible for logic formation only.
     2. Deployment - the process of packaging application files into an archive file and transferring them to a target application server.
     3. Waiting application - the application launch process.
   * Create time.
   * Update time.
2. Scale
   * Slots count. Slots count is the number of slots allocated for this deployment. To modify the slot count, click the Edit <img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FYwLGWSwfJSkWReKa8wZM%2Fimage.png?alt=media&#x26;token=ca2c7971-938f-437f-8e26-99e703d83317" alt="" data-size="line"> button. In the opened pop-up, specify the required number of slots and then confirm the changes.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FyTBsd3T6YEfI3TfQklaW%2FPopUp_Change%20deployment%20%20slot%20count-20231115-131635.png?alt=media&#x26;token=9c1b71a8-ca32-4d9e-b753-836de5dae2ee" alt="" width="563"><figcaption></figcaption></figure>

* Slots utilization. Slot utilization indicates the percentage of occupancy that the current deployment is utilizing on the slots allocated for that specific deployment. To update the statistics, click the Refresh <img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FuZP6jNAgGJvotmrOUeVs%2Fimage.png?alt=media&#x26;token=95abdbe9-7be6-41e9-b6e6-5587cdee463f" alt="" data-size="line"> button.

3. Source
   * Repository name
   * Project name
   * Project short ID
   * Branch name
   * Commit ID

The **right part** includes information on how the deployment can be used. You can obtain comprehensive Swagger or WSDL documentation for all available services. Also, you need to include the API key either in the header or as a request parameter in the URL of the app you are using to make a call to the generated services.

### How to work with deployments? <a href="#how-to-work-with-deployments" id="how-to-work-with-deployments"></a>

To deploy a project, click **the Add New Deployment button** in the Deployments tab.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2Fnwh07ybRwAgHAmMFXjKC%2FSwagger%20and%20WSDL%20links.png?alt=media&#x26;token=bb69a2ef-45db-4f6b-970c-a86a22eccfd6" alt=""><figcaption></figcaption></figure>

After that, a New Deployment pop-up window will appear in which the name of the new deployment will be automatically assigned. The name is editable. If you have not created any projects or repositories, **STEP 1 Commit** will be unavailable, and the repository and project fields will remain empty.

{% hint style="info" %}
You can create a deployment only if you have previously created a repository and a project with commits that include at least one flow and do not contain errors.
{% endhint %}

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FeCQCIyA3RUvDkz18EQ5U%2FNew%20Deployment_0.png?alt=media&#x26;token=c3a9151c-67ff-408a-8b62-733d2e858f2f" alt=""><figcaption></figcaption></figure>

If you have already created repositories and projects, **STEP 1 Сommit** will become immediately available. By default, the first repository and the first project from the list of available options will be pre-selected, and the commits for this project will be displayed.

You can select the desired project from the list, and all existing commits of the selected project will be loaded. Choose the commit you want to deploy and click **the NEXT button.**

Before creating a new deployment, it is possible to view the specific commit in the IDE in viewer mode by clicking **the** **VIEW button**.

To see the difference in each commit, you need to select the desired commit and check the values of the old version and the new version in the Changes section.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FzJxSMF5fT3kuR5ocS1qo%2FNew%20Deployment_1%20(2).png?alt=media&#x26;token=ad50a2f6-d66f-4021-a464-a7ac7ea9d625" alt=""><figcaption></figcaption></figure>

In **STEP 2 Base URL and Access keys (API keys),** you can manually specify the Base URL and Access key using a specific format. After entering the data, you can check it by clicking on **the VALIDATE button**:

* if the Base URL is not correct or the key is not registered in a system - **the NEXT button** is unavailable.
* if the Base URL is correct and the key is registered in a system - you can use it and **the NEXT button** becomes available. Also, you can use the key of another deployment.

{% hint style="info" %}
By default, in Step 2, the Base URL and Access key are generated by the system. Status: Checked. The NEXT button is available.
{% endhint %}

If you do not want to use the default environment Access key, you can generate a new one by clicking **the GENERATE button**. The system will generate a new key and after successful checking by clicking **the VALIDATE button**, you will be able to proceed to the next step.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FJXrDW30myxy6PXog3mcS%2FNew%20Deployment_2%20(1).png?alt=media&#x26;token=52f5b77a-f5a4-43dd-a595-b4765fa73fda" alt=""><figcaption></figcaption></figure>

In **STEP 3 Global variables** you can reassign existing global variables in the selected commit.

{% hint style="info" %}
Global variables are constants set by the user in the IDE and are used to store data (variables, passwords) that should be available in any part of the system.
{% endhint %}

You can set a new variable value, but it is necessary to remember that it can affect the functioning of other parts of the system that already use this variable. Click **the NEXT button.**

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FFrfEHGjFqJhXmH6F7fCi%2FNew%20Deployment_3%20(1).png?alt=media&#x26;token=0d932773-f50b-4f84-9371-8c33accd5cf1" alt=""><figcaption></figcaption></figure>

In **STEP 4 Logs**, you can turn on the Collection of Request logs and click the NEXT button. By default, the collection of Request logs is disabled.

{% hint style="info" %}
Enabling Request logs records all data associated with flow requests, but be aware that these logs may contain sensitive information. If Request logs are enabled, anyone accessing them can view this sensitive data within the Request Logs.
{% endhint %}

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FdjkZqOm6USuoW2M9BcRK%2FNew%20Deployment_4.png?alt=media&#x26;token=e43e7627-c0ad-4515-823f-9bdca0bed887" alt=""><figcaption></figcaption></figure>

In **STEP 5 Scaling options**, you can see a number of available slots that can be used for deployment. The availability of deployment slots depends on the allocated resources in the environment you are deploying to. The number of slots that the organization has is determined by the combination of slots included in the subscription and any additional slots purchased. These slots are then distributed within your organization's environment. You can only utilize the free allocated slots in the environment to which you are deploying. For more information, see the Organization and Subscription Guide.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2F5mxOMDpD5CRZE2YspXQg%2FNew%20Deployment_5.png?alt=media&#x26;token=d6ca4147-27d3-496d-a79b-8584d5e5dabf" alt=""><figcaption></figcaption></figure>

Once you are ready, click **the DEPLOY button**. The deployment process will be initiated with a **Starting** status.

The status of the deployment can be viewed in the General tab. Additionally, a color indication corresponding to the statuses is displayed next to the deployment's name.

Deployment statuses:

1. Starting (blue circle) project deployment process is in progress.
2. Running (green circle): project successfully deployed.
3. Stopped (grey circle): the deployment process is stopped.
4. Failed (red circle): the deployment process failed.

{% hint style="info" %}
If the deployment process ends with Failed status you can view the Deploy logs to check what happened during the deployment process. You can also view Application logs containing information about actions, events, and states occurring inside the system.
{% endhint %}

After the deployment process has been completed, the deployment status is **Running**.

Each deployment has an **API** key (Access key). To obtain it, you can go to the General tab.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FE6rR5NaW13r0DMzQeZEX%2FGeneral%20deployments%20tab.png?alt=media&#x26;token=537bcb49-f81f-4d2d-a26b-219ac1a2c4b6" alt=""><figcaption></figcaption></figure>

In the right part of the **General** tab, you also get access to the Swagger and WSDL files. To obtain them, click the respective **Swagger** or **WSDL** link located in **the How to use section** of the General tab.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FwjT7s8P3qMbaEm8Gp38W%2FSwagger%20and%20WSDL%20links%20(1).png?alt=media&#x26;token=492e1777-6c7f-4976-9dd6-64bd40b4ef9c" alt=""><figcaption></figcaption></figure>

The deployment list and information are updated automatically by the system every 10 seconds.

To **rename** deployments, click **the rename** <img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2F6jIaCTUEBqtTbnaOd3Up%2Fimage.png?alt=media&#x26;token=22ac0f53-3c69-4cd0-bf6c-fcfa16435cb7" alt="" data-size="line"> **button** in the **Deployment name** field. When the pop-up appears, enter a new name in the input field and then click **the RENAME button**. The deployment’s name will be changed.

To **delete** a deployment, click **the delete** <img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FdCm7qFazaHqZBSaX1tzh%2Fimage.png?alt=media&#x26;token=7ac7482b-09f2-4dd1-9dca-6f85b2b570c3" alt="" data-size="line"> **button** in the **Deployment name** field. In the removal process, the deployment will disappear from the page. After the section reloads, it will reappear with a gray-colored indicator (showing 'removing' status). When the deployment disappears again, it means it has been stopped. The system retains the information that the deployment existed but has been removed.

&#x20;
