Skip to content

Commit cd2fd9a

Browse files
committed
0.1.0
0 parents  commit cd2fd9a

40 files changed

+22700
-0
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
.AppleDouble
3+
.LSOverride
4+
5+
node_modules/
6+
.idea/
7+
8+
.docusaurus/

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
You will need Node 6 or newer in order to build the Metro website.
2+
3+
# Run the server
4+
5+
The first time, get all the dependencies loaded via
6+
7+
```
8+
yarn
9+
```
10+
11+
in the root directory.
12+
13+
Then, run the server via
14+
15+
```
16+
npm start
17+
Open http://localhost:3000
18+
```
19+
20+
Anytime you change the contents, just refresh the page and it's going to be
21+
updated
22+
23+
# Publish the website
24+
25+
The Metro website is hosted as a GitHub page. A static site is generated by
26+
`server/generate.js` and its output is pushed to the `gh-pages` branch by
27+
CircleCI whenever `master` is updated.
28+
29+
To deploy the website manually, run the following command as a Git user with
30+
write permissions:
31+
32+
```
33+
DEPLOY_USER=facebook GIT_USER=metro-bot CIRCLE_PROJECT_USERNAME=facebook CIRCLE_PROJECT_REPONAME=metro npm run gh-pages
34+
```
35+
36+
## Staging
37+
38+
Run the above command against your own fork of `facebook/metro`:
39+
40+
```
41+
DEPLOY_USER=YOUR_GITHUB_USERNAME GIT_USER=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_USERNAME=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_REPONAME=metro npm run gh-pages
42+
```

docs/cli/bootstrap.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
id: bootstrap
3+
title: bootstrap
4+
---
5+
6+
### unload bootstrap
7+
8+
This command generates initial manifest and deploys the required AWS infrastructure resources for app continuous integration.
9+
10+
This command must be run for each application to provision mandatory resources and generate initial manifest file.
11+
Upon completion the AWS infrastructure resources will be created:
12+
- An nat instance or nat gateway.
13+
- An network with configured subset of availability zones.
14+
- An role for CI/CD platform authenticated via OIDC.
15+
- An AWS CloudFormation execution IAM role assumed by AWS CloudFormation for application resources deployment.
16+
- An Amazon S3 bucket to hold the deployment artifacts.
17+
18+
### Usage
19+
20+
```bash
21+
unload boostrap [--help]
22+
```
23+
24+
### Flags
25+
26+
- [--help] Display a list of available command flags.

docs/cli/build.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
id: build
3+
title: build
4+
---
5+
6+
### unload build
7+
8+
Builds a serverless application and prepares it for next steps in your workflow, like locally testing the application or deploying it to the AWS Cloud.
9+
10+
The unload build command processes your manifest file, application code and dependencies. The command copies build artifacts in the format and location expected for subsequent steps in deployment workflow.
11+
This command usually useful for debugging generated CloudFormation templates, `unload build` is being executed as a part of `unload deploy`, therefore there is no need to call it before deployment.
12+
13+
### Usage
14+
15+
```bash
16+
unload build [--config|--help]
17+
```
18+
19+
### Flags
20+
21+
- [--config] Define environment name for which manifest file to load. For example, `--config dev` will load unload.dev.yaml.
22+
- [--help] Display a list of available command flags.
23+

docs/cli/ci.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
id: ci
3+
title: ci
4+
---
5+
6+
### unload ci
7+
8+
This command deploys the required CI/CD resources for app continuous integration.
9+
10+
Typically not required to be used directly and being executed as part of `unload bootstrap` process.
11+
Direct use of this command makes sense when extra environment need to be provisioned or when CI/CD stack update is required.
12+
13+
### Usage
14+
15+
```bash
16+
unload ci [--region|--profile|--config|--app|--provider|--repository|--help]
17+
```
18+
19+
### Flags
20+
21+
- [--region] Region where CI stack needs to be deployed.
22+
- [--profile] AWS profile to use for stack deployment request.
23+
- [--app] Application name, it used for stack resources naming.
24+
- [--provider] Continuous integration provider. (Supported: github)
25+
- [--repository] Fully qualified repository name (i.e username/reponame)
26+
- [--config] Define environment name for which manifest file to load. For example, `--config dev` will load unload.dev.yaml
27+
- [--help] Display a list of available flags
28+
29+
30+
### Example
31+
32+
Deploy continuous integration stack for example application in us-east-1 using github as CI/CD provider.
33+
34+
```bash
35+
unload ci --region us-east-1 --profile example --config beta --app example --provider github --repository exampleorg/exampleapp
36+
```

