cloudmason 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +38 -74
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,67 +4,65 @@ The tool will handle everything from obtaining ACM certificates to building AMIs
4
4
 
5
5
  Can be used as a command line tool, or in a CI/CD pipeline.
6
6
 
7
+ ## Contents
8
+ - [Quick Start](##quick-start)
9
+ - [Important Notes](##important)
10
+ - [Commands](##commands)
7
11
 
8
- # Quick Start
9
12
 
10
- Get an Ec2 nodejs app up and running in 4 commands.
11
-
12
- #### Step 1: Prereqs:
13
-
14
- 1. Open an AWS account
15
- 2. Download and set up the AWS CLI (or just set your AWS credentials with enviroment variables)
16
- 3. Buy a domain to deploy apps to
17
- 4. Run the following command to set up your org:
18
- 1. `init-org -name MyOrg -region us-east-1`
19
13
 
20
- #### Step 2: Set up an App
14
+ ## Quick Start
21
15
 
22
- Run the command below to get a starter nodejs template
16
+ Get an Ec2 nodejs app up and running in 4 commands.
23
17
 
18
+ 1. **Prereqs**
19
+ 1. Open an AWS account
20
+ 2. Download and set up the AWS CLI (or just set your AWS credentials with enviroment variables)
21
+ 3. Buy a domain to deploy apps to
22
+ 4. Run the following command to set up your org:
23
+ - `init-org -name MyOrg -region us-east-1`
24
+ 2. **Set up a Local App Template**
25
+ 1. Get a sample nodejs app template:
26
+ - `mason starter -p ./myDesktop/MyFirstApp -type asg`
27
+ 3. **Add an App**
24
28
  ```
25
- mason starter -p ./myDesktop/HelloWorld -type asg
29
+ mason new-app -name MyFirstApp -type asg
30
+ mason new-instance -app MyFirstApp -domain myfirstapp.com -region us-east-2 -admin me@gmail.com
31
+ mason update-app -app MyFirstApp -v 1.0 -path ./myDesktop/HelloWorld
32
+ mason list-apps
26
33
  ```
27
-
28
- #### Step 3: Add an App
29
-
34
+ 4. **Launch it**
30
35
  ```
31
- mason new-app -name MyFirstApp -type asg
32
- new-instance -app MyFirstApp -domain myfirstapp.com -region us-east-2 -admin me@gmail.com
33
- update-app -app MyFirstApp -v 1.0 -path ./myDesktop/HelloWorld
34
- list-apps
36
+ mason launch -app MyFirstApp -v 1.0 -domain myfirstapp.com
37
+ mason inspect -app MyFirstApp -domain myfirstapp.com -boot
35
38
  ```
36
- You now have an AMI and Cloudformation stack primed and ready to go.
39
+ 5. **Review It**
40
+ 1. Visit the domain you specified. You'll see a login page.
41
+ 2. Check the email address you specified for a temp password. Use it to log in.
42
+ 3. After logging in, you'll see a "Hello World" page.
37
43
 
38
- #### Step 4: Launch it
44
+ #### All Together
39
45
 
40
46
  ```
41
- launch -app MyFirstApp -v 1.0 -domain myfirstapp.com
42
- inspect -app MyFirstApp -domain myfirstapp.com -boot
47
+ init-org -name MyOrg -region us-east-1
48
+ mason starter -p ./myDesktop/MyFirstApp -type asg
49
+ mason new-app -name MyFirstApp -type asg
50
+ mason new-instance -app MyFirstApp -domain myfirstapp.com -region us-east-2 -admin me@gmail.com
51
+ mason update-app -app MyFirstApp -v 1.0 -path ./myDesktop/MyFirstApp
52
+ mason launch -app MyFirstApp -v 1.0 -domain myfirstapp.com
53
+ mason inspect -app MyFirstApp -domain myfirstapp.com -boot
43
54
  ```
44
55
 
45
- The `launch` command deploy the specified version of your application to the specified domain (instance).
46
-
47
- It takes time to launch the app, so the `inspect` command will return the status of the cloudformation deployment. It will also return the console output from the boot script (aka User Data) when the first instance starts up.
48
-
49
56
 
50
- # IMPORTANT!!!
57
+ ## IMPORTANT!!!
51
58
 
52
59
  - THIS APP DEPLOYS EC2 INSTANCES THAT ARE NOT FREE! IT WILL RESULT IN AWS CHARGES!
53
60
  - Make sure to run `delete-instance` when you're done to avoid major surprises
61
+ - update-app will build an AMI, which may not be immediately available. Leave a few minutes between running update-app and launch
54
62
  - Your web application must serve on localhost:8080
55
63
  - Use `inspect` ! It will return all console output of your application - very useful for debugging
56
64
 
57
65
 
58
- # Architectures
59
-
60
- ### AMI-Based Autoscaling Group Web App
61
-
62
- To do
63
-
64
- ### Cloudfront and S3 Static Site
65
-
66
- To do
67
-
68
66
 
69
67
 
70
68
 
@@ -84,10 +82,8 @@ Run `mason [command] -<options>`
84
82
  | [starter](###starter) | Get a starter template for a specified architecture type |
85
83
  | [delete-instance](###delete-instance) | Delete an instance |
86
84
  | [delete-app](###delete-app) | Delete an app |
87
- | [update-stack](###update-stack) | Update cloudformation stac |
85
+ | [update-stack](###update-stack) | Update cloudformation stack |
88
86
  | [list-apps](###list-apps) | List all apps |
89
- | [isvalid](###isvalid) | Check if a cloudformation template is valid |
90
- | [zip](###zip) | Zip a folder |
91
87
 
92
88
 
93
89
 
@@ -343,35 +339,3 @@ mason starter -type asg -l node -path ../myfirstapp
343
339
 
344
340
 
345
341
 
346
- ## TODO
347
-
348
- - [x] Run logs
349
- - [x] Read token
350
- - [x] Verify token
351
- - [x] Get user groups
352
- - [x] DDB connect
353
- - [x] Fix starter routes
354
- - [x] Add arguments for max ec2 instance and instance type
355
- - [X] Customize boot script
356
- - [x] Secure param permissions
357
- - [X] Pass node/py versions
358
- - [X] Pass version info to instance
359
- - [X] Fix Delete App
360
- - [X] Update default instance
361
- - [X] Pass Env to instance
362
- - [] Custom SES Config
363
- - [X] Fix logs
364
- - [] Add dev
365
- - [] Add Admin
366
- - [] Cloudtrails
367
- - [] Static site
368
- - [] Deregistering in home region
369
- - [] cf-templates s3 bucket creation
370
-
371
- ## OPEN ITEMS
372
-
373
- - Custom auth domain
374
- - AWS requires ACM cert in us-east-1 for custom Cognito auth domain. Cloudformation does not allow for cross-region resource creation
375
- - [Github AWS Issue](https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/523)
376
-
377
-
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"cloudmason","version":"1.0.1","description":"","main":"main.js","scripts":{"build":"node build.js"},"bin":{"mason":"./main.js"},"repository":{"type":"git","url":"https://github.com/kai-harvey/secure-saas.git"},"author":"Kai Harvey","license":"ISC","dependencies":{"@aws-sdk/client-acm":"^3.418.0","@aws-sdk/client-auto-scaling":"^3.470.0","@aws-sdk/client-cloudformation":"^3.418.0","@aws-sdk/client-ec2":"^3.416.0","@aws-sdk/client-iam":"^3.418.0","@aws-sdk/client-route-53":"^3.425.0","@aws-sdk/client-s3":"^3.418.0","@aws-sdk/client-ssm":"^3.421.0","adm-zip":"^0.5.10"}}
1
+ {"name":"cloudmason","version":"1.0.3","description":"","main":"main.js","scripts":{"build":"node build.js"},"bin":{"mason":"./main.js"},"repository":{"type":"git","url":"https://github.com/kai-harvey/secure-saas.git"},"author":"Kai Harvey","license":"ISC","dependencies":{"@aws-sdk/client-acm":"^3.418.0","@aws-sdk/client-auto-scaling":"^3.470.0","@aws-sdk/client-cloudformation":"^3.418.0","@aws-sdk/client-ec2":"^3.416.0","@aws-sdk/client-iam":"^3.418.0","@aws-sdk/client-route-53":"^3.425.0","@aws-sdk/client-s3":"^3.418.0","@aws-sdk/client-ssm":"^3.421.0","adm-zip":"^0.5.10"}}