Skip to content

Commit

Permalink
update contributing and readme docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Égée committed Sep 4, 2023
1 parent 89d68a7 commit 094bf28
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 14 deletions.
39 changes: 36 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
# Contributing

## Testing `cdk-dynamodb-migrator`
## Guidelines

Feel free to open an issue or pull request!

## Useful commands

- `pnpm install` install the project
- `pnpm run build` build libraries
- `pnpm run test-linter` perform Eslint check
- `pnpm run test-type` check TypeScript compilation
- `pnpm run test-unit` run jest unit tests
- `pnpm run test` perform all tests

## Installation

### Requirements

- NodeJs >= 18.17 (you can use `nvm install` command)
- pnpm >= 8.7.1

### Installation steps

```sh
pnpm i
```

### Deploying `cdk-dynamodb-migrator` app

```sh
cd cdk-dynamodb-migrator
pnpm run deploy
```

#### Deploying a demo example

```sh
cd cdk-dynamodb-migrator
pnpm link --global
pnpm run build
cd ../demo/example
pnpm link --global cdk-dynamodb-migrator
pnpm cdk deploy
```
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Welcome to your CDK TypeScript project
# DynamoDB data migration enablers

This is a blank project for CDK development with TypeScript.
A set of enablers for safer data migrations with DynamoDB.

The `cdk.json` file tells the CDK Toolkit how to execute your app.
## CDK DynamoDB migration construct

## Useful commands
See [documentation](./cdk-dynamodb-migrator/README.md)

* `pnpm run build` compile typescript to js
* `pnpm run watch` watch for changes and compile
* `pnpm run test` perform the jest unit tests
* `cdk deploy` deploy this stack to your default AWS account/region
* `cdk diff` compare deployed stack with current state
* `cdk synth` emits the synthesized CloudFormation template
## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md)
13 changes: 12 additions & 1 deletion cdk-dynamodb-migrator/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# CDK DynamoDB migration framework
# CDK migration construct and stack

Constructs to manage migration versions performed by a migration lambda

## Usage

It is possible to use either `MigrationConstruct` inside a stack, or use `MigrationStack` as an independent stack
These constructs contain a state machine (Step Functions) + a DynamoDB table to store current state and versions.

They take as input a Lambda function which should perform migrations using a version number strictly increasing.
Lambda input must extend: `{ targetVersion: number }`
Lambda output must extend: `{ status: 'SUCCEEDED' | 'FAILED' }`
5 changes: 5 additions & 0 deletions cdk-dynamodb-migrator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"author": {
"name": "Guillaume Égée"
},
"contributors": [
{
"name": "Zineb El Bachiri"
}
],
"bin": {
"cdk": "bin/cdk.js"
},
Expand Down

0 comments on commit 094bf28

Please sign in to comment.