From 6e94747ae663786f78dac481664c0c24d06f1e3a Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Thu, 9 Jul 2020 14:58:25 -0500 Subject: [PATCH] Add administrative resources like StorageClasses and PersistentVolumes --- README.md | 15 ++++++++++++++- admin/README.md | 34 +++++++++++++++++++++++++++++++++ admin/local-large-cache.yaml | 30 +++++++++++++++++++++++++++++ admin/local-medium-archive.yaml | 30 +++++++++++++++++++++++++++++ 4 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 admin/README.md create mode 100644 admin/local-large-cache.yaml create mode 100644 admin/local-medium-archive.yaml diff --git a/README.md b/README.md index 38c915a..0db9d6f 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,17 @@ GitLab group are updated, deployment is executed and operational processing is upgraded. This repository also contains "helper" CI configs for sub-component -repositories to use for building and testing their pieces. \ No newline at end of file +repositories to use for building and testing their pieces. + +## Repository Structure + +* admin: Kubernetes resources that should be manually installed to define + cluster resources available to the main geosphere application(s). These + are **not** run as part of continuous integration. +* cichart: Docker image configuration used by certain CI jobs to build or + download helm charts. +* production: Extra helm chart "values" YAML files to configure GeoSphere for + the production environment. +* sidecars: Docker image configurations for various "sidecar" containers that + don't fit in one subcomponent's project. +* .gitlab-ci.yml: Continuous Integration (CI) configuration \ No newline at end of file diff --git a/admin/README.md b/admin/README.md new file mode 100644 index 0000000..3472d25 --- /dev/null +++ b/admin/README.md @@ -0,0 +1,34 @@ +# Cluster Resource Administration + +This directory includes Kubernetes resources that should be installed on +Kubernetes clusters that will have GeoSphere deployed on them. While there +may be local cluster builtin equivalents to the resources defined here, these +builtin names are not used in the current configuration in this deploy +repository. The builtin resources could be used instead of installing the +resources defined in this directory by updating the `values-X.yaml` files in +the various directories and in the `.gitlab-ci.yml` configuration file. + +## Storage - Local Large Cache + +This storage class and persistent volume can be used for cases where a +GeoSphere component needs relatively high performance and +large capacity storage. Both the StorageClass and the PersistentVolume +are defined in `local-large-cache.yaml`. This storage is primarily used +for GeoSphere's tile cache (used by MapCache). It defines large storage +that is physically located/connected to the node where the pod is being +run or at least performs like it is. The term "large" here refers to +multiple terabytes (3-10TB). While this isn't large in generic storage +terms, it is considered large for a "cache" which is not guaranteed to +persist. + +To apply: + +```bash +kubectl apply -f local-large-cache.yaml +``` + +## Storage - Local Medium Archive + +Similar to Local Large Cache above, but larger available space. Note this +should only be used for testing as data will be deleted when the claim +is removed. \ No newline at end of file diff --git a/admin/local-large-cache.yaml b/admin/local-large-cache.yaml new file mode 100644 index 0000000..27869c8 --- /dev/null +++ b/admin/local-large-cache.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: local-large-cache +spec: + capacity: + storage: 10Ti + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Delete + storageClassName: local-large-cache + local: + path: /data + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - kubekorner.ssec.wisc.edu + - presto.ssec.wisc.edu +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-large-cache +provisioner: kubernetes.io/no-provisioner +volumeBindingMode: WaitForFirstConsumer \ No newline at end of file diff --git a/admin/local-medium-archive.yaml b/admin/local-medium-archive.yaml new file mode 100644 index 0000000..f3d2113 --- /dev/null +++ b/admin/local-medium-archive.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: local-medium-archive +spec: + capacity: + storage: 15Ti + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Delete + storageClassName: local-medium-archive + local: + path: /data + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - kubekorner.ssec.wisc.edu + - presto.ssec.wisc.edu +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-medium-archive +provisioner: kubernetes.io/no-provisioner +volumeBindingMode: WaitForFirstConsumer \ No newline at end of file -- GitLab