Skip to main content
⏳ Estimated read time: 8 min read

Create an appStack

An appStack is a collection of resources that represent your application or cloud system. These resources, when considered together, allow for StackGen to analyze your application’s architecture and generate the appropriate Infrastructure as Code (IaC). This IaC can then be used to deploy the infrastructure required to support your application.

To get started with StackGen and generate infrastructure as code (IaC) for deployment, log in to StackGen and then follow these steps:

  1. Connect Your Repositories With StackGen
  2. Create an appStack
  3. View and edit the topology
  4. Generate IaC files
note

This process assumes you have an existing application codebase that you would like to scan and build infrastructure. If you would like to start from a blank canvas, check out our IaC From Design. If you would like to use our CLI, check out Create an appStack.

Log In to StackGen

Click to view

You can login to StackGen with the following accounts:

note

If you are not already logged into the authentication accounts listed above, StackGen will prompt you to log in before you authorize it.

GitHub

When you log in with GitHub, you will be asked to authorize StackGen with read-only access to your organization, teams, and personal information. Additionally, you will need to grant StackGen access to any repositories that are not already configured to allow the application to access organization data. Click Authorize StackGen to proceed.

GitLab

When you log in with GitLab, you will be asked to authorize StackGen with read access to your personal information and authentication via OpenID Connect. Additionally, you will need to grant access to any repositories that are not already configured to allow the application to access organization data. Click Authorize to proceed.

Google

When you log in with Google, you are linking your Google account with StackGen. Selecting the account would mean that you are agreeing to share your name, email address, language preference, and profile picture with StackGen. Click Continue to proceed.

Connect Your Repositories With StackGen

Click to view

You need to make sure that StackGen has access to the repositories you use to build your application, whether that's several microservices or a monolith repository. If you don't see the repositories you need, listed when you click Repositories in the left-hand navigation bar, you will need to connect repos to StackGen. Learn more about how to Connect and manage a repository on StackGen.

Create an appStack

Click to view

To generate the IaC files your application needs, you need to create an appStack. You can create in the following ways:

View and Edit the Topology

Click to view

The Topology Canvas in StackGen is a visual design tool for creating, managing, and validating cloud infrastructure. You can drag and drop cloud resources, configure their settings, establish connections, and export Infrastructure as Code (IaC). It provides an interactive way to plan and validate infrastructure before deployment. Learn more about the Toplogy Canvas here.

Generate IaC Files

Click to view

When you're ready to deploy your infrastructure, StackGen offers two methods for exporting your Infrastructure as Code (IaC) to streamline your workflow. You can either download your IaC in a .zip file or push it directly to a Git repository. Learn more about the Iac tab in the Topology Canvas and exporting Iac.

To get started with StackGen and generate infrastructure as code (IaC) for deployment, log in to StackGen and then follow these steps:

  1. Connect a repo
  2. Create an appStack
  3. View and edit the topology, and
  4. Generate IaC files

This process assumes you have an existing application codebase you would like to scan to build infrastructure. If you would like to start from a blank canvas, check out our usage instructions. All instructions will be given for the StackGen web application, if you would like to use our CLI, go here.

Log in

When you choose the "Developer Edition" option from the StackGen Get Started page, you will be prompted to log in with either:

  • GitHub

  • GitLab, or

  • Google

    Note: If you are not already logged in to these applications, you will be prompted to log in before authorization.

GitHub

When you log in with GitHub, you will be asked to authorize StackGen to acccess your organizations, teams, and personal information with read only access, and to grant us access to any repository not already configured to allow the application to access organization data. Click "Authorize StackGen" to proceed.

If the project you want to use with StackGen was already added during this step, you can skip directly to Create an appStack.

GitLab

When you log in with GitLab, you will be asked to authorize StackGen to access your account with read access to your personal information and authentication through OpenID Connect. You will also grant us access to any repository not already configured to allow the application to access organization data. Click "Authorize" to proceed.

If the project you want to use with StackGen was already added during this step, you can skip directly to Create an appStack.

Google

When you log in with Google, you are connecting your Google account to StackGen. Select the account you would like to connect, and then agree to share your name, email address, language preference, and profile picture with StackGen. Click "Continue".

Connect a repo

You need to make sure that StackGen has access to the repos you use to build your application, whether that's several repos of various microservices or one monolith repo. If you don't see the repos you need listed when you click "Repositories" in the left-hand navigation bar, you will need to connect repos to StackGen. To do this:

  1. Click the "Add repositories" button.
  2. Select the "Using OAuth Application" option.
  3. Choose the VCS provider you will be using (GitHub or GitLab) and click "Proceed".
  4. If you haven't configured access to your repos, you will be prompted to do so.
  • If prompted, click "Configure StackGen to access [VCS provider] repos".
  • Authorize StackGen to access your repositories as prompted.
  1. Click "Proceed".

  2. Select the repositories you want to use with StackGen, and click "Proceed".

    You should now see the repos you've chosen in a list.

    Repolist

Create an appStack

To get the IaC files your application needs, you need to create an appStack. You have two options for how to do this:

  1. StackGen can scan your code and generate IaC for you; or
  2. You can use our visualizer to drag and drop infrastructure to generate IaC from.

Code Scan

To create an appStack by scanning your application or project code:

  1. Click on "appStacks" in the left-hand navigation bar.
  2. Click the "New appStack" button.
  3. Choose the bottom option in the list, "appStack from source code". SourceCodeScan
  4. Then select at least one repository for StackGen to scan. You can choose as many repositories as are needed for your application or project.
  • When you select a repo, be sure to specify the language and, if applicable, the branch you want to scan.
  • (Optional) You can also: rename the component for StackGen, if you do not wish to use the repository's name; specify a path within the repo to scan; provide a URL to the container image; and specify a Dockerfile location. ComponentLangTag
  1. Click "Proceed" once your repos are selected and the language and branch information are set.
  2. Choose the cloud service you would like to use and click "Proceed".
  3. Select any policies you would like your IaC to comply with, and click "Proceed". PoliciesSelection
  4. Name your appStack, and add a description or tags if you would like. NameScanStack
  5. Click "Create appStack" and you should see your project listed on the appStack page.

At this point your project is being scanned, so you will need to wait until the scan is complete before moving on to the next step. For very large projects, this could take several minutes. To see the status of your appStack, click the '^' to the left of the appStack name to expand the appStack information. If it is still analyzing, it will look like this:

CodeScanAnalyzing

Blank Canvas

To create an appStack where you can start building infrastructure from scratch:

  1. Click on "appStacks" in the left-hand navigation bar.
  2. Click the "New appStack" button.
  3. Choose the top option in the list, "appStack from scratch". BlankCanvasStack
  4. Choose the cloud service you would like to use and click "Proceed".
  5. Select any policies you would like your IaC to comply with, and click "Proceed". PoliciesSelection
  6. Name your appStack, and add a description or tags if you would like. NameCanvasStack
  7. Click "Create appStack".

You will end up on a blank Topology screen. From this point, you will be dragging and dropping topology elements, and can follow the instructions in edit topology.

BlankCanvas