---
# System prepended metadata

title: McDao Deployment Notes

---

# McDao Deployment Notes

## Getting a new Kovan test up

X 1. Deploy contract
0x8cc93fadc8632f5bd4939ebd2fa7867ce97b28a7

X 3. Update subgraph - sk
4. Update infura - check it

X 6. make sure there are no hard coded addresses

X 5. bring over serverless configuration to mc-dao repo
 X auth confirm code change
 x.env to config - switch process.env

mainnet sdk in a few places
getSdkEnvironment(SdkEnvironmentNames.Kovan)

X remove email from member meta data

X add ens_name

x 5. Update env variables in app

x 7. Build aws resources (see below)

9. Deploy

10. clean up - remove the console logs



11. Can then do a test on adding a user that will be a delgate for contract deployment Member w/ metamask wallet




## Other
- add all .env varables to config?

- clear SDK accounts?

- considerations if we need to create a new user pool
  - can import user pool data, need a reset pasword form to serve when the users show up for the first time

- error handling on existing SDK account
  - maybe a username already exists on the sdk 





## Deploying

### First deployment for a environment

1. Build AWS resources

staging/kovan
```bash
serverless deploy
```

prod/mainnet

```bash
serverless deploy --stage prod
```

2. Manually add user pool custom attributes
- device_address
- account_address
 custom:ens_name
 
3. Update config with resource information

src/config
- congnito user pool, identity pool and client id
- s3 bucket name and region

4. Configure cloudfront domain and cert settings

TBD

5. Build the app

```bash
yarn prod-build
```

5. Sync to s3

```bash
aws S3 sync build/ s3://<bucketname>
```

6. Invalidate couldfront cache if needed
aws cloudfront create-invalidation --distribution-id <distro-id> --paths /\*

