Skip to content

Commit

Permalink
Add maintenance page
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcVelia committed Nov 20, 2024
1 parent 179f804 commit 98bbf72
Show file tree
Hide file tree
Showing 47 changed files with 425 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Set maintenance mode

on:
workflow_dispatch:
inputs:
environment:
required: true
type: choice
options:
- test
- production
mode:
required: true
type: choice
options:
- enable
- disable

jobs:
set-maintenance-mode:
name: Set maintenance mode
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Enable or disable maintenance mode
uses: DFE-Digital/github-actions/maintenance@master
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS}}
environment: ${{ inputs.environment }}
mode: ${{ inputs.mode }}
docker-repository: ghcr.io/dfe-digital/claim-additional-payments-for-teaching-maintenance
github-token: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,20 @@ domains-plan: domains-init ## Terraform plan for DNS environment domains. Usage

domains-apply: domains-init ## Terraform apply for DNS environment domains. Usage: make development domains-apply
terraform -chdir=terraform/domains/environment_domains apply -var-file config/${CONFIG}.tfvars.json ${AUTO_APPROVE}

maintenance-image-push:
$(if ${GITHUB_TOKEN},, $(error Provide a valid Github token with write:packages permissions as GITHUB_TOKEN variable))
$(if ${MAINTENANCE_IMAGE_TAG},, $(eval export MAINTENANCE_IMAGE_TAG=$(shell date +%s)))
docker build -t ghcr.io/dfe-digital/claim-additional-payments-for-teaching-maintenance:${MAINTENANCE_IMAGE_TAG} maintenance_page
echo ${GITHUB_TOKEN} | docker login ghcr.io -u USERNAME --password-stdin
docker push ghcr.io/dfe-digital/claim-additional-payments-for-teaching-maintenance:${MAINTENANCE_IMAGE_TAG}

maintenance-fail-over: get-cluster-credentials
$(eval export CONFIG)
./maintenance_page/scripts/failover.sh

enable-maintenance: maintenance-image-push maintenance-fail-over

disable-maintenance: get-cluster-credentials
$(eval export CONFIG)
./maintenance_page/scripts/failback.sh
4 changes: 4 additions & 0 deletions maintenance_page/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginxinc/nginx-unprivileged:1.26.1

