From 170d4f56010fb84cd0af8dc615c2a7f8e075e4fe Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 14 Aug 2023 10:43:24 +0800 Subject: [PATCH] Better doc wording --- docs/docs/ci-cd.md | 25 ++++++++++++++++--- docs/docs/development.md | 2 +- docs/docs/sentry.md | 2 -- docs/docs/setup.md | 13 +++++++++- .../src/components/HomepageFeatures/index.tsx | 2 +- 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/docs/docs/ci-cd.md b/docs/docs/ci-cd.md index fa961b03..de7bb99d 100644 --- a/docs/docs/ci-cd.md +++ b/docs/docs/ci-cd.md @@ -8,13 +8,26 @@ title: CI/CD The following [GitHub Secrets][How to set up GitHub Action Secrets] needs to be defined - [**SONAR_TOKEN**](https://sonarcloud.io/project/overview?id=QubitPi_jersey-ws-template) -- **SSL_CERTIFICATE** SSL certificate file content (for [exposing webservice endpoints over HTTPS][Nginx SSL Config]) -- **SSL_CERTIFICATE_KEY** SSL certificate key file content (for +- (Optional) **SSL_CERTIFICATE** SSL certificate file content (for [exposing webservice endpoints over HTTPS][Nginx SSL Config]) +- (Optional) **SSL_CERTIFICATE_KEY** SSL certificate key file content (for + [exposing webservice endpoints over HTTPS][Nginx SSL Config]) + + :::info + + In case SSL is not needed (because, for example, the webservice is behind a load balancer, which handles SSL for it), + Delete the following: + + - SSL config in HashiCorp [image][HashiCorp Packer template] and its + [setup script][HashiCorp Packer template setup script] + - [AWS Route 53 record config][HashiCorp Terraform config file] + + ::: + - [**AWS_ACCESS_KEY_ID**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) - [**AWS_SECRET_ACCESS_KEY**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) -- [**AWS_REGION**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) -- **ZONE_ID** AWS Route 53 hosted zone ID (DNS routing) +- [**AWS_REGION**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html), such as "us-east-1" +- (Optional) **ZONE_ID** AWS Route 53 hosted zone ID (DNS routing) **if SSL configs above are set** - **DOCKERHUB_USERNAME** The [Dockerfile][jersey-ws-template Dockerfile], in [CI/CD][jersey-ws-template CI/CD], got pushed to a [personal DockerHub][docker hub] account. The _DOCKERHUB_USERNAME_ if it needs to go to a different account, should be set accordingly @@ -28,6 +41,10 @@ The following [GitHub Secrets][How to set up GitHub Action Secrets] needs to be [docker hub]: https://hub.docker.com/r/jack20191124/jersey-ws-template/ +[HashiCorp Packer template]: https://github.com/QubitPi/jersey-ws-template/blob/master/hashicorp/images/aws-jersey-ws.pkr.hcl +[HashiCorp Packer template setup script]: https://github.com/QubitPi/jersey-ws-template/blob/master/hashicorp/scripts/setup.sh +[HashiCorp Terraform config file]: https://github.com/QubitPi/jersey-ws-template/blob/master/hashicorp/instances/main.tf + [jersey-ws-template CI/CD]: https://github.com/QubitPi/jersey-ws-template/blob/master/.github/workflows/ci-cd.yml [jersey-ws-template Dockerfile]: https://github.com/QubitPi/jersey-ws-template/blob/master/Dockerfile diff --git a/docs/docs/development.md b/docs/docs/development.md index 2c4cef17..097a9961 100644 --- a/docs/docs/development.md +++ b/docs/docs/development.md @@ -18,7 +18,7 @@ mvn clean package ``` A [**WAR** file](https://en.wikipedia.org/wiki/WAR_(file_format)) named `jersey-ws-template-1.0-SNAPSHOT.war` will -beJersey Webservice Template generated under _target_ directory for [running in Jetty](#running-in-standalone-jetty) +be generated under _target_ directory for [running in Jetty](#running-in-standalone-jetty) Running Webservice in Docker (Development) ------------------------------------------ diff --git a/docs/docs/sentry.md b/docs/docs/sentry.md index abf22d73..2785d4a0 100644 --- a/docs/docs/sentry.md +++ b/docs/docs/sentry.md @@ -30,5 +30,3 @@ It is recommended to simply define **SENTRY_DSN** environment variable via CI/CD automatically [jersey-ws-template]: https://github.com/QubitPi/jersey-ws-template - -[Sentry DSN]: https://docs.sentry.io/platforms/java/guides/logback/#dsn-configuration diff --git a/docs/docs/setup.md b/docs/docs/setup.md index be9b0e15..0c3ba5bb 100644 --- a/docs/docs/setup.md +++ b/docs/docs/setup.md @@ -70,7 +70,18 @@ implementing caching feature. _Remove them if not needed_: Modifying Templates ------------------- -- Update [endpoint package] accordingly + + +1. Setup [CI/CD](ci-cd) + + + +2. Renaming `src` package +3. Setup SonarCloud Project and replace all `QubitPi_jersey-ws-template` with project ID accordingly +4. Update links by replacing all `jersey-ws-template`, `Jersey Webservice Template`, and `QubitPi` (including cases) + accordingly +5. Update [endpoint package] accordingly +6. Update Copyright holder "Jiaqi Liu" [Caching]: https://github.com/QubitPi/jersey-ws-template/tree/master/src/main/java/com/qubitpi/ws/jersey/template/cache [Caching tests]: https://github.com/QubitPi/jersey-ws-template/tree/master/src/test/groovy/com/qubitpi/ws/jersey/template/cache diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index ec726c88..ca7379d5 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -83,7 +83,7 @@ const FeatureList: FeatureItem[] = [ ), }, { - title: 'Easy Config Environment', + title: 'Easy Config Management', Svg: require('@site/static/img/config.svg').default, description: ( <>