Deployment setup
Installing gdeploy
To manage your Common Fate deployment, start by installing gdeploy
.
gdeploy
is a command-line interface (CLI) tool for creating and managing Common Fate deployments. It provides commands for creating and updating deployments, and also for operational tasks like viewing logs and backing up or restoring data.
To install gdeploy
, follow the instructions below based on your computer's operating system:
- Homebrew on MacOS
- MacOS manual install
- Linux
- Windows
Homebrew is an open source package manager for MacOS. We publish a Homebrew formula for gdeploy
. To install gdeploy
with Homebrew, run the commands below in your terminal.
brew tap common-fate/granted
brew install gdeploy
Select the steps which match your system architecture. You can find your architecture by running uname -m
from a terminal window.
- x86_64
- arm64
curl -OL releases.commonfate.io/gdeploy/v0.12.0/gdeploy_0.12.0_darwin_x86_64.tar.gz
sudo tar -zxvf ./gdeploy_0.12.0_darwin_x86_64.tar.gz -C /usr/local/bin/
curl -OL releases.commonfate.io/gdeploy/v0.12.0/gdeploy_0.12.0_darwin_arm64.tar.gz
sudo tar -zxvf ./gdeploy_0.12.0_darwin_arm64.tar.gz -C /usr/local/bin/
Select the steps which match your system architecture. You can find your architecture by running uname -m
from a terminal window.
- x86_64
- arm64
- i386
curl -OL releases.commonfate.io/gdeploy/v0.12.0/gdeploy_0.12.0_linux_x86_64.tar.gz
sudo tar -zxvf ./gdeploy_0.12.0_linux_x86_64.tar.gz -C /usr/local/bin/
curl -OL releases.commonfate.io/gdeploy/v0.12.0/gdeploy_0.12.0_linux_arm64.tar.gz
sudo tar -zxvf ./gdeploy_0.12.0_linux_arm64.tar.gz -C /usr/local/bin/
curl -OL releases.commonfate.io/gdeploy/v0.12.0/gdeploy_0.12.0_linux_i386.tar.gz
sudo tar -zxvf ./gdeploy_0.12.0_linux_i386.tar.gz -C /usr/local/bin/
First, download the zip archive of gdeploy
which matches your system's architecture. You can find your architecture by viewing your system properties in the Control Panel.
After downloading gdeploy, unzip the package.
You'll need to move the binary to a folder which is accessible on your PATH
. This StackOverflow link has instructions on how to do this.
Verify the installation
You can verify the integrity and authenticity of the gdeploy
binary you have downloaded by running through the verification process here (replacing references to granted
in URLs with gdeploy
).
Check that gdeploy
has been installed correctly by running the following command:
gdeploy -v
You should see a version output similar to the below:
gdeploy version 0.12.0
Setting up your deployment configuration
To start, create a new folder on your computer and open a terminal window in it; this folder will hold configuration files for your Common Fate deployment. You can give this folder any name — we suggest calling it common-fate-deployment
. In the terminal window, run the following command:
gdeploy init
gdeploy
will ask some questions to set up your deployments. After you've answered the questions, you should see an output similar to below:
[✔] wrote config to deployment.yml
The deployment.yml
file contains all of the configuration for your Common Fate deployment. Have a look at the file by running:
cat deployment.yml
This should output something similar:
version: 2
deployment:
stackName: Common Fate
account: "123456789012"
region: ap-southeast-2
release: v0.12.0
parameters:
CognitoDomainPrefix: common-fate-login-cfdemo
During the deployment process, gdeploy
reads information from this file and uses it to populate CloudFormation parameters for the deployment.
We recommend using Git to track versions of the deployment.yml
file. Run the following commands from your deployment folder to set up version control with Git:
git init
git add -A
git commit -m "initial Common Fate deployment configuration"
You can publish this repository to a Git time to deploy Common Fate! From the same folder as the previous step, run the following command: provider like GitHub or GitLab to backup your configuration.