docs/cli/dashboard.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
id: dashboard
3+
title: dashboard
4+
---
5+
6+
### unload dashboard
7+
8+
Open AWS console with lambda application dashboard for a given environment.
9+
10+
This action will generate a pre-signed URL based on your manifest credentials and automatically login you to AWS Console.
11+
12+
### Usage
13+
14+
```bash
15+
unload dashboard [--config|--help]
16+
```
17+
18+
### Flags
19+
20+
- [--config] Define environment name for which manifest file to load. For example, `--config dev` will load unload.dev.yaml
21+
- [--help] Display a list of available flags
22+

docs/cli/deploy.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
id: deploy
3+
title: deploy
4+
---
5+
6+
### unload deploy
7+
8+
Deploy an app by updating or creating a CloudFormation stack with resources defined in the application manifest.
9+
10+
CloudFormation stack name will be based on manifest application name and prefixed by current environment name.
11+
Stack names are unique to an AWS region. Changing the application name or region will create a new CloudFormation stack.
12+
13+
### Usage
14+
15+
```bash
16+
unload deploy [--config|--help]
17+
```
18+
19+
### Flags
20+
21+
- [--config] Define environment name for which manifest file to load. For example, `--config dev` will load unload.dev.yaml
22+
- [--help] Display a list of available flags
23+

docs/cli/destroy.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
id: destroy
3+
title: destroy
4+
---
5+
6+
### unload destroy
7+
8+
Destroy an app by deleting CloudFormation stacks with all resources associated with a given manifest.
9+
10+
This action will remove application stack, continuous integration stack and all environment variables.
11+
Database snapshot and all bucket files will be retained to reduce potential harm and allow recover.
12+
To free resources completely all associated buckets and database snapshots are required to be removed manually via AWS console or CLI.
13+
14+
### Usage
15+
16+
```bash
17+
unload destroy [--config|--help]
18+
```
19+
20+
### Flags
21+
22+
- [--config] Define environment name for which manifest file to load. For example, `--config dev` will load unload.dev.yaml
23+
- [--help] Display a list of available flags
24+

docs/cli/domain.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
id: domain
3+
title: domain
4+
---
5+
6+
### unload domain
7+
8+
Register custom application domain with Route53 service.
9+
10+
Route53 DNS service is how you assign a domain name to a deployed app. This service transparently integrated with Amazon’s other cloud services.
11+
This command output will contain Amazon's nameservers which are required to be configured within your domain vendor to allow automatic
12+
DNS record management during CloudFormation stack deployment.
13+
14+
### Usage
15+
16+
```bash
17+
unload domain [--help] <domain>
18+
```
19+
20+
### Flags
21+
22+
- [--help] Display a list of available command flags.
23+
24+
### Examples
25+
26+
Register example.com
27+
28+
```bash
29+
unload domain example.com
30+
```
31+

docs/cli/env.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
id: env
3+
title: env
4+
---
5+
6+
### unload env
7+
8+
This command allows load, view and edut application enviroment configuration.
9+
10+
Environment configuration is being stored as encrypted strings in AWS System Manager. With proper permission, command fetches and decrypts variables to open them in default system editor.
11+
Upon save it is being encrypted and saved back to system manager.
12+
13+
During CI/CD they are being fetched and bundled in encrypted form to the app package, therefore credentials are never exposed in raw during deployment phase.
14+
Secrets decryption takes place during lambda cold start where environment variable secret is used to decrypt bundled secrets.
15+
16+
### Usage
17+
18+
```bash
19+
unload env [--config|--rotate|--help]
20+
```
21+
22+
### Flags
23+
24+
- [--config] Define environment name for which manifest file to load. For example, `--config dev` will load unload.dev.yaml.
25+
- [--rotate] Encrypts secrets with a new key. Do not use it in the middle of deployment to prevent possible inconsistency.
26+
- [--help] Display a list of available command flags.

0 commit comments

Comments
 (0)