From c01f92c08141653644501167902bd586139ec9aa Mon Sep 17 00:00:00 2001 From: Sergey Melnikov Date: Thu, 22 Dec 2022 20:09:45 +0100 Subject: [PATCH] Fully remove old staging deploy (#3191) --- .github/ansible/staging.hosts.yaml | 35 ------------ .../staging.neon-storage-broker.yaml | 56 ------------------ .github/helm-values/staging.proxy-scram.yaml | 57 ------------------- .github/helm-values/staging.proxy.yaml | 57 ------------------- .github/workflows/build_and_test.yml | 16 +++--- 5 files changed, 7 insertions(+), 214 deletions(-) delete mode 100644 .github/ansible/staging.hosts.yaml delete mode 100644 .github/helm-values/staging.neon-storage-broker.yaml delete mode 100644 .github/helm-values/staging.proxy-scram.yaml delete mode 100644 .github/helm-values/staging.proxy.yaml diff --git a/.github/ansible/staging.hosts.yaml b/.github/ansible/staging.hosts.yaml deleted file mode 100644 index 79acfd1d2a..0000000000 --- a/.github/ansible/staging.hosts.yaml +++ /dev/null @@ -1,35 +0,0 @@ -storage: - vars: - bucket_name: zenith-staging-storage-us-east-1 - bucket_region: us-east-1 - console_mgmt_base_url: http://console-staging.local - broker_endpoint: http://storage-broker.staging.local:50051 - pageserver_config_stub: - pg_distrib_dir: /usr/local - remote_storage: - bucket_name: "{{ bucket_name }}" - bucket_region: "{{ bucket_region }}" - prefix_in_bucket: "{{ inventory_hostname }}" - safekeeper_s3_prefix: us-stage/wal - hostname_suffix: ".local" - remote_user: admin - sentry_environment: development - - children: - pageservers: - hosts: - zenith-us-stage-ps-2: - console_region_id: aws-us-east-1 - zenith-us-stage-ps-3: - console_region_id: aws-us-east-1 - zenith-us-stage-ps-4: - console_region_id: aws-us-east-1 - - safekeepers: - hosts: - zenith-us-stage-sk-4: - console_region_id: aws-us-east-1 - zenith-us-stage-sk-5: - console_region_id: aws-us-east-1 - zenith-us-stage-sk-6: - console_region_id: aws-us-east-1 diff --git a/.github/helm-values/staging.neon-storage-broker.yaml b/.github/helm-values/staging.neon-storage-broker.yaml deleted file mode 100644 index 6b21c286a1..0000000000 --- a/.github/helm-values/staging.neon-storage-broker.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# Helm chart values for neon-storage-broker -podLabels: - neon_env: staging - neon_service: storage-broker - -# Use L4 LB -service: - # service.annotations -- Annotations to add to the service - annotations: - service.beta.kubernetes.io/aws-load-balancer-type: external # use newer AWS Load Balancer Controller - service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip - service.beta.kubernetes.io/aws-load-balancer-scheme: internal # deploy LB to private subnet - # assign service to this name at external-dns - external-dns.alpha.kubernetes.io/hostname: storage-broker.staging.local - # service.type -- Service type - type: LoadBalancer - # service.port -- broker listen port - port: 50051 - -ingress: - enabled: false - -metrics: - enabled: true - serviceMonitor: - enabled: true - selector: - release: kube-prometheus-stack - -extraManifests: - - apiVersion: operator.victoriametrics.com/v1beta1 - kind: VMServiceScrape - metadata: - name: "{{ include \"neon-storage-broker.fullname\" . }}" - labels: - helm.sh/chart: neon-storage-broker-{{ .Chart.Version }} - app.kubernetes.io/name: neon-storage-broker - app.kubernetes.io/instance: neon-storage-broker - app.kubernetes.io/version: "{{ .Chart.AppVersion }}" - app.kubernetes.io/managed-by: Helm - namespace: "{{ .Release.Namespace }}" - spec: - selector: - matchLabels: - app.kubernetes.io/name: "neon-storage-broker" - endpoints: - - port: broker - path: /metrics - interval: 10s - scrapeTimeout: 10s - namespaceSelector: - matchNames: - - "{{ .Release.Namespace }}" - -settings: - sentryEnvironment: "development" diff --git a/.github/helm-values/staging.proxy-scram.yaml b/.github/helm-values/staging.proxy-scram.yaml deleted file mode 100644 index 66f9921c9a..0000000000 --- a/.github/helm-values/staging.proxy-scram.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Helm chart values for zenith-proxy. -# This is a YAML-formatted file. - -image: - repository: neondatabase/neon - -settings: - authBackend: "console" - authEndpoint: "http://console-staging.local/management/api/v2" - domain: "*.cloud.stage.neon.tech" - sentryEnvironment: "development" - -# -- Additional labels for zenith-proxy pods -podLabels: - zenith_service: proxy-scram - zenith_env: staging - zenith_region: us-east-1 - zenith_region_slug: virginia - -exposedService: - annotations: - service.beta.kubernetes.io/aws-load-balancer-type: external - service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip - service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing - external-dns.alpha.kubernetes.io/hostname: cloud.stage.neon.tech - -metrics: - enabled: true - serviceMonitor: - enabled: true - selector: - release: kube-prometheus-stack - -extraManifests: - - apiVersion: operator.victoriametrics.com/v1beta1 - kind: VMServiceScrape - metadata: - name: "{{ include \"neon-proxy.fullname\" . }}" - labels: - helm.sh/chart: neon-proxy-{{ .Chart.Version }} - app.kubernetes.io/name: neon-proxy - app.kubernetes.io/instance: "{{ include \"neon-proxy.fullname\" . }}" - app.kubernetes.io/version: "{{ .Chart.AppVersion }}" - app.kubernetes.io/managed-by: Helm - namespace: "{{ .Release.Namespace }}" - spec: - selector: - matchLabels: - app.kubernetes.io/name: "neon-proxy" - endpoints: - - port: http - path: /metrics - interval: 10s - scrapeTimeout: 10s - namespaceSelector: - matchNames: - - "{{ .Release.Namespace }}" diff --git a/.github/helm-values/staging.proxy.yaml b/.github/helm-values/staging.proxy.yaml deleted file mode 100644 index a22082e625..0000000000 --- a/.github/helm-values/staging.proxy.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Helm chart values for zenith-proxy. -# This is a YAML-formatted file. - -image: - repository: neondatabase/neon - -settings: - authBackend: "link" - authEndpoint: "https://console.stage.neon.tech/authenticate_proxy_request/" - uri: "https://console.stage.neon.tech/psql_session/" - sentryEnvironment: "development" - -# -- Additional labels for zenith-proxy pods -podLabels: - zenith_service: proxy - zenith_env: staging - zenith_region: us-east-1 - zenith_region_slug: virginia - -exposedService: - annotations: - service.beta.kubernetes.io/aws-load-balancer-type: external - service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip - service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing - external-dns.alpha.kubernetes.io/hostname: connect.stage.neon.tech - -metrics: - enabled: true - serviceMonitor: - enabled: true - selector: - release: kube-prometheus-stack - -extraManifests: - - apiVersion: operator.victoriametrics.com/v1beta1 - kind: VMServiceScrape - metadata: - name: "{{ include \"neon-proxy.fullname\" . }}" - labels: - helm.sh/chart: neon-proxy-{{ .Chart.Version }} - app.kubernetes.io/name: neon-proxy - app.kubernetes.io/instance: "{{ include \"neon-proxy.fullname\" . }}" - app.kubernetes.io/version: "{{ .Chart.AppVersion }}" - app.kubernetes.io/managed-by: Helm - namespace: "{{ .Release.Namespace }}" - spec: - selector: - matchLabels: - app.kubernetes.io/name: "neon-proxy" - endpoints: - - port: http - path: /metrics - interval: 10s - scrapeTimeout: 10s - namespaceSelector: - matchNames: - - "{{ .Release.Namespace }}" diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 48ed800450..17c698482c 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -759,20 +759,18 @@ jobs: calculate-deploy-targets: runs-on: [ self-hosted, dev, x64 ] if: | - (github.ref_name == 'main' || github.ref_name == 'release') && + github.ref_name == 'release' && github.event_name != 'workflow_dispatch' outputs: matrix-include: ${{ steps.set-matrix.outputs.include }} steps: - id: set-matrix run: | - if [[ "$GITHUB_REF_NAME" == "main" ]]; then - echo "include=[]" >> $GITHUB_OUTPUT - elif [[ "$GITHUB_REF_NAME" == "release" ]]; then + if [[ "$GITHUB_REF_NAME" == "release" ]]; then PRODUCTION='{"env_name": "production", "proxy_job": "neon-proxy", "proxy_config": "production.proxy", "storage_broker_ns": "neon-storage-broker", "storage_broker_config": "production.neon-storage-broker", "kubeconfig_secret": "PRODUCTION_KUBECONFIG_DATA", "console_api_key_secret": "NEON_PRODUCTION_API_KEY"}' echo "include=[$PRODUCTION]" >> $GITHUB_OUTPUT else - echo "GITHUB_REF_NAME (value '$GITHUB_REF_NAME') is not set to either 'main' or 'release'" + echo "GITHUB_REF_NAME (value '$GITHUB_REF_NAME') is not set to 'release'" exit 1 fi @@ -783,7 +781,7 @@ jobs: # If it notices a fresh storage it may bump the compute version. And if compute image failed to build it may break things badly needs: [ push-docker-hub, calculate-deploy-targets, tag, regress-tests ] if: | - (github.ref_name == 'main' || github.ref_name == 'release') && + github.ref_name == 'release' && github.event_name != 'workflow_dispatch' defaults: run: @@ -827,7 +825,7 @@ jobs: container: 369495373322.dkr.ecr.eu-central-1.amazonaws.com/ansible:pinned # We need both storage **and** compute images for deploy, because control plane picks the compute version based on the storage version. # If it notices a fresh storage it may bump the compute version. And if compute image failed to build it may break things badly - needs: [ push-docker-hub, calculate-deploy-targets, tag, regress-tests ] + needs: [ push-docker-hub, tag, regress-tests ] if: | (github.ref_name == 'main') && github.event_name != 'workflow_dispatch' @@ -939,7 +937,7 @@ jobs: # Compute image isn't strictly required for proxy deploy, but let's still wait for it to run all deploy jobs consistently. needs: [ push-docker-hub, calculate-deploy-targets, tag, regress-tests ] if: | - (github.ref_name == 'main' || github.ref_name == 'release') && + github.ref_name == 'release' && github.event_name != 'workflow_dispatch' defaults: run: @@ -982,7 +980,7 @@ jobs: # Compute image isn't strictly required for proxy deploy, but let's still wait for it to run all deploy jobs consistently. needs: [ push-docker-hub, calculate-deploy-targets, tag, regress-tests ] if: | - (github.ref_name == 'main' || github.ref_name == 'release') && + github.ref_name == 'release' && github.event_name != 'workflow_dispatch' defaults: run: