From f8d7480de057780fec7cf46149a0a836e5429c32 Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Fri, 26 Apr 2019 16:46:09 -0400 Subject: [PATCH 1/6] Fix the Circle CI badge image URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c80413c6dc5..2da86dff335 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ #### staging -[![CircleCI](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging) +[![CircleCI](https://circleci.com/gh/ustaxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging) API | Front-End | Shared Code --- | --------- | ----------- From c95f348161b2448a25a2d688e9aa602cc1814679 Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Fri, 26 Apr 2019 17:08:37 -0400 Subject: [PATCH 2/6] Clarify CircleCI and AWS instructions --- README.md | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 2da86dff335..d73aca5d159 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ #### staging -[![CircleCI](https://circleci.com/gh/ustaxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging) +[![CircleCI](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging) API | Front-End | Shared Code --- | --------- | ----------- @@ -190,11 +190,12 @@ Follow these steps for creating the end of sprint PRs for the court. ## Prerequisites - [Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/). -- In [AWS Identity and Access Management](https://console.aws.amazon.com/iam/), create a `CircleCI` user: - - Run the `generate-policy.sh YOUR_ACCOUNT_ID_AS_ARG_1` to generated the policy.json. - - Create a IAM policy called CircleCIPolicy with that generated policy.json - - Create the CircleCI user and attach the policy - - keep track of the access key and secret access key; it is needed for the CircleCI setup. +- Create a `CircleCI` user in [AWS Identity and Access Management](https://console.aws.amazon.com/iam/): + - Determine your organization’s AWS ID, a 12-digit number. While logged into the AWS Console, you can find this in the account menu in the top right, where it may appear with hyphens, e.g. `3503-6506-1526`. + - In your local copy of the repository, generate an IAM policy with `./generate-policy.sh [YOUR_ACCOUNT_ID]`, e.g. `generate-policy.sh 350365061526`. + - Create a IAM policy called `CircleCIPolicy`, populating it with the contents of the generated `policy.json`. + - Create the `CircleCI` user and attach the policy. + - Keep track of the access key and secret access key — it is needed for the CircleCI setup. - [Create a Route53 Hosted Zone](https://console.aws.amazon.com/route53/home) This will be used for setting up the domains for the UI and API. Put the desired domain name (e.g. `ef-cms.example.gov.`) and make sure it is a `Public Hosted Zone`. This is the value you will set for `EFCMS_DOMAIN` in CircleCI. Make sure the domain name ends with a period. - [Create a SonarCloud account](https://sonarcloud.io/). SonarCloud will be used to tests each build. - [Create a new SonarCloud organization](https://sonarcloud.io/create-organization). @@ -204,23 +205,23 @@ Follow these steps for creating the end of sprint PRs for the court. - [Create a project and project key](https://sonarcloud.io/projects/create?manual=true) for the SHARED code. (This will be referred to as `SHARED_SONAR_TOKEN` when setting up Jenkins.) ## Circle CI Setup -1. Setup a Circle CI account -2. Click Add Projects +1. Set up a [CircleCI](https://circleci.com/) account +2. Click "Add Projects" 3. Click "Set Up Project" next to the court's repo 4. Click "Start Building" with defaults -5. Go to the settings of the project in Circle via clicking on the project / job, and clicking the gear cog +5. Go to the settings of the project in CircleCI via clicking on the project / job, and clicking the gear icon 6. Click "Environment Variables" 7. Add the following: - - AWS_ACCESS_KEY_ID (the access key for the AWS CircleCI user created in the Prerequisites) - - AWS_SECRET_ACCESS_KEY (the secret access key for the AWS CircleCI user created in the Prerequisites) - - EFCMS_DOMAIN (the domain indented for use by the court, e.g., `ef-cms.example.gov`) - - SONAR_ORG (your sonar organization’s name) - - SHARED_SONAR_KEY (the sonar key for the SHARED project) - - SHARED_SONAR_TOKEN (the token for the sonar SHARED project) - - API_SONAR_KEY (the sonar key for the API project) - - API_SONAR_TOKEN (the token for the sonar API project) - - UI_SONAR_KEY (the sonar key for the UI project) - - UI_SONAR_TOKEN (the token for the sonar UI project) - - COGNITO_SUFFIX (a suffix of your choice for the cognito url) - - USTC_ADMIN_PASS (a unique password of your choice used by the cognito admin user) -8. You're good to go. Builds should start running and deploying if everything is setup correctly. + - `AWS_ACCESS_KEY_ID` (the access key for the AWS CircleCI user created in the Prerequisites) + - `AWS_SECRET_ACCESS_KEY` (the secret access key for the AWS CircleCI user created in the Prerequisites) + - `EFCMS_DOMAIN` (the domain indented for use by the court, e.g., `ef-cms.example.gov`) + - `SONAR_ORG` (your sonar organization’s name) + - `SHARED_SONAR_KEY` (the sonar key for the SHARED project) + - `SHARED_SONAR_TOKEN` (the token for the sonar SHARED project) + - `API_SONAR_KEY` (the sonar key for the API project) + - `API_SONAR_TOKEN` (the token for the sonar API project) + - `UI_SONAR_KEY` (the sonar key for the UI project) + - `UI_SONAR_TOKEN` (the token for the sonar UI project) + - `COGNITO_SUFFIX` (a suffix of your choice for the cognito url) + - `USTC_ADMIN_PASS` (a unique password of your choice used by the cognito admin user) +8. Run a build. From 1395f1f07ba6ded74d4e860b73fed359b15a1e34 Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Wed, 1 May 2019 11:02:01 -0400 Subject: [PATCH 3/6] Move three documentatino files into the docs dir Unclutter the root and start to centralize process documentation. --- ACCESSIBILITY.md => docs/ACCESSIBILITY.md | 0 CODE_REVIEW.md => docs/CODE_REVIEW.md | 0 development-team-process.md => docs/development-team-process.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename ACCESSIBILITY.md => docs/ACCESSIBILITY.md (100%) rename CODE_REVIEW.md => docs/CODE_REVIEW.md (100%) rename development-team-process.md => docs/development-team-process.md (100%) diff --git a/ACCESSIBILITY.md b/docs/ACCESSIBILITY.md similarity index 100% rename from ACCESSIBILITY.md rename to docs/ACCESSIBILITY.md diff --git a/CODE_REVIEW.md b/docs/CODE_REVIEW.md similarity index 100% rename from CODE_REVIEW.md rename to docs/CODE_REVIEW.md diff --git a/development-team-process.md b/docs/development-team-process.md similarity index 100% rename from development-team-process.md rename to docs/development-team-process.md From 142fc362fbe18183a16e5075f1b22e0c10a76c7a Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Wed, 1 May 2019 11:05:49 -0400 Subject: [PATCH 4/6] Fix typo in CircleCI badge URL I thought I'd fixed this in #63, but I missed a character. So here's a PR to delete exactly one character. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d73aca5d159..ca731521d37 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ #### staging -[![CircleCI](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging) +[![CircleCI](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/ustaxcourt/ef-cms/tree/staging) API | Front-End | Shared Code --- | --------- | ----------- From f93298a60a7c6ca5f9b583add6181fe22cb85b08 Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Wed, 1 May 2019 11:21:42 -0400 Subject: [PATCH 5/6] Remove yet another extraneous "a" I'm not sure how three changes are necessary when it was only in there twice, but here we are. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ca731521d37..781cd6a37ff 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ #### staging -[![CircleCI](https://circleci.com/gh/usataxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/ustaxcourt/ef-cms/tree/staging) +[![CircleCI](https://circleci.com/gh/ustaxcourt/ef-cms/tree/staging.svg?style=svg)](https://circleci.com/gh/ustaxcourt/ef-cms/tree/staging) API | Front-End | Shared Code --- | --------- | ----------- From 95e93e9791b0a9d5e8b852451b9fd4145f64f537 Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Wed, 1 May 2019 15:13:49 -0400 Subject: [PATCH 6/6] Fix list formatting The list of resources available is running together, instead of being formatted properly. Precede each with a bullet to format them properly. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d73aca5d159..50ac5e8eb77 100644 --- a/README.md +++ b/README.md @@ -61,12 +61,12 @@ Assuming you have Docker installed, the following command will spin up a Docker `./docker-run.sh` -You can access the UI at http://localhost:1234 -You can access the API at http://localhost:3000 -You can access the dynamodb shell at http://localhost:8000/shell -You can access the dynamodb-admin ui at http://localhost:8001 -You can access s3 local at http://localhost:9000 -You can access the style guide at http://localhost:1234/style-guide +- You can access the UI at http://localhost:1234 +- You can access the API at http://localhost:3000 +- You can access the dynamodb shell at http://localhost:8000/shell +- You can access the dynamodb-admin ui at http://localhost:8001 +- You can access s3 local at http://localhost:9000 +- You can access the style guide at http://localhost:1234/style-guide ## Running this project locally without Docker