Skip to content

Commit a50a7be

Browse files
enhancement: Change the referenced names of the modules to reflect the upcoming name change. A few improvements and consolidations to docs. (#407)
* enhancement: Change the referenced names of the modules to reflect the upcoming name change. A few improvements and consolidations to docs. * Update README.md Co-authored-by: David Cheung <davidcheung@live.ca> Co-authored-by: David Cheung <davidcheung@live.ca>
1 parent 5a694f7 commit a50a7be

File tree

9 files changed

+73
-199
lines changed

9 files changed

+73
-199
lines changed

.goreleaser.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ builds:
77
- CGO_ENABLED=0
88
ldflags:
99
- -X github.com/commitdev/zero/version.AppVersion={{.Version}} -X github.com/commitdev/zero/version.AppBuild={{.ShortCommit}}
10+
goarch:
11+
- amd64
12+
- 386
1013
archives:
1114
- replacements:
1215
darwin: Darwin

README.md

Lines changed: 5 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -71,42 +71,7 @@ ___
7171

7272
## Getting Started
7373

74-
### How to Install and Configure Zero
75-
76-
There are multiple ways to install Zero:
77-
78-
- Install Zero using your systems package manager.
79-
80-
```
81-
# MacOS
82-
brew tap commitdev/zero
83-
brew install zero
84-
```
85-
86-
- Install Zero by downloading the binary.
87-
88-
Download the latest [Zero binary] for your systems architecture. Unzip your downloaded package and copy the Zero binary to the desired location and add it to your system PATH.
89-
90-
Zero currently supports:
91-
| System | Support| Package Manager |
92-
|---------|:-----:|:------:|
93-
| MacOS || `brew` |
94-
| Linux || `deb, rpm, apk` |
95-
| Windows || n/a |
96-
97-
### Prerequisites
98-
99-
In order to use Zero, run the `zero check` command on your system to find out which other tools / dependencies you might need to install.
100-
101-
![zero-check](./docs/img/zero-check.png)
102-
103-
[AWS CLI], [Kubectl], [Terraform], [jq], [Git], [Wget]
104-
105-
You need to [register a new domain](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html) / [host a registered domain](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) you will use to access your infrastructure on [Amazon Route 53](https://aws.amazon.com/route53/).
106-
107-
> We recommended you have two domains - one for staging and another for production. For example, mydomain.com and mydomain-staging.com. This will lead to environments that are more similar, rather than trying to use a subdomain like staging.mydomain.com for staging which may cause issues in your app later on.
108-
109-
___
74+
[See the getting started guide at the Zero docs site.](https://getzero.dev/docs/zero/getting-started/installation)
11075

11176
### Building blocks of Zero
11277

@@ -120,134 +85,6 @@ Also declares dependency used to determine the order of execution with other mod
12085

12186
See [`zero-module.yml` reference](./docs/module-definition.md) for details.
12287
___
123-
## Using zero to spin up your own stack
124-
125-
Using Zero to spin up your infrastructure and application is easy and straightforward. Using just a few commands, you can configure and deploy your very own scalable, high-performance, production-ready infrastructure.
126-
127-
A few caveats before getting started:
128-
129-
- For Zero to provision resources, you will need to be authenticated with AWS [(authenticate with aws-cli)](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-methods).
130-
131-
- It is recommended practice to [create a GitHub org](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/creating-a-new-organization-from-scratch) where your code is going to live. If you choose, after creating your codebases, Zero will automatically create repositories and check in your code for you. You will need to [create a Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) to enable this.
132-
133-
<details>
134-
<summary>If using CircleCI as your build pipeline ...</summary>
135-
136-
- Grant [CircleCi Organization access](https://github.com/settings/connections/applications/78a2ba87f071c28e65bb) to your repositories to allow pulling the code during the build pipeline.
137-
138-
- You will need to [create a CircleCi access token](https://circleci.com/docs/2.0/managing-api-tokens/) and enter it during the setup process; you should store your generated tokens securely.
139-
140-
- For your CI build to work, you need to opt into the use of third-party orbs. You can find this in your CircleCi Org Setting > Security > Allow Uncertified Orbs.
141-
</details>
142-
143-
### zero init
144-
145-
The `zero init` command creates a new project and outputs an infrastructure configuration file with user input prompted responses into a file. -> 📁 `YOUR_PROJECT_NAME/zero-project.yml`
146-
147-
```shell
148-
# To create and customize a new project you run
149-
$ zero init
150-
151-
## Sample project initialization
152-
✔ Project Name: myapp-infra
153-
🎉 Initializing project
154-
✔ EKS + Go + React + Gatsby
155-
✔ Should the created projects be checked into github automatically? (y/n): y
156-
✔ What's the root of the github org to create repositories in?: github.com/myapp-org
157-
✔ Existing AWS Profiles
158-
✔ default
159-
160-
Github personal access token: used for creating repositories for your project
161-
Requires the following permissions: [repo::public_repo, admin::orgread:org]
162-
The token can be created at https://github.com/settings/tokens
163-
✔ Github Personal Access Token with access to the above organization: <MY_GITHUB_ORG_ACCESS_TOKEN>
164-
165-
CircleCI api token: used for setting up CI/CD for your project
166-
The token can be created at https://app.circleci.com/settings/user/tokens
167-
✔ Circleci api key for CI/CD: <MY_CIRCLE_CI_ACCESS_TOKEN>
168-
✔ us-west-2
169-
✔ Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain.: commitzero.com
170-
✔ Production Frontend Host Name (e.g. app.): app.
171-
✔ Production Backend Host Name (e.g. api.): api.
172-
✔ Staging Root Host Name (e.g. mydomain-staging.com) - this must be the root of the chosen domain, not a subdomain.: commitzero-stage.com
173-
✔ Staging Frontend Host Name (e.g. app.): app.
174-
✔ Staging Backend Host Name (e.g. api.): api.
175-
✔ What do you want to call the zero-aws-eks-stack project?: infrastructure
176-
✔ What do you want to call the zero-deployable-backend project?: backend-service
177-
✔ What do you want to call the zero-deployable-react-frontend project?: frontend
178-
179-
```
180-
181-
### zero create
182-
183-
The `zero create` command renders the infrastructure modules you've configured into your project folder and pushes your code to GitHub.
184-
185-
```shell
186-
# Template the selected modules and configuration specified in zero-project.yml and push to the repository.
187-
$ cd zero-init # change your working dir to YOUR_PROJECT_NAME
188-
$ zero create
189-
190-
## Sample Output
191-
🕰 Fetching Modules
192-
📝 Rendering Modules
193-
Finished templating : backend-service/.circleci/README.md
194-
✅ Finished templating : backend-service/.circleci/config.yml
195-
✅ Finished templating : backend-service/.gitignore
196-
...
197-
...
198-
✅ Finished templating : infrastructure/terraform/modules/vpc/versions.tf
199-
⬆ Done Rendering - committing repositories to version control.
200-
✅ Repository created: github.com/myapp-org/infrastructure
201-
✅ Repository created: github.com/myapp-org/backend-service
202-
✅ Repository created: github.com/myapp-org/frontend
203-
✅ Done - run zero apply to create any required infrastructure or execute any other remote commands to prepare your environments.
204-
205-
206-
```
207-
208-
### zero apply
209-
210-
The `zero apply` command takes the templated modules generated based on your input and spins up a scalable & performant infrastructure for you!
211-
212-
_Note that this can take 20 minutes or more depending on your choices, as it is waiting for all the provisioned infrastructure to be created_
213-
```shell
214-
$ zero apply
215-
216-
# Sample Output
217-
Choose the environments to apply. This will create infrastructure, CI pipelines, etc.
218-
At this point, real things will be generated that may cost money!
219-
Only a single environment may be suitable for an initial test, but for a real system we suggest setting up both staging and production environments.
220-
✔ Production
221-
🎉 Bootstrapping project zero-init. Please use the zero-project.yml file to modify the project as needed.
222-
Cloud provider: AWS
223-
Runtime platform: Kubernetes
224-
Infrastructure executor: Terraform
225-
226-
...
227-
...
228-
229-
230-
✅ Done.
231-
Your projects and infrastructure have been successfully created. Here are some useful links and commands to get you started:
232-
zero-aws-eks-stack:
233-
- Repository URL: github.com/myapp-org/infrastructure
234-
- To see your kubernetes clusters, run: 'kubectl config get-contexts'
235-
- To switch to a cluster, use the following commands:
236-
- for production use: kubectl config use-context arn:aws:eks:us-west-2:123456789:cluster/myapp-infra-production-us-west-2
237-
238-
- To inspect the selected cluster, run 'kubectl get node,service,deployment,pods'
239-
zero-deployable-react-frontend:
240-
- Repository URL: github.com/myapp-org/frontend
241-
- Deployment Pipeline URL: https://app.circleci.com/pipelines/github/myapp-org/frontend
242-
- Production Landing Page: app.commitzero.com
243-
244-
zero-deployable-backend:
245-
- Repository URL: github.com/myapp-org/backend-service
246-
- Deployment Pipeline URL: https://app.circleci.com/pipelines/github/myapp-org/backend-service
247-
- Production API: api.commitzero.com
248-
```
249-
250-
***Your stack is now up and running, follow the links in your terminal to visit your application 🎉***
25188

25289

25390
## Zero Default Stack
@@ -258,10 +95,10 @@ The core zero modules currently available are:
25895
| Project | URL |
25996
|---|---|
26097
| AWS Infrastructure | [https://github.com/commitdev/zero-aws-eks-stack](https://github.com/commitdev/zero-aws-eks-stack) |
261-
| Backend (Go) | [https://github.com/commitdev/zero-deployable-backend](https://github.com/commitdev/zero-deployable-backend) |
262-
| Backend (Node.js) | [https://github.com/commitdev/zero-deployable-node-backend](https://github.com/commitdev/zero-deployable-node-backend) |
263-
| Frontend (React) | [https://github.com/commitdev/zero-deployable-react-frontend](https://github.com/commitdev/zero-deployable-react-frontend) |
264-
| Static Site (Gatsby) | [https://github.com/commitdev/zero-deployable-landing-page](https://github.com/commitdev/zero-deployable-landing-page) |
98+
| Backend (Go) | [https://github.com/commitdev/zero-backend-go](https://github.com/commitdev/zero-backend-go) |
99+
| Backend (Node.js) | [https://github.com/commitdev/zero-backend-node](https://github.com/commitdev/zero-backend-node) |
100+
| Frontend (React) | [https://github.com/commitdev/zero-frontend-react](https://github.com/commitdev/zero-frontend-react) |
101+
| Static Site (Gatsby) | [https://github.com/commitdev/zero-static-site-gatsby](https://github.com/commitdev/zero-static-site-gatsby) |
265102

266103
___
267104

@@ -313,17 +150,11 @@ Why is my deployed application not yet accessible?
313150
- It takes about 20 - 35 mins for your deployed application to be globally available through AWS CloudFront CDN.
314151

315152
<!-- links -->
316-
[git]: https://git-scm.com
317-
[kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
318-
[terraform]:https://www.terraform.io/downloads.html
319-
[jq]: https://github.com/stedolan/jq
320-
[AWS CLI]: https://aws.amazon.com/cli/
321153
[acw]: https://aws.amazon.com/cloudwatch/
322154
[vpc]: https://aws.amazon.com/vpc/
323155
[iam]: https://aws.amazon.com/iam/
324156
[asg]: https://aws.amazon.com/autoscaling/
325157
[zero binary]: https://github.com/commitdev/zero/releases/
326-
[Wget]: https://stackoverflow.com/questions/33886917/how-to-install-wget-in-macos
327158
[and more]: https://github.com/commitdev/zero-aws-eks-stack/blob/master/docs/resources.md
328159
[terraform]: https://terraform.io
329160
[letsencrypt]: https://letsencrypt.org/

doc-site/docs/getting-started/prerequisites.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@ sidebar_label: Prerequisites
44
sidebar_position: 2
55
---
66

7+
8+
Using Zero to spin up your infrastructure and application is easy and straightforward. Using just a few commands, you can configure and deploy your very own scalable, high-performance, production-ready infrastructure.
9+
10+
A few caveats before getting started:
11+
12+
- For Zero to provision resources, you will need to be [authenticated with the AWS CLI tool ](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-methods).
13+
14+
- It is recommended practice to [create a GitHub org](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/creating-a-new-organization-from-scratch) where your code is going to live. If you choose, after creating your codebases, Zero will automatically create repositories and check in your code for you. You will need to [create a Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) to enable this.
15+
16+
<details>
17+
<summary>If using CircleCI as your build pipeline...</summary>
18+
<ul>
19+
<li>
20+
Grant <a href="https://github.com/settings/connections/applications/78a2ba87f071c28e65bb">CircleCi Organization access</a> to your repositories to allow pulling the code during the build pipeline.
21+
</li>
22+
<li>
23+
You will need to <a href="https://circleci.com/docs/2.0/managing-api-tokens/">create a CircleCi access token</a> and enter it during the setup process; you should store your generated tokens securely.
24+
</li>
25+
<li>
26+
For your CI build to work, you need to opt into the use of third-party orbs. You can find this in your CircleCi Org Setting &gt; Security &gt; Allow Uncertified Orbs.
27+
</li>
28+
</ul>
29+
</details>
30+
31+
732
### `zero check`
833
In order to use Zero, run the `zero check` command on your system to find out which other tools / dependencies you might need to install.
934

@@ -13,5 +38,13 @@ In order to use Zero, run the `zero check` command on your system to find out wh
1338

1439
You need to [register a new domain](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html) / [host a registered domain](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) you will use to access your infrastructure on [Amazon Route 53](https://aws.amazon.com/route53/).
1540

16-
> We recommended you have two domains - one for staging and another for production. For example, mydomain.com and mydomain-staging.com. This will lead to environments that are more similar, rather than trying to use a subdomain like staging.mydomain.com for staging which may cause issues in your app later on.
41+
:::tip
42+
We recommended you have two domains - one for staging and another for production. For example, mydomain.com and mydomain-staging.com. This will lead to environments that are more similar, rather than trying to use a subdomain like staging.mydomain.com for staging which may cause issues in your app later on.
43+
:::
1744

45+
[AWS CLI]: https://aws.amazon.com/cli/
46+
[git]: https://git-scm.com
47+
[kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
48+
[terraform]:https://www.terraform.io/downloads.html
49+
[jq]: https://github.com/stedolan/jq
50+
[Wget]: https://stackoverflow.com/questions/33886917/how-to-install-wget-in-macos

doc-site/docs/getting-started/zero-apply.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ sidebar_position: 5
66

77
The `zero apply` command takes the templated modules generated based on your input and spins up a scalable & performant infrastructure for you!
88

9-
_Note that this can take 20 minutes or more depending on your choices, as it is waiting for all the provisioned infrastructure to be created_
9+
:::note
10+
This can take 20 minutes or more depending on your choices, as it must wait for all the provisioned infrastructure to be created
11+
:::
12+
1013
```shell
1114
$ zero apply
1215

@@ -33,12 +36,12 @@ zero-aws-eks-stack:
3336
- for production use: kubectl config use-context arn:aws:eks:us-west-2:123456789:cluster/myapp-infra-production-us-west-2
3437

3538
- To inspect the selected cluster, run 'kubectl get node,service,deployment,pods'
36-
zero-deployable-react-frontend:
39+
zero-frontend-react:
3740
- Repository URL: github.com/myapp-org/frontend
3841
- Deployment Pipeline URL: https://app.circleci.com/pipelines/github/myapp-org/frontend
3942
- Production Landing Page: app.commitzero.com
4043

41-
zero-deployable-backend:
44+
zero-backend-go:
4245
- Repository URL: github.com/myapp-org/backend-service
4346
- Deployment Pipeline URL: https://app.circleci.com/pipelines/github/myapp-org/backend-service
4447
- Production API: api.commitzero.com

doc-site/docs/getting-started/zero-create.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ $ zero create
2727
✅ Done - run zero apply to create any required infrastructure or execute any other remote commands to prepare your environments.
2828

2929

30-
```
30+
```
31+
32+
After this step you will be able to examine the created repositories before proceeding to `zero apply`. If you chose not to have zero create a repository for you, you can still use the `zero apply` command to create the infrastructure but you will need to check these repositories into your version control system of choice.

doc-site/docs/getting-started/zero-init.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ The token can be created at https://app.circleci.com/settings/user/tokens
3636
✔ Staging Frontend Host Name (e.g. app.): app.
3737
✔ Staging Backend Host Name (e.g. api.): api.
3838
✔ What do you want to call the zero-aws-eks-stack project?: infrastructure
39-
✔ What do you want to call the zero-deployable-backend project?: backend-service
40-
✔ What do you want to call the zero-deployable-react-frontend project?: frontend
39+
✔ What do you want to call the zero-backend-go project?: backend-service
40+
✔ What do you want to call the zero-frontend-react project?: frontend
4141
42-
```
42+
```
43+
44+
After this step you will be able to examine the `zero-project.yml` file to ensure your settings are correct before proceeding to `zero create`.

doc-site/src/components/HomepageTrustedBy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const trustedByData = [
1212
},
1313
{
1414
img: "img/partners/atlasone.png",
15-
src: "https://atlasone.ca/",
15+
src: "https://www.atlasone.ca/",
1616
},
1717
{
1818
img: "img/partners/placeholder.png",
@@ -39,4 +39,4 @@ export default function TrustedByCarousel() {
3939
<h3 className={styles.title}>Trusted By</h3>
4040
<Carousel data={trustedByData} />
4141
</div>
42-
}
42+
}

internal/config/projectconfig/project_config_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ func TestLoadConfig(t *testing.T) {
4040
func eksGoReactSampleModules() projectconfig.Modules {
4141
parameters := projectconfig.Parameters{"a": "b"}
4242
return projectconfig.Modules{
43-
"aws-eks-stack": projectconfig.NewModule(parameters, "zero-aws-eks-stack", "github.com/something/repo1", "github.com/commitdev/zero-aws-eks-stack", []string{}, []projectconfig.Condition{}),
44-
"deployable-backend": projectconfig.NewModule(parameters, "zero-deployable-backend", "github.com/something/repo2", "github.com/commitdev/zero-deployable-backend", []string{}, []projectconfig.Condition{}),
45-
"deployable-react-frontend": projectconfig.NewModule(parameters, "zero-deployable-react-frontend", "github.com/something/repo3", "github.com/commitdev/zero-deployable-react-frontend", []string{}, []projectconfig.Condition{}),
43+
"aws-eks-stack": projectconfig.NewModule(parameters, "zero-aws-eks-stack", "github.com/something/repo1", "github.com/commitdev/zero-aws-eks-stack", []string{}, []projectconfig.Condition{}),
44+
"backend-go": projectconfig.NewModule(parameters, "zero-backend-go", "github.com/something/repo2", "github.com/commitdev/zero-backend-go", []string{}, []projectconfig.Condition{}),
45+
"frontend-react": projectconfig.NewModule(parameters, "zero-frontend-react", "github.com/something/repo3", "github.com/commitdev/zero-frontend-react", []string{}, []projectconfig.Condition{}),
4646
}
4747
}
4848

@@ -61,20 +61,20 @@ modules:
6161
dir: zero-aws-eks-stack
6262
repo: github.com/something/repo1
6363
source: github.com/commitdev/zero-aws-eks-stack
64-
deployable-backend:
64+
backend-go:
6565
parameters:
6666
a: b
6767
files:
68-
dir: zero-deployable-backend
68+
dir: zero-backend-go
6969
repo: github.com/something/repo2
70-
source: github.com/commitdev/zero-deployable-backend
71-
deployable-react-frontend:
70+
source: github.com/commitdev/zero-backend-go
71+
frontend-react:
7272
parameters:
7373
a: b
7474
files:
75-
dir: zero-deployable-react-frontend
75+
dir: zero-frontend-react
7676
repo: github.com/something/repo3
77-
source: github.com/commitdev/zero-deployable-react-frontend
77+
source: github.com/commitdev/zero-frontend-react
7878
`
7979
}
8080

internal/registry/registry.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ func GetRegistry(path string) Registry {
1313
"EKS + Go + React + Gatsby",
1414
[]string{
1515
path + "/zero-aws-eks-stack",
16-
path + "/zero-deployable-landing-page",
17-
path + "/zero-deployable-backend",
18-
path + "/zero-deployable-react-frontend",
16+
path + "/zero-static-site-gatsby",
17+
path + "/zero-backend-go",
18+
path + "/zero-frontend-react",
1919
},
2020
},
2121
{
2222
"EKS + NodeJS + React + Gatsby",
2323
[]string{
2424
path + "/zero-aws-eks-stack",
25-
path + "/zero-deployable-landing-page",
26-
path + "/zero-deployable-node-backend",
27-
path + "/zero-deployable-react-frontend",
25+
path + "/zero-static-site-gatsby",
26+
path + "/zero-backend-node",
27+
path + "/zero-frontend-react",
2828
},
2929
},
3030
}

0 commit comments

Comments
 (0)