Skip to content

codeforboston/beacon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Setup

Requirements

Install the AWS command line tools

Credentials

Set up a named AWS profile called cfb with an access key id and secret from AWS IAM. You may need to create a new user in IAM with the ability to create and manage CloudFormation stacks.

Create an SQS Queue

When creating the new queue:

Enable Content-based deduplication. In the GUI, it's shown as a checkbox in the Configuration section. If you're using the CLI, set ContentBasedDeduplication to true in your attributes map.

export AWS_PROFILE=cfb
aws sqs create-queue --queue-name "cfb-beacon-dev.fifo" --attributes '{ "MessageRetentionPeriod":"7200","FifoQueue":"true","ContentBasedDeduplication":"true" }'

Slack Setup

Create a Slack app

To finish configuration, you'll need two more pieces of information: a signing secret and a token.

You'll find the signing secret under Basic Information.

Under OAuth & Permissions, create a token by installing the new app in your workspace. This will be your BOT_OAUTH_TOKEN. It usually starts with xoxp or xoxb.

On the command line, in root of this project, run:

aws ssm put-parameter --name "/beacon/dev/slack/token" --value "BOT_OAUTH_TOKEN" --type SecureString
aws ssm put-parameter --name "/beacon/dev/slack/secret" --value "SIGNING_SECRET" --type SecureString
aws ssm put-parameter --name "/beacon/dev/github/secret" --value "GITHUB_SECRET" --type SecureString

with the appropriate values substituted.

Google Sheets Setup

On the Google Cloud console, go to Service Accounts and create a new service account. Do not grant the account any permissions (roles) during this stage of setup.

Create Key

Go to the Keys tab and press Add Key then Create new key. Select JSON as the key type. Move the downloaded file to the functions directory and rename it service-account.json.

Sheets: Add service account as editor

Copy the fully qualified email address for the new service account. It will look something like [email protected].

In the RSVPs spreadsheet, open the sharing preferences and add the service account email as an Editor.

Deploying

Install serverless (e.g., with npm install -g serverless)

Switch to the functions directory.

Run npm install.

Run serverless deploy -s prod. If you omit the stage, it will default to dev.

About

A Slackbot to help newcomers get oriented

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published