COPY nginx.conf /etc/nginx/nginx.conf
COPY ./html/ /usr/share/nginx/html
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions maintenance_page/html/assets/images/favicon-ec189703.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions maintenance_page/html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE html>
<html lang="en" class="govuk-template">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>This service is currently unavailable - Claim Additional Payments for teaching - GOV.UK</title>
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#0b0c0c">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="assets/images/favicon-7ddbfd51.ico" type="image/x-icon">
<link rel="mask-icon" href="assets/images/govuk-mask-icon.svg" color="#0b0c0c">
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/govuk-apple-touch-icon-180x180.png">
<link rel="apple-touch-icon" sizes="167x167" href="assets/images/govuk-apple-touch-icon-167x167.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/images/govuk-apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" href="assets/images/govuk-apple-touch-icon.png">
<meta property="og:image" content="assets/govuk-opengraph-image.png">
<link rel="stylesheet" media="all" href="stylesheets/govuk-frontend-5.3.1.min.css">
</head>
<body class="govuk-template__body">
<style>
.app-header--production.app-header--full-border {
border-bottom-color: #1d70b8;
}
</style>
<header class="govuk-header govuk-!-display-none-print app-header--production app-header--full-border app-header--wide-logo" role="banner" data-module="govuk-header">
<div class="govuk-header__container govuk-width-container">
<div class="govuk-header__logo">
<a class="govuk-header__link govuk-header__link--homepage" href="https://www.gov.uk/">
<span class="govuk-header__logotype">
<svg
focusable="false"
role="img"
class="govuk-header__logotype"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 148 30"
height="30"
width="148"
aria-label="GOV.UK"
>
<title>GOV.UK</title>
<path d="M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2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m-27.6 16.1c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7-1.2-2.7-2.7-2.7z"></path>
</svg>
<span class="govuk-header__logotype-text"></span>
</span>
</a>
</div>
<div class="govuk-header__content">
<a class="govuk-header__link govuk-header__service-name" href="/">Claim Additional Payments for teaching</a>
</div>
</div>
</header>
<div class="govuk-width-container">
<main class="govuk-main-wrapper" id="main-content" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">This service is currently unavailable</h1>
<p class="govuk-body">We're sorry the service is not available right now.</p>
<p class="govuk-body">Try again later.</p>
<p class="govuk-body">If you reached this page after submitting information then it has not been saved. You will need to enter it again when the service is available.</p>
</div>
</div>
</main>
</div>
<footer role="contentinfo" class="govuk-footer govuk-!-display-none-print">
<div class="govuk-width-container">
<div class="govuk-footer__meta">
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
<h2 class="govuk-heading-m">Get help</h2>
<p class="govuk-body-s govuk-!-margin-bottom-1">Call 0800 389 2500 or <a class="govuk-link govuk-footer__link" href="https://getintoteaching.education.gov.uk/help-and-support?utm_source=apply-for-teacher-training.service.gov.uk&amp;utm_medium=referral&amp;utm_campaign=candidate_interface%2Fstart_page-create_account_or_sign_in&amp;utm_content=candidate_not_logged_in">chat online</a>.</p>
<p class="govuk-body-s govuk-!-margin-bottom-1">Monday to Friday, 8:30am to 5:30pm (except public&nbsp;holidays)</p>
</div>
<div class="govuk-footer__meta-item">
<a class="govuk-footer__link govuk-footer__copyright-logo govuk-!-margin-bottom-1" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">© Crown copyright</a>
</div>
</div>
</div>
</footer>
</body>
</html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: claim-additional-payments-for-teaching-maintenance
labels:
app: claim-additional-payments-for-teaching-maintenance
spec:
replicas: 2
selector:
matchLabels:
app: claim-additional-payments-for-teaching-maintenance
template:
metadata:
labels:
app: claim-additional-payments-for-teaching-maintenance
spec:
nodeSelector:
teacherservices.cloud/node_pool: applications
kubernetes.io/os: linux
containers:
- name: claim-additional-payments-for-teaching-maintenance
image: ghcr.io/dfe-digital/claim-additional-payments-for-teaching-maintenance:#MAINTENANCE_IMAGE_TAG#
ports:
- containerPort: 8080
resources:
requests:
memory: 64M
cpu: 0.1
limits:
memory: 64M
cpu: 1
12 changes: 12 additions & 0 deletions maintenance_page/manifests/maintenance/service_maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Service
metadata:
name: claim-additional-payments-for-teaching-maintenance
spec:
selector:
app: claim-additional-payments-for-teaching-maintenance
ports:
- protocol: TCP
port: 80
targetPort: 8080
16 changes: 16 additions & 0 deletions maintenance_page/manifests/production/ingress_internal_to_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: claim-additional-payments-for-teaching-production-web.teacherservices.cloud
spec:
ingressClassName: nginx
rules:
- host: claim-additional-payments-for-teaching-production-web.teacherservices.cloud
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: claim-additional-payments-for-teaching-production-web
port:
number: 80
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: claim-additional-payments-for-teaching-production-web.teacherservices.cloud
spec:
ingressClassName: nginx
rules:
- host: claim-additional-payments-for-teaching-production-web.teacherservices.cloud
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: claim-additional-payments-for-teaching-maintenance
port:
number: 80
16 changes: 16 additions & 0 deletions maintenance_page/manifests/production/ingress_maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: claim-additional-payments-for-teaching-maintenance.teacherservices.cloud
spec:
ingressClassName: nginx
rules:
- host: claim-additional-payments-for-teaching-maintenance.teacherservices.cloud
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: claim-additional-payments-for-teaching-maintenance
port:
number: 80
16 changes: 16 additions & 0 deletions maintenance_page/manifests/production/ingress_temp_to_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: claim-additional-payments-for-teaching-temp.teacherservices.cloud
spec:
ingressClassName: nginx
rules:
- host: claim-additional-payments-for-teaching-temp.teacherservices.cloud
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: claim-additional-payments-for-teaching-production-web
port:
number: 80
16 changes: 16 additions & 0 deletions maintenance_page/manifests/test/ingress_internal_to_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: claim-additional-payments-for-teaching-test-web.test.teacherservices.cloud
spec:
ingressClassName: nginx
rules:
- host: claim-additional-payments-for-teaching-test-web.test.teacherservices.cloud
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: claim-additional-payments-for-teaching-test-web
port:
number: 80
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: claim-additional-payments-for-teaching-test-web.test.teacherservices.cloud
spec:
ingressClassName: nginx
rules:
- host: claim-additional-payments-for-teaching-test-web.test.teacherservices.cloud
http:
paths:
- pathType: ImplementationSpecific
backend:
service:
name: claim-additional-payments-for-teaching-maintenance
port:
number: 80
Loading

0 comments on commit 98bbf72

Please sign in to comment.