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 StackSpot Portal.


To create Infrastructure on StackSpot, you can use Infrastructure Plugins that generate infrastructure components (IaC code). This process is similar to creating an Application, which generates source code using Application Plugins.

Requirements

Before you begin, ensure the following:

  • Be a Workspace member.
  • Log in to your StackSpot account.
  • Access to a Studio.
  • A Stack and Starter must be available.
  • Ensure environments are created in your account.
  • Set up Deployment via Self-Hosted to connect environments to your Cloud Account.
  • Source Code Management (SCM) must be configured by your account administrator.
  • If your account is Enterprise and the administrator decides that users should 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. 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 all the steps in the GIF below:

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 to create your Infrastructure. There are two ways:

  1. Create a repository from scratch: The repository creation will only be available if an Action is linked to this step in the Workflow.

See an example of a form to create a repository: Provide the information:

  • Name: Repository name, i.e. the application.
  • Visibility: The repository visibility. It can be public or private on GitHub.
  • Description: Describe what your application is for.

The inputs in this section may vary depending on the configured Workflow. For example, your Organization may have pre-configured Actions with inputs different from those shown in this example.


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


  1. Use an existing repository: Provide the information:
  • URL: The URL of the repository.
warning

If other Actions are configured in the Before stage prior to accessing the Plugins, they will be displayed as sequential steps in the flow, allowing you to provide the necessary information at each step.

Click 'Next step' to continue.

Step 6. In the Apply the Plugins to your Infrastructure tab, a list of Plugins from the Stack you selected will appear.

  • To add more Plugins, click 'Add Plugins', select the desired Plugins, 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. Refer to the image below for guidance:

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


Screenshot of the plugin configuration page during the application creation process. The image shows input fields and options to select and configure the required plugins.

warning

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


  • Example: To implement an Infra plugin for your Infrastructure that provides S3 buckets (Simple Storage Service), you must create two distinct S3 buckets: one for storing images and another for storing logs.

To achieve this goal, you must apply the Plugin twice to your Infrastructure Plugin. Using a Plugin with a single-use functionality will limit you to only one Application, forcing you to choose between creating an S3 Bucket for images or one for logs. Applying the Plugin twice is the clear solution to effectively meet your needs.

Important information about some inputs that may show up

  • Plugin's ID: This field names the Plugin usage and indicate its purpose in the application, as Plugins can be applied more than once. It comes automatically filled in, like in the image below, but you can edit it. To do this, click on the field and edit the text. The Plugin's ID is immutable once configured. If you want to edit this name, this is the only time you can.

Alias field in the Plugin configuration
  • If the Plugin requires a Connection Interface, you must select one. To do this, click on the down arrow in the 'Connection' field, as you can see below:

The image shows the Connection Interface required by the plugin. It is type ecs conn. Just below, there is a selection box for connections, in the list are: ecs-iti-cash-in; ecs-iti-cash-out; ecs-iti-pix-statement

  • If the Plugin you are applying has inputs-envs configured in the YAML file, you can parameterize the values based on the environment. In the Portal, you will find the option labeled 'Set values by environment.' Select this option and configure the inputs according to your desired environment.

  • In the 'Name resources to use later' field: If the Plugin you selected was created with Schema v.2 and has a generated Connection Interface, you must name it here.

  • In the 'Required Resources' field: If the Plugin you selected was created with Schema v.2 and requires a Connection Interface, you must select one here. To do this, click on the input field.

Check the image below for an example of this field for Plugins created with Schema v.2:


Screenshot of the input fields "Name resources to use later" and "Required Resources" of a Plugin created with Schema v.2 in the StackSpot EDP portal, displayed during the Application creation process


  • A list of provisioned Connection Interfaces should appear. You have two options:

    1. Choose one;
    2. Select another Plugin to generate the required Connection Interface. Click Add connection from a Plugin..

You will see a list of the Plugins in the Stack you selected that generate the same type of connection. Select the Plugin you want. Repeat the process as necessary.

caution

If the Plugin was created using Schema v3, the text in the input fields for generated or required Connection Interfaces is defined by the person who developed the Plugin. Therefore, these texts may vary and do not follow a fixed standard.

In case of doubts, refer to the specific documentation of the Plugin for more details.

Step.8 Save the settings for all Plugins. Click 'Next step';

info
  • Each Plugin has a tag indicating if further configuration is needed. Once everything is correctly set up, the tag turns green and displays 'Setup complete'.

  • If contexts are defined, some or all variables may already be pre-filled. Mandatory variables cannot be changed.

  • Step 8.1. If the configured Workflow includes Actions in the "After" stage, you may see additional steps. These steps will require you to provide specific information about the Actions set up in the flow.

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

Step 10. Click 'Run' to upload the Infrastructure to the repository and deploy it. The code will be committed to the repository specified during configuration.

caution

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


info
  • Your Infrastructure is published in the Workspace.
  • The commit/push of the code is done in the Git repository you added during configuration.

Once the workflow is finished, the developer can use the Infrastructures in an application.


Error when creating an Infrastructure


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

When you create an Infrastructure and click 'Commit' to upload the Infrastructure to the repository, you start a Workflow. Workflows define the order Actions will be executed, for example, to upload an Infrastructure to a repository.

If this Workflow returns an error, the creation of the Infrastructure will be interrupted. You'll need to check what's wrong and rerun the Workflow to create the Infrastructure properly.

Follow the steps below to rerun your workflow:


Step 1. Within the Workspace, after you start to create your Application, click on the 'Running' window that shows up on the left bottom of the page after you click on 'Commit'. Then, click on 'View details'.


info

If you closed the modal with the execution log of your Infrastructure:

  1. Go to your Workspace;
  2. Click on 'Infrastructures' in the left side menu and select your Infrastructure;
  3. Within your Infrastructure, click on 'Activities' in the left side menu;
  4. 115
  5. Within the log, click on the button 'Return to Create Infra Review';
  6. Continue from the 'Step 3' below.

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

Step 3. Check if there is something wrong and edit by clicking on the 'Edit' button or going back to the creation steps by clicking on the 'Return' button;

Step 4. Save your changes and click on the 'Commit' button again;

If an error occurs, repeat the process.


Edit Infrastructure name and description via the StackSpot Portal

Even after deploying, you can edit the name and description of your Infrastructure in the Portal. To do this, follow the steps below:

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

Step 2. Find and select your Infrastructure to open its dashboard. In the Infrastructure's main menu, click on the 'Settings' section;

Step 3. You can view the basic information about your Infrastructure, such as name and description. To edit them, click the edit button. Make the changes you want and click 'Save'.

You edited your Infrastructure.

Next step

danger

After creating your Application or Infrastructure, you need to deploy it. The steps for this may vary based on your organization's pipeline configuration. For more information, contact the account administrator or the person responsible for configuring the self-hosted environment.

Was this page helpful?