Infrastructure Workflow - Creating Stack Templates

Agile Stacks Updated by Agile Stacks

Infrastructure Workflow - Creating Stack Templates

Stack Templates are the cornerstone of reproducible and composable stacks (clusters). You can learn more about the principal parts of the AgileStacks' system here. Stack templates are automatically generated and saved in Git repository, allowing you to manage, configure, and implement change control for your infrastructure as code.

In this short tutorial, we'll walk you through the Stack Template creation and deployment process.

TLDR: watch a video version of this tutorial

  1. Login into the SuperHub UI ( and click the Templates tab
  2. then click Create link
  1. Next, you will need to name the stack template; it needs to be unique across all environments.
    Note: When naming a stack, try to choose a meaningful name that includes the stack type or purpose, such as ML Stack or Innovation Lab Stack.
    You can also use tags to give additional context to your Stack Template such as the date and author.

  1. You need to choose if this will be a Platform Stack or an Overlay.
    Platform Stacks deploy a Kubernetes cluster, and form the foundational stack of a deployment. Overlay Stacks are couplings of integrated components, and can be added later to a Platform Stack. Any number of different overlay stacks can be added to an existing Stack.
  2. Choose from a list of supported stack components: Kubernetes, Harbor, Jenkins, GitLab, Clair, Prometheus, and more. Functional areas of components are grouped.
  3. Select the required stack components. Sometimes components are unavailable because they are incompatible with other choices made, either because of a selection from a previous functional area or it cannot coexist with a component in the selected functional area.
  4. Click on the gear icon on the top right of each component tile to see a detailed component description or to enter advanced configuration options.

  1. At the end template creation page, there is a choice to
    1. Save for later which creates the stack template for peer review or allow editing of the auto-generated files in the git repository
      • Create an automation template in a Git repository without deploying it
    2. Build it now which creates and immediately deploy a stack to a Cloud Account
  2. When ready to deploy the stack template, click Build it now and follow the instructions to deploy a stack instance from that template
  3. Choose the Environment from the drop-down list where the template is deployed (ie: the cloud account)
  1. Under "Domain name" select Click to edit to enter the value for this template to reference, using only valid DNS characters.
    • lower case characters
    • numbers
    • or the dash - symbol
  2. Depending on the Template and Cloud location the capacity configurations for a Platform stack may need to be adjusted
    1. Here is an AWS view
  3. After tweaking the settings to your liking, click deploy, and the view will change to a live log output of your deployment. You can close this tab or navigate away and the deployment will continue. If you deployed a Platform Stack, the process should complete in about 20 minutes.
  4. While waiting for the stack to deploy, you can review the generated infrastructure as code. First open Templates -> List section in a navigation bar of AgileStacks control plane. Find the stack template you have just created. On this screen you will see the address to your Git repository. To access it you can use a SSH key you have defined in your user profile, or a secret key issued to you in the SuperHub WebUI. In this tutorial we will use the second option. Press Show secret URL in Stack Template source code section and then press Copy URL. The URL you see will be copied in your clipboard.
    Now, open a terminal with your favorite shell, and clone a git repository from your exchange buffer:
    git clone
    You can view infrastructure as code definition of the stack template, based on Terraform, CloudFormation, Helm and other languages.
    Congratulations, you have just created and deployed a new stack template!

Like what you see? Sign up today!

How did we do?

Infrastructure Workflow - Deploy Kubernetes with Hub CLI

Developer Workflow - Accelerated Development and Deployment on Kubernetes with Skaffold (101)