- gnu make
- nodejs
- npm
- terraform
- tfswitch
- docker
- docker-compose ~> 1.29
- python ~> 3.9
- python-poetry
- aws cli
edit ./tf/main.tf and adjust the region in the aws provider block .
edit ./config.json and adjust the values as needed
export AWS_REGION="us-east-x"
export UID="$(id -u)"
poetry update
cd ./tf
tfswitch
terraform init
terraform plan -out plan.out
terraform apply plan.out
./bin/crypt.sh save
Running this script the first time will create an empty .secrets.json
file in your project, and then populate it with a secrets template. These secrets are put in the parameter store in AWS SSM.
These values will be filled in and updated in AWS SSM later.
npm install
make backend_layer
make gen_slack_manifest
This will generate a slack manifest template for you to create your Slack App and generate the secrets stored in the AWS SSM Parameter store.
-
Create two channels in your workspace, one as a primary channel for your app, and another for exceptions the application may throw (for monitoring)
-
Navigate to the slack apps page
-
Select "Create New App"
-
Select your desired workspace
-
Copy the text in
./slack/manifest.yaml
generated from the previous command, and past into the window -
Change all the
url
keys tohttp://localhost
- this will be updated later. -
Finalize your app creation
-
Click "Install to Workspace"
-
Authorize App, and select your primary channel you created in a previous step
-
Go to "Incoming Webhooks" and click "Add New Webhook to workspace"
-
Select the exception webhook you created earlier
-
Edit your .secrets.json file, and populate with values from the various parts of the application. You secrets json file should look like the first image.
-
Once all these are updated save the file and issue the command *
./bin/crypt.sh save
After your secrets are saved, deploy the backend;
make deploy_all
Now that the backend is in place, you can generate an updated manifest with the URL for your App's deployment;
make gen_slack_manifest
Copy your new slack/manifest.yml
file into your App's configuration.
-
Once the backend is built and your manifest is updated, go your "App Manifest" section, and click the verify location
-
At this point you should be done, save your source control, and follow the steps below to maintain / update the application.
## Upgrade existing packages
poetry upgrade
## add new direct packages (will be in layer)
poetry add xyz
## Add development package
poetry add -D foo
make deploy_all
make deploy_only_serverless
# Tail lambda web
make logs
cd ./tf
terraform plan -out plan.out
terraform apply plan.out