Skip to content

Commit

Permalink
Remove old PaaS jobs from Makefile
Browse files Browse the repository at this point in the history
These are jobs and scripts that were used when Find was still deployed
to GOVUK PaaS. They are no longer required now that Find deploys to AKS.
  • Loading branch information
malcolmbaig committed Mar 27, 2024
1 parent 6739192 commit 1187e08
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 90 deletions.
33 changes: 0 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,39 +79,6 @@ install-fetch-config: ## Install the fetch-config script, for viewing/editing se
&& chmod +x bin/fetch_config.rb \
|| true

.PHONY: set-space-developer
set-space-developer: read-deployment-config ## make dev set-space-developer [email protected]
$(if $(USER_ID), , $(error Missing environment variable "USER_ID", USER_ID required for this command to run))
cf set-space-role ${USER_ID} dfe ${SPACE} SpaceDeveloper

.PHONY: unset-space-developer
unset-space-developer: read-deployment-config ## make dev unset-space-developer [email protected]
$(if $(USER_ID), , $(error Missing environment variable "USER_ID", USER_ID required for this command to run))
cf unset-space-role ${USER_ID} dfe ${SPACE} SpaceDeveloper

stop-app: read-deployment-config ## Stops api app, make dev stop-app CONFIRM_STOP=1
$(if $(CONFIRM_STOP), , $(error stop-app can only run with CONFIRM_STOP))
cf target -s ${SPACE}
cf stop ${FLT_APP_NAME}

get-postgres-instance-guid: read-deployment-config ## Gets the postgres service instance's guid
cf target -s ${SPACE} > /dev/null
cf service ${POSTGRES_DATABASE_NAME} --guid
$(eval DB_INSTANCE_GUID=$(shell cf service ${POSTGRES_DATABASE_NAME} --guid))

rename-postgres-service: read-deployment-config ## make dev rename-postgres-service NEW_NAME_SUFFIX=old CONFIRM_RENAME
$(if $(CONFIRM_RENAME), , $(error can only run with CONFIRM_RENAME))
$(if $(NEW_NAME_SUFFIX), , $(error NEW_NAME_SUFFIX is required))
cf target -s ${SPACE} > /dev/null
cf rename-service ${POSTGRES_DATABASE_NAME} ${POSTGRES_DATABASE_NAME}-$(NEW_NAME_SUFFIX)

restore-data-from-backup: read-deployment-config # make production restore-data-from-backup CONFIRM_RESTORE=YES BACKUP_FILENAME="find-a-lost-trn-production-pg-svc-2022-04-28-01"
@if [[ "$(CONFIRM_RESTORE)" != YES ]]; then echo "Please enter "CONFIRM_RESTORE=YES" to run workflow"; exit 1; fi
$(eval export AZURE_BACKUP_STORAGE_ACCOUNT_NAME=$(AZURE_BACKUP_STORAGE_ACCOUNT_NAME))
$(if $(BACKUP_FILENAME), , $(error can only run with BACKUP_FILENAME, eg BACKUP_FILENAME="find-a-lost-trn-production-pg-svc-2022-04-28-01"))
bin/download-db-backup ${AZURE_BACKUP_STORAGE_ACCOUNT_NAME} ${AZURE_BACKUP_STORAGE_CONTAINER_NAME} ${BACKUP_FILENAME}.tar.gz
bin/restore-db ${DEPLOY_ENV} ${CONFIRM_RESTORE} ${SPACE} ${BACKUP_FILENAME}.sql ${POSTGRES_DATABASE_NAME}

terraform-init: bin/terrafile
[[ "${SP_AUTH}" != "true" ]] && az account set -s $(AZURE_SUBSCRIPTION) || true
./bin/terrafile -p terraform/aks/vendor/modules -f terraform/aks/workspace_variables/$(CONFIG)_Terrafile
Expand Down
31 changes: 0 additions & 31 deletions bin/download-db-backup

This file was deleted.

26 changes: 0 additions & 26 deletions bin/restore-db

This file was deleted.

0 comments on commit 1187e08

Please sign in to comment.