Skip to content

Commit 0fc4b78

Browse files
Merge pull request #34 from powellquiring/master
Terraform, schematics, DA
2 parents 601450c + bc29ed8 commit 0fc4b78

File tree

8 files changed

+397
-2
lines changed

8 files changed

+397
-2
lines changed

.gitignore

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,24 @@ mongodb.conf
5252
*.sln
5353

5454
# Courtesy of https://github.com/meanjs/mean/blob/master/.gitignore
55-
__temp__ca.pem
55+
__temp__ca.pem
56+
57+
### Vim ###
58+
# swap
59+
[._]*.sw[a-p]
60+
61+
## Terraform ###
62+
# Local .terraform directories
63+
**/.terraform/*
64+
65+
# .tfstate files
66+
*.tfstate
67+
*.tfstate.*
68+
69+
# place to keep environment variables
70+
local.env
71+
72+
### drawio ***
73+
# DrawIO temporary files
74+
*.dtmp
75+
*.bkp

.terraform.lock.hcl

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
## 1.0.6
3+
Changed compliance controls to version 1.2.0 changed rule to 1.46
4+
## 1.0.1
5+
Added support terraform, schematics and IBM Catalog

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This application uses [Databases for MongoDB](https://cloud.ibm.com/catalog/serv
66

77
The code and detailed steps are discussed in the [IBM Cloud solution tutorial](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorials) titled [Modern web application using MEAN stack](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-mean-stack).
88

9-
<img src="ReadME-Images/Architecture.png">
9+
<img src="ReadME-Images/Architecture.svg">
1010

1111
#### Features
1212
- MVC project structure
@@ -67,6 +67,33 @@ An alternative way of running locally is using the provided `Dockerfile`.
6767
docker run -p 8080:8080 --env-file .env -ti mean-stack:v1.0.0
6868
```
6969

70+
## Provision with Terraform
71+
The steps of creating the resouces (database, code engine project, secret, application, ...) described in [Modern web application using MEAN stack](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-mean-stack) are captured in the terraform file [main.tf](main.tf).
72+
73+
[Getting started with solution tutorials](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorials) has a description of how to get started with terraform on a workstation.
74+
75+
76+
```
77+
terraform init
78+
terraform apply
79+
```
80+
81+
## Provision with Schematics
82+
Schematics is a cloud based Infrastructure as Code runner with cloud based state. It leverages the Terraform configuration described in the previous section.
83+
84+
[Create a Schematics Workspace from this github repository](https://cloud.ibm.com/schematics/workspaces/create?repository=https://github.com/IBM-Cloud/nodejs-MEAN-stack&terraform_version=terraform_v1.4)
85+
86+
The link above should have opened a schematics workspace in the create dialog with the github repository pre-configured and terraform 1.4 selected. Change the **Workspace name**, **Resource group**, and **Location** as desired. This will be the resource group of the workspace. The resource group of the resources created will be configured in schematics. Click **Create**.
87+
88+
## Provision as a Deployable Architecture
89+
In the IBM Cloud create a private catalog and then add a product to the catalog:
90+
- Product type: Deployable architecture
91+
- Deliver method: Terraform
92+
- Public repository: Open the [releases](https://github.com/IBM-Cloud/nodejs-MEAN-stack/releases) and right click on the source.code.tar.gz file and paste in the string. Example: https://github.com/IBM-Cloud/nodejs-MEAN-stack/archive/refs/tags/1.0.3.tar.gz
93+
- Variation: Standard
94+
- Rest of the values are pretty clear
95+
96+
7097
## Contribute
7198
Please create a pull request with your desired changes.
7299

ReadME-Images/Architecture.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)