Skip to main content

Create and Publish Infrastructure via Portal

In this section, you will find a guide on how to create and publish an Infrastructure via the StackSpot Portal.


An Infrastructure on StackSpot consists of Stacks containing Infrastructure Plugins. These Plugins generate infrastructure components (IaC code). This process is similar to creating an Application, which generates source code using Application Plugins.

Prerequisites

Before you begin, ensure the following:

  • Be a Workspace member.
  • Have logged in to your StackSpot account.
  • Have access to a Studio.
  • Have a Stack and Starter available.
  • Have environments created in your account.
  • Have configured Deployment via Self-Hosted to connect environments to your Cloud Account.
  • Have the SCM configured (typically done by your account administrator).
  • If your account is Enterprise and the administrator requires users to manage access to
    SCM
    via Personal Access Token (PAT) individually
    , you must configure it in 'External Connections'.

If any of the above requirements are not met, complete them before proceeding.


Follow the steps to create your Infrastructure via Portal

Step 1. Log in to the StackSpot EDP Portal;

Step 2. On the side menu, click the ’Create’ button and select the ’Infrastructure’ option;

warning
  • If the administrator of your Account has not configured the SCM, you will not be able to proceed. For more information, see the Configure SCM section.

  • If your Account Administrator requires users to manage SCM access individually using a Personal Access Token (PAT), you must set it up in 'External Connections'.

Step 3. Select the following:

  • Workspace: Choose the Workspace where you want to create your Infrastructure.
  • Stack: Select a Stack to serve as the basis for your Infrastructure and its version.
  • Starter (optional): Pick a Starter, a predefined template with specifications for a set of Plugins.

Click 'Next' to proceed.

See the process in the GIF below:

GIF showing the selection of Workspace, Stack, and Starter during infrastructure creation

info
  • The Infrastructure Stack is already created; you only need to configure and upload it.
  • Review the list of pre-selected Infrastructure Plugins from the Stack and choose the ones you want to apply.

Step 4. Provide the following details on the 'Create Infrastructure' screen:

  • Name: Enter a name for your Infrastructure.
  • Description: Add a brief description of your Infrastructure.

Step 5. On the 'Source Code Repository' screen, choose the repository for your Infrastructure. There are two options:

  1. Create a repository from scratch: Available only if an Action is linked to this step in the Workflow. Fill in:
    • Name: Repository name.
    • Visibility: Public or private on the SCM.
    • Description: Brief description of the repository.

Inputs in this section may vary depending on the configured Workflow Actions.


You can only edit this step if the Account Holder allows it.


  1. Use an existing repository:
    • URL: Enter the repository URL.
warning

If there are Actions configured in the Before stage, they will be displayed as sequential steps before you can access the Plugins. Fill in the necessary information for each step.

Click 'Next step' to continue.

Step 6. Apply the Plugins to your Infrastructure. The Plugins from the selected Stack will be listed.

  • To add more Plugins, click 'Add Plugins', select the desired ones, and click 'Add Plugins' to confirm.

Step 7. Configure each Plugin by filling in its input fields. To configure, click on the Plugin to expand its settings. See the image below:

To learn more about input rules, see the Input Configuration section.


Screenshot of the plugin configuration screen on StackSpot Portal showing input fields

warning

If a Plugin has the single-use flag, it can only be applied once to your Infrastructure.


  • Example:
    If you need two S3 Buckets (one for images, one for logs), you must apply the Plugin twice. However, if the Plugin is single-use, it only allows one instance. In this case, you would need a Plugin that supports multiple instances or a different Plugin.

Important information about inputs

  • Plugin's ID: This field names the Plugin usage and indicates its purpose, as Plugins can be applied multiple times. It comes automatically filled, but you can edit it by clicking on the field.
    The Plugin's ID is immutable once configured. This is the only time you can edit it.

Plugin ID field highlighted in the configuration screen
  • Set values by environment: If the Plugin has scope: env configured in the YAML, you can parameterize values per environment:

    1. In the Portal, find the option 'Set values by environment';
    2. Select it and configure the inputs for each environment.
  • 'Name resources to use later' field: If the Plugin was created with Schema v.2 and generates a Connection Interface, name it here.

  • 'Required Resources' field: If the Plugin was created with Schema v.2 and requires a Connection Interface, select one here by clicking on the field.

See the example below for Schema v.2 Plugins:


Highlighted input fields for 'Name resources to use later' and 'Required Resources'


  • A list of provisioned Connection Interfaces will appear. You can:
    1. Select one from the list; or
    2. Select another Plugin to generate the required Connection Interface by clicking 'Add connection from a Plugin'.
caution

If the Plugin uses Schema v3, input texts for Connection Interfaces are defined by the Plugin developer. They may vary and do not follow a fixed standard. Refer to the specific Plugin documentation for details.

Step 8. After configuring all Plugins, click 'Next step'.

info
  • A tag indicates the Plugin configuration status. Once finished, it turns green ('Setup complete').
  • If contexts are defined, some variables may be pre-filled and locked.

Step 9. If the configured Workflow has additional steps (Actions in the 'After' stage or Extensions), fill in the requested information.

Extensions configured in workflow.yaml only work via the Portal.

Step 10. Review your Infrastructure details. If needed, click 'Edit' to make changes.

Step 11. Click 'Run' (or Create) to upload the Infrastructure to the repository.

caution

The Infrastructure deployment (cloud provisioning) will only occur automatically at this stage if your organization has configured deployment via Runtime Self-Hosted.


info
  • Your Infrastructure is published in the Workspace.
  • The code commit/push is performed in the specified Git repository.

Once the workflow finishes, the Infrastructure will be available for use in Applications.


Error when creating an Infrastructure


Learn how to re-run the 'Create Infrastructure Workflow' in case of an error. This is only possible within the StackSpot Portal.

When you click 'Run', you start a Workflow. If this Workflow fails, the creation is interrupted. You must check the error and rerun the Workflow.

Follow the steps:


Step 1. In the Workspace, locate the 'Running' window in the bottom left corner and click 'View details'.


info

If you closed the modal with the execution log:

  1. Go to your Workspace;
  2. Click 'Infrastructures' in the side menu and select your Infrastructure;
  3. Click 'Activities' in the Infrastructure menu;
  4. Select the failed Workflow and review the "errorLog" attribute;
  5. In the log, click the button 'Return to Create Infra Review';
  6. Continue from 'Step 3' below.

Step 2. On the 'Commit' page, click 'Back to review'.

Step 3. Check the data, edit as needed by clicking 'Edit', or use 'Return' to navigate through steps.

Step 4. Save your changes and click the 'Commit' (or Run) button again.

caution

If the error persists, repeat the log analysis process.


Edit Infrastructure name and description

Even after deploying, you can edit the name and description of your Infrastructure.

Step 1. Log in to the StackSpot EDP Portal and click ’Infrastructures’ in the main menu;

Step 2. Select your Infrastructure to open its dashboard. In the side menu, click 'Settings'.

Step 3. View the basic information. Click 'Edit', make changes, and click 'Save'.

Next steps

danger

After creating your Infrastructure, you must deploy it (if not done automatically). Steps vary based on your organization's configuration. Contact your Account Administrator regarding the self-hosted environment.