diff --git a/.github/workflows/rsp-filestore-dir.yaml b/.github/workflows/rsp-filestore-dir.yaml deleted file mode 100644 index 7a7f400a..00000000 --- a/.github/workflows/rsp-filestore-dir.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# Sets up directories on NFS for Filestore. Do not run more than once. -name: 'RSP FILESTORE DIR' - -on: - workflow_dispatch: - inputs: - gcpProject: - description: GCP Project ID - required: true - gkeCluster: - description: 'GKE Cluster used to prep NFS dirs' - required: true - filestore: - description: 'Filestore to configure NFS dirs' - required: true - -jobs: - build: - name: 'Setups directories on GCP filestore for use' - runs-on: ubuntu-latest - - # Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest - defaults: - run: - shell: bash - working-directory: ./kubernetes-manifests - - steps: - # Checkout the repository to the GitHub Actions runner - - name: Checkout - uses: actions/checkout@v3 - - # gcp auth - - name: GCP login - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }} - - # gcloud setup - - name: 'Set up Cloud SDK' - uses: 'google-github-actions/setup-gcloud@v2' - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - skip_install: true - - # Set up yq - - name: Set up yq - run: |- - wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O yq - chmod +x yq - env: - YQ_VERSION: 3.4.1 - - # Update Filestore Address Persistent Volume Patch - - name: Update Filestore Address - run: |- - FILESTORE_IP=$(gcloud filestore instances list --filter=name:"${{ github.event.inputs.filestore }}" --format="value(IP_ADDRESS)") - echo $FILESTORE_IP - ./yq w -i overlays/dev/nfs.ip.patch.yaml [].value $FILESTORE_IP - - # Get the GKE credentials so we can deploy to the cluster - - id: 'get-credentials' - uses: 'google-github-actions/get-gke-credentials@v2' - with: - cluster_name: "${{ github.event.inputs.gkeCluster }}" - location: "us-central1" - - # Validate the kubernetes manifest from kustomize - - name: Validate Kubernetes Manifests - run: |- - kustomize build overlays/dev - - # Deploy the kubernetes manifest from kustomize - - name: Deploy Kubernetes Manifests - run: |- - kustomize build overlays/dev | kubectl apply -f - - - - name: Report status - if: failure() && github.ref == 'refs/heads/main' - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: failure - notification_title: 'idf_deploy: Periodic plan for {workflow} failed' - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK }} diff --git a/environment/deployments/roundtable/readme.md b/environment/deployments/roundtable/readme.md index fef6c96b..48da3fe0 100644 --- a/environment/deployments/roundtable/readme.md +++ b/environment/deployments/roundtable/readme.md @@ -24,7 +24,6 @@ No provider. | default_region | The default region to place subnetwork | `string` | `"us-west1"` | no | | default_service_account | Project default service account setting: can be one of delete, deprivilege, disable, or keep. | `string` | `"keep"` | no | | environment | The environment the single project belongs to | `string` | n/a | yes | -| fileshare_capacity | File share capacity in GiB. This must be at least 1024 GiB for the standard tier, or 2560 GiB for the premium tier. | `number` | `2660` | no | | fileshare_name | The name of the fileshare (16 characters or less) | `string` | `"share1"` | no | | folder_id | The folder id where project will be created | `string` | n/a | yes | | modes | IP versions for which the instance has IP addresses assigned. Each value may be one of ADDRESS_MODE_UNSPECIFIED, MODE_IPV4, and MODE_IPV6. | `list(string)` |
[
"MODE_IPV4"
]
| no | diff --git a/environment/deployments/science-platform/variables.tf b/environment/deployments/science-platform/variables.tf index eff8c89a..087ace2c 100644 --- a/environment/deployments/science-platform/variables.tf +++ b/environment/deployments/science-platform/variables.tf @@ -164,12 +164,6 @@ variable "fileshare_name" { default = "share1" } -variable "fileshare_capacity" { - description = "File share capacity in GiB. This must be at least 1024 GiB for the standard tier, or 2560 GiB for the premium tier." - type = number - default = 2600 -} - variable "tier" { description = "The service tier of the instance. Possible values are TIER_UNSPECIFIED, STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, and HIGH_SCALE_SSD." type = string diff --git a/kubernetes-manifests/base/filestore/kustomization.yaml b/kubernetes-manifests/base/filestore/kustomization.yaml deleted file mode 100644 index 41b7244f..00000000 --- a/kubernetes-manifests/base/filestore/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -resources: -- nfs.class.yaml -- nfs.pv.yaml -- nfs.pvc.claim.yaml -- nfs.dir.deploy.yaml \ No newline at end of file diff --git a/kubernetes-manifests/base/filestore/nfs.class.yaml b/kubernetes-manifests/base/filestore/nfs.class.yaml deleted file mode 100644 index 83091b5d..00000000 --- a/kubernetes-manifests/base/filestore/nfs.class.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: gcp-filestore-pd -provisioner: nfs-filestore -reclaimPolicy: Retain -allowVolumeExpansion: false -volumeBindingMode: WaitForFirstConsumer \ No newline at end of file diff --git a/kubernetes-manifests/base/filestore/nfs.dir.deploy.yaml b/kubernetes-manifests/base/filestore/nfs.dir.deploy.yaml deleted file mode 100644 index 834f45e4..00000000 --- a/kubernetes-manifests/base/filestore/nfs.dir.deploy.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: fs-provisioner -spec: - template: - spec: - containers: - - image: lsstsqre/fs-provisioner:latest - imagePullPolicy: Always - name: fs-provisioner - volumeMounts: - - mountPath: /storage - name: storage - restartPolicy: Never - volumes: - - name: storage - persistentVolumeClaim: - claimName: gcp-filestore-setup-claim - readOnly: false \ No newline at end of file diff --git a/kubernetes-manifests/base/filestore/nfs.pv.yaml b/kubernetes-manifests/base/filestore/nfs.pv.yaml deleted file mode 100644 index 7e6f23d2..00000000 --- a/kubernetes-manifests/base/filestore/nfs.pv.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: gcp-filestore -spec: - capacity: - storage: 2T - accessModes: - - ReadWriteMany - storageClassName: gcp-filestore-pd - nfs: - path: /share1 - server: 10.203.50.242 \ No newline at end of file diff --git a/kubernetes-manifests/base/filestore/nfs.pvc.claim.yaml b/kubernetes-manifests/base/filestore/nfs.pvc.claim.yaml deleted file mode 100644 index 970e2c74..00000000 --- a/kubernetes-manifests/base/filestore/nfs.pvc.claim.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: gcp-filestore-setup-claim -spec: - accessModes: - - ReadWriteMany - volumeName: gcp-filestore - storageClassName: gcp-filestore-pd - resources: - requests: - storage: 100Mi \ No newline at end of file diff --git a/kubernetes-manifests/overlays/dev/kustomization.yaml b/kubernetes-manifests/overlays/dev/kustomization.yaml deleted file mode 100644 index 8a66896c..00000000 --- a/kubernetes-manifests/overlays/dev/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - ../../base/filestore - -patches: - - path: nfs.ip.patch.yaml - target: - version: v1 - kind: PersistentVolume - name: gcp-filestore \ No newline at end of file diff --git a/kubernetes-manifests/overlays/dev/nfs.ip.patch.yaml b/kubernetes-manifests/overlays/dev/nfs.ip.patch.yaml deleted file mode 100644 index de324bcd..00000000 --- a/kubernetes-manifests/overlays/dev/nfs.ip.patch.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: /spec/nfs/server - value: 10.32.92.1 diff --git a/runbook/filestore.md b/runbook/filestore.md deleted file mode 100644 index adcc835e..00000000 --- a/runbook/filestore.md +++ /dev/null @@ -1,30 +0,0 @@ -# Filestore - -Runbook sections on how to work with GCP Filestore. - -## Editing Filestore Instance - -Once deployed a GCP Filestore instance [cannot change tier](https://cloud.google.com/filestore/docs/service-tiers#selecting_a_tier). A new Filestore instance with the new tier setting must be deployed and data migrated. - -Filestore size can be changed via terraform by the folling the below instructions. - -* Navigate to the [terraform deployments directory](../environment/deployments) -* Open either qserv or science platform. Note that during the time of deploment science platform were the only projects requiring filestore. Then go into env directory. -* Modify the tfvars file. The naming syntax is `.tfvars`. For the development project open dev.tfvars. For the integration project open int.tfvars. -* Perform a pull request to a new branch to edit the tfvars file -* Add the fileshare_capacity value. The example below updates to 3.6 TB. This will override the default [2.6 TB value for science platform](/environment/deployments/science-platform/main.tf). Snippet below. - -``` -fileshare_capacity = 3600 -``` - -### Filestore Directory Prep - -When a new filestore is provisioned for science platform the NFS directores needs to be created before use from pods in GKE. The [RSP FILESTORE DIR GitHub Action](/.github/workflows/rsp-filestore-dir.yaml) automates the provisioning of directories by running a Kubernetes job with shell script that runs mkdir -p for each directory. The job references a NFS storage class, persistent volume, and persistent volume claim for connecting to Filestore. This is setup using kustomize templates. A [base directory](/kubernetes-manifests/base/filestore) contains the nfs storage class, persistent volume, persistent volume claim, and job manifests. An [overlays directory](/kubernetes-manifests/overlays/dev) directory overlays the Filestore IP using kustomize patches. This allows the base directory to be used in in the future for other use cases. - -The RSP FILESTORE DIR GitHub Action is set to run via manual invocation. It could be automated in the future. The requirements during the time of deployment were to run exactly once during GKE setup and not ongoing. To run follow the instructions below. - -* Navigate to the [IDF Deploy GitHub Actions](https://github.com/lsst/idf_deploy/actions) -* Select RSP FILSTORE DIR on left. Select Run Worklow -* Populate the GCP Project ID, GKE Cluster, and Filestore. The filestore name can be obtained by running `gcloud filestore instances list` -* Select Run workflow