generated from dxw/rails-template
-
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.
- Loading branch information
Showing
13 changed files
with
260 additions
and
546 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,32 @@ | ||
# Get Help Buying for Schools | ||
|
||
[![Maintainability][codeclimate-badge]][codeclimate-report] | ||
![CI][ci-badge] | ||
![Deploy][deploy-badge] | ||
[Github Repo](https://github.com/DFE-Digital/buy-for-your-school) | ||
| [Github Packages](https://github.com/dfe-digital/buy-for-your-school/pkgs/container/buy-for-your-school) | ||
|
||
![main](https://github.com/DFE-Digital/buy-for-your-school/actions/workflows/ci-full-pipeline.yml/badge.svg?branch=main) | ||
|
||
A service to help school buying professionals create tender documents that comply with the relevant government policy. | ||
These tender documents can then be used to start a procurement process saving schools time and money. | ||
|
||
## Reusable Code | ||
|
||
This project uses **[DfE Sign-In][dsi]** for authentication. | ||
If your department project does the same, the code in `./lib/dsi` could help you. | ||
|
||
## Documentation | ||
|
||
Run `$ yardoc` to generate documentation for the project in `/documentation` and then `$ open ./documentation/index.html` to open in the browser. | ||
|
||
## Changelog | ||
|Environment|URL| | ||
|-|-| | ||
|Production|https://www.get-help-buying-for-schools.service.gov.uk| | ||
|Staging|https://staging.get-help-buying-for-schools.service.gov.uk| | ||
|Development|https://dev.get-help-buying-for-schools.service.gov.uk| | ||
|
||
When making a change, update the [changelog](CHANGELOG.md) using the | ||
[Keep a Changelog 1.0.0][keep-a-changelog] format. | ||
## Getting Started with Development | ||
|
||
## Architecture Decision Records | ||
Please read the [Getting Started](doc/getting-started.md) documentation for help on setting up your local environment and getting access to required systems. | ||
|
||
We use ADRs to document architectural decisions managed with [adr-tools][adr]. | ||
|
||
## Access | ||
|
||
| Environment | URL | | ||
| :---------- | :-----------------------------------------------------------: | | ||
| Development | http://localhost:3000 | | ||
| Research | https://buy-for-your-school-research.london.cloudapps.digital | | ||
| Staging | https://staging-get-help-buying-for-schools.education.gov.uk | | ||
| Production | https://get-help-buying-for-schools.education.gov.uk | | ||
|
||
|
||
|
||
--- | ||
## Documentation | ||
|
||
[adr]: https://github.com/npryce/adr-tools | ||
[ci-badge]: https://github.com/DFE-Digital/buy-for-your-school/actions/workflows/continuous-integration.yml/badge.svg | ||
[codeclimate-badge]: https://api.codeclimate.com/v1/badges/f119cce1678a8a67cca7/maintainability | ||
[codeclimate-report]: https://codeclimate.com/github/DFE-Digital/buy-for-your-school/maintainability | ||
[deploy-badge]: https://github.com/DFE-Digital/buy-for-your-school/actions/workflows/deploy.yml/badge.svg | ||
[dsi]: https://services.signin.education.gov.uk/ | ||
[keep-a-changelog]: https://keepachangelog.com/en/1.0.0/ | ||
- [Accessibility](doc/accessibility.md) | ||
- [Azure infrastructure](doc/azure.md) | ||
- [Console Access](doc/console-access.md) | ||
- [Contentful](doc/contentful-updates.md) | ||
- [Contentful Webhooks](doc/webhooks.md) | ||
- [Continuous Integration](doc/continuous-integration.md) | ||
- [Logging](doc/logging.md) | ||
- [Managing Environment Variables](doc/managing-environment-variables.md) | ||
- [Notify](doc/notify.md) | ||
- [Roles and Portals](roles-and-portals.md) |
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,10 @@ | ||
# Azure | ||
|
||
## Resource groups | ||
|
||
|Environment|Azure Resource Group|URL| | ||
|-|-|-| | ||
|Production|s174p01-ghbs-app|https://portal.azure.com/#@platform.education.gov.uk/resource/subscriptions/1871efd3-900d-4908-bf66-1b268ab28f10/resourceGroups/s174p01-ghbs-app| | ||
|Staging|s174t01-ghbs-app|https://portal.azure.com/#@platform.education.gov.uk/resource/subscriptions/cb3dd736-2dc8-4296-9894-16d3ecabe85d/resourceGroups/s174d01-ghbs-app| | ||
|Development|s174d01-ghbs-app|https://portal.azure.com/#@platform.education.gov.uk/resource/subscriptions/cb3dd736-2dc8-4296-9894-16d3ecabe85d/resourceGroups/s174d01-ghbs-app| | ||
|
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,51 +1,13 @@ | ||
# Console access | ||
|
||
We may need a way to access live environments for debugging or incident management purposes in future. | ||
NOTE: you will need Azure access to do this | ||
|
||
If we do need to open a rails console on production we should pair through the commands we execute to mitigate the risk of data loss. | ||
Please read [this documentation on console access](https://learn.microsoft.com/en-us/azure/container-apps/container-console?tabs=bash#azure-portal) for more information on connecting to a container app console. | ||
|
||
## Prerequisites | ||
## Console access links | ||
|
||
You must have an account that has been invited to the Government Platform as a Service (GPaaS) account. DfE PaaS organisation administrators should be able to invite you if you [request in DfE's #digital-tools-support Slack channel](https://ukgovernmentdfe.slack.com/archives/CMS9V0JQL). | ||
|
||
You must have have been given 'Space developer' access to the intended space, for example "sct-prod". Note 'Space manager' is a separate role and does not include all `Space developer` permissions. | ||
|
||
[You can sign in to check your account and permissions here](https://admin.london.cloud.service.gov.uk). | ||
|
||
## Access | ||
|
||
1. From a local terminal login to Cloud Foundry and select the intended space | ||
``` | ||
$ cf login -a api.london.cloud.service.gov.uk -u [email protected] | ||
``` | ||
1. See all available spaces | ||
``` | ||
$ cf spaces | ||
``` | ||
1. Change space | ||
``` | ||
$ cf target -s <space name> | ||
``` | ||
1. View available services | ||
``` | ||
$ cf apps | ||
``` | ||
1. Connect to the environment (in this case production) | ||
``` | ||
$ cf ssh <service name> | ||
``` | ||
1. Navigate to the application | ||
``` | ||
$ cd /srv/app | ||
``` | ||
1. Run the intended commands | ||
``` | ||
$ export PATH="$PATH:/usr/local/bin" | ||
$ /usr/local/bin/ruby bin/rails c | ||
``` | ||
or | ||
``` | ||
$ /usr/local/bin/ruby bin/rake db:seed | ||
``` | ||
|Enviroment|Console Link| | ||
|--|--| | ||
|Development|[Console](https://portal.azure.com/#@platform.education.gov.uk/resource/subscriptions/cb3dd736-2dc8-4296-9894-16d3ecabe85d/resourceGroups/s174d01-ghbs-app/providers/Microsoft.App/containerApps/devghbs-buyforyourschool/console)| | ||
|Staging|[Console](https://portal.azure.com/#@platform.education.gov.uk/resource/subscriptions/bc55c4cf-d75d-42d1-9017-a457b6b2cfc8/resourceGroups/s174t01-ghbs-app/providers/Microsoft.App/containerApps/stagghbs-buyforyourschool/console)| | ||
|Production|[Console](https://portal.azure.com/#@platform.education.gov.uk/resource/subscriptions/1871efd3-900d-4908-bf66-1b268ab28f10/resourceGroups/s174p01-ghbs-app/providers/Microsoft.App/containerApps/prodghbs-buyforyourschool/console)| |
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,17 @@ | ||
# Continuous Integration | ||
|
||
## Github Actions | ||
|
||
Automated deployments are handled by [github actions](https://github.com/DFE-Digital/buy-for-your-school/actions). | ||
|
||
### Deployment Secrets | ||
|
||
Select secrets are stored in github "Environments". We store as little secrets as possible within github and prefer to rely on permissions within Azure. | ||
|
||
|Secret|Description| | ||
|-|-| | ||
|`AZURE_SP_CREDENTIALS`|Service principle credentails stored in JSON form| | ||
|`CONTAINER_APP_NAME`|Name of the container-app| | ||
|`RESOURCE_GROUP_NAME`|Name of the resource group| | ||
|
||
For more on service principal credentials, see [here](https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#create-a-service-principal) and [here](https://github.com/marketplace/actions/azure-login#configure-a-service-principal-with-a-secret). |
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.
Oops, something went wrong.