This guide covers how to create your own Cycloid private stack from scratch. The source code for each steps in the documentation is available here.

We will create a stack called stack-sample to create & deploy a cloud instance using Terraform and a pipeline.

Here is an overview of the final result: Final pipeline

This pipeline will get the source code of a website from a Git repository, run unit tests on the code. Then create and deploy a cloud instance to run the website using this code with Terraform.

# Requirements

To simplify the step by step guide we assume that you provide the following elements:

  • An empty Git repository (you can use Github, Bitbucket, Gitlab, AWS CodeCommit, etc.):
    • Later on, we will create 2 branches (stacks and config).
    • SSH key to access to the repository.

Important

In this guide, We use and create 2 branches into the same git repository to keep things simple. But when you build your own stack, it's up to you to define if you want to use one unique branch, several branches or even split them across different git repositories.

# Prepare Cycloid credentials

Let's create Cycloid credentials that we will use into our pipeline.

  • 1) SSH key Create a new credential named step by step of type ssh. Put your private SSH key in the ssh_key field.

This creates a SSH credential under the path ssh_step-by-step, which will be used to interact with the Git repository.

Cycloid credentials