Skip to content

Commit

Permalink
Review comments fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Venkata Challa committed Dec 21, 2023
1 parent 9854714 commit 87e6376
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 196 deletions.
4 changes: 0 additions & 4 deletions .env.development

This file was deleted.

4 changes: 0 additions & 4 deletions .env.production

This file was deleted.

4 changes: 0 additions & 4 deletions .env.test

This file was deleted.

27 changes: 27 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,30 @@ public/assets
storage
tmp
vendor

# Ignore bundler config
/.bundle

# bundled gems
/vendor

# Ignore cache
/.sass-cache
/.cache

# Ignore .DS_store file
.DS_Store

# Ignore built documentation
/build

# Ignore vscode files
.vscode/

# Ignore terraform files
bin/terrafile
.terraform
terraform/application/vendor
terraform/domains/environment_domains/vendor
terraform/domains/infrastructure/vendor
terraform.tfstate*
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ RUN rm -rf node_modules log/* tmp/* /tmp && \
# Build runtime image
FROM ruby:3.2.2-alpine as production

# Use rails production environment when deployed using docker
ENV RAILS_ENV=production
# The application runs from /app
WORKDIR /app
Expand Down
31 changes: 0 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,13 @@ DOCKER_REPOSITORY=ghcr.io/dfe-digital/itt-mentor-services
help:
@grep -E '^[a-zA-Z\._\-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: development
development: test-cluster
$(eval include global_config/development.sh)

.PHONY: review
review: test-cluster
$(if ${PR_NUMBER},,$(error Missing PR_NUMBER))
$(eval ENVIRONMENT=${PR_NUMBER})
$(eval export TF_VAR_environment=${ENVIRONMENT})
$(eval include global_config/review.sh)

production: production-cluster
$(if $(or ${SKIP_CONFIRM}, ${CONFIRM_PRODUCTION}), , $(error Missing CONFIRM_PRODUCTION=yes))
$(eval include global_config/production.sh)

domains:
$(eval include global_config/domains.sh)

composed-variables:
$(eval RESOURCE_GROUP_NAME=${AZURE_RESOURCE_PREFIX}-${SERVICE_SHORT}-${CONFIG_SHORT}-rg)
$(eval KEYVAULT_NAMES='("${AZURE_RESOURCE_PREFIX}-${SERVICE_SHORT}-${CONFIG_SHORT}-app-kv", "${AZURE_RESOURCE_PREFIX}-${SERVICE_SHORT}-${CONFIG_SHORT}-inf-kv")')
Expand Down Expand Up @@ -97,26 +86,6 @@ domains-infra-init: bin/terrafile domains composed-variables set-azure-account
-backend-config=storage_account_name=${STORAGE_ACCOUNT_NAME} \
-backend-config=key=domains_infrastructure.tfstate

domains-infra-plan: domains domains-infra-init ## Terraform plan for DNS infrastructure (DNS zone and front door). Usage: make domains-infra-plan
terraform -chdir=terraform/domains/infrastructure plan -var-file config/zones.tfvars.json

domains-infra-apply: domains domains-infra-init ## Terraform apply for DNS infrastructure (DNS zone and front door). Usage: make domains-infra-apply
terraform -chdir=terraform/domains/infrastructure apply -var-file config/zones.tfvars.json ${AUTO_APPROVE}

domains-init: bin/terrafile domains composed-variables set-azure-account
./bin/terrafile -p terraform/domains/environment_domains/vendor/modules -f terraform/domains/environment_domains/config/${CONFIG}_Terrafile

terraform -chdir=terraform/domains/environment_domains init -upgrade -reconfigure \
-backend-config=resource_group_name=${RESOURCE_GROUP_NAME} \
-backend-config=storage_account_name=${STORAGE_ACCOUNT_NAME} \
-backend-config=key=${ENVIRONMENT}.tfstate

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

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}

test-cluster:
$(eval CLUSTER_RESOURCE_GROUP_NAME=s189t01-tsc-ts-rg)
$(eval CLUSTER_NAME=s189t01-tsc-test-aks)
Expand Down
6 changes: 0 additions & 6 deletions global_config/development.sh

This file was deleted.

4 changes: 0 additions & 4 deletions global_config/domains.sh

This file was deleted.

6 changes: 0 additions & 6 deletions global_config/production.sh

This file was deleted.

3 changes: 2 additions & 1 deletion terraform/application/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ module "web_application" {
environment = var.environment
service_name = var.service_name
web_external_hostnames = [
local.claims_host,local.placements_host
local.claims_host,
local.placements_host
]

cluster_configuration_map = module.cluster_data.configuration_map
Expand Down
17 changes: 0 additions & 17 deletions terraform/application/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,3 @@ module "postgres" {
azure_enable_backup_storage = var.enable_postgres_backup_storage
server_version = "14"
}


module "redis-cache" {
source = "./vendor/modules/aks//aks/redis"

namespace = var.namespace
environment = var.environment
azure_resource_prefix = var.azure_resource_prefix
service_short = var.service_short
config_short = var.config_short
service_name = var.service_name
cluster_configuration_map = module.cluster_data.configuration_map
use_azure = var.deploy_azure_backing_services
azure_enable_monitoring = var.enable_monitoring
azure_patch_schedule = [{ "day_of_week" : "Sunday", "start_hour_utc" : 01 }]
server_version = "6"
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions terraform/domains/environment_domains/main.tf

This file was deleted.

19 changes: 0 additions & 19 deletions terraform/domains/environment_domains/terraform.tf

This file was deleted.

4 changes: 0 additions & 4 deletions terraform/domains/environment_domains/variables.tf

This file was deleted.

11 changes: 0 additions & 11 deletions terraform/domains/infrastructure/config/zones.tfvars.json

This file was deleted.

3 changes: 0 additions & 3 deletions terraform/domains/infrastructure/config/zones_Terrafile

This file was deleted.

5 changes: 0 additions & 5 deletions terraform/domains/infrastructure/main.tf

This file was deleted.

19 changes: 0 additions & 19 deletions terraform/domains/infrastructure/terraform.tf

This file was deleted.

7 changes: 0 additions & 7 deletions terraform/domains/infrastructure/variables.tf

This file was deleted.

0 comments on commit 87e6376

Please sign in to comment.