Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

[CLEANUP] Delete Solr 6 App + EKS Cluster #157

Merged
merged 3 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
- name: prep applications
run: |
./app-setup-eks.sh
./app-setup-solr.sh
./app-setup-solrcloud.sh
./app-setup-smtp.sh
- name: terraform apply (staging)
Expand Down Expand Up @@ -89,7 +88,6 @@ jobs:
- name: prep applications
run: |
./app-setup-eks.sh
./app-setup-solr.sh
./app-setup-solrcloud.sh
./app-setup-smtp.sh
- name: terraform apply (production)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
- name: prep applications
run: |
./app-setup-eks.sh
./app-setup-solr.sh
./app-setup-solrcloud.sh
./app-setup-smtp.sh

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
- name: prep applications
run: |
./app-setup-eks.sh
./app-setup-solr.sh
./app-setup-solrcloud.sh
./app-setup-smtp.sh
- name: terraform plan (staging)
Expand Down Expand Up @@ -77,7 +76,6 @@ jobs:
- name: prep applications
run: |
./app-setup-eks.sh
./app-setup-solr.sh
./app-setup-solrcloud.sh
./app-setup-smtp.sh
- name: terraform plan (production)
Expand Down
88 changes: 0 additions & 88 deletions app-setup-solr.sh

This file was deleted.

54 changes: 11 additions & 43 deletions application-boundary.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module "broker_eks" {
client_spaces = var.client_spaces
enable_ssh = var.enable_ssh
memory = 1024
instances = 2
instances = 1
aws_access_key_id = module.ssb-eks-broker-user.iam_access_key_id
aws_secret_access_key = module.ssb-eks-broker-user.iam_access_key_secret
aws_zone = var.broker_zone
Expand All @@ -31,12 +31,18 @@ module "broker_smtp" {
aws_zone = var.broker_zone
}

# This is the back-end k8s instance to be used by the ssb-solr app
resource "cloudfoundry_service_instance" "k8s_cluster" {
name = "ssb-solr-k8s"
# For now we are using a hand-provisioned user-provided service, not managed by Terraform
data "cloudfoundry_space" "broker-space" {
name = var.broker_space.space
org_name = var.broker_space.org
}

resource "cloudfoundry_service_instance" "solrcloud_broker_k8s_cluster" {
name = "ssb-solrcloud-k8s"
space = data.cloudfoundry_space.broker_space.id
service_plan = module.broker_eks.plans["aws-eks-service/raw"]
tags = ["k8s"]
json_params = "{\"mng_min_capacity\": 1, \"mng_max_capacity\": 1, \"mng_desired_capacity\": 1, \"mng_instance_types\": [\"t2.small\"]}"
timeouts {
create = "60m"
update = "90m" # in case of an EKS destroy/create
Expand All @@ -47,32 +53,6 @@ resource "cloudfoundry_service_instance" "k8s_cluster" {
]
}

# resource "cloudfoundry_service_instance" "solrcloud_broker_k8s_cluster" {
# name = "ssb-solrcloud-k8s"
# space = data.cloudfoundry_space.broker_space.id
# service_plan = module.broker_eks.plans["aws-eks-service/raw"]
# tags = ["k8s"]
# json_params = "{\"mng_min_capacity\": 8, \"mng_max_capacity\": 12, \"mng_desired_capacity\": 10}"
# timeouts {
# create = "60m"
# update = "90m" # in case of an EKS destroy/create
# delete = "40m"
# }
# depends_on = [
# module.broker_eks
# ]
# }

# For now we are using a hand-provisioned user-provided service, not managed by Terraform
data "cloudfoundry_space" "broker-space" {
name = var.broker_space.space
org_name = var.broker_space.org
}
data "cloudfoundry_user_provided_service" "ssb-solrcloud-k8s" {
name = "ssb-solrcloud-k8s"
space = data.cloudfoundry_space.broker-space.id
}

module "broker_solrcloud" {
source = "./broker"

Expand All @@ -82,17 +62,5 @@ module "broker_solrcloud" {
client_spaces = var.client_spaces
enable_ssh = var.enable_ssh
memory = 1024
# services = [cloudfoundry_service_instance.solrcloud_broker_k8s_cluster.id]
services = [data.cloudfoundry_user_provided_service.ssb-solrcloud-k8s.id]
}

module "broker_solr" {
source = "./broker"

name = "ssb-solr"
path = "./app-solr"
broker_space = var.broker_space
client_spaces = var.client_spaces
enable_ssh = var.enable_ssh
services = [cloudfoundry_service_instance.k8s_cluster.id]
services = [cloudfoundry_service_instance.solrcloud_broker_k8s_cluster.id]
}