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

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

merged 3 commits into from
Aug 22, 2022

Conversation

nickumia-reisys
Copy link
Contributor

@nickumia-reisys nickumia-reisys commented Aug 22, 2022

Related to

To save on costs, we are removing obsolete code. We no longer need solr 6 and we are not using EKS anymore. The solrcloud app still needs a k8s cluster to be able to start up, so we need to provision the bare minimum; but overall, this should save on costs and give us less to maintain.

We'll try and let terraform do the cleanup for us. If it fails, we'll have to manually go in and update the terraform state and the AWS resources that it manages. 😟

To save on costs, we are removing obsolete code.  We no longer need solr 6 and we are not using EKS anymore.  The solrcloud app still needs a k8s cluster to be able to start up, so we need to provision the bare minimum; but overall, this should save on costs and give us less to maintain
@nickumia-reisys nickumia-reisys temporarily deployed to production August 22, 2022 13:59 Inactive
@nickumia-reisys nickumia-reisys temporarily deployed to staging August 22, 2022 13:59 Inactive
@github-actions
Copy link

github-actions bot commented Aug 22, 2022

Terraform plan for production

Plan: 1 to add, 2 to change, 9 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
  - destroy

Terraform will perform the following actions:

  # cloudfoundry_service_instance.solrcloud_broker_k8s_cluster will be created
  + resource "cloudfoundry_service_instance" "solrcloud_broker_k8s_cluster" {
      + id                             = (known after apply)
      + json_params                    = jsonencode(
            {
              + mng_desired_capacity = 1
              + mng_instance_types   = [
                  + "t2.small",
                ]
              + mng_max_capacity     = 1
              + mng_min_capacity     = 1
            }
        )
      + name                           = "ssb-solrcloud-k8s"
      + recursive_delete               = false
      + replace_on_params_change       = false
      + replace_on_service_plan_change = false
      + service_plan                   = "07996909-c99a-4f7b-b154-4330e363693b"
      + space                          = "9a1db116-0180-42be-8ffa-7944dcf6bf50"
      + tags                           = [
          + "k8s",
        ]

      + timeouts {
          + create = "60m"
          + delete = "40m"
          + update = "90m"
        }
    }

  # module.broker_eks.cloudfoundry_app.ssb will be updated in-place
  ~ resource "cloudfoundry_app" "ssb" {
        id                         = "20a6babb-fd11-465c-88b1-019c6d72e04e"
      ~ instances                  = 2 -> 1
        name                       = "ssb-eks"
        # (19 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # module.broker_solr.cloudfoundry_app.ssb will be destroyed
  # (because cloudfoundry_app.ssb is not in configuration)
  - resource "cloudfoundry_app" "ssb" {
      - buildpack                  = "binary_buildpack" -> null
      - command                    = "source .profile && ./cloud-service-broker serve" -> null
      - disk_quota                 = 2048 -> null
      - docker_image               = "" -> null
      - enable_ssh                 = false -> null
      - environment                = (sensitive value)
      - health_check_http_endpoint = "" -> null
      - health_check_timeout       = 0 -> null
      - health_check_type          = "port" -> null
      - id                         = "e12a5612-c842-4880-a4c2-c53acf809ed5" -> null
      - id_bg                      = "e12a5612-c842-4880-a4c2-c53acf809ed5" -> null
      - instances                  = 1 -> null
      - memory                     = 256 -> null
      - name                       = "ssb-solr" -> null
      - path                       = "./app-ssb-solr.zip" -> null
      - ports                      = [
          - 8080,
        ] -> null
      - source_code_hash           = "XiYr3BX9sxZDqxn59BFZ5FCtHcIdmnlBOjcJlB6gz+I=" -> null
      - space                      = "9a1db116-0180-42be-8ffa-7944dcf6bf50" -> null
      - stack                      = "ad34309f-ab24-4c3d-9ad1-eb0da8378bd4" -> null
      - stopped                    = false -> null
      - strategy                   = "blue-green" -> null
      - timeout                    = 60 -> null

      - routes {
          - port  = 8080 -> null
          - route = "55daf0e6-9dd4-4273-995c-6c1363ead364" -> null
        }

      - service_binding {
          - params           = (sensitive value)
          - service_instance = "4c682b52-1f15-438d-9e4d-621a1d9c3e22" -> null
        }
    }

  # module.broker_solr.cloudfoundry_route.ssb_uri will be destroyed
  # (because cloudfoundry_route.ssb_uri is not in configuration)
  - resource "cloudfoundry_route" "ssb_uri" {
      - domain   = "50ba3f69-cd54-4963-9172-14f3334b479e" -> null
      - endpoint = "ssb-solr-gsa-datagov-management.app.cloud.gov" -> null
      - hostname = "ssb-solr-gsa-datagov-management" -> null
      - id       = "55daf0e6-9dd4-4273-995c-6c1363ead364" -> null
      - space    = "9a1db116-0180-42be-8ffa-7944dcf6bf50" -> null
    }

  # module.broker_solr.cloudfoundry_service_broker.space_scoped_broker["gsa-datagov/development"] will be destroyed
  # (because cloudfoundry_service_broker.space_scoped_broker is not in configuration)
  - resource "cloudfoundry_service_broker" "space_scoped_broker" {
      - catalog_change                   = false -> null
      - catalog_hash                     = "YVywS6YTvqZDBaaWSwyz5aShd-I=" -> null
      - fail_when_catalog_not_accessible = false -> null
      - id                               = "c3ad20b5-87f6-4453-bd9d-af154bfd3093" -> null
      - name                             = "ssb-solr-gsa-datagov-development" -> null
      - password                         = (sensitive value)
      - service_plans                    = {
          - "solr-cloud/base" = "afbb9a3e-9e68-4eac-9116-981eaaf243af"
        } -> null
      - services                         = {
          - "solr-cloud" = "c9aeae38-db35-4bcb-a1ec-3ba5574cd673"
        } -> null
      - space                            = "eab3d327-7d9f-423b-9838-753c26fdb5a0" -> null
      - url                              = "https://ssb-solr-gsa-datagov-management.app.cloud.gov" -> null
      - username                         = "77ad2d16-302d-19f7-b7f9-a2a2cc5560d4" -> null
    }

  # module.broker_solr.cloudfoundry_service_broker.space_scoped_broker["gsa-datagov/management"] will be destroyed
  # (because cloudfoundry_service_broker.space_scoped_broker is not in configuration)
  - resource "cloudfoundry_service_broker" "space_scoped_broker" {
      - catalog_change                   = false -> null
      - catalog_hash                     = "YVywS6YTvqZDBaaWSwyz5aShd-I=" -> null
      - fail_when_catalog_not_accessible = false -> null
      - id                               = "06ab8b17-9590-43e6-89f2-fe54bcaef416" -> null
      - name                             = "ssb-solr-gsa-datagov-management" -> null
      - password                         = (sensitive value)
      - service_plans                    = {
          - "solr-cloud/base" = "820bbbc9-ff8c-41f9-850e-456574356f54"
        } -> null
      - services                         = {
          - "solr-cloud" = "635bdfd1-894c-4117-bcdd-d5962e28688e"
        } -> null
      - space                            = "9a1db116-0180-42be-8ffa-7944dcf6bf50" -> null
      - url                              = "https://ssb-solr-gsa-datagov-management.app.cloud.gov" -> null
      - username                         = "77ad2d16-302d-19f7-b7f9-a2a2cc5560d4" -> null
    }

  # module.broker_solr.cloudfoundry_service_broker.space_scoped_broker["gsa-datagov/prod"] will be destroyed
  # (because cloudfoundry_service_broker.space_scoped_broker is not in configuration)
  - resource "cloudfoundry_service_broker" "space_scoped_broker" {
      - catalog_change                   = false -> null
      - catalog_hash                     = "YVywS6YTvqZDBaaWSwyz5aShd-I=" -> null
      - fail_when_catalog_not_accessible = false -> null
      - id                               = "a4a9adf3-2d40-48e5-9b37-bf462fddd84e" -> null
      - name                             = "ssb-solr-gsa-datagov-prod" -> null
      - password                         = (sensitive value)
      - service_plans                    = {
          - "solr-cloud/base" = "8ab2d807-1249-4b54-9b95-c34f9f7dac01"
        } -> null
      - services                         = {
          - "solr-cloud" = "65fa8a1c-98e4-4fce-8de4-5316247b2e1e"
        } -> null
      - space                            = "acbabadb-2604-4736-81f7-01288b0371c6" -> null
      - url                              = "https://ssb-solr-gsa-datagov-management.app.cloud.gov" -> null
      - username                         = "77ad2d16-302d-19f7-b7f9-a2a2cc5560d4" -> null
    }

  # module.broker_solr.cloudfoundry_service_broker.space_scoped_broker["gsa-datagov/staging"] will be destroyed
  # (because cloudfoundry_service_broker.space_scoped_broker is not in configuration)
  - resource "cloudfoundry_service_broker" "space_scoped_broker" {
      - catalog_change                   = false -> null
      - catalog_hash                     = "YVywS6YTvqZDBaaWSwyz5aShd-I=" -> null
      - fail_when_catalog_not_accessible = false -> null
      - id                               = "8bdf2e28-6a69-43fe-90e8-6ee4fdd55058" -> null
      - name                             = "ssb-solr-gsa-datagov-staging" -> null
      - password                         = (sensitive value)
      - service_plans                    = {
          - "solr-cloud/base" = "49618e87-fafc-481f-8da8-608682535bcf"
        } -> null
      - services                         = {
          - "solr-cloud" = "9707c1f0-8e45-4af8-9845-c85be04fc5cb"
        } -> null
      - space                            = "3e692cdd-6d26-41ea-9698-04903dc3f742" -> null
      - url                              = "https://ssb-solr-gsa-datagov-management.app.cloud.gov" -> null
      - username                         = "77ad2d16-302d-19f7-b7f9-a2a2cc5560d4" -> null
    }

  # module.broker_solr.cloudfoundry_service_instance.db will be destroyed
  # (because cloudfoundry_service_instance.db is not in configuration)
  - resource "cloudfoundry_service_instance" "db" {
      - id                             = "4c682b52-1f15-438d-9e4d-621a1d9c3e22" -> null
      - name                           = "ssb-solr-db" -> null
      - recursive_delete               = false -> null
      - replace_on_params_change       = false -> null
      - replace_on_service_plan_change = false -> null
      - service_plan                   = "4b9e5bb1-d0d3-4c24-8542-e377cbb85aed" -> null
      - space                          = "9a1db116-0180-42be-8ffa-7944dcf6bf50" -> null
      - tags                           = [
          - "mysql",
        ] -> null

      - timeouts {
          - create = "30m" -> null
          - delete = "30m" -> null
          - update = "30m" -> null
        }
    }

  # module.broker_solr.random_password.client_password will be destroyed
  # (because random_password.client_password is not in configuration)
  - resource "random_password" "client_password" {
      - id          = "none" -> null
      - length      = 16 -> null
      - lower       = true -> null
      - min_lower   = 0 -> null
      - min_numeric = 0 -> null
      - min_special = 0 -> null
      - min_upper   = 0 -> null
      - number      = true -> null
      - result      = (sensitive value)
      - special     = true -> null
      - upper       = true -> null
    }

  # module.broker_solr.random_uuid.client_username will be destroyed
  # (because random_uuid.client_username is not in configuration)
  - resource "random_uuid" "client_username" {
      - id     = "77ad2d16-302d-19f7-b7f9-a2a2cc5560d4" -> null
      - result = "77ad2d16-302d-19f7-b7f9-a2a2cc5560d4" -> null
    }

  # module.broker_solrcloud.cloudfoundry_app.ssb will be updated in-place
  ~ resource "cloudfoundry_app" "ssb" {
        id                         = "69811529-c323-45f2-8f2e-6767ea6ea3cf"
      ~ id_bg                      = "************************************" -> (known after apply)
        name                       = "ssb-solrcloud"
        # (21 unchanged attributes hidden)

      + service_binding {
          + service_instance = (known after apply)
        }

        # (2 unchanged blocks hidden)
    }

Plan: 1 to add, 2 to change, 9 to destroy.

📝 Plan generated in plan #240

@github-actions
Copy link

github-actions bot commented Aug 22, 2022

Terraform plan for staging

Plan: 1 to add, 1 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # cloudfoundry_service_instance.solrcloud_broker_k8s_cluster will be created
  + resource "cloudfoundry_service_instance" "solrcloud_broker_k8s_cluster" {
      + id                             = (known after apply)
      + json_params                    = jsonencode(
            {
              + mng_desired_capacity = 1
              + mng_instance_types   = [
                  + "t2.small",
                ]
              + mng_max_capacity     = 1
              + mng_min_capacity     = 1
            }
        )
      + name                           = "ssb-solrcloud-k8s"
      + recursive_delete               = false
      + replace_on_params_change       = false
      + replace_on_service_plan_change = false
      + service_plan                   = "75ff550a-1f72-4bc2-9bd9-644a174a3384"
      + space                          = "5edc803e-3376-4788-b72c-a152f11925b0"
      + tags                           = [
          + "k8s",
        ]

      + timeouts {
          + create = "60m"
          + delete = "40m"
          + update = "90m"
        }
    }

  # module.broker_solrcloud.cloudfoundry_app.ssb will be updated in-place
  ~ resource "cloudfoundry_app" "ssb" {
        id                         = "ddef884b-c4dd-4a89-9ee5-aa0f5ea3cabf"
      ~ id_bg                      = "************************************" -> (known after apply)
        name                       = "ssb-solrcloud"
        # (19 unchanged attributes hidden)

      + service_binding {
          + service_instance = (known after apply)
        }

        # (2 unchanged blocks hidden)
    }

Plan: 1 to add, 1 to change, 0 to destroy.

❌ Error applying plan in apply #104

@nickumia-reisys nickumia-reisys temporarily deployed to staging August 22, 2022 14:09 Inactive
@nickumia-reisys nickumia-reisys temporarily deployed to production August 22, 2022 14:09 Inactive
@FuhuXia FuhuXia merged commit 3aaf6d8 into main Aug 22, 2022
@FuhuXia FuhuXia deleted the remove-solr-6 branch August 22, 2022 14:17
@nickumia-reisys nickumia-reisys temporarily deployed to production August 22, 2022 14:22 Inactive
@nickumia-reisys nickumia-reisys temporarily deployed to staging August 22, 2022 14:22 Inactive
@nickumia-reisys nickumia-reisys temporarily deployed to staging August 22, 2022 14:31 Inactive
@nickumia-reisys nickumia-reisys temporarily deployed to production August 22, 2022 14:31 Inactive
@nickumia-reisys nickumia-reisys temporarily deployed to staging August 22, 2022 14:41 Inactive
@nickumia-reisys nickumia-reisys temporarily deployed to production August 22, 2022 14:41 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants