Create the Stack

A Stackery Stack is an application consisting of relationships between cloud resources specified in a configuration file (a CloudFormation / SAM template) and their related assets (e.g. Lambda Function source code) inside of a Git repository. We’re going to start by forking and checking out the existing Catalog API Git repository.

Fork your GitHub Repository

You’ll need a GitHub account. If you don’t already have a GitHub account you can create a free one here.

Open the Catalog API Git repository. In the upper right hand corner click the button to Fork it, and choose whether to fork it to your personal space or an organization space, if you are part of one.

Create a New Stackery Stack

We’re going to create a new Stackery Stack inside your forked repository. Navigate to the Stackery Stacks page. Click the drop-down button to Add a Stack and choose With an existing repo.

Add a Stack with an Existing Repo

Fill in the details for your new stack by selecting GitHub as your Git Provider, demo-dotnet-webapi (or similar) for your stack name, and use the autocomplete form field to find your fork of the dotnet-framework-webapi repo. Click the Add Stack button.

If this is the first time you’re using Stackery with GitHub you’ll be asked to authorize Stackery to access your GitHub account.

Create Stack Form

Clone and Check Out Your Fork

Using a Local IDE

If you have your own usual method for checking out your fork, now’s the time to do it! If not, we highly recommend using Visual Studio Code’s built-in GitHub functionality to clone and check out your fork.

Using a Cloud9 Environment

To clone your fork locally to your Cloud9 environment, first export your GitHub username as an environment variable: sh export GH_USERNAME='<yourusername>'

Next, copy and run the below commands: sh mkdir -p ~/.c9/.repositories && \ mkdir -p "/home/ec2-user/environment/github.com/${GH_USERNAME}" && \ cd "/home/ec2-user/environment/github.com/${GH_USERNAME}" && \ git init && \ git clone "git@github.com:${GH_USERNAME}/dotnet-framework-webapi.git" && \ cd /dotnet-framework-webapi && \ touch ~/.c9/.repositories/dotnet-framework-webapi

You’re now ready to Create the Infrastructure for your stack!