cloudmason 1.0.1 → 1.0.2
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.
- package/README.md +38 -42
- 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
13
|
|
|
14
|
-
|
|
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`
|
|
14
|
+
## Quick Start
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
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
|
|
32
|
-
|
|
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
|
-
|
|
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
|
-
####
|
|
44
|
+
#### All Together
|
|
39
45
|
|
|
40
46
|
```
|
|
41
|
-
|
|
42
|
-
|
|
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
56
|
|
|
49
|
-
|
|
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
|
|
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
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cloudmason","version":"1.0.
|
|
1
|
+
{"name":"cloudmason","version":"1.0.2","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"}}
|