Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Use aws-cdk to deploy an AWS Lambda based server-less version of the app #5

Merged
merged 57 commits into from
Jan 2, 2019

Commits on Dec 14, 2018

  1. Configuration menu
    Copy the full SHA
    d3fa248 View commit details
    Browse the repository at this point in the history
  2. Add basic package.json

    And run `npm install` to generate `package-lock.json`.
    floehopper committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    b8dfe11 View commit details
    Browse the repository at this point in the history
  3. Add typescript package

    floehopper committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    0cbe3f0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    51ecb74 View commit details
    Browse the repository at this point in the history
  5. Add aws-cdk package

    floehopper committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    223aa99 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    53a7f9c View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2018

  1. Configuration menu
    Copy the full SHA
    eb61865 View commit details
    Browse the repository at this point in the history
  2. Add default constructor to stack class

    This is where I'll add custom code to define the AWS resources which
    make up the stack.
    floehopper committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    68540aa View commit details
    Browse the repository at this point in the history
  3. Create an EventRule to fire at daily at 2am

    This rule currently has no target and so won't do anything, but it's a
    small step on the way.
    floehopper committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    a7b25e0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2cabad2 View commit details
    Browse the repository at this point in the history
  5. Add empty Ruby lambda function as target of scheduled rule

    Note that Ruby lambda functions cannot currently be "inline"; they have
    to be in a separate file.
    floehopper committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    fd3e64d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0ea4cd7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0c33a8c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    182f3f8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c78db03 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1e42cf7 View commit details
    Browse the repository at this point in the history
  11. Use trello gem to print name of first board

    Note that unfortunately the trello gem currently (rather unnecessarily)
    has an indirect dependency on the unf gem which has native extensions.
    When I was trying this previously, I thought I ran into problems because
    the extensions were being built on my local machine using Mac OSX
    (x86_64-darwin-17), but were being deployed and run in an AWS Lambda
    function which is an x86_64-linux platform. Previously I had used Docker
    to build the extensions for the correct platform, however, when I just
    tried deploying and running the function as it stands (with Mac
    OSX-build extensions), it seemed to work OK, so maybe the whole Docker
    thing was unnecessary!
    floehopper committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    52b61f1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    23f6a40 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    03513a1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1a5b273 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    85b71c9 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    25701aa View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    02f10ab View commit details
    Browse the repository at this point in the history
  18. Write Trello board data to S3 bucket

    I've chosen to use the board ID rather than a normalized version of the
    board name for the S3 object key, because this is a lot less likely to
    change over time.
    
    There's no need to include a timestamp in the S3 object key, because the
    S3 bucket has versioning enabled.
    floehopper committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    2e6e8c9 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2018

  1. Configuration menu
    Copy the full SHA
    03b02ea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b30f73 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    36a3f96 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7bee932 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    967a288 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8d0ded5 View commit details
    Browse the repository at this point in the history
  7. Email notification for errors in lamda functions

    I've confirmed that even a single exception from one of the lambda
    functions will trigger an alarm email notification.
    floehopper committed Dec 23, 2018
    Configuration menu
    Copy the full SHA
    4ec16c2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ab877f4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9705993 View commit details
    Browse the repository at this point in the history
  10. Move bucket name env var up into constructor

    This means all the env vars are obtained at the same level.
    floehopper committed Dec 23, 2018
    Configuration menu
    Copy the full SHA
    19e9257 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ae0e431 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b1ca055 View commit details
    Browse the repository at this point in the history
  13. Install bundled gems from scratch

    To minimize the size of the zip file uploaded to AWS.
    floehopper committed Dec 23, 2018
    Configuration menu
    Copy the full SHA
    34f7e65 View commit details
    Browse the repository at this point in the history
  14. Avoid using ruby-trello gem to reduce dependencies

    And reduce the size of the zip file uploaded to AWS.
    floehopper committed Dec 23, 2018
    Configuration menu
    Copy the full SHA
    9693ccd View commit details
    Browse the repository at this point in the history
  15. Use Net::HTTP vs addressable & rest-client gems to reduce dependencies

    And reduce the size of the zip file uploaded to AWS.
    floehopper committed Dec 23, 2018
    Configuration menu
    Copy the full SHA
    ff86d0c View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2018

  1. Configuration menu
    Copy the full SHA
    8b5a4e7 View commit details
    Browse the repository at this point in the history
  2. Add missing labels parameter when downloading board JSON

    I noticed this was missing when I was comparing this project with the
    `trello-full-backup` Python package [1].
    
    [1]: https://pypi.org/project/trello-full-backup/
    floehopper committed Dec 24, 2018
    Configuration menu
    Copy the full SHA
    dd6e01b View commit details
    Browse the repository at this point in the history
  3. Re-order board query parameters

    Move key & token to beginning of list and order the remaining keys
    alphabetically.
    floehopper committed Dec 24, 2018
    Configuration menu
    Copy the full SHA
    41ccd14 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2018

  1. Restrict fields returned from Trello API boards endpoint

    This should hopefully speed up the API response time.
    floehopper committed Dec 28, 2018
    Configuration menu
    Copy the full SHA
    9f20085 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2018

  1. Configuration menu
    Copy the full SHA
    e218ae4 View commit details
    Browse the repository at this point in the history
  2. Rename S3 bucket name env var to include "S3"

    To make its purpose clearer.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    a7c196f View commit details
    Browse the repository at this point in the history
  3. Rename alarm topic to monitoring topic

    I'm planning to use this topic for monitoring as well as alarms.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    1c1a0ff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d552bf6 View commit details
    Browse the repository at this point in the history
  5. Fix Markdown in README

    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    b63e324 View commit details
    Browse the repository at this point in the history
  6. Rename backupTrelloBoardTopic -> backupBoardTopic

    No need to include "Trello" in constant name.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    df0d545 View commit details
    Browse the repository at this point in the history
  7. Rename enumerateTrelloBoardsFunction -> enumerateBoardsFunction

    No need to repeat "Trello" in constant/function name.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    5145032 View commit details
    Browse the repository at this point in the history
  8. Rename backupTrelloBoardFunction -> backupBoardFunction

    No need to repeat "Trello" in constant/function name.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    27b6139 View commit details
    Browse the repository at this point in the history
  9. Rename trelloBoardBackupsBucket -> boardBackupsBucket

    No need to repeat "Trello" in constant/function name.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    5901917 View commit details
    Browse the repository at this point in the history
  10. Change env var prefix to match project name

    TRELLO_BOARD_BACKUPS -> TRELLO_BACKUP.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    ab8c11a View commit details
    Browse the repository at this point in the history
  11. Use project prefix even for dynamically generated env var

    BACKUP_TRELLO_BOARD_TOPIC_ARN -> TRELLO_BACKUP_BACKUP_BOARD_TOPIC_ARN.
    
    This makes the code more consistent.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    65cea17 View commit details
    Browse the repository at this point in the history
  12. Rename schedule expression env var

    I want to introduce another schedule expression and this change which
    makes the name more specific will make that easier.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    7564a40 View commit details
    Browse the repository at this point in the history
  13. Inline schedule function and use more specific naming

    Again this will make it easier to add another schedule expression rule.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    71327ee View commit details
    Browse the repository at this point in the history
  14. Add post-backup check

    Sends an email indicating whether the backup of all boards was
    successful or not.
    floehopper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    d634b0d View commit details
    Browse the repository at this point in the history