From 28910f8a1e60ff9a04d8193f3945152164994320 Mon Sep 17 00:00:00 2001 From: powellquiring Date: Mon, 14 Aug 2023 08:09:21 -0700 Subject: [PATCH 1/9] terraform support --- .gitignore | 17 +++++- .terraform.lock.hcl | 54 +++++++++++++++++++ README.md | 11 ++++ main.tf | 128 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 .terraform.lock.hcl create mode 100644 main.tf diff --git a/.gitignore b/.gitignore index 27733cf..5ec5fa9 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,19 @@ mongodb.conf *.sln # Courtesy of https://github.com/meanjs/mean/blob/master/.gitignore -__temp__ca.pem \ No newline at end of file +__temp__ca.pem + +### Vim ### +# swap +[._]*.sw[a-p] + +## Terraform ### +# Local .terraform directories +**/.terraform/* + +# .tfstate files +*.tfstate +*.tfstate.* + +# place to keep environment variables +local.env diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl new file mode 100644 index 0000000..63540e0 --- /dev/null +++ b/.terraform.lock.hcl @@ -0,0 +1,54 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/local" { + version = "2.4.0" + hashes = [ + "h1:ZUEYUmm2t4vxwzxy1BvN1wL6SDWrDxfH7pxtzX8c6d0=", + "zh:53604cd29cb92538668fe09565c739358dc53ca56f9f11312b9d7de81e48fab9", + "zh:66a46e9c508716a1c98efbf793092f03d50049fa4a83cd6b2251e9a06aca2acf", + "zh:70a6f6a852dd83768d0778ce9817d81d4b3f073fab8fa570bff92dcb0824f732", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:82a803f2f484c8b766e2e9c32343e9c89b91997b9f8d2697f9f3837f62926b35", + "zh:9708a4e40d6cc4b8afd1352e5186e6e1502f6ae599867c120967aebe9d90ed04", + "zh:973f65ce0d67c585f4ec250c1e634c9b22d9c4288b484ee2a871d7fa1e317406", + "zh:c8fa0f98f9316e4cfef082aa9b785ba16e36ff754d6aba8b456dab9500e671c6", + "zh:cfa5342a5f5188b20db246c73ac823918c189468e1382cb3c48a9c0c08fc5bf7", + "zh:e0e2b477c7e899c63b06b38cd8684a893d834d6d0b5e9b033cedc06dd7ffe9e2", + "zh:f62d7d05ea1ee566f732505200ab38d94315a4add27947a60afa29860822d3fc", + "zh:fa7ce69dde358e172bd719014ad637634bbdabc49363104f4fca759b4b73f2ce", + ] +} + +provider "registry.terraform.io/hashicorp/random" { + version = "3.5.1" + hashes = [ + "h1:IL9mSatmwov+e0+++YX2V6uel+dV6bn+fC/cnGDK3Ck=", + "zh:04e3fbd610cb52c1017d282531364b9c53ef72b6bc533acb2a90671957324a64", + "zh:119197103301ebaf7efb91df8f0b6e0dd31e6ff943d231af35ee1831c599188d", + "zh:4d2b219d09abf3b1bb4df93d399ed156cadd61f44ad3baf5cf2954df2fba0831", + "zh:6130bdde527587bbe2dcaa7150363e96dbc5250ea20154176d82bc69df5d4ce3", + "zh:6cc326cd4000f724d3086ee05587e7710f032f94fc9af35e96a386a1c6f2214f", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:b6d88e1d28cf2dfa24e9fdcc3efc77adcdc1c3c3b5c7ce503a423efbdd6de57b", + "zh:ba74c592622ecbcef9dc2a4d81ed321c4e44cddf7da799faa324da9bf52a22b2", + "zh:c7c5cde98fe4ef1143bd1b3ec5dc04baf0d4cc3ca2c5c7d40d17c0e9b2076865", + "zh:dac4bad52c940cd0dfc27893507c1e92393846b024c5a9db159a93c534a3da03", + "zh:de8febe2a2acd9ac454b844a4106ed295ae9520ef54dc8ed2faf29f12716b602", + "zh:eab0d0495e7e711cca367f7d4df6e322e6c562fc52151ec931176115b83ed014", + ] +} + +provider "registry.terraform.io/ibm-cloud/ibm" { + version = "1.56.0" + constraints = ">= 1.51.0" + hashes = [ + "h1:uspjRblOgcnaz/Flt/IOnPRbXQtZgAk2ybMk/IxWteY=", + "zh:25855b3920fbbd3241ea0aa94fb91f80e602c5a8a81f9fb9eb402703fd6832f1", + "zh:2c47cf5a4a0d8d76f1e0573ceb55c65bdd9923978e581f89885a735e99437325", + "zh:87b13c504bac3e12b81c65b7e8eaaf7c25f6edf02dc398dcc93b2bf43c50c226", + "zh:a757fca1307cbed8f08e00f1f1cfb9a4f84667e299d6629b6b0452be0085efc6", + "zh:b6325243884d6c45fd96d8eee1dbfc92af518865ff4d1d96720c91be7e8142db", + "zh:f1135bd10abfe22bdcc8acfac7403335d589968a1fe09555d5c0206afb6abcf0", + ] +} diff --git a/README.md b/README.md index 10aec37..6ae0f94 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,17 @@ An alternative way of running locally is using the provided `Dockerfile`. docker run -p 8080:8080 --env-file .env -ti mean-stack:v1.0.0 ``` +## Provision with Terraform +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). + +[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. + + +``` +terraform init +terraform apply +``` + ## Contribute Please create a pull request with your desired changes. diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..21dbab3 --- /dev/null +++ b/main.tf @@ -0,0 +1,128 @@ +// variables ///////////////////////////// +variable "region" { + default = "us-south" + description = "Region where to find and create resources" +} + +variable "prefix" { + default = "" + description = "Prefix for all resources created by the template" +} + +variable "use_default_resource_group" { + type = bool + default = true +} + +variable "tags" { + default = ["terraform", "mean-stack"] +} + +// terraform, provider ///////////////////////////// +terraform { + required_version = ">= 1.5" + required_providers { + ibm = { + source = "IBM-Cloud/ibm" + version = ">= 1.51" + } + } +} + +provider "ibm" { + region = var.region +} + +resource "random_string" "random" { + count = var.prefix == "" ? 1 : 0 + + length = 6 + special = false +} + +// basename, resource group id ///////////////////////////// +locals { + basename = lower(var.prefix == "" ? "mean-stack-${random_string.random.0.result}" : var.prefix) + resource_group_id = var.use_default_resource_group ? data.ibm_resource_group.group.0.id : ibm_resource_group.group.0.id + resource_group_name = var.use_default_resource_group ? data.ibm_resource_group.group.0.name : ibm_resource_group.group.0.name +} + +# Create a resource group or reuse an existing one +resource "ibm_resource_group" "group" { + count = var.use_default_resource_group ? 0 : 1 + name = "${local.basename}-group" + tags = var.tags +} + +data "ibm_resource_group" "group" { + count = var.use_default_resource_group ? 1 : 0 + is_default = true +} + +// mongodb ///////////////////////////// +resource "ibm_database" "mongodb" { + resource_group_id = local.resource_group_id + name = "${local.basename}-mongodb" + service = "databases-for-mongodb" + plan = "standard" + location = var.region + adminpassword = "password123" +} + +resource "ibm_resource_key" "mongodb_key" { + name = "${local.basename}-mongodb-key" + role = "Viewer" + resource_instance_id = ibm_database.mongodb.id +} + +resource "local_file" "env" { + content = <<-EOT + SESSION_SECRET=my_secret + MONGODB_URL=${ibm_resource_key.mongodb_key.credentials["connection.mongodb.composed.0"]} + CERTIFICATE_BASE64=${ibm_resource_key.mongodb_key.credentials["connection.mongodb.certificate.certificate_base64"]} + PORT=8080 + BIND=0.0.0.0 + EOT + filename = "${path.module}/.env" +} + +// code engine ///////////////////////////// +resource "ibm_code_engine_project" "ce_project" { + name = local.basename + resource_group_id = local.resource_group_id +} + +resource "ibm_code_engine_secret" "ce_secret" { + project_id = ibm_code_engine_project.ce_project.id + name = "${local.basename}-secrets" + format = "generic" + + data = { + SESSION_SECRET = "my_secret" + MONGODB_URL = ibm_resource_key.mongodb_key.credentials["connection.mongodb.composed.0"] + CERTIFICATE_BASE64 = ibm_resource_key.mongodb_key.credentials["connection.mongodb.certificate.certificate_base64"] + PORT = "8080" + BIND = "0.0.0.0" + } +} + +resource "ibm_code_engine_app" "code_engine_app_instance" { + project_id = ibm_code_engine_project.ce_project.id + name = "${local.basename}-application" + image_reference = "icr.io/solution-tutorials/tutorial-mean-stack" + scale_min_instances = 1 + scale_max_instances = 2 + + run_env_variables { + reference = ibm_code_engine_secret.ce_secret.name + type = "secret_full_reference" + } +} + +output "resource_group_name" { + value = local.resource_group_name +} + +output "endpoint" { + value = ibm_code_engine_app.code_engine_app_instance.endpoint +} From 2c121381b16dd942b9547210ed0c7df867e2a656 Mon Sep 17 00:00:00 2001 From: powellquiring Date: Mon, 14 Aug 2023 08:27:05 -0700 Subject: [PATCH 2/9] terraform support --- README.md | 5 +++++ main.tf | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ae0f94..361730a 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,11 @@ terraform init terraform apply ``` +## Provision with Schematics +Schematics is a cloud based Infrastructure as Code runner with cloud based state. It leverages the Terraform configuration described in the previous section. + +[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) + ## Contribute Please create a pull request with your desired changes. diff --git a/main.tf b/main.tf index 21dbab3..a512f70 100644 --- a/main.tf +++ b/main.tf @@ -20,7 +20,7 @@ variable "tags" { // terraform, provider ///////////////////////////// terraform { - required_version = ">= 1.5" + required_version = ">= 1.4" required_providers { ibm = { source = "IBM-Cloud/ibm" From 528fc95f942f8d65a4ce3d1898225d3bf2f5b4cd Mon Sep 17 00:00:00 2001 From: powellquiring Date: Mon, 14 Aug 2023 10:08:31 -0700 Subject: [PATCH 3/9] catalog --- CHANGELOG.md | 3 ++ ibm_catalog.json | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 ibm_catalog.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ff873d4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# Changelog +## 1.0.1 +Added support terraform, schematics and IBM Catalog \ No newline at end of file diff --git a/ibm_catalog.json b/ibm_catalog.json new file mode 100644 index 0000000..a7022b3 --- /dev/null +++ b/ibm_catalog.json @@ -0,0 +1,89 @@ +{ + "products": [ + { + "name": "nodejs-MEAN-stack", + "label": "nodejs MEAN stack", + "product_kind": "solution", + "version": "1.0.0", + "tags": [ + "MEAN-stack", + "Technology" + ], + "keywords": [ + "MEAN", + "code-engine", + "mongodb" + ], + "short_description": "MEAN stack using Code Engine and Mongodb", + "long_description": "A demonstration deployable architecture based on the MEAN stack. Leverages Code Engine to host the application and Mongodb for the database.", + "offering_docs_url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack", + "support_details": "This is a demonstration and no official support is given.", + "flavors": [ + { + "label": "Standard", + "name": "mean-stack", + "install_type": "fullstack", + "licenses": [ + { + "name": "Apache License 2.0", + "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/LICENSE.md" + } + ], + "outputs": [ + { + "resource_group_name": "resource_group_name", + "endpoint": "endpoint" + } + ], + "compliance": { + "authority": "scc-v3", + "controls": [ + { + "profile": { + "name": "IBM Cloud Security Best Practices", + "version": "1.1.0" + }, + "names": [ + "4.39" + ] + } + ] + }, + "iam_permissions": [ + { + "service_name": "iam-groups", + "role_crns": [ + "crn:v1:bluemix:public:iam::::role:Administrator" + ] + }, + { + "service_name": "codeengine", + "role_crns": [ + "crn:v1:bluemix:public:iam::::role:Administrator" + ] + }, + { + "service_name": "databases-for-mongodb", + "role_crns": [ + "crn:v1:bluemix:public:iam::::role:Administrator" + ] + } + ], + "release_notes_url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/CHANGELOG.md", + "architecture": { + "diagrams": [ + { + "diagram": { + "caption": "Architecture diagram", + "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/ReadME-Images/Architecture.png", + "metadata": [] + }, + "description": "MEAN stack." + } + ] + } + } + ] + } + ] + } \ No newline at end of file From 0202cf9c47aeffe4159bbfea4952eeecaad32fd3 Mon Sep 17 00:00:00 2001 From: powellquiring Date: Mon, 14 Aug 2023 10:16:05 -0700 Subject: [PATCH 4/9] polish --- README.md | 9 +++++++-- package.json | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 361730a..4c97c52 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,12 @@ terraform apply ## Provision with Schematics Schematics is a cloud based Infrastructure as Code runner with cloud based state. It leverages the Terraform configuration described in the previous section. -[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) +[Create a Schematics Workspace from this github repository](https://cloud.ibm.com/schematics/workspaces/create?repository=https://github.com/powellquiring/nodejs-MEAN-stack&terraform_version=terraform_v1.4) + +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**. + + + ## Contribute Please create a pull request with your desired changes. @@ -94,4 +99,4 @@ The primary source of debugging information for your app running in the cloud ar For more detailed information on troubleshooting your application, see the [Troubleshooting apps section](https://cloud.ibm.com/docs/codeengine?topic=codeengine-troubleshoot-apps) in the documentation. ## License -See [LICENSE.MD](https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/LICENSE.md) for license information. +See [LICENSE.MD](https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/LICENSE.md) for license information. diff --git a/package.json b/package.json index d5a39a1..61128e1 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack.git" + "url": "https://github.com/powellquiring/nodejs-MEAN-stack.git" }, "keywords": [ "Node.js", @@ -23,9 +23,9 @@ "author": "IBM Cloud", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/issues" + "url": "https://github.com/powellquiring/nodejs-MEAN-stack/issues" }, - "homepage": "https://github.com/IBM-Cloud/nodejs-MEAN-stack", + "homepage": "https://github.com/powellquiring/nodejs-MEAN-stack", "dependencies": { "bcrypt": "5.0.1", "body-parser": "1.19.0", From 873021107b11d65462dc4fbd3996a322b152d8f2 Mon Sep 17 00:00:00 2001 From: powellquiring Date: Mon, 14 Aug 2023 11:39:33 -0700 Subject: [PATCH 5/9] polish --- .gitignore | 5 ++++ README.md | 2 +- ReadME-Images/Architecture.svg | 3 ++ ibm_catalog.json | 4 +-- nodejs-mean-stack.drawio | 55 ++++++++++++++++++++++++++++++++++ 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 ReadME-Images/Architecture.svg create mode 100644 nodejs-mean-stack.drawio diff --git a/.gitignore b/.gitignore index 5ec5fa9..c5f2411 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,8 @@ __temp__ca.pem # place to keep environment variables local.env + +### drawio *** +# DrawIO temporary files +*.dtmp +*.bkp diff --git a/README.md b/README.md index 4c97c52..ce53607 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This application uses [Databases for MongoDB](https://cloud.ibm.com/catalog/serv 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). - + #### Features - MVC project structure diff --git a/ReadME-Images/Architecture.svg b/ReadME-Images/Architecture.svg new file mode 100644 index 0000000..6e49980 --- /dev/null +++ b/ReadME-Images/Architecture.svg @@ -0,0 +1,3 @@ + + +
CODE ENGINE
CODE EN...
DATABSES
FOR MONGODB
DATABSE...
USER
USER
1
1
2
2
CLOUD
CLOUD
USER
USER
Text is not SVG - cannot display
\ No newline at end of file diff --git a/ibm_catalog.json b/ibm_catalog.json index a7022b3..b12ece1 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -4,7 +4,7 @@ "name": "nodejs-MEAN-stack", "label": "nodejs MEAN stack", "product_kind": "solution", - "version": "1.0.0", + "version": "1.0.3", "tags": [ "MEAN-stack", "Technology" @@ -75,7 +75,7 @@ { "diagram": { "caption": "Architecture diagram", - "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/ReadME-Images/Architecture.png", + "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/ReadME-Images/Architecture.svg", "metadata": [] }, "description": "MEAN stack." diff --git a/nodejs-mean-stack.drawio b/nodejs-mean-stack.drawio new file mode 100644 index 0000000..37f235c --- /dev/null +++ b/nodejs-mean-stack.drawio @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 74a56f90ad682484f3e12721087dd5420d5c92a1 Mon Sep 17 00:00:00 2001 From: powellquiring Date: Mon, 14 Aug 2023 13:01:47 -0700 Subject: [PATCH 6/9] polish --- README.md | 8 +++++++- ibm_catalog.json | 23 ++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ce53607..37a0dcc 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,13 @@ Schematics is a cloud based Infrastructure as Code runner with cloud based state 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**. - +## Provision as a Deployable Architecture +In the IBM Cloud create a private catalog and then add a product to the catalog. +- Product type: Deployable architecture +- Deliver method: Terraform +- Public repository: Open the [releases](https://github.com/powellquiring/nodejs-MEAN-stack/releases) and right click on the source.code.tar.gz file and paste in the string. Example: https://github.com/powellquiring/nodejs-MEAN-stack/archive/refs/tags/1.0.3.tar.gz +- Variation: Standard +- Rest of the values are pretty clear ## Contribute diff --git a/ibm_catalog.json b/ibm_catalog.json index b12ece1..3bf11c4 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -4,7 +4,7 @@ "name": "nodejs-MEAN-stack", "label": "nodejs MEAN stack", "product_kind": "solution", - "version": "1.0.3", + "version": "1.0.4", "tags": [ "MEAN-stack", "Technology" @@ -16,7 +16,7 @@ ], "short_description": "MEAN stack using Code Engine and Mongodb", "long_description": "A demonstration deployable architecture based on the MEAN stack. Leverages Code Engine to host the application and Mongodb for the database.", - "offering_docs_url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack", + "offering_docs_url": "https://github.com/powellquiring/nodejs-MEAN-stack", "support_details": "This is a demonstration and no official support is given.", "flavors": [ { @@ -26,7 +26,20 @@ "licenses": [ { "name": "Apache License 2.0", - "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/LICENSE.md" + "url": "https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/LICENSE.md" + } + ], + "configuration": [ + { + "key": "prefix", + "required": false, + "description": "prefix string for all resources if not provided mean-stack-RANDOM string is generated" + }, + { + "key": "use_default_resource_group", + "type": "bool", + "required": false, + "description": "if true use the account default resource group if false mean-stack-RANDOM string is used to create a new resource group" } ], "outputs": [ @@ -69,13 +82,13 @@ ] } ], - "release_notes_url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/CHANGELOG.md", + "release_notes_url": "https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/CHANGELOG.md", "architecture": { "diagrams": [ { "diagram": { "caption": "Architecture diagram", - "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/ReadME-Images/Architecture.svg", + "url": "https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/ReadME-Images/Architecture.svg", "metadata": [] }, "description": "MEAN stack." From 8f7a44379a0e18e084bbd82843fea3fec80679f1 Mon Sep 17 00:00:00 2001 From: powellquiring Date: Mon, 14 Aug 2023 14:08:23 -0700 Subject: [PATCH 7/9] polish --- CHANGELOG.md | 2 ++ ibm_catalog.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff873d4..661ce09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ # Changelog +## 1.0.5 +Changed from powellquiring -> IBM-Cloud ## 1.0.1 Added support terraform, schematics and IBM Catalog \ No newline at end of file diff --git a/ibm_catalog.json b/ibm_catalog.json index 3bf11c4..f0910d8 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -4,7 +4,7 @@ "name": "nodejs-MEAN-stack", "label": "nodejs MEAN stack", "product_kind": "solution", - "version": "1.0.4", + "version": "1.0.5", "tags": [ "MEAN-stack", "Technology" @@ -37,7 +37,7 @@ }, { "key": "use_default_resource_group", - "type": "bool", + "type": "boolean", "required": false, "description": "if true use the account default resource group if false mean-stack-RANDOM string is used to create a new resource group" } From 545ff26ce8de316b42a592d446bada587b6edbab Mon Sep 17 00:00:00 2001 From: powellquiring Date: Tue, 15 Aug 2023 06:07:10 -0700 Subject: [PATCH 8/9] polish --- CHANGELOG.md | 3 ++- README.md | 8 ++++---- ibm_catalog.json | 14 +++++++------- main.tf | 9 +++++---- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661ce09..d3f2465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog -## 1.0.5 +## 1.0.6 Changed from powellquiring -> IBM-Cloud +Changed compliance controls to version 1.2.0 changed rule to 1.46 ## 1.0.1 Added support terraform, schematics and IBM Catalog \ No newline at end of file diff --git a/README.md b/README.md index 37a0dcc..feba373 100644 --- a/README.md +++ b/README.md @@ -81,15 +81,15 @@ terraform apply ## Provision with Schematics Schematics is a cloud based Infrastructure as Code runner with cloud based state. It leverages the Terraform configuration described in the previous section. -[Create a Schematics Workspace from this github repository](https://cloud.ibm.com/schematics/workspaces/create?repository=https://github.com/powellquiring/nodejs-MEAN-stack&terraform_version=terraform_v1.4) +[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) 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**. ## Provision as a Deployable Architecture -In the IBM Cloud create a private catalog and then add a product to the catalog. +In the IBM Cloud create a private catalog and then add a product to the catalog: - Product type: Deployable architecture - Deliver method: Terraform -- Public repository: Open the [releases](https://github.com/powellquiring/nodejs-MEAN-stack/releases) and right click on the source.code.tar.gz file and paste in the string. Example: https://github.com/powellquiring/nodejs-MEAN-stack/archive/refs/tags/1.0.3.tar.gz +- 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 - Variation: Standard - Rest of the values are pretty clear @@ -105,4 +105,4 @@ The primary source of debugging information for your app running in the cloud ar For more detailed information on troubleshooting your application, see the [Troubleshooting apps section](https://cloud.ibm.com/docs/codeengine?topic=codeengine-troubleshoot-apps) in the documentation. ## License -See [LICENSE.MD](https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/LICENSE.md) for license information. +See [LICENSE.MD](https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/LICENSE.md) for license information. diff --git a/ibm_catalog.json b/ibm_catalog.json index f0910d8..64ebb0c 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -4,7 +4,7 @@ "name": "nodejs-MEAN-stack", "label": "nodejs MEAN stack", "product_kind": "solution", - "version": "1.0.5", + "version": "1.0.6", "tags": [ "MEAN-stack", "Technology" @@ -16,7 +16,7 @@ ], "short_description": "MEAN stack using Code Engine and Mongodb", "long_description": "A demonstration deployable architecture based on the MEAN stack. Leverages Code Engine to host the application and Mongodb for the database.", - "offering_docs_url": "https://github.com/powellquiring/nodejs-MEAN-stack", + "offering_docs_url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack", "support_details": "This is a demonstration and no official support is given.", "flavors": [ { @@ -26,7 +26,7 @@ "licenses": [ { "name": "Apache License 2.0", - "url": "https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/LICENSE.md" + "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/LICENSE.md" } ], "configuration": [ @@ -54,10 +54,10 @@ { "profile": { "name": "IBM Cloud Security Best Practices", - "version": "1.1.0" + "version": "1.2.0" }, "names": [ - "4.39" + "1.46" ] } ] @@ -82,13 +82,13 @@ ] } ], - "release_notes_url": "https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/CHANGELOG.md", + "release_notes_url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/blob/master/CHANGELOG.md", "architecture": { "diagrams": [ { "diagram": { "caption": "Architecture diagram", - "url": "https://github.com/powellquiring/nodejs-MEAN-stack/blob/master/ReadME-Images/Architecture.svg", + "url": "https://raw.githubusercontent.com/IBM-Cloud/nodejs-MEAN-stack/master/ReadME-Images/Architecture.svg", "metadata": [] }, "description": "MEAN stack." diff --git a/main.tf b/main.tf index a512f70..893288c 100644 --- a/main.tf +++ b/main.tf @@ -59,6 +59,7 @@ data "ibm_resource_group" "group" { is_default = true } + // mongodb ///////////////////////////// resource "ibm_database" "mongodb" { resource_group_id = local.resource_group_id @@ -119,10 +120,10 @@ resource "ibm_code_engine_app" "code_engine_app_instance" { } } -output "resource_group_name" { - value = local.resource_group_name -} - output "endpoint" { value = ibm_code_engine_app.code_engine_app_instance.endpoint } + +output "resource_group_name" { + value = local.resource_group_name +} From bc29ed8afa85a890d4c4c57a4973d0bf6a8fc136 Mon Sep 17 00:00:00 2001 From: powellquiring Date: Tue, 15 Aug 2023 06:09:39 -0700 Subject: [PATCH 9/9] polish --- CHANGELOG.md | 1 - package.json | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3f2465..a40e5cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,5 @@ # Changelog ## 1.0.6 -Changed from powellquiring -> IBM-Cloud Changed compliance controls to version 1.2.0 changed rule to 1.46 ## 1.0.1 Added support terraform, schematics and IBM Catalog \ No newline at end of file diff --git a/package.json b/package.json index 61128e1..d5a39a1 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/powellquiring/nodejs-MEAN-stack.git" + "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack.git" }, "keywords": [ "Node.js", @@ -23,9 +23,9 @@ "author": "IBM Cloud", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/powellquiring/nodejs-MEAN-stack/issues" + "url": "https://github.com/IBM-Cloud/nodejs-MEAN-stack/issues" }, - "homepage": "https://github.com/powellquiring/nodejs-MEAN-stack", + "homepage": "https://github.com/IBM-Cloud/nodejs-MEAN-stack", "dependencies": { "bcrypt": "5.0.1", "body-parser": "1.19.0",