Infrastructure Workflow - Creating Stack Templates
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
- Login into the SuperHub UI (controlplane.agilestacks.io) and click the
Templates
tab - then click
Create
link

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

- 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. - Choose from a list of supported stack components: Kubernetes, Harbor, Jenkins, GitLab, Clair, Prometheus, and more. Functional areas of components are grouped.
- 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.
- 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.


- At the end template creation page, there is a choice to
-
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
-
Build it now
which creates and immediately deploy a stack to a Cloud Account
-
- When ready to deploy the stack template, click
Build it now
and follow the instructions to deploy a stack instance from that template - Choose the Environment from the drop-down list where the template is deployed (ie: the cloud account)

- 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
- Depending on the Template and Cloud location the capacity configurations for a Platform stack may need to be adjusted
- Here is an AWS view
- 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.
- 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. PressShow secret URL
inStack Template source code
section and then pressCopy 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 https://__YOUR_KEY__@git.agilestacks.io/repo/__ORGANISATION__/__TEMPLATE__
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!
