generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jacob Woffenden <jacob.woffenden@justice.gov.uk>
- Loading branch information
1 parent
a7221a3
commit f668866
Showing
26 changed files
with
193 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: Dependency Review | ||
name: 🔍 Dependency Review | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
name: 🐙 GitHub Project Issue Type | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: {} | ||
|
||
env: | ||
PROJECT_ID: "PVT_kwDOACGfts4AVFPo" # gh api graphql -f 'query=query{organization(login:"ministryofjustice"){projectV2(number: 44){id}}}' | jq -r '.data.organization.projectV2.id' | ||
FIELD_ID: "PVTSSF_lADOACGfts4AVFPozgU4CJs" # gh project field-list 44 --owner ministryofjustice --format json | jq -r '.fields[] | select(.name=="Issue Type") .id' | ||
|
||
jobs: | ||
update-github-projects-issue-type: | ||
runs-on: ubuntu-latest | ||
name: Update GitHub Projects Issue Type | ||
steps: | ||
- name: Check Labels | ||
id: check_labels | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
with: | ||
github-token: ${{ secrets.OBSERVABILITY_PLATFORM_BOT_TOKEN }} | ||
script: | | ||
const issue = context.issue; | ||
const labels = context.payload.issue.labels.map(label => label.name); | ||
// fieldOptionId is the ID of the field option that corresponds to the issue type | ||
// this can be obtained from the GitHub API by running | ||
// gh project field-list 44 --owner ministryofjustice --format json | jq -r '.fields[] | select(.name=="Type") .options' | ||
let type; | ||
if (labels.includes("bug")) { | ||
type = "bug"; | ||
fieldOptionId = "911c9508"; | ||
} else if (labels.includes("epic")) { | ||
type = "epic"; | ||
fieldOptionId = "ae8af2c4"; | ||
} else if (labels.includes("feature-request")) { | ||
type = "feature-request"; | ||
fieldOptionId = "92b9573d"; | ||
} else if (labels.includes("story")) { | ||
type = "story"; | ||
fieldOptionId = "9d14e00a"; | ||
} else if (labels.includes("spike")) { | ||
type = "spike"; | ||
fieldOptionId = "2baf6f13"; | ||
} | ||
if (type) { | ||
console.log(`Issue is a ${type}`); | ||
return fieldOptionId; | ||
} else { | ||
console.log("Issue is not a bug, epic, feature-request, or story"); | ||
return null; | ||
} | ||
- name: Add to GitHub Project # Even though GitHub Project automation can do this, we need to do it again to get the item ID | ||
id: add_to_project | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OBSERVABILITY_PLATFORM_BOT_TOKEN }} | ||
uses: octokit/graphql-action@8ad880e4d437783ea2ab17010324de1075228110 # v2.3.2 | ||
with: | ||
query: | | ||
mutation AddIssueToProject($project_id: ID!, $content_id: ID!) { | ||
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) { | ||
item { | ||
id | ||
} | ||
} | ||
} | ||
variables: | | ||
project_id: ${{ env.PROJECT_ID }} | ||
content_id: ${{ github.event.issue.node_id }} | ||
- name: Update Issue Type | ||
id: update_issue_type | ||
if: steps.check_labels.outputs.result != null | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OBSERVABILITY_PLATFORM_BOT_TOKEN }} | ||
uses: octokit/graphql-action@8ad880e4d437783ea2ab17010324de1075228110 # v2.3.2 | ||
with: | ||
query: | | ||
mutation UpdateIssueType($item_id: ID!, $project_id: ID!, $field_id: ID!, $field_option_id: String) { | ||
updateProjectV2ItemFieldValue( | ||
input: { itemId: $item_id, projectId: $project_id, fieldId: $field_id, value: { singleSelectOptionId: $field_option_id } }) { | ||
clientMutationId | ||
} | ||
} | ||
variables: | | ||
item_id: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }} | ||
project_id: ${{ env.PROJECT_ID }} | ||
field_id: ${{ env.FIELD_ID }} | ||
field_option_id: ${{ steps.check_labels.outputs.result }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: OpenSSF Scorecard | ||
name: 🛡️ OpenSSF Scorecard | ||
|
||
on: | ||
branch_protection_rule: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.PHONY: package preview | ||
|
||
IMAGE_NAME ?= ghcr.io/ministryofjustice/tech-docs-github-pages-publisher | ||
IMAGE_SHA ?= sha256:35699473dbeefeeb8b597de024125a241277ee03587d5fe8e72545e4b27b33f8 | ||
|
||
package: | ||
docker run --rm \ | ||
--name tech-docs-github-pages-publisher \ | ||
--volume $(PWD)/config:/tech-docs-github-pages-publisher/config \ | ||
--volume $(PWD)/source:/tech-docs-github-pages-publisher/source \ | ||
$(IMAGE_NAME)@$(IMAGE_SHA) \ | ||
/usr/local/bin/package | ||
|
||
preview: | ||
docker run -it --rm \ | ||
--name tech-docs-github-pages-publisher-preview \ | ||
--volume $(PWD)/config:/tech-docs-github-pages-publisher/config \ | ||
--volume $(PWD)/source:/tech-docs-github-pages-publisher/source \ | ||
--publish 4567:4567 \ | ||
$(IMAGE_NAME)@$(IMAGE_SHA) \ | ||
/usr/local/bin/preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions
10
...ecture-decision-records/index.html.md.erb → ...ecture-decision-records/index.html.md.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: Architecture | ||
last_reviewed_on: 2024-11-04 | ||
review_in: 3 months | ||
weight: 0 | ||
--- | ||
|
||
# <%= current_page.data.title %> | ||
|
||
At its core, the Observability Platform is [Amazon Managed Grafana](https://aws.amazon.com/grafana/), which offers a fully managed, single pane of glass view of onboarded accounts' [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/), as well as other SaaS services that offer integration, such as GitHub or Sentry. | ||
|
||
Additionally, the Observability Platform also offers: | ||
|
||
- Integration with [Amazon Managed Service for Prometheus](https://aws.amazon.com/prometheus/) | ||
|
||
- Integration with [AWS X-Ray](https://aws.amazon.com/xray/) | ||
|
||
- Alerting with PagerDuty and Slack | ||
|
||
## High Level Diagram | ||
|
||
![Observability Platform](./src/architecture.svg) | ||
|
||
## Environments | ||
|
||
The Observability Platform has two environments: | ||
|
||
- `development` | ||
|
||
- `production` (also known as `alpha`) | ||
|
||
The `development` environment is used for platform development and testing. | ||
|
||
The `alpha` environment is where all the Observability Platform tenants are onboarded. | ||
|
||
## Deployment | ||
|
||
Observability Platform is deployed to the [Modernisation Platform](https://user-guide.modernisation-platform.service.justice.gov.uk/), and the source is available [here](https://github.com/ministryofjustice/modernisation-platform-environments/tree/main/terraform/environments/observability-platform). |
File renamed without changes
38 changes: 0 additions & 38 deletions
38
source/documentation/platform-architecture/index.html.md.erb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.