From c621c0f079f2d5a76d9036b7164c54cdc7e7b587 Mon Sep 17 00:00:00 2001 From: Abhishek Roy Date: Mon, 6 Feb 2023 17:52:58 +0530 Subject: [PATCH 1/2] Made changes according to branding --- LICENCE | 2 +- README.md | 10 +++++----- package.json | 12 ++++++------ src/config/common.json | 10 +++++----- src/config/ecs.json | 4 ++-- src/config/s3.json | 6 +++--- src/driver.ts | 6 +++--- src/terraform/ghost/cloudfront.ts | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/LICENCE b/LICENCE index dccc6cb..45b2f4c 100644 --- a/LICENCE +++ b/LICENCE @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright © 2022 PLG Works +Copyright © 2023 True Sparrow Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/README.md b/README.md index 8add6ac..7492c2e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Terraform CDK then utilizes the providers and modules specified to generate terr It expects to have Route53 configured for the domain where you want to host the Ghost. If you want to use the existing VPC, you need to provide the `subnet ids` to launch the ECS tasks (recommend private subnets) and `public subnet ids` to launch the load balancer (ALB). 2. **Existing Load Balancer**: You can use the existing load balancer (ALB) by providing the `load balancer listener ARN`. 3. **Hosting URL**: It requires a `Ghost hosting url` where Ghost can be accessed on the web. -4. **Static Website**: Refer [this](https://github.com/PLG-Works/ghost-static-website-generator) to host the static website for the generated content. You can also specify `Static website url` where it will provision the AWS S3 bucket to host the static website. +4. **Static Website**: Refer [this](https://github.com/TrueSparrowSystems/ghost-static-website-generator) to host the static website for the generated content. You can also specify `Static website url` where it will provision the AWS S3 bucket to host the static website. 5. **Existing MySQL Database**: The cli requires a MySQL database to store the Ghost configurations along with the content. You can provide the existing DB credentials like DB host, DB name, DB user password, and database name. (otherwise it'll create a new RDS instance). ## Why do I need to use this tool? @@ -45,22 +45,22 @@ It comes with the following benefits: - Install the package: ```bash - npm install -g plg-ghost + npm install -g truesparrow-ghost ``` - Deploy Ghost Stack and Backend Stack: ```bash - plg-ghost deploy + truesparrow-ghost deploy ``` - Destroy Ghost and Backend Stack: ```bash - plg-ghost destroy + truesparrow-ghost destroy ``` ## Development: - Clone the repository: ```bash - git clone git@github.com:PLG-Works/ghost-hosting-cli.git + git clone git@github.com:truesparrow-Works/ghost-hosting-cli.git ``` - Install all dependencies: ```bash diff --git a/package.json b/package.json index 71bfc81..cb46b5b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "plg-ghost", + "name": "truesparrow-ghost", "version": "1.0.0", "description": "Host Ghost server in AWS ECS and provision to host static files on AWS S3", "main": "./dist/src/run.js", @@ -23,7 +23,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/PLG-Works/ghost-hosting-cli.git" + "url": "git+https://github.com/TrueSparrowSystems/ghost-hosting-cli.git" }, "keywords": [ "ghost", @@ -33,12 +33,12 @@ "cdktf", "devops" ], - "author": "PLG Works", + "author": "True Sparrow", "license": "MIT", "bugs": { - "url": "https://github.com/PLG-Works/ghost-hosting-cli/issues" + "url": "https://github.com/TrueSparrowSystems/ghost-hosting-cli/issues" }, - "homepage": "https://github.com/PLG-Works/ghost-hosting-cli#readme", + "homepage": "https://github.com/TrueSparrowSystems/ghost-hosting-cli#readme", "dependencies": { "@cdktf/provider-aws": "8.0.12", "cdktf": "0.11.2", @@ -69,6 +69,6 @@ "dist/**/*" ], "bin": { - "plg-ghost": "./dist/src/run.js" + "truesparrow-ghost": "./dist/src/run.js" } } diff --git a/src/config/common.json b/src/config/common.json index 819e2a0..708dd7a 100644 --- a/src/config/common.json +++ b/src/config/common.json @@ -1,14 +1,14 @@ { "ghostStackName": "ghost", "backendStackName": "backend", - "nameLabel": "PLG Ghost Test", - "nameIdentifier": "plg-ghost", + "nameLabel": "True Sparrow Ghost Test", + "nameIdentifier": "truesparrow-ghost", "configFile": "config.json", "outputFile": "output.json", - "tfStateBucketName": "plg-ghost-tf-state", + "tfStateBucketName": "truesparrow-ghost-tf-state", "tfStateBucketKey": "meta/ghost.tfstate", - "tfStateBucketLockDdbTableName": "plg-ghost-tf-state-locking", + "tfStateBucketLockDdbTableName": "truesparrow-ghost-tf-state-locking", "tags": { - "Name": "PLG Ghost" + "Name": "True Sparrow Ghost" } } diff --git a/src/config/ecs.json b/src/config/ecs.json index 2f2c0a6..2020306 100644 --- a/src/config/ecs.json +++ b/src/config/ecs.json @@ -5,7 +5,7 @@ "nginxContainerPort": 8080, "autoScalingMinCapacity": 2, "autoScalingMaxCapacity": 10, - "logGroupName": "plg/ghost", + "logGroupName": "truesparrow/ghost", "logStreamPrefix": "ecs", "taskDefinition": { @@ -14,7 +14,7 @@ }, "ghostImageUri": "public.ecr.aws/j0d2y7t1/ghost:5.7.0-alpine", "nginxImageUri": "public.ecr.aws/j0d2y7t1/nginx:1.23.1", - "clusterName": "plg-ghost", + "clusterName": "truesparrow-ghost", "amazonECSTaskExecutionRolePolicy": "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy", "amazonEC2ContainerServiceAutoscaleRole": "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceAutoscaleRole" } diff --git a/src/config/s3.json b/src/config/s3.json index a99d3e4..578b9a3 100644 --- a/src/config/s3.json +++ b/src/config/s3.json @@ -1,5 +1,5 @@ { - "configsS3BucketName": "plg-ghost-configs", - "blogContentS3BucketName": "plg-ghost-blog-assets", - "blogStaticS3BucketName": "plg-ghost-static-assets" + "configsS3BucketName": "truesparrow-ghost-configs", + "blogContentS3BucketName": "truesparrow-ghost-blog-assets", + "blogStaticS3BucketName": "truesparrow-ghost-static-assets" } diff --git a/src/driver.ts b/src/driver.ts index 16fd41f..7292531 100644 --- a/src/driver.ts +++ b/src/driver.ts @@ -165,9 +165,9 @@ function _readAndShowOutput(): any { function _formatOutput(output: any): any { const responseData = {}; - const plgGhostOutputHash = output[commonConfig.ghostStackName]; - Object.keys(plgGhostOutputHash).forEach(function (key) { - const value = plgGhostOutputHash[key]; + const tsGhostOutputHash = output[commonConfig.ghostStackName]; + Object.keys(tsGhostOutputHash).forEach(function (key) { + const value = tsGhostOutputHash[key]; const extractedKey = key.substring(0, key.length - 9); // 8 char random string with '_' diff --git a/src/terraform/ghost/cloudfront.ts b/src/terraform/ghost/cloudfront.ts index c00a6a5..bfeede8 100644 --- a/src/terraform/ghost/cloudfront.ts +++ b/src/terraform/ghost/cloudfront.ts @@ -107,7 +107,7 @@ class CloudfrontResource extends Resource { */ _createOriginAccessIdentity() { return new CloudfrontOriginAccessIdentity(this, 'origin_access_identity', { - comment: 'PLG Ghost blog', + comment: 'True Sparrow Ghost blog', }); } @@ -140,7 +140,7 @@ class CloudfrontResource extends Resource { ], enabled: true, isIpv6Enabled: true, - comment: 'PLG Ghost blog', + comment: 'True Sparrow Ghost blog', defaultCacheBehavior: { allowedMethods: ['GET', 'HEAD', 'OPTIONS'], cachedMethods: ['GET', 'HEAD'], From 725e8c60299d8c9da2b3f0c0f15cc48b6e2a832e Mon Sep 17 00:00:00 2001 From: Abhishek Roy <43261722+roy-cse@users.noreply.github.com> Date: Tue, 7 Feb 2023 19:22:22 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7492c2e..5330104 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ It comes with the following benefits: ## Development: - Clone the repository: ```bash - git clone git@github.com:truesparrow-Works/ghost-hosting-cli.git + git clone git@github.com:TrueSparrowSystems/ghost-hosting-cli.git ``` - Install all dependencies: ```bash @@ -85,4 +85,4 @@ It comes with the following benefits: npm run dev -- destroy ``` -> While executing **deploy**/**destroy** command, you might get timeout exceptions because of network interruptions. If that is the case, then re-run the command to complete the execution. \ No newline at end of file +> While executing **deploy**/**destroy** command, you might get timeout exceptions because of network interruptions. If that is the case, then re-run the command to complete the execution.