diff --git a/.env.defaults b/.env.defaults index 4e5a213b8c..300b8e6dc3 100644 --- a/.env.defaults +++ b/.env.defaults @@ -1,11 +1,4 @@ # These credential information is no secret, it's just for easy # development. Don't use these values for production deployment! JWTSECRET=super-secret-string -JWTAUDIENCE=api.dev -AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX -AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxx -AWS_BUCKET=aws-bucket -HARBOR_REGISTRY_STORAGE_AMAZON_BUCKET=bucket-name -HARBOR_REGISTRY_STORAGE_AMAZON_REGION=bucket-region -REGISTRY_STORAGE_S3_ACCESSKEY=AWS-ID -REGISTRY_STORAGE_S3_SECRETKEY=AWS-Secret \ No newline at end of file +JWTAUDIENCE=api.dev \ No newline at end of file diff --git a/.gitignore b/.gitignore index 58a6ae60b6..c0e063a91c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,12 @@ deploytest startVagrant.sh local-dev/oc local-dev/helm -minishift -minikube +local-dev/minishift +local-dev/minikube +local-dev/k3d +local-dev/jq k3d -kubectl +local-dev/kubectl **/v8-* node_modules/ build/* @@ -24,3 +26,7 @@ docs/_build yarn-debug.log* yarn-error.log* site +kubeconfig.* +kindconfig.* +kind +lagoon-charts.* diff --git a/.lagoon.harbor-secrets.yaml b/.lagoon.harbor-secrets.yaml deleted file mode 100644 index 9c3df25bf5..0000000000 --- a/.lagoon.harbor-secrets.yaml +++ /dev/null @@ -1,116 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-secret-environment-template -parameters: - - name: HARBOR_CORE_SECRET - description: The secret used to connect to harbor's core service - generate: expression - from: "[a-zA-Z0-9]{16}" - - name: HARBOR_JOBSERVICE_SECRET - description: The secret used to connect to harbor's jobservice service - generate: expression - from: "[a-zA-Z0-9]{16}" - - name: HARBOR_REGISTRY_SECRET - description: The secret used to connect to harbor's registry service - generate: expression - from: "[a-zA-Z0-9]{16}" - - name: HARBOR_ADMIN_PASSWORD - description: Harbor's admin password - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: CLAIR_DB_PASSWORD - description: The password clair should use to talk to the postgres db - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true -objects: -- kind: Secret - apiVersion: v1 - metadata: - name: harbor-core-secret - stringData: - HARBOR_CORE_SECRET: ${HARBOR_CORE_SECRET} -- kind: Secret - apiVersion: v1 - metadata: - name: harbor-jobservice-secret - stringData: - HARBOR_JOBSERVICE_SECRET: ${HARBOR_JOBSERVICE_SECRET} -- kind: Secret - apiVersion: v1 - metadata: - name: harborregistry-secret - stringData: - HARBOR_REGISTRY_SECRET: ${HARBOR_REGISTRY_SECRET} -- kind: Secret - apiVersion: v1 - metadata: - name: harbor-admin-password - stringData: - HARBOR_ADMIN_PASSWORD: ${HARBOR_ADMIN_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: clair-db-password - stringData: - CLAIR_DB_PASSWORD: ${CLAIR_DB_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: postgresql-password - stringData: - POSTGRESQL_PASSWORD: ${CLAIR_DB_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: notary-db-url - stringData: - NOTARY_DB_URL: postgres://postgres:${CLAIR_DB_PASSWORD}@harbor-database:5432/notaryserver?sslmode=disable -- apiVersion: v1 - kind: ConfigMap - metadata: - name: harborclair - labels: - service: harborclair - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - type: Opaque - data: - config.yaml: | - clair: - database: - type: pgsql - options: - source: "postgres://postgres:${CLAIR_DB_PASSWORD}@harbor-database:5432/postgres?sslmode=disable" - # Number of elements kept in the cache - # Values unlikely to change (e.g. namespaces) are cached in order to save prevent needless roundtrips to the database. - cachesize: 16384 - api: - # API server port - port: 6060 - healthport: 6061 - # Deadline before an API request will respond with a 503 - timeout: 300s - updater: - interval: 1h - redis: "redis://harbor-redis:6379/4" - database: "postgres://postgres:${CLAIR_DB_PASSWORD}@harbor-database:5432/postgres?sslmode=disable" diff --git a/.lagoon.keycloak-secrets.yaml b/.lagoon.keycloak-secrets.yaml deleted file mode 100644 index 9d15e2603f..0000000000 --- a/.lagoon.keycloak-secrets.yaml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-secret-environment-template -parameters: - - name: KEYCLOAK_LAGOON_ADMIN_PASSWORD - description: super admin password of keycloak - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: KEYCLOAK_ADMIN_PASSWORD - description: admin user password of keycloak - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: KEYCLOAK_AUTH_SERVER_CLIENT_SECRET - description: client secret of the auth server client - generate: expression - from: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" - - name: KEYCLOAK_API_CLIENT_SECRET - description: client secret of the api client - generate: expression - from: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true -objects: -- kind: Secret - apiVersion: v1 - metadata: - name: keycloak-lagoon-admin-password - stringData: - KEYCLOAK_LAGOON_ADMIN_PASSWORD: ${KEYCLOAK_LAGOON_ADMIN_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: keycloak-admin-password - stringData: - KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: keycloak-auth-server-client-secret - stringData: - KEYCLOAK_AUTH_SERVER_CLIENT_SECRET: ${KEYCLOAK_AUTH_SERVER_CLIENT_SECRET} -- kind: Secret - apiVersion: v1 - metadata: - name: keycloak-api-client-secret - stringData: - KEYCLOAK_API_CLIENT_SECRET: ${KEYCLOAK_API_CLIENT_SECRET} diff --git a/.lagoon.logs-db-secrets.yaml b/.lagoon.logs-db-secrets.yaml deleted file mode 100644 index ce9c3a2a30..0000000000 --- a/.lagoon.logs-db-secrets.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-secret-environment-template -parameters: - - name: LOGSDB_ADMIN_PASSWORD - description: admin password of logs-db - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: LOGSDB_KIBANASERVER_PASSWORD - description: kibana password of logs-db - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true -objects: -- kind: Secret - apiVersion: v1 - metadata: - name: logs-db-admin-password - stringData: - LOGSDB_ADMIN_PASSWORD: ${LOGSDB_ADMIN_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: logs-db-kibanaserver-password - stringData: - LOGSDB_KIBANASERVER_PASSWORD: ${LOGSDB_KIBANASERVER_PASSWORD} \ No newline at end of file diff --git a/.lagoon.secrets.yaml b/.lagoon.secrets.yaml deleted file mode 100644 index 6a411006cb..0000000000 --- a/.lagoon.secrets.yaml +++ /dev/null @@ -1,111 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-secret-environment-template -parameters: - - name: JWTSECRET - description: JSON Web Token generation secret - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: RABBITMQ_PASSWORD - description: Password to connect to rabbitmq to - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: LOGSTASH_USERNAME - description: Username to for incoming logstash http connections - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: LOGSTASH_PASSWORD - description: Password to for incoming logstash http connections - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: OPENDISTRO_SECURITY_COOKIE_PASSWORD - description: Password to for opendistro-security cookies - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: API_DB_PASSWORD - description: Password used for connecting to the api-db - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: KEYCLOAK_DB_PASSWORD - description: Password used for connecting to the keycloak-db - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: API_REDIS_PASSWORD - description: Password used for connecting to the api-redis - generate: expression - from: "[a-zA-Z0-9]{32}" - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true -objects: -- kind: Secret - apiVersion: v1 - metadata: - name: jwtsecret - stringData: - JWTSECRET: ${JWTSECRET} -- kind: Secret - apiVersion: v1 - metadata: - name: rabbitmq-password - stringData: - RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: rabbitmq-username - stringData: - RABBITMQ_USERNAME: lagoon -- kind: Secret - apiVersion: v1 - metadata: - name: api-db-password - stringData: - API_DB_PASSWORD: ${API_DB_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: keycloak-db-password - stringData: - KEYCLOAK_DB_PASSWORD: ${KEYCLOAK_DB_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: logstash-username - stringData: - LOGSTASH_USERNAME: ${LOGSTASH_USERNAME} -- kind: Secret - apiVersion: v1 - metadata: - name: logstash-password - stringData: - LOGSTASH_PASSWORD: ${LOGSTASH_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: opendistro-security-cookie-password - stringData: - OPENDISTRO_SECURITY_COOKIE_PASSWORD: ${OPENDISTRO_SECURITY_COOKIE_PASSWORD} -- kind: Secret - apiVersion: v1 - metadata: - name: api-redis-password - stringData: - API_REDIS_PASSWORD: ${API_REDIS_PASSWORD} diff --git a/.lagoon.yml b/.lagoon.yml deleted file mode 100644 index b5fbfed2f0..0000000000 --- a/.lagoon.yml +++ /dev/null @@ -1,59 +0,0 @@ -docker-compose-yaml: docker-compose.yaml - -additional-yaml: - secrets: - path: .lagoon.secrets.yaml - command: create - ignore_error: true - - logs-db-secrets: - path: .lagoon.logs-db-secrets.yaml - command: create - ignore_error: true - - keycloak-secrets: - path: .lagoon.keycloak-secrets.yaml - command: create - ignore_error: true - - harbor-secrets: - path: .lagoon.harbor-secrets.yaml - command: create - ignore_error: true -tasks: -# pre-rollout: -# - run: -# name: 'disable shard allocation on elasticsearch and run synced flush' # see https://www.elastic.co/guide/en/elasticsearch/reference/current/restart-upgrade.html -# command: | -# es-curl PUT _cluster/settings -d '{"persistent":{"cluster.routing.allocation.enable":"none"}}' -# es-curl POST _flush/synced -# service: logs-db - - post-rollout: - - run: - name: update database schema - command: /rerun_initdb.sh - service: api-db - - run: - name: 'enable shard allocation on elasticsearch' - command: es-curl PUT _cluster/settings -d '{"persistent":{"cluster.routing.allocation.enable":null}}' - service: logs-db - -environments: - master: - types: - logs-db: elasticsearch-cluster - logs-collector: custom - templates: - logs-db: services/logs-db/.lagoon.cluster.yml - logs-forwarder: services/logs-forwarder/.lagoon.multi.yml - rollouts: - logs-db: statefulset - logs-forwarder: statefulset - develop: - types: - logs-db: elasticsearch-cluster - templates: - logs-db: services/logs-db/.lagoon.cluster.yml - rollouts: - logs-db: statefulset \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 72e040c407..0e737c2216 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,201 +1,124 @@ -node { - - openshift_version = 'v3.11.0' - minishift_version = '1.34.1' - kubernetes_versions = [ - // ["kubernetes": "v1.15", "k3s": "v0.9.1", "kubectl": "v1.15.4"], - // ["kubernetes": "v1.16", "k3s": "v1.0.1", "kubectl": "v1.16.3"], - ["kubernetes": "v1.17", "k3s": "v1.17.0-k3s.1", "kubectl": "v1.17.0"] - ] - - env.MINISHIFT_HOME = "/data/jenkins/.minishift" - - withEnv(['AWS_BUCKET=jobs.amazeeio.services', 'AWS_DEFAULT_REGION=us-east-2']) { - withCredentials([ - usernamePassword(credentialsId: 'aws-s3-lagoon', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'), - string(credentialsId: 'SKIP_IMAGE_PUBLISH', variable: 'SKIP_IMAGE_PUBLISH') - ]) { - try { - env.CI_BUILD_TAG = env.BUILD_TAG.replaceAll('%2f','').replaceAll("[^A-Za-z0-9]+", "").toLowerCase() - env.SAFEBRANCH_NAME = env.BRANCH_NAME.replaceAll('%2f','-').replaceAll("[^A-Za-z0-9]+", "-").toLowerCase() - env.SYNC_MAKE_OUTPUT = 'target' - // make/tests will synchronise (buffer) output by default to avoid interspersed - // lines from multiple jobs run in parallel. However this means that output for - // each make target is not written until the command completes. - // - // See `man -P 'less +/-O' make` for more information about this option. - // - // Uncomment the line below to disable output synchronisation. - env.SYNC_MAKE_OUTPUT = 'none' - - stage ('env') { - sh "env" - } - - deleteDir() - - stage ('Checkout') { - def checkout = checkout scm - env.GIT_COMMIT = checkout["GIT_COMMIT"] - } - - // in order to have the newest images from upstream (with all the security updates) we clean our local docker cache on tag deployments - // we don't do this all the time to still profit from image layer caching - // but we want this on tag deployments in order to ensure that we publish images always with the newest possible images. - if (env.TAG_NAME) { - stage ('clean docker image cache') { - sh script: "docker image prune -af", label: "Pruning images" - } - } - - stage ('check PR labels') { - if (env.BRANCH_NAME ==~ /PR-\d+/) { - pullRequest.labels.each{ - echo "This PR has labels: $it" - } - } - } - - stage ('build images') { - sh script: "make -O${SYNC_MAKE_OUTPUT} -j6 build", label: "Building images" - } - - try { - parallel ( - '1 tests': { - kubernetes_versions.each { kubernetes_version -> - stage ("kubernetes ${kubernetes_version['kubernetes']} tests") { - try { - sh script: "make k3d/clean K3S_VERSION=${kubernetes_version['k3s']} KUBECTL_VERSION=${kubernetes_version['kubectl']}", label: "Removing any previous k3d versions" - sh script: "make k3d K3S_VERSION=${kubernetes_version['k3s']} KUBECTL_VERSION=${kubernetes_version['kubectl']}", label: "Making k3d" - sh script: "make -O${SYNC_MAKE_OUTPUT} k8s-tests -j2", label: "Making kubernetes tests" - } catch (e) { - echo "Something went wrong, trying to cleanup" - cleanup() - throw e - } - } - } - stage ('minishift tests') { - try { - if (env.CHANGE_ID && pullRequest.labels.contains("skip-openshift-tests")) { - sh script: 'echo "PR identified as not needing Openshift testing."', label: "Skipping Openshift testing stage" - } else { - sh 'make minishift/cleanall || echo' - sh script: "make minishift MINISHIFT_CPUS=\$(nproc --ignore 3) MINISHIFT_MEMORY=24GB MINISHIFT_DISK_SIZE=70GB MINISHIFT_VERSION=${minishift_version} OPENSHIFT_VERSION=${openshift_version}", label: "Making openshift" - sh script: "make -O${SYNC_MAKE_OUTPUT} push-minishift -j5", label: "Pushing built images into openshift" - sh script: "make -O${SYNC_MAKE_OUTPUT} openshift-tests -j2", label: "Making openshift tests" - } - } catch (e) { - echo "Something went wrong, trying to cleanup" - cleanup() - throw e - } - } - stage ('cleanup') { - cleanup() - } - }, - '2 start services': { - stage ('start services') { - try { - notifySlack() - sh "make kill" - sh "make up" - sh "make logs" - } catch (e) { - echo "Something went wrong, trying to cleanup" - cleanup() - throw e - } - } - }, - '3 push images to amazeeiolagoon': { - stage ('push images to amazeeiolagoon/*') { - withCredentials([string(credentialsId: 'amazeeiojenkins-dockerhub-password', variable: 'PASSWORD')]) { - try { - if (env.SKIP_IMAGE_PUBLISH != 'true') { - sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" - sh script: "make -O${SYNC_MAKE_OUTPUT} -j4 publish-amazeeiolagoon-baseimages publish-amazeeiolagoon-serviceimages publish-amazeeiolagoon-taskimages BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" - } else { - sh script: 'echo "skipped because of SKIP_IMAGE_PUBLISH env variable"', label: "Skipping image publishing" - } - if (env.BRANCH_NAME == 'main' ) { - withCredentials([string(credentialsId: 'vshn-gitlab-helmfile-ci-trigger', variable: 'TOKEN')]) { - sh script: "curl -X POST -F token=$TOKEN -F ref=master https://git.vshn.net/api/v4/projects/1263/trigger/pipeline", label: "Trigger lagoon-core helmfile sync on amazeeio-test6" - } - } - } catch (e) { - echo "Something went wrong, trying to cleanup" - cleanup() - throw e - } - } - } - } - ) - } catch (e) { - echo "Something went wrong, trying to cleanup" - cleanup() - throw e - } +pipeline { + agent any + environment { + // configure build params + CI_BUILD_TAG = env.BUILD_TAG.replaceAll('%2f','').replaceAll('[^A-Za-z0-9]+', '').toLowerCase() + SAFEBRANCH_NAME = env.BRANCH_NAME.replaceAll('%2f','-').replaceAll('[^A-Za-z0-9]+', '-').toLowerCase() + NPROC = "${sh(script:'getconf _NPROCESSORS_ONLN', returnStdout: true).trim()}" + } - if (env.TAG_NAME && env.SKIP_IMAGE_PUBLISH != 'true') { - stage ('publish-amazeeio') { - withCredentials([string(credentialsId: 'amazeeiojenkins-dockerhub-password', variable: 'PASSWORD')]) { - sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" - sh script: "make -O${SYNC_MAKE_OUTPUT} -j4 publish-amazeeio-baseimages", label: "Publishing built images" - } - } + stages { + stage ('notify started') { + steps { + notifySlack('STARTED') + } + } + stage ('env') { + steps { + sh 'env' + } + } + // in order to have the newest images from upstream (with all the security + // updates) we clean our local docker cache on tag deployments + // we don't do this all the time to still profit from image layer caching + // but we want this on tag deployments in order to ensure that we publish + // images always with the newest possible images. + stage ('clean docker image cache') { + when { + buildingTag() + } + steps { + sh script: "docker image prune -af", label: "Pruning images" + } + } + stage ('build images') { + steps { + sh script: "make -O -j$NPROC build", label: "Building images" + } + } + stage ('show trivy scan results') { + steps { + sh script: "cat scan.txt", label: "Display scan results" + } + } + stage ('push images to testlagoon/*') { + when { + not { + environment name: 'SKIP_IMAGE_PUBLISH', value: 'true' } - - if (env.BRANCH_NAME == 'master' && env.SKIP_IMAGE_PUBLISH != 'true') { - stage ('save-images-s3') { - sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 s3-save", label: "Saving images to AWS S3" - } + } + environment { + PASSWORD = credentials('amazeeiojenkins-dockerhub-password') + } + steps { + sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" + sh script: "make -O -j$NPROC publish-testlagoon-baseimages publish-testlagoon-serviceimages publish-testlagoon-taskimages BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" + } + } + stage ('run test suite') { + steps { + sh script: "make -j$NPROC kind/test BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Running tests on kind cluster" + } + } + stage ('push images to testlagoon/* with :latest tag') { + when { + branch 'main' + } + environment { + PASSWORD = credentials('amazeeiojenkins-dockerhub-password') + } + steps { + sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" + sh script: "make -O -j$NPROC publish-testlagoon-baseimages publish-testlagoon-serviceimages publish-testlagoon-taskimages BRANCH_NAME=latest", label: "Publishing built images with :latest tag" + } + } + stage ('deploy to test environment') { + when { + branch 'main' + } + environment { + TOKEN = credentials('vshn-gitlab-helmfile-ci-trigger') + } + steps { + sh script: "curl -X POST -F token=$TOKEN -F ref=master https://git.vshn.net/api/v4/projects/1263/trigger/pipeline", label: "Trigger lagoon-core helmfile sync on amazeeio-test6" + } + } + stage ('push images to uselagoon/*') { + when { + buildingTag() + not { + environment name: 'SKIP_IMAGE_PUBLISH', value: 'true' } - - } catch (e) { - currentBuild.result = 'FAILURE' - throw e - } finally { - notifySlack(currentBuild.result) + } + environment { + PASSWORD = credentials('amazeeiojenkins-dockerhub-password') + } + steps { + sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" + sh script: "make -O -j$NPROC publish-uselagoon-baseimages publish-uselagoon-serviceimages publish-uselagoon-taskimages", label: "Publishing built images to uselagoon" } } } -} - -def cleanup() { - try { - sh "make minishift/cleanall" - sh "make k3d/cleanall" - sh "make down || true" - sh "make kill" - sh "make down" - sh "make clean" - } catch (error) { - echo "cleanup failed, ignoring this." + post { + always { + sh "make clean kind/clean" + } + success { + notifySlack('SUCCESS') + deleteDir() + } + failure { + notifySlack('FAILURE') + } + aborted { + notifySlack('ABORTED') + } } } -def notifySlack(String buildStatus = 'STARTED') { - // Build status of null means success. - buildStatus = buildStatus ?: 'SUCCESS' - - def color - - if (buildStatus == 'STARTED') { - color = '#68A1D1' - } else if (buildStatus == 'SUCCESS') { - color = '#BDFFC3' - } else if (buildStatus == 'UNSTABLE') { - color = '#FFFE89' - } else { - color = '#FF9FA1' - } - - def msg = "${buildStatus}: `${env.JOB_NAME}` #${env.BUILD_NUMBER}:\n${env.BUILD_URL}" - - slackSend(color: color, message: msg) +def notifySlack(String status) { + slackSend( + color: ([STARTED: '#68A1D1', SUCCESS: '#BDFFC3', FAILURE: '#FF9FA1', ABORTED: '#949393'][status]), + message: "${status}: `${env.JOB_NAME}` #${env.BUILD_NUMBER}:\n${env.BUILD_URL}") } diff --git a/Jenkinsfile.end2end b/Jenkinsfile.end2end deleted file mode 100644 index 1a612a4aa9..0000000000 --- a/Jenkinsfile.end2end +++ /dev/null @@ -1,21 +0,0 @@ -node { - - stage ('Checkout') { - deleteDir() - checkout scm - } - - ansiColor('xterm') { - stage ('run test') { - try { - sh "make end2end-tests -j1" - } catch (e) { - echo "Something went wrong, trying to cleanup" - sh "make end2end-tests/clean" - throw e - } - sh "make end2end-tests/clean" - } - } - -} \ No newline at end of file diff --git a/Lagoon_OG.png b/Lagoon_OG.png new file mode 100644 index 0000000000..1c4f0de0c7 Binary files /dev/null and b/Lagoon_OG.png differ diff --git a/Makefile b/Makefile index 583f1f9792..cd4868b274 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,9 @@ DOCKER_BUILD_PARAMS := --quiet # CI systems to define an Environment variable CI_BUILD_TAG which uniquely identifies each build. # If it's not set we assume that we are running local and just call it lagoon. CI_BUILD_TAG ?= lagoon +# SOURCE_REPO is the repos where the upstream images are found (usually uselagoon, but can substiture for testlagoon) +UPSTREAM_REPO ?= uselagoon +UPSTREAM_TAG ?= latest # Local environment ARCH := $(shell uname | tr '[:upper:]' '[:lower:]') @@ -73,8 +76,8 @@ MINISHIFT_DISK_SIZE := 30GB # Version and Hash of the minikube cli that should be downloaded K3S_VERSION := v1.17.0-k3s.1 -KUBECTL_VERSION := v1.17.0 -HELM_VERSION := v3.0.3 +KUBECTL_VERSION := v1.20.2 +HELM_VERSION := v3.5.0 MINIKUBE_VERSION := 1.5.2 MINIKUBE_PROFILE := $(CI_BUILD_TAG)-minikube MINIKUBE_CPUS := $(nproc --ignore 2) @@ -86,8 +89,12 @@ K3D_VERSION := 1.4.0 K3D_NAME := k3s-$(shell echo $(CI_BUILD_TAG) | sed -E 's/.*(.{31})$$/\1/') # Name of the Branch we are currently in -BRANCH_NAME := -DEFAULT_ALPINE_VERSION := 3.11 +BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD) +SAFE_BRANCH_NAME := $(shell echo $(BRANCH_NAME) | sed -E 's:/:_:g') + +# Init the file that is used to hold the image tag cross-reference table +$(shell >build.txt) +$(shell >scan.txt) ####### ####### Functions @@ -95,32 +102,15 @@ DEFAULT_ALPINE_VERSION := 3.11 # Builds a docker image. Expects as arguments: name of the image, location of Dockerfile, path of # Docker Build Context -docker_build = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg ALPINE_VERSION=$(DEFAULT_ALPINE_VERSION) -t $(CI_BUILD_TAG)/$(1) -f $(2) $(3) - -# Build a Python docker image. Expects as arguments: -# 1. Python version -# 2. Location of Dockerfile -# 3. Path of Docker Build context -docker_build_python = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg PYTHON_VERSION=$(1) --build-arg ALPINE_VERSION=$(2) -t $(CI_BUILD_TAG)/python:$(3) -f $(4) $(5) - -docker_build_elastic = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) -t $(CI_BUILD_TAG)/$(2):$(1) -f $(3) $(4) - -# Build a PHP docker image. Expects as arguments: -# 1. PHP version -# 2. PHP version and type of image (ie 7.3-fpm, 7.3-cli etc) -# 3. Location of Dockerfile -# 4. Path of Docker Build Context -docker_build_php = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg PHP_VERSION=$(1) --build-arg PHP_IMAGE_VERSION=$(1) --build-arg ALPINE_VERSION=$(2) -t $(CI_BUILD_TAG)/php:$(3) -f $(4) $(5) +docker_build = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg UPSTREAM_REPO=$(UPSTREAM_REPO) --build-arg UPSTREAM_TAG=$(UPSTREAM_TAG) -t $(CI_BUILD_TAG)/$(1) -f $(2) $(3) -docker_build_node = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg NODE_VERSION=$(1) --build-arg ALPINE_VERSION=$(2) -t $(CI_BUILD_TAG)/node:$(3) -f $(4) $(5) +scan_image = docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(HOME)/Library/Caches:/root/.cache/ aquasec/trivy --timeout 5m0s $(CI_BUILD_TAG)/$(1) >> scan.txt -docker_build_solr = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg SOLR_MAJ_MIN_VERSION=$(1) -t $(CI_BUILD_TAG)/solr:$(2) -f $(3) $(4) +# Tags an image with the `testlagoon` repository and pushes it +docker_publish_testlagoon = docker tag $(CI_BUILD_TAG)/$(1) testlagoon/$(2) && docker push testlagoon/$(2) | cat -# Tags an image with the `amazeeio` repository and pushes it -docker_publish_amazeeio = docker tag $(CI_BUILD_TAG)/$(1) amazeeio/$(2) && docker push amazeeio/$(2) | cat - -# Tags an image with the `amazeeiolagoon` repository and pushes it -docker_publish_amazeeiolagoon = docker tag $(CI_BUILD_TAG)/$(1) amazeeiolagoon/$(2) && docker push amazeeiolagoon/$(2) | cat +# Tags an image with the `uselagoon` repository and pushes it +docker_publish_uselagoon = docker tag $(CI_BUILD_TAG)/$(1) uselagoon/$(2) && docker push uselagoon/$(2) | cat ####### @@ -130,29 +120,13 @@ docker_publish_amazeeiolagoon = docker tag $(CI_BUILD_TAG)/$(1) amazeeiolagoon/$ images := oc \ kubectl \ - mariadb \ - mariadb-drupal \ - postgres \ - postgres-ckan \ - postgres-drupal \ oc-build-deploy-dind \ kubectl-build-deploy-dind \ - commons \ - nginx \ - nginx-drupal \ - varnish \ - varnish-drupal \ - varnish-persistent \ - varnish-persistent-drupal \ - redis \ - redis-persistent \ rabbitmq \ rabbitmq-cluster \ - mongo \ athenapdf-service \ curator \ - docker-host \ - toolbox + docker-host # base-images is a variable that will be constantly filled with all base image there are base-images += $(images) @@ -167,6 +141,8 @@ $(build-images): $(eval image = $(subst build/,,$@)) # Call the docker build $(call docker_build,$(image),images/$(image)/Dockerfile,images/$(image)) +#scan created image with Trivy + $(call scan_image,$(image),) # Touch an empty file which make itself is using to understand when the image has been last build touch $@ @@ -176,217 +152,17 @@ $(build-images): # if the parent has been built # 2. Dockerfiles of the Images itself, will cause make to rebuild the images if something has # changed on the Dockerfiles -build/mariadb: build/commons images/mariadb/Dockerfile -build/mariadb-drupal: build/mariadb images/mariadb-drupal/Dockerfile -build/postgres: build/commons images/postgres/Dockerfile -build/postgres-ckan: build/postgres images/postgres-ckan/Dockerfile -build/postgres-drupal: build/postgres images/postgres-drupal/Dockerfile -build/commons: images/commons/Dockerfile -build/nginx: build/commons images/nginx/Dockerfile -build/nginx-drupal: build/nginx images/nginx-drupal/Dockerfile -build/varnish: build/commons images/varnish/Dockerfile -build/varnish-drupal: build/varnish images/varnish-drupal/Dockerfile -build/varnish-persistent: build/varnish images/varnish/Dockerfile -build/varnish-persistent-drupal: build/varnish-persistent images/varnish-drupal/Dockerfile -build/redis: build/commons images/redis/Dockerfile -build/redis-persistent: build/redis images/redis-persistent/Dockerfile -build/rabbitmq: build/commons images/rabbitmq/Dockerfile +build/rabbitmq: images/rabbitmq/Dockerfile build/rabbitmq-cluster: build/rabbitmq images/rabbitmq-cluster/Dockerfile -build/mongo: build/commons images/mongo/Dockerfile -build/docker-host: build/commons images/docker-host/Dockerfile -build/oc: build/commons images/oc/Dockerfile -build/kubectl: build/commons images/kubectl/Dockerfile -build/curator: build/commons images/curator/Dockerfile +build/docker-host: images/docker-host/Dockerfile +build/oc: images/oc/Dockerfile +build/kubectl: images/kubectl/Dockerfile +build/curator: images/curator/Dockerfile build/oc-build-deploy-dind: build/oc images/oc-build-deploy-dind -build/athenapdf-service: build/commons images/athenapdf-service/Dockerfile -build/toolbox: build/commons images/toolbox/Dockerfile +build/athenapdf-service:images/athenapdf-service/Dockerfile build/kubectl-build-deploy-dind: build/kubectl images/kubectl-build-deploy-dind -####### -####### Elastic Images -####### - -elasticimages := elasticsearch__6 \ - elasticsearch__7 \ - kibana__6 \ - kibana__7 \ - logstash__6 \ - logstash__7 - -build-elasticimages = $(foreach image,$(elasticimages),build/$(image)) - -# Define the make recipe for all base images -$(build-elasticimages): build/commons - $(eval clean = $(subst build/,,$@)) - $(eval tool = $(word 1,$(subst __, ,$(clean)))) - $(eval version = $(word 2,$(subst __, ,$(clean)))) -# Call the docker build - $(call docker_build_elastic,$(version),$(tool),images/$(tool)/Dockerfile$(version),images/$(tool)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(elasticimages) -s3-images += $(elasticimages) - -build/elasticsearch__6 build/elasticsearch__7 build/kibana__6 build/kibana__7 build/logstash__6 build/logstash__7: images/commons - -####### -####### Python Images -####### -####### Python Images are alpine linux based Python images. - -pythonimages := python__2.7 \ - python__3.7 \ - python__2.7-ckan \ - python__2.7-ckandatapusher - -build-pythonimages = $(foreach image,$(pythonimages),build/$(image)) - -# Define the make recipe for all base images -$(build-pythonimages): build/commons - $(eval clean = $(subst build/python__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) - $(eval alpine_version = $(DEFAULT_ALPINE_VERSION)) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) -# Call the docker build - $(call docker_build_python,$(version),$(alpine_version),$(version)$(type_dash),images/python$(type_dash)/Dockerfile,images/python$(type_dash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(pythonimages) -s3-images += $(pythonimages) - -build/python__2.7 build/python__3.7: images/commons -build/python__2.7-ckan: build/python__2.7 -build/python__2.7-ckandatapusher: build/python__2.7 - - -####### -####### PHP Images -####### -####### PHP Images are alpine linux based PHP images. - -phpimages := php__7.2-fpm \ - php__7.3-fpm \ - php__7.4-fpm \ - php__7.2-cli \ - php__7.3-cli \ - php__7.4-cli \ - php__7.2-cli-drupal \ - php__7.3-cli-drupal \ - php__7.4-cli-drupal - - -build-phpimages = $(foreach image,$(phpimages),build/$(image)) - -# Define the make recipe for all base images -$(build-phpimages): build/commons - $(eval clean = $(subst build/php__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) - $(eval subtype = $(word 3,$(subst -, ,$(clean)))) - $(eval alpine_version := $(shell case $(version) in (5.6) echo "3.8" ;; (7.0) echo "3.7" ;; (7.1) echo "3.10" ;; (*) echo $(DEFAULT_ALPINE_VERSION) ;; esac )) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) - $(eval type_slash = $(if $(type),/$(type))) -# if there is a subtype, add it. If not, just keep what we already had - $(eval type_dash = $(if $(subtype),-$(type)-$(subtype),$(type_dash))) - $(eval type_slash = $(if $(subtype),/$(type)-$(subtype),$(type_slash))) - -# Call the docker build - $(call docker_build_php,$(version),$(alpine_version),$(version)$(type_dash),images/php$(type_slash)/Dockerfile,images/php$(type_slash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(phpimages) -s3-images += $(phpimages) - -build/php__7.2-fpm build/php__7.3-fpm build/php__7.4-fpm: images/commons -build/php__7.2-cli: build/php__7.2-fpm -build/php__7.3-cli: build/php__7.3-fpm -build/php__7.4-cli: build/php__7.4-fpm -build/php__7.2-cli-drupal: build/php__7.2-cli -build/php__7.3-cli-drupal: build/php__7.3-cli -build/php__7.4-cli-drupal: build/php__7.4-cli - -####### -####### Solr Images -####### -####### Solr Images are alpine linux based Solr images. - -solrimages := solr__5.5 \ - solr__6.6 \ - solr__7.7 \ - solr__5.5-drupal \ - solr__6.6-drupal \ - solr__7.7-drupal \ - solr__5.5-ckan \ - solr__6.6-ckan - - -build-solrimages = $(foreach image,$(solrimages),build/$(image)) - -# Define the make recipe for all base images -$(build-solrimages): build/commons - $(eval clean = $(subst build/solr__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) -# Call the docker build - $(call docker_build_solr,$(version),$(version)$(type_dash),images/solr$(type_dash)/Dockerfile,images/solr$(type_dash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(solrimages) -s3-images += $(solrimages) - -build/solr__5.5 build/solr__6.6 build/solr__7.7: images/commons -build/solr__5.5-drupal: build/solr__5.5 -build/solr__6.6-drupal: build/solr__6.6 -build/solr__7.7-drupal: build/solr__7.7 -build/solr__5.5-ckan: build/solr__5.5 -build/solr__6.6-ckan: build/solr__6.6 - -####### -####### Node Images -####### -####### Node Images are alpine linux based Node images. - -nodeimages := node__14 \ - node__12 \ - node__10 \ - node__14-builder \ - node__12-builder \ - node__10-builder \ - -build-nodeimages = $(foreach image,$(nodeimages),build/$(image)) - -# Define the make recipe for all base images -$(build-nodeimages): build/commons - $(eval clean = $(subst build/node__,,$@)) - $(eval version = $(word 1,$(subst -, ,$(clean)))) - $(eval type = $(word 2,$(subst -, ,$(clean)))) - $(eval alpine_version := $(shell case $(version) in (6) echo "" ;; (9) echo "" ;; (*) echo $(DEFAULT_ALPINE_VERSION) ;; esac )) -# this fills variables only if $type is existing, if not they are just empty - $(eval type_dash = $(if $(type),-$(type))) - $(eval type_slash = $(if $(type),/$(type))) -# Call the docker build - $(call docker_build_node,$(version),$(alpine_version),$(version)$(type_dash),images/node$(type_slash)/Dockerfile,images/node$(type_slash)) -# Touch an empty file which make itself is using to understand when the image has been last build - touch $@ - -base-images-with-versions += $(nodeimages) -s3-images += $(nodeimages) - -build/node__10 build/node__12 build/node__14: images/commons images/node/Dockerfile -build/node__14-builder: build/node__14 images/node/builder/Dockerfile -build/node__12-builder: build/node__12 images/node/builder/Dockerfile -build/node__10-builder: build/node__10 images/node/builder/Dockerfile - ####### ####### Service Images ####### @@ -396,9 +172,10 @@ build/node__10-builder: build/node__10 images/node/builder/Dockerfile # Yarn Workspace Image which builds the Yarn Workspace within a single image. This image will be # used by all microservices based on Node.js to not build similar node packages again build-images += yarn-workspace-builder -build/yarn-workspace-builder: build/node__10-builder images/yarn-workspace-builder/Dockerfile +build/yarn-workspace-builder: images/yarn-workspace-builder/Dockerfile $(eval image = $(subst build/,,$@)) $(call docker_build,$(image),images/$(image)/Dockerfile,.) + $(call scan_image,$(image),) touch $@ ####### @@ -422,46 +199,35 @@ build-taskimages = $(foreach image,$(taskimages),build/task-$(image)) $(build-taskimages): $(eval image = $(subst build/task-,,$@)) $(call docker_build,task-$(image),taskimages/$(image)/Dockerfile,taskimages/$(image)) + $(call scan_image,task-$(image),) touch $@ # Variables of service images we manage and build -services := api \ - auth-server \ - logs2email \ - logs2slack \ - logs2rocketchat \ - logs2microsoftteams \ - controllerhandler \ - webhook-handler \ - webhooks2tasks \ - backup-handler \ - broker \ - broker-single \ - logs-concentrator \ - logs-dispatcher \ - logs-tee \ - logs-forwarder \ - logs-db \ - logs-db-ui \ - logs-db-curator \ - logs2logs-db \ - auto-idler \ - storage-calculator \ - api-db \ - drush-alias \ - keycloak \ - keycloak-db \ - ui \ - harbor-core \ - harbor-database \ - harbor-jobservice \ - harbor-nginx \ - harbor-portal \ - harbor-redis \ - harborregistry \ - harborregistryctl \ - harbor-trivy \ - api-redis +services := api \ + api-db \ + api-redis \ + auth-server \ + auto-idler \ + backup-handler \ + broker \ + broker-single \ + controllerhandler \ + drush-alias \ + keycloak \ + keycloak-db \ + logs-concentrator \ + logs-db-curator \ + logs-dispatcher \ + logs-tee \ + logs2email \ + logs2microsoftteams \ + logs2rocketchat \ + logs2slack \ + storage-calculator \ + ui \ + webhook-handler \ + webhooks2tasks + service-images += $(services) @@ -471,44 +237,50 @@ build-services = $(foreach image,$(services),build/$(image)) $(build-services): $(eval image = $(subst build/,,$@)) $(call docker_build,$(image),services/$(image)/Dockerfile,services/$(image)) + $(call scan_image,$(image),) touch $@ # Dependencies of Service Images build/auth-server build/logs2email build/logs2slack build/logs2rocketchat build/logs2microsoftteams build/backup-handler build/controllerhandler build/webhook-handler build/webhooks2tasks build/api build/ui: build/yarn-workspace-builder -build/logs2logs-db: build/logstash__7 -build/logs-db: build/elasticsearch__7 -build/logs-db-ui: build/kibana__7 -build/logs-db-curator: build/curator +build/api-db: services/api-db/Dockerfile +build/api-redis: services/api-redis/Dockerfile build/auto-idler: build/oc -build/storage-calculator: build/oc -build/api-db build/keycloak-db: build/mariadb -build/broker: build/rabbitmq-cluster build/broker-single build/broker-single: build/rabbitmq -build/drush-alias: build/nginx -build/keycloak: build/commons -build/harbor-database: build/postgres -build/harbor-trivy build/local-minio: build/harbor-database services/harbor-redis/Dockerfile -build/harborregistry: services/harbor-jobservice/Dockerfile -build/harborregistryctl: build/harborregistry -build/harbor-nginx: build/harborregistryctl services/harbor-core/Dockerfile services/harbor-portal/Dockerfile -build/tests: build/python__2.7 +build/broker: build/rabbitmq-cluster build/broker-single +build/drush-alias: services/drush-alias/Dockerfile +build/keycloak-db: services/keycloak-db/Dockerfile +build/keycloak: services/keycloak/Dockerfile +build/logs-concentrator: services/logs-concentrator/Dockerfile +build/logs-db-curator: build/curator +build/logs-dispatcher: services/logs-dispatcher/Dockerfile +build/logs-tee: services/logs-tee/Dockerfile +build/storage-calculator: build/oc +build/tests-controller-kubernetes: build/tests build/tests-kubernetes: build/tests build/tests-openshift: build/tests -build/toolbox: build/mariadb -build/api-redis: build/redis - +build/tests: tests/Dockerfile +build/local-minio: # Auth SSH needs the context of the root folder, so we have it individually -build/ssh: build/commons +build/ssh: services/ssh/Dockerfile $(eval image = $(subst build/,,$@)) $(call docker_build,$(image),services/$(image)/Dockerfile,.) + $(call scan_image,$(image),) touch $@ service-images += ssh +build/local-git: local-dev/git/Dockerfile +build/local-api-data-watcher-pusher: local-dev/api-data-watcher-pusher/Dockerfile +build/local-registry: local-dev/registry/Dockerfile +build/local-dbaas-provider: local-dev/dbaas-provider/Dockerfile +build/local-mongodb-dbaas-provider: local-dev/mongodb-dbaas-provider/Dockerfile + # Images for local helpers that exist in another folder than the service images localdevimages := local-git \ local-api-data-watcher-pusher \ - local-registry\ - local-dbaas-provider + local-registry \ + local-dbaas-provider \ + local-mongodb-dbaas-provider + service-images += $(localdevimages) build-localdevimages = $(foreach image,$(localdevimages),build/$(image)) @@ -516,12 +288,14 @@ $(build-localdevimages): $(eval folder = $(subst build/local-,,$@)) $(eval image = $(subst build/,,$@)) $(call docker_build,$(image),local-dev/$(folder)/Dockerfile,local-dev/$(folder)) + $(call scan_image,$(image),) touch $@ # Image with ansible test build/tests: $(eval image = $(subst build/,,$@)) $(call docker_build,$(image),$(image)/Dockerfile,$(image)) + $(call scan_image,$(image),) touch $@ service-images += tests @@ -534,7 +308,7 @@ s3-images += $(service-images) # Builds all Images .PHONY: build -build: $(foreach image,$(base-images) $(base-images-with-versions) $(service-images) $(task-images),build/$(image)) +build: $(foreach image,$(base-images) $(service-images) $(task-images),build/$(image)) # Outputs a list of all Images we manage .PHONY: build-list build-list: @@ -543,10 +317,15 @@ build-list: done # Define list of all tests -all-k8s-tests-list:= features-kubernetes \ - nginx \ - drupal \ - active-standby-kubernetes +all-k8s-tests-list:= nginx \ + drupal-php72 \ + drupal-php73 \ + drupal-php74 \ + python \ + active-standby-kubernetes \ + features-kubernetes \ + node-mongodb + all-k8s-tests = $(foreach image,$(all-k8s-tests-list),k8s-tests/$(image)) # Run all k8s tests @@ -557,15 +336,15 @@ k8s-tests: $(all-k8s-tests) $(all-k8s-tests): k3d k8s-test-services-up $(MAKE) push-local-registry -j6 $(eval testname = $(subst k8s-tests/,,$@)) - IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility run --rm \ - tests-kubernetes ansible-playbook --skip-tags="skip-on-kubernetes" \ + IMAGE_REPO=$(CI_BUILD_TAG) UPSTREAM_REPO=$(UPSTREAM_REPO) UPSTREAM_TAG=$(UPSTREAM_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility run --rm \ + tests-kubernetes ansible-playbook --skip-tags="skip-on-kubernetes,skip-on-jenkins" --extra-vars="@/ansible/tests/vars/test_vars.yaml" \ /ansible/tests/$(testname).yaml \ --extra-vars \ "$$(cat $$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)') | \ jq -rcsR '{kubeconfig: .}')" # push command of our base images into minishift -push-local-registry-images = $(foreach image,$(base-images) $(base-images-with-versions) $(task-images),[push-local-registry]-$(image)) +push-local-registry-images = $(foreach image,$(base-images) $(task-images),[push-local-registry]-$(image)) # tag and push all images .PHONY: push-local-registry push-local-registry: $(push-local-registry-images) @@ -586,14 +365,17 @@ $(push-local-registry-images): # Define list of all tests all-openshift-tests-list:= features-openshift \ node \ - drupal \ + drupal-php72 \ + drupal-php73 \ + drupal-php74 \ drupal-postgres \ github \ gitlab \ bitbucket \ nginx \ elasticsearch \ - active-standby-openshift + active-standby-openshift \ + node-mongodb all-openshift-tests = $(foreach image,$(all-openshift-tests-list),openshift-tests/$(image)) .PHONY: openshift-tests @@ -610,13 +392,13 @@ wait-for-keycloak: grep -m 1 "Config of Keycloak done." <(docker-compose -p $(CI_BUILD_TAG) --compatibility logs -f keycloak 2>&1) # Define a list of which Lagoon Services are needed for running any deployment testing -main-test-services = broker logs2email logs2slack logs2rocketchat logs2microsoftteams api api-db keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher harbor-core harbor-database harbor-jobservice harbor-portal harbor-nginx harbor-redis harborregistry harborregistryctl harbor-trivy local-minio +main-test-services = broker logs2email logs2slack logs2rocketchat logs2microsoftteams api api-db api-redis keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher local-minio # Define a list of which Lagoon Services are needed for openshift testing -openshift-test-services = openshiftremove openshiftbuilddeploy openshiftbuilddeploymonitor openshiftmisc tests-openshift +openshift-test-services = openshiftremove openshiftbuilddeploy openshiftbuilddeploymonitor openshiftmisc tests-openshift local-dbaas-provider local-mongodb-dbaas-provider # Define a list of which Lagoon Services are needed for kubernetes testing -k8s-test-services = controllerhandler tests-kubernetes local-registry local-dbaas-provider drush-alias +k8s-test-services = controllerhandler tests-kubernetes local-registry local-dbaas-provider local-mongodb-dbaas-provider drush-alias # List of Lagoon Services needed for webhook endpoint testing webhooks-test-services = webhook-handler webhooks2tasks backup-handler @@ -628,11 +410,10 @@ drupal-test-services = drush-alias webhook-tests = github gitlab bitbucket # All Tests that use API endpoints -api-tests = node features-openshift features-kubernetes nginx elasticsearch active-standby-openshift active-standby-kubernetes +api-tests = node features-openshift features-kubernetes nginx elasticsearch active-standby-openshift active-standby-kubernetes node-mongodb # All drupal tests -drupal-tests = drupal drupal-postgres -drupal-dependencies = build/varnish-drupal build/solr__5.5-drupal build/nginx-drupal build/redis build/php__7.2-cli-drupal build/php__7.3-cli-drupal build/php__7.4-cli-drupal build/postgres-drupal build/mariadb-drupal +drupal-tests = drupal-php72 drupal-php73 drupal-php74 drupal-postgres # These targets are used as dependencies to bring up containers in the right order. .PHONY: main-test-services-up @@ -674,7 +455,7 @@ $(openshift-run-api-tests): minishift build/oc-build-deploy-dind openshift-test- openshift-run-drupal-tests = $(foreach image,$(drupal-tests),openshift-tests/$(image)) .PHONY: $(openshift-run-drupal-tests) -$(openshift-run-drupal-tests): minishift build/oc-build-deploy-dind $(drupal-dependencies) openshift-test-services-up drupaltest-services-up push-minishift +$(openshift-run-drupal-tests): minishift build/oc-build-deploy-dind openshift-test-services-up drupaltest-services-up push-minishift $(eval testname = $(subst openshift-tests/,,$@)) IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility run --rm tests-openshift ansible-playbook /ansible/tests/$(testname).yaml @@ -684,24 +465,8 @@ $(openshift-run-webhook-tests): minishift build/oc-build-deploy-dind openshift-t $(eval testname = $(subst openshift-tests/,,$@)) IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility run --rm tests-openshift ansible-playbook /ansible/tests/$(testname).yaml -end2end-all-tests = $(foreach image,$(all-tests-list),end2end-tests/$(image)) - -.PHONY: end2end-tests -end2end-tests: $(end2end-all-tests) - -.PHONY: start-end2end-ansible -start-end2end-ansible: build/tests - docker-compose -f docker-compose.yaml -f docker-compose.end2end.yaml -p end2end --compatibility up -d tests - -$(end2end-all-tests): start-end2end-ansible - $(eval testname = $(subst end2end-tests/,,$@)) - docker exec -i $$(docker-compose -f docker-compose.yaml -f docker-compose.end2end.yaml -p end2end ps -q tests) ansible-playbook /ansible/tests/$(testname).yaml - -end2end-tests/clean: - docker-compose -f docker-compose.yaml -f docker-compose.end2end.yaml -p end2end --compatibility down -v - # push command of our base images into minishift -push-minishift-images = $(foreach image,$(base-images) $(base-images-with-versions),[push-minishift]-$(image)) +push-minishift-images = $(foreach image,$(base-images),[push-minishift]-$(image)) # tag and push all images .PHONY: push-minishift push-minishift: minishift/login-docker-registry $(push-minishift-images) @@ -726,129 +491,112 @@ lagoon-kickstart: $(foreach image,$(deployment-test-services-rest),build/$(image curl -X POST -H "Content-Type: application/json" --data 'mutation { deployEnvironmentBranch(input: { project: { name: "lagoon" }, branchName: "master" } )}' http://localhost:3000/graphql make logs -# Start only the local Harbor for testing purposes -local-harbor: build/harbor-core build/harbor-database build/harbor-jobservice build/harbor-portal build/harbor-nginx build/harbor-redis build/harborregistry build/harborregistryctl build/harbor-trivy build/local-minio - IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d harbor-core harbor-database harbor-jobservice harbor-portal harbor-nginx harbor-redis harborregistry harborregistryctl harbor-trivy local-minio +####### +####### Publishing Images +####### +####### All main&PR images are pushed to testlagoon repository +####### -# Publish command to amazeeio docker hub, this should probably only be done during a master deployments -publish-amazeeio-baseimages = $(foreach image,$(base-images),[publish-amazeeio-baseimages]-$(image)) -publish-amazeeio-baseimages-with-versions = $(foreach image,$(base-images-with-versions),[publish-amazeeio-baseimages-with-versions]-$(image)) +# Publish command to testlagoon docker hub, done on any main branch or PR +publish-testlagoon-baseimages = $(foreach image,$(base-images),[publish-testlagoon-baseimages]-$(image)) # tag and push all images -.PHONY: publish-amazeeio-baseimages -publish-amazeeio-baseimages: $(publish-amazeeio-baseimages) $(publish-amazeeio-baseimages-with-versions) +.PHONY: publish-testlagoon-baseimages +publish-testlagoon-baseimages: $(publish-testlagoon-baseimages) # tag and push of each image -.PHONY: $(publish-amazeeio-baseimages) -$(publish-amazeeio-baseimages): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeio-baseimages]-' first - $(eval image = $(subst [publish-amazeeio-baseimages]-,,$@)) -# Publish images as :latest - $(call docker_publish_amazeeio,$(image),$(image):latest) +.PHONY: $(publish-testlagoon-baseimages) +$(publish-testlagoon-baseimages): +# Calling docker_publish for image, but remove the prefix '[publish-testlagoon-baseimages]-' first + $(eval image = $(subst [publish-testlagoon-baseimages]-,,$@)) # Publish images with version tag - $(call docker_publish_amazeeio,$(image),$(image):$(LAGOON_VERSION)) + $(call docker_publish_testlagoon,$(image),$(image):$(BRANCH_NAME)) -# tag and push of base image with version -.PHONY: $(publish-amazeeio-baseimages-with-versions) -$(publish-amazeeio-baseimages-with-versions): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeio-baseimages-with-versions]-' first - $(eval image = $(subst [publish-amazeeio-baseimages-with-versions]-,,$@)) -# The underline is a placeholder for a colon, replace that - $(eval image = $(subst __,:,$(image))) -# These images already use a tag to differentiate between different versions of the service itself (like node:9 and node:10) -# We push a version without the `-latest` suffix - $(call docker_publish_amazeeio,$(image),$(image)) -# Plus a version with the `-latest` suffix, this makes it easier for people with automated testing - $(call docker_publish_amazeeio,$(image),$(image)-latest) -# We add the Lagoon Version just as a dash - $(call docker_publish_amazeeio,$(image),$(image)-$(LAGOON_VERSION)) +# Publish command to amazeeio docker hub, this should probably only be done during a master deployments +publish-testlagoon-serviceimages = $(foreach image,$(service-images),[publish-testlagoon-serviceimages]-$(image)) +# tag and push all images +.PHONY: publish-testlagoon-serviceimages +publish-testlagoon-serviceimages: $(publish-testlagoon-serviceimages) +# tag and push of each image +.PHONY: $(publish-testlagoon-serviceimages) +$(publish-testlagoon-serviceimages): +# Calling docker_publish for image, but remove the prefix '[publish-testlagoon-serviceimages]-' first + $(eval image = $(subst [publish-testlagoon-serviceimages]-,,$@)) +# Publish images with version tag + $(call docker_publish_testlagoon,$(image),$(image):$(BRANCH_NAME)) # Publish command to amazeeio docker hub, this should probably only be done during a master deployments -publish-amazeeiolagoon-baseimages = $(foreach image,$(base-images),[publish-amazeeiolagoon-baseimages]-$(image)) -publish-amazeeiolagoon-baseimages-with-versions = $(foreach image,$(base-images-with-versions),[publish-amazeeiolagoon-baseimages-with-versions]-$(image)) +publish-testlagoon-taskimages = $(foreach image,$(task-images),[publish-testlagoon-taskimages]-$(image)) # tag and push all images -.PHONY: publish-amazeeiolagoon-baseimages -publish-amazeeiolagoon-baseimages: $(publish-amazeeiolagoon-baseimages) $(publish-amazeeiolagoon-baseimages-with-versions) - +.PHONY: publish-testlagoon-taskimages +publish-testlagoon-taskimages: $(publish-testlagoon-taskimages) # tag and push of each image -.PHONY: $(publish-amazeeiolagoon-baseimages) -$(publish-amazeeiolagoon-baseimages): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeiolagoon-baseimages]-' first - $(eval image = $(subst [publish-amazeeiolagoon-baseimages]-,,$@)) +.PHONY: $(publish-testlagoon-taskimages) +$(publish-testlagoon-taskimages): +# Calling docker_publish for image, but remove the prefix '[publish-testlagoon-taskimages]-' first + $(eval image = $(subst [publish-testlagoon-taskimages]-,,$@)) # Publish images with version tag - $(call docker_publish_amazeeiolagoon,$(image),$(image):$(BRANCH_NAME)) + $(call docker_publish_testlagoon,$(image),$(image):$(BRANCH_NAME)) -# tag and push of base image with version -.PHONY: $(publish-amazeeiolagoon-baseimages-with-versions) -$(publish-amazeeiolagoon-baseimages-with-versions): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeiolagoon-baseimages-with-versions]-' first - $(eval image = $(subst [publish-amazeeiolagoon-baseimages-with-versions]-,,$@)) -# The underline is a placeholder for a colon, replace that - $(eval image = $(subst __,:,$(image))) -# We add the Lagoon Version just as a dash - $(call docker_publish_amazeeiolagoon,$(image),$(image)-$(BRANCH_NAME)) +####### +####### All tagged releases are pushed to uselagoon repository with new semantic tags +####### +# Publish command to uselagoon docker hub, only done on tags +publish-uselagoon-baseimages = $(foreach image,$(base-images),[publish-uselagoon-baseimages]-$(image)) -# Publish command to amazeeio docker hub, this should probably only be done during a master deployments -publish-amazeeiolagoon-serviceimages = $(foreach image,$(service-images),[publish-amazeeiolagoon-serviceimages]-$(image)) # tag and push all images -.PHONY: publish-amazeeiolagoon-serviceimages -publish-amazeeiolagoon-serviceimages: $(publish-amazeeiolagoon-serviceimages) - +.PHONY: publish-uselagoon-baseimages +publish-uselagoon-baseimages: $(publish-uselagoon-baseimages) # tag and push of each image -.PHONY: $(publish-amazeeiolagoon-serviceimages) -$(publish-amazeeiolagoon-serviceimages): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeiolagoon-serviceimages]-' first - $(eval image = $(subst [publish-amazeeiolagoon-serviceimages]-,,$@)) +.PHONY: $(publish-uselagoon-baseimages) +$(publish-uselagoon-baseimages): +# Calling docker_publish for image, but remove the prefix '[publish-uselagoon-baseimages]-' first + $(eval image = $(subst [publish-uselagoon-baseimages]-,,$@)) +# Publish images as :latest + $(call docker_publish_uselagoon,$(image),$(image):latest) # Publish images with version tag - $(call docker_publish_amazeeiolagoon,$(image),$(image):$(BRANCH_NAME)) + $(call docker_publish_uselagoon,$(image),$(image):$(LAGOON_VERSION)) # Publish command to amazeeio docker hub, this should probably only be done during a master deployments -publish-amazeeiolagoon-taskimages = $(foreach image,$(task-images),[publish-amazeeiolagoon-taskimages]-$(image)) +publish-uselagoon-serviceimages = $(foreach image,$(service-images),[publish-uselagoon-serviceimages]-$(image)) # tag and push all images -.PHONY: publish-amazeeiolagoon-taskimages -publish-amazeeiolagoon-taskimages: $(publish-amazeeiolagoon-taskimages) - +.PHONY: publish-uselagoon-serviceimages +publish-uselagoon-serviceimages: $(publish-uselagoon-serviceimages) # tag and push of each image -.PHONY: $(publish-amazeeiolagoon-taskimages) -$(publish-amazeeiolagoon-taskimages): -# Calling docker_publish for image, but remove the prefix '[publish-amazeeiolagoon-taskimages]-' first - $(eval image = $(subst [publish-amazeeiolagoon-taskimages]-,,$@)) +.PHONY: $(publish-uselagoon-serviceimages) +$(publish-uselagoon-serviceimages): +# Calling docker_publish for image, but remove the prefix '[publish-uselagoon-serviceimages]-' first + $(eval image = $(subst [publish-uselagoon-serviceimages]-,,$@)) +# Publish images as :latest + $(call docker_publish_uselagoon,$(image),$(image):latest) # Publish images with version tag - $(call docker_publish_amazeeiolagoon,$(image),$(image):$(BRANCH_NAME)) + $(call docker_publish_uselagoon,$(image),$(image):$(LAGOON_VERSION)) -s3-save = $(foreach image,$(s3-images),[s3-save]-$(image)) -# save all images to s3 -.PHONY: s3-save -s3-save: $(s3-save) -# tag and push of each image -.PHONY: $(s3-save) -$(s3-save): -# remove the prefix '[s3-save]-' first - $(eval image = $(subst [s3-save]-,,$@)) - $(eval image = $(subst __,:,$(image))) - docker save $(CI_BUILD_TAG)/$(image) $$(docker history -q $(CI_BUILD_TAG)/$(image) | grep -v missing) | gzip -9 | aws s3 cp - s3://lagoon-images/$(image).tar.gz - -s3-load = $(foreach image,$(s3-images),[s3-load]-$(image)) -# save all images to s3 -.PHONY: s3-load -s3-load: $(s3-load) +# Publish command to amazeeio docker hub, this should probably only be done during a master deployments +publish-uselagoon-taskimages = $(foreach image,$(task-images),[publish-uselagoon-taskimages]-$(image)) +# tag and push all images +.PHONY: publish-uselagoon-taskimages +publish-uselagoon-taskimages: $(publish-uselagoon-taskimages) + # tag and push of each image -.PHONY: $(s3-load) -$(s3-load): -# remove the prefix '[s3-load]-' first - $(eval image = $(subst [s3-load]-,,$@)) - $(eval image = $(subst __,:,$(image))) - curl -s https://s3.us-east-2.amazonaws.com/lagoon-images/$(image).tar.gz | gunzip -c | docker load +.PHONY: $(publish-uselagoon-taskimages) +$(publish-uselagoon-taskimages): +# Calling docker_publish for image, but remove the prefix '[publish-uselagoon-taskimages]-' first + $(eval image = $(subst [publish-uselagoon-taskimages]-,,$@)) +# Publish images as :latest + $(call docker_publish_uselagoon,$(image),$(image):latest) +# Publish images with version tag + $(call docker_publish_uselagoon,$(image),$(image):$(LAGOON_VERSION)) # Clean all build touches, which will case make to rebuild the Docker Images (Layer caching is # still active, so this is a very safe command) @@ -870,8 +618,6 @@ else IMAGE_REPO=$(CI_BUILD_TAG) \ docker-compose -p $(CI_BUILD_TAG) --compatibility up -d endif - grep -m 1 ".opendistro_security index does not exist yet" <(docker-compose -p $(CI_BUILD_TAG) logs -f logs-db 2>&1) - while ! docker exec "$$(docker-compose -p $(CI_BUILD_TAG) ps -q logs-db)" ./securityadmin_demo.sh; do sleep 5; done $(MAKE) wait-for-keycloak down: @@ -928,7 +674,7 @@ minishift/login-docker-registry: minishift openshift-lagoon-setup: # Only use the minishift provided oc if we don't have one yet (allows system engineers to use their own oc) if ! which oc; then eval $$(./local-dev/minishift/minishift --profile $(CI_BUILD_TAG) oc-env); fi; \ - oc -n default set env dc/router -e ROUTER_LOG_LEVEL=info -e ROUTER_SYSLOG_ADDRESS=router-logs.lagoon.svc:5140; \ + oc -n default set env dc/router -e ROUTER_LOG_LEVEL=info -e ROUTER_SYSLOG_ADDRESS=router-logs.lagoon.svc:5141; \ oc new-project lagoon; \ oc adm pod-network make-projects-global lagoon; \ oc -n lagoon create serviceaccount openshiftbuilddeploy; \ @@ -941,16 +687,12 @@ openshift-lagoon-setup: oc -n lagoon create serviceaccount docker-host; \ oc -n lagoon adm policy add-scc-to-user privileged -z docker-host; \ oc -n lagoon policy add-role-to-user edit -z docker-host; \ - oc -n lagoon create serviceaccount logs-collector; \ - oc -n lagoon adm policy add-cluster-role-to-user cluster-reader -z logs-collector; \ - oc -n lagoon adm policy add-scc-to-user hostaccess -z logs-collector; \ - oc -n lagoon adm policy add-scc-to-user privileged -z logs-collector; \ oc -n lagoon adm policy add-cluster-role-to-user daemonset-admin -z lagoon-deployer; \ oc -n lagoon create serviceaccount lagoon-deployer; \ oc -n lagoon policy add-role-to-user edit -z lagoon-deployer; \ oc -n lagoon create -f openshift-setup/clusterrole-daemonset-admin.yaml; \ oc -n lagoon adm policy add-cluster-role-to-user daemonset-admin -z lagoon-deployer; \ - bash -c "oc process -n lagoon -f services/docker-host/docker-host.yaml | oc -n lagoon apply -f -"; \ + bash -c "oc process -n lagoon -f openshift-setup/docker-host.yaml | oc -n lagoon apply -f -"; \ oc -n lagoon create -f openshift-setup/dbaas-roles.yaml; \ oc -n dbaas-operator-system create -f openshift-setup/dbaas-operator.yaml; \ oc -n lagoon create -f openshift-setup/dbaas-providers.yaml; \ @@ -1022,21 +764,20 @@ ifeq ($(KUBECTL_VERSION), $(shell kubectl version --short --client 2>/dev/null | ln -s $(shell command -v kubectl) ./local-dev/kubectl else $(info downloading kubectl version $(KUBECTL_VERSION) for $(ARCH)) - curl -Lo local-dev/kubectl https://storage.googleapis.com/kubernetes-release/release/$(KUBECTL_VERSION)/bin/$(ARCH)/amd64/kubectl + curl -sSLo local-dev/kubectl https://storage.googleapis.com/kubernetes-release/release/$(KUBECTL_VERSION)/bin/$(ARCH)/amd64/kubectl chmod a+x local-dev/kubectl endif # Symlink the installed helm client if the correct version is already # installed, otherwise downloads it. -local-dev/helm/helm: - @mkdir -p ./local-dev/helm -ifeq ($(HELM_VERSION), $(shell helm version --short --client 2>/dev/null | sed -E 's/v([0-9.]+).*/\1/')) +local-dev/helm: +ifeq ($(HELM_VERSION), $(shell helm version --short --client 2>/dev/null | sed -nE 's/v([0-9.]+).*/\1/p')) $(info linking local helm version $(HELM_VERSION)) ln -s $(shell command -v helm) ./local-dev/helm else $(info downloading helm version $(HELM_VERSION) for $(ARCH)) - curl -L https://get.helm.sh/helm-$(HELM_VERSION)-$(ARCH)-amd64.tar.gz | tar xzC local-dev/helm --strip-components=1 - chmod a+x local-dev/helm/helm + curl -sSL https://get.helm.sh/helm-$(HELM_VERSION)-$(ARCH)-amd64.tar.gz | tar -xzC local-dev --strip-components=1 $(ARCH)-amd64/helm + chmod a+x local-dev/helm endif ifeq ($(DOCKER_DRIVER), btrfs) @@ -1046,7 +787,7 @@ else K3D_BTRFS_VOLUME := endif -k3d: local-dev/k3d local-dev/kubectl local-dev/helm/helm build/docker-host +k3d: local-dev/k3d local-dev/kubectl local-dev/helm build/docker-host $(MAKE) local-registry-up $(MAKE) broker-up $(info starting k3d with name $(K3D_NAME)) @@ -1061,33 +802,43 @@ endif --image docker.io/rancher/k3s:$(K3S_VERSION) \ --volume $$PWD/local-dev/k3d-registries.yaml:/etc/rancher/k3s/registries.yaml \ $(K3D_BTRFS_VOLUME) \ - -x --no-deploy=traefik \ - --volume $$PWD/local-dev/k3d-nginx-ingress.yaml:/var/lib/rancher/k3s/server/manifests/k3d-nginx-ingress.yaml + -x --no-deploy=traefik echo "$(K3D_NAME)" > $@ export KUBECONFIG="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')"; \ local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" apply -f $$PWD/local-dev/k3d-storageclass-bulk.yaml; \ docker tag $(CI_BUILD_TAG)/docker-host localhost:5000/lagoon/docker-host; \ docker push localhost:5000/lagoon/docker-host; \ + local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace nginx-ingress; \ + local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add stable https://charts.helm.sh/stable; \ + local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n nginx-ingress nginx stable/nginx-ingress; \ local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace k8up; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add appuio https://charts.appuio.ch; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n k8up k8up appuio/k8up; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add appuio https://charts.appuio.ch; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n k8up k8up appuio/k8up; \ local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace dioscuri; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add dioscuri https://raw.githubusercontent.com/amazeeio/dioscuri/ingress/charts ; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dioscuri dioscuri dioscuri/dioscuri ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add dioscuri https://raw.githubusercontent.com/amazeeio/dioscuri/main/charts ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dioscuri dioscuri dioscuri/dioscuri ; \ local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace dbaas-operator; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add dbaas-operator https://raw.githubusercontent.com/amazeeio/dbaas-operator/master/charts ; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dbaas-operator dbaas-operator dbaas-operator/dbaas-operator ; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dbaas-operator mariadbprovider dbaas-operator/mariadbprovider -f local-dev/helm-values-mariadbprovider.yml ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add dbaas-operator https://raw.githubusercontent.com/amazeeio/dbaas-operator/main/charts ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dbaas-operator dbaas-operator dbaas-operator/dbaas-operator ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dbaas-operator mariadbprovider dbaas-operator/mariadbprovider -f local-dev/helm-values-mariadbprovider.yml ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n dbaas-operator mongodbprovider dbaas-operator/mongodbprovider -f local-dev/helm-values-mongodbprovider.yml ; \ + local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace harbor; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add harbor https://helm.goharbor.io ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n harbor harbor harbor/harbor -f local-dev/helm-values-harbor.yml ; \ local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace lagoon-builddeploy; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add lagoon-builddeploy https://raw.githubusercontent.com/amazeeio/lagoon-kbd/main/charts ; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n lagoon-builddeploy lagoon-builddeploy lagoon-builddeploy/lagoon-builddeploy \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add lagoon-builddeploy https://raw.githubusercontent.com/amazeeio/lagoon-kbd/main/charts ; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n lagoon-builddeploy lagoon-builddeploy lagoon-builddeploy/lagoon-builddeploy \ --set vars.lagoonTargetName=ci-local-control-k8s \ --set vars.rabbitPassword=guest \ --set vars.rabbitUsername=guest \ --set vars.rabbitHostname=172.17.0.1:5672; \ local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' create namespace lagoon; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add lagoon https://uselagoon.github.io/lagoon-charts/; \ - local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n lagoon lagoon-remote lagoon/lagoon-remote --set dockerHost.image.name=172.17.0.1:5000/lagoon/docker-host --set dockerHost.registry=172.17.0.1:5000; \ + local-dev/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' repo add lagoon https://uselagoon.github.io/lagoon-charts/; \ + local-dev/helm/helm --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --kube-context='$(K3D_NAME)' upgrade --install -n lagoon lagoon-remote lagoon/lagoon-remote \ + --set dioscuri.enabled=false \ + --set dockerHost.image.repository=172.17.0.1:5000/lagoon/docker-host \ + --set dockerHost.image.tag=latest \ + --set dockerHost.registry=172.17.0.1:5000; \ local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon rollout status deployment lagoon-remote-docker-host -w; ifeq ($(ARCH), darwin) export KUBECONFIG="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')"; \ @@ -1137,7 +888,7 @@ k8s-dashboard: kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc2/aio/deploy/recommended.yaml; \ kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n kubernetes-dashboard rollout status deployment kubernetes-dashboard -w; \ echo -e "\nUse this token:"; \ - kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon describe secret $$(local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon get secret | grep kubernetesbuilddeploy | awk '{print $$1}') | grep token: | awk '{print $$2}'; \ + kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon describe secret $$(local-dev/kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' -n lagoon get secret | grep kubernetes-build-deploy | awk '{print $$1}') | grep token: | awk '{print $$2}'; \ open http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ ; \ kubectl --kubeconfig="$$(./local-dev/k3d get-kubeconfig --name='$(K3D_NAME)')" --context='$(K3D_NAME)' proxy @@ -1167,14 +918,14 @@ k3d/cleanall: k3d/stopall .PHONY: kubernetes-lagoon-setup kubernetes-lagoon-setup: kubectl create namespace lagoon; \ - local-dev/helm/helm repo add lagoon https://uselagoon.github.io/lagoon-charts/; \ - local-dev/helm/helm upgrade --install -n lagoon lagoon-remote lagoon/lagoon-remote; \ + local-dev/helm repo add lagoon https://uselagoon.github.io/lagoon-charts/; \ + local-dev/helm upgrade --install -n lagoon lagoon-remote lagoon/lagoon-remote; \ echo -e "\n\nAll Setup, use this token as described in the Lagoon Install Documentation:"; $(MAKE) kubernetes-get-kubernetesbuilddeploy-token .PHONY: kubernetes-get-kubernetesbuilddeploy-token kubernetes-get-kubernetesbuilddeploy-token: - kubectl -n lagoon describe secret $$(kubectl -n lagoon get secret | grep kubernetesbuilddeploy | awk '{print $$1}') | grep token: | awk '{print $$2}' + kubectl -n lagoon describe secret $$(kubectl -n lagoon get secret | grep kubernetes-build-deploy | awk '{print $$1}') | grep token: | awk '{print $$2}' .PHONY: rebuild-push-oc-build-deploy-dind rebuild-push-oc-build-deploy-dind: @@ -1190,3 +941,192 @@ ui-development: build/api build/api-db build/local-api-data-watcher-pusher build .PHONY: api-development api-development: build/api build/api-db build/local-api-data-watcher-pusher build/keycloak build/keycloak-db build/broker build/broker-single build/api-redis IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) --compatibility up -d api api-db local-api-data-watcher-pusher keycloak keycloak-db broker api-redis + +## CI targets + +KIND_VERSION = v0.10.0 +GOJQ_VERSION = v0.11.2 +KIND_IMAGE = kindest/node:v1.20.2@sha256:8f7ea6e7642c0da54f04a7ee10431549c0257315b3a634f6ef2fecaaedb19bab +TESTS = [api,features-kubernetes,nginx,drupal-php73,drupal-php74,drupal-postgres,python,gitlab,github,bitbucket,node-mongodb,elasticsearch] +CHARTS_TREEISH = main + +local-dev/kind: +ifeq ($(KIND_VERSION), $(shell kind version 2>/dev/null | sed -nE 's/kind (v[0-9.]+).*/\1/p')) + $(info linking local kind version $(KIND_VERSION)) + ln -s $(shell command -v kind) ./local-dev/kind +else + $(info downloading kind version $(KIND_VERSION) for $(ARCH)) + curl -sSLo local-dev/kind https://github.com/kubernetes-sigs/kind/releases/download/$(KIND_VERSION)/kind-$(ARCH)-amd64 + chmod a+x local-dev/kind +endif + +local-dev/jq: +ifeq ($(GOJQ_VERSION), $(shell jq -v 2>/dev/null | sed -nE 's/gojq ([0-9.]+).*/v\1/p')) + $(info linking local jq version $(KIND_VERSION)) + ln -s $(shell command -v jq) ./local-dev/jq +else + $(info downloading gojq version $(GOJQ_VERSION) for $(ARCH)) +ifeq ($(ARCH), darwin) + TMPDIR=$$(mktemp -d) \ + && curl -sSL https://github.com/itchyny/gojq/releases/download/$(GOJQ_VERSION)/gojq_$(GOJQ_VERSION)_$(ARCH)_amd64.zip -o $$TMPDIR/gojq.zip \ + && (cd $$TMPDIR && unzip gojq.zip) && cp $$TMPDIR/gojq_$(GOJQ_VERSION)_$(ARCH)_amd64/gojq ./local-dev/jq && rm -rf $$TMPDIR +else + curl -sSL https://github.com/itchyny/gojq/releases/download/$(GOJQ_VERSION)/gojq_$(GOJQ_VERSION)_$(ARCH)_amd64.tar.gz | tar -xzC local-dev --strip-components=1 gojq_$(GOJQ_VERSION)_$(ARCH)_amd64/gojq + mv ./local-dev/{go,}jq +endif + chmod a+x local-dev/jq +endif + +.PHONY: helm/repos +helm/repos: local-dev/helm + # install repo dependencies required by the charts + ./local-dev/helm repo add harbor https://helm.goharbor.io + ./local-dev/helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx + ./local-dev/helm repo add stable https://charts.helm.sh/stable + ./local-dev/helm repo add bitnami https://charts.bitnami.com/bitnami + ./local-dev/helm repo add amazeeio https://amazeeio.github.io/charts/ + ./local-dev/helm repo add lagoon https://uselagoon.github.io/lagoon-charts/ + ./local-dev/helm repo update + +# stand up a kind cluster configured appropriately for lagoon testing +.PHONY: kind/cluster +kind/cluster: local-dev/kind + ./local-dev/kind get clusters | grep -q "$(CI_BUILD_TAG)" && exit; \ + docker network create kind || true \ + && export KUBECONFIG=$$(mktemp) \ + KINDCONFIG=$$(mktemp ./kindconfig.XXX) \ + KIND_NODE_IP=$$(docker run --rm --network kind alpine ip -o addr show eth0 | sed -nE 's/.* ([0-9.]{7,})\/.*/\1/p') \ + && chmod 644 $$KUBECONFIG \ + && curl -sSLo $$KINDCONFIG.tpl https://raw.githubusercontent.com/uselagoon/lagoon-charts/$(CHARTS_TREEISH)/test-suite.kind-config.yaml.tpl \ + && envsubst < $$KINDCONFIG.tpl > $$KINDCONFIG \ + && echo ' [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]' >> $$KINDCONFIG \ + && echo ' endpoint = ["https://imagecache.amazeeio.cloud", "https://index.docker.io/v1/"]' >> $$KINDCONFIG \ + && echo 'nodes:' >> $$KINDCONFIG \ + && echo '- role: control-plane' >> $$KINDCONFIG \ + && echo ' image: $(KIND_IMAGE)' >> $$KINDCONFIG \ + && echo ' extraMounts:' >> $$KINDCONFIG \ + && echo ' - containerPath: /var/lib/kubelet/config.json' >> $$KINDCONFIG \ + && echo ' hostPath: $(HOME)/.docker/config.json' >> $$KINDCONFIG \ + && echo ' - containerPath: /lagoon/services' >> $$KINDCONFIG \ + && echo ' hostPath: ./services' >> $$KINDCONFIG \ + && echo ' readOnly: false' >> $$KINDCONFIG \ + && echo ' - containerPath: /lagoon/node-packages' >> $$KINDCONFIG \ + && echo ' hostPath: ./node-packages' >> $$KINDCONFIG \ + && echo ' readOnly: false' >> $$KINDCONFIG \ + && KIND_CLUSTER_NAME="$(CI_BUILD_TAG)" ./local-dev/kind create cluster --config=$$KINDCONFIG \ + && cp $$KUBECONFIG "kubeconfig.kind.$(CI_BUILD_TAG)" \ + && echo -e 'Interact with the cluster during the test run in Jenkins like so:\n' \ + && echo "export KUBECONFIG=\$$(mktemp) && scp $$NODE_NAME:$$KUBECONFIG \$$KUBECONFIG && KIND_PORT=\$$(sed -nE 's/.+server:.+:([0-9]+)/\1/p' \$$KUBECONFIG) && ssh -fNL \$$KIND_PORT:127.0.0.1:\$$KIND_PORT $$NODE_NAME" \ + && echo -e '\nOr running locally:\n' \ + && echo -e './local-dev/kind export kubeconfig --name "$(CI_BUILD_TAG)"\n' \ + && echo -e 'kubectl ...\n' +ifeq ($(ARCH), darwin) + export KUBECONFIG="$$(pwd)/kubeconfig.kind.$(CI_BUILD_TAG)" && \ + if ! ifconfig lo0 | grep $$(./local-dev/kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}') -q; then sudo ifconfig lo0 alias $$(./local-dev/kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}'); fi + docker rm --force $(CI_BUILD_TAG)-kind-proxy-32080 || true + docker run -d --name $(CI_BUILD_TAG)-kind-proxy-32080 \ + --publish 32080:32080 \ + --link $(CI_BUILD_TAG)-control-plane:target --network kind \ + alpine/socat -dd \ + tcp-listen:32080,fork,reuseaddr tcp-connect:target:32080 +endif + +KIND_SERVICES = api api-db api-redis auth-server broker controllerhandler docker-host drush-alias keycloak keycloak-db webhook-handler webhooks2tasks kubectl-build-deploy-dind local-api-data-watcher-pusher local-git ssh tests ui +KIND_TESTS = local-api-data-watcher-pusher local-git tests +KIND_TOOLS = kind helm kubectl jq + +# install lagoon charts and run lagoon test suites in a kind cluster +.PHONY: kind/test +kind/test: kind/cluster helm/repos $(addprefix local-dev/,$(KIND_TOOLS)) $(addprefix build/,$(KIND_SERVICES)) + export CHARTSDIR=$$(mktemp -d ./lagoon-charts.XXX) \ + && ln -sfn "$$CHARTSDIR" lagoon-charts.kind.lagoon \ + && git clone https://github.com/uselagoon/lagoon-charts.git "$$CHARTSDIR" \ + && cd "$$CHARTSDIR" \ + && git checkout $(CHARTS_TREEISH) \ + && export KUBECONFIG="$$(realpath ../kubeconfig.kind.$(CI_BUILD_TAG))" \ + && export IMAGE_REGISTRY="registry.$$(../local-dev/kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/library" \ + && $(MAKE) install-registry HELM=$$(realpath ../local-dev/helm) KUBECTL=$$(realpath ../local-dev/kubectl) \ + && cd .. && $(MAKE) -j6 kind/push-images && cd "$$CHARTSDIR" \ + && $(MAKE) fill-test-ci-values TESTS=$(TESTS) IMAGE_TAG=$(SAFE_BRANCH_NAME) \ + HELM=$$(realpath ../local-dev/helm) KUBECTL=$$(realpath ../local-dev/kubectl) \ + JQ=$$(realpath ../local-dev/jq) \ + OVERRIDE_BUILD_DEPLOY_DIND_IMAGE=$$IMAGE_REGISTRY/kubectl-build-deploy-dind:$(SAFE_BRANCH_NAME) \ + IMAGE_REGISTRY=$$IMAGE_REGISTRY \ + && sleep 30 \ + && docker run --rm --network host --name ct-$(CI_BUILD_TAG) \ + --volume "$$(pwd)/test-suite-run.ct.yaml:/etc/ct/ct.yaml" \ + --volume "$$(pwd):/workdir" \ + --volume "$$(realpath ../kubeconfig.kind.$(CI_BUILD_TAG)):/root/.kube/config" \ + --workdir /workdir \ + "quay.io/helmpack/chart-testing:v3.3.1" \ + ct install + +LOCAL_DEV_SERVICES = api auth-server controllerhandler logs2email logs2microsoftteams logs2rocketchat logs2slack ui webhook-handler webhooks2tasks + +# kind/local-dev-patch will build the services in LOCAL_DEV_SERVICES on your machine, and then use kubectl patch to mount the folders into Kubernetes +# the deployments should be restarted to trigger any updated code changes +# `kubectl rollout undo deployment` can be used to rollback a deployment to before the annotated patch +# ensure that the correct version of Node to build the services is set on your machine +.PHONY: kind/local-dev-patch +kind/local-dev-patch: + export KUBECONFIG="$$(pwd)/kubeconfig.kind.$(CI_BUILD_TAG)" && \ + export IMAGE_REGISTRY="registry.$$(./local-dev/kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/library" \ + && for image in $(LOCAL_DEV_SERVICES); do \ + echo "building $$image" \ + && cd services/$$image && yarn install && yarn build && cd ../..; \ + done \ + && for image in $(LOCAL_DEV_SERVICES); do \ + echo "patching lagoon-core-$$image" \ + && ./local-dev/kubectl --namespace lagoon patch deployment lagoon-core-$$image --patch-file ./local-dev/kubectl-patches/$$image.yaml; \ + done + +# kind/dev can only be run once a cluster is up and running (run kind/test first) - it doesn't rebuild the cluster at all, just pushes the built images +# into the image registry and reinstalls the lagoon-core helm chart. +.PHONY: kind/dev +kind/dev: $(addprefix build/,$(KIND_SERVICES)) + export KUBECONFIG="$$(realpath ./kubeconfig.kind.$(CI_BUILD_TAG))" \ + && export IMAGE_REGISTRY="registry.$$(./local-dev/kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/library" \ + && $(MAKE) kind/push-images && cd lagoon-charts.kind.lagoon \ + && $(MAKE) install-lagoon-core IMAGE_TAG=$(SAFE_BRANCH_NAME) \ + HELM=$$(realpath ../local-dev/helm) KUBECTL=$$(realpath ../local-dev/kubectl) \ + JQ=$$(realpath ../local-dev/jq) \ + OVERRIDE_BUILD_DEPLOY_DIND_IMAGE=$$IMAGE_REGISTRY/kubectl-build-deploy-dind:$(SAFE_BRANCH_NAME) \ + IMAGE_REGISTRY=$$IMAGE_REGISTRY + +.PHONY: kind/push-images +kind/push-images: + export KUBECONFIG="$$(pwd)/kubeconfig.kind.$(CI_BUILD_TAG)" && \ + export IMAGE_REGISTRY="registry.$$(./local-dev/kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/library" \ + && docker login -u admin -p Harbor12345 $$IMAGE_REGISTRY \ + && for image in $(KIND_SERVICES); do \ + docker tag $(CI_BUILD_TAG)/$$image $$IMAGE_REGISTRY/$$image:$(SAFE_BRANCH_NAME) \ + && docker push $$IMAGE_REGISTRY/$$image:$(SAFE_BRANCH_NAME); \ + done + +## Use kind/retest to only perform a push of the local-dev, or test images, and run the tests +## It preserves the last build lagoon core&remote setup, reducing rebuild time +.PHONY: kind/retest +kind/retest: + export KUBECONFIG="$$(pwd)/kubeconfig.kind.$(CI_BUILD_TAG)" && \ + export IMAGE_REGISTRY="registry.$$(./local-dev/kubectl get nodes -o jsonpath='{.items[0].status.addresses[0].address}').nip.io:32080/library" \ + && docker login -u admin -p Harbor12345 $$IMAGE_REGISTRY \ + && for image in $(KIND_TESTS); do \ + docker tag $(CI_BUILD_TAG)/$$image $$IMAGE_REGISTRY/$$image:$(SAFE_BRANCH_NAME) \ + && docker push $$IMAGE_REGISTRY/$$image:$(SAFE_BRANCH_NAME); \ + done \ + && cd lagoon-charts.kind.lagoon \ + && $(MAKE) install-tests TESTS=$(TESTS) IMAGE_TAG=$(SAFE_BRANCH_NAME) \ + HELM=$$(realpath ../local-dev/helm) KUBECTL=$$(realpath ../local-dev/kubectl) \ + JQ=$$(realpath ../local-dev/jq) \ + IMAGE_REGISTRY=$$IMAGE_REGISTRY \ + && docker run --rm --network host --name ct-$(CI_BUILD_TAG) \ + --volume "$$(pwd)/test-suite-run.ct.yaml:/etc/ct/ct.yaml" \ + --volume "$$(pwd):/workdir" \ + --volume "$$(realpath ../kubeconfig.kind.$(CI_BUILD_TAG)):/root/.kube/config" \ + --workdir /workdir \ + "quay.io/helmpack/chart-testing:v3.3.1" \ + ct install + +.PHONY: kind/clean +kind/clean: local-dev/kind + KIND_CLUSTER_NAME="$(CI_BUILD_TAG)" ./local-dev/kind delete cluster diff --git a/README.md b/README.md index 4f7645b6fe..18e92042e9 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,158 @@

- The Lagoon logo is a blue hexagon split in two pieces with an L-shaped cut + The Lagoon logo is a blue hexagon split in two pieces with an L-shaped cut

-# amazee.io Lagoon - Docker Build and Deploy System for OpenShift & Kubernetes +# Lagoon - the developer-focused application delivery platform for Kubernetes + +Lagoon solves what developers are dreaming about: A system that allows developers to locally develop their code and their services with Docker and run the exact same system in production. The same container images, the same service configurations and the same code. + +> Lagoon is an application delivery **platform**. Its primary focus is as a cloud-native tool for the deployment, management, security and operation of many applications. Lagoon greatly reduces the requirement on developers of those applications to have cloud-native experience or knowledge. + +Lagoon is fully open-source, built on open-source tools, built collaboratively with our users. + +## Installing Lagoon + +*Note that is not necessary to install Lagoon on to your local machine if you are looking to maintain websites hosted on Lagoon.* + +Lagoon can be installed: + +- Locally (for evaluation, testing, debugging or development) using [Helm](https://helm.sh/) charts and [kind](https://kind.sigs.k8s.io/) +- Into your managed Kubernetes cloud provider of choice - it's running in production on [Amazon Elastic Kubernetes Service](https://aws.amazon.com/eks/), [Azure Kubernetes Service](https://azure.microsoft.com/en-au/services/kubernetes-service/), and [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/), but we are confident that it will also run on any other managed Kubernetes service. + +For more information on developing or contributing to Lagoon, head to https://docs.lagoon.sh/lagoon/contributing-to-lagoon + +For more information on installing and administering Lagoon, head to https://docs.lagoon.sh/lagoon/administering-lagoon + +## Lagoon architecture + +Lagoon comprises two main components: Lagoon Core and Lagoon Remote. It's also built on several other third-party services, Operators and Controllers. In a full production setting, we recommend installing Lagoon Core and Remote into different Kubernetes Clusters. A single Lagoon Core installation is capable of serving multiple Remotes, but they can also be installed into the same cluster if preferred. + +To enhance security, Lagoon Core does not need administrator-level access to the Kubernetes clusters that are running Lagoon Remote. All inter-cluster communication happens only via RabbitMQ. This is hosted in Lagoon Core, and consumed (and published back to) by Lagoon Remote. This allows Lagoon Remotes to be managed by different teams, in different locations - even behind firewalls or inaccessible from the internet. + +Lagoon services are mostly built in Node.js. More recent development occurs in Go, and most of the automation and scripting components are in Bash. + +### Lagoon Core + +All the services that handle the API, authentication and external communication are installed here. Installation is via a [Helm Chart](https://github.com/uselagoon/lagoon-charts/tree/main/charts/lagoon-core) +- API + - [api](https://github.com/amazeeio/lagoon/tree/main/services/api) (the GraphQL API that powers Lagoon) + - [api-db](https://github.com/amazeeio/lagoon/tree/main/services/api-db) (the MariaDB storage for the API) + - [api-redis](https://github.com/amazeeio/lagoon/tree/main/services/api-redis) (the cache layer for API queries) +- Authentication + - [keycloak](https://github.com/amazeeio/lagoon/tree/main/services/keycloak) (the main authentication application) + - [keycloak-db](https://github.com/amazeeio/lagoon/tree/main/services/keycloak-db) (the MariaDB storage for Keycloak) + - [auth-server](https://github.com/amazeeio/lagoon/tree/main/services/auth-server) (generates authentication tokens for Lagoon services) + - [ssh](https://github.com/amazeeio/lagoon/tree/main/services/ssh) (provides developers with ssh access to the sites hosted on Lagoon) +- Messaging + - [broker](https://github.com/amazeeio/lagoon/tree/main/services/broker) (the RabbitMQ message service used to communicate with Lagoon Remote) + - [webhooks2tasks](https://github.com/amazeeio/lagoon/tree/main/services/webhooks2tasks) (the service that converts incoming webhooks to API updates) + - [controllerhandler](https://github.com/amazeeio/lagoon/tree/main/services/controllerhandler) (the service that relays build progress from the controllers) +- Webhooks + - [webhook-handler](https://github.com/amazeeio/lagoon/tree/main/services/webhook-handler) (the external service that Git Repositories and Registries communicate with) +- Notifications + - [logs2email](https://github.com/amazeeio/lagoon/tree/main/services/logs2email) (the service that pushes build notifications to a nominated email address) + - [logs2slack](https://github.com/amazeeio/lagoon/tree/main/services/logs2slack) (the service that pushes build notifications to a nominated Slack (or Discord) channel) + - [logs2rocketchat](https://github.com/amazeeio/lagoon/tree/main/services/logs2rocketchat) (the service that pushes build notifications to a nominated Rocket Chat channel) + - [logs2microsoftteams](https://github.com/amazeeio/lagoon/tree/main/services/logs2microsoftteams) (the service that pushes build notifications to a nominated Microsoft Teams channel) +- Other Services + - [ui](https://github.com/amazeeio/lagoon/tree/main/services/ui) (the main user interface and dashboard for Lagoon) + - [lagoon-cli](https://github.com/amazeeio/lagoon-cli) (the command-line interface for managing sites on Lagoon) + - [drush-alias](https://github.com/amazeeio/lagoon/tree/main/services/drush-alias) (provides Drupal developers with an automated alias service for Drush) + +### Lagoon Remote + +All the services that are used to provision, deploy and maintain sites hosted by Lagoon on Kubernetes live here. These services are mostly comprised of third-party tools, developed external to Lagoon itself. Installation is via a [Helm Chart](https://github.com/uselagoon/lagoon-charts/tree/main/charts/lagoon-remote) + +- [Lagoon Build Deploy](https://github.com/amazeeio/lagoon-kbd) (the controllers that handle building and deploying sites onto Lagoon) +- [kubectl-build-deploy](https://github.com/amazeeio/lagoon/tree/main/images/kubectl-build-deploy-dind) (the service that computes which services, configuration and settings to provision for Kubernetes) +- [docker-host](https://github.com/amazeeio/lagoon/tree/main/images/docker-host) (the service that stores and caches upstream docker images for use in builds) +- [lagoon-idler](https://github.com/amazeeio/lagoon-idler) (optional operator that can idle non-production sites not currently in use to conserve resources) +- [Dioscuri](https://github.com/amazeeio/dioscuri) (optional operator that provides Active/Standby functionality to Lagoon) +- [dbaas-operator](https://github.com/amazeeio/dbaas-operator) (optional operator that provisions databases from an underlying managed database) + +### Additional Services + +These services are usually installed alongside either Lagoon Core or Lagoon Remote to provide additional functionality to Lagoon. + +- Registry (required) + - [Harbor](https://goharbor.io/) (provides image registry services to Lagoon projects) + - [Trivy](https://github.com/aquasecurity/trivy) (scans images for vulnerability, and can report to Lagoon) + +- Lagoon Logging (optional) + - [lagoon-logging](https://github.com/uselagoon/lagoon-charts/tree/main/charts/lagoon-logging) (utilizes [banzaicloud/logging-operator](https://github.com/banzaicloud/logging-operator) to collect and augment container&router logs from all sites, and sends them to a logs-dispatcher) + - [logs-dispatcher](https://github.com/amazeeio/lagoon/tree/main/services/logs-dispatcher) (collects application logs from sites, as well as container&router logs from lagoon-logging, enriches them with additional metadata and sends them to a central log concentrator) + - [lagoon-logs-concentrator](https://github.com/uselagoon/lagoon-charts/tree/main/charts/lagoon-logs-concentrator) (collects logs from remote logs-dispatchers and sends them to Elasticsearch) + +- Open Policy Agent (optional) + + - [lagoon-gatekeeper](https://github.com/uselagoon/lagoon-charts/tree/main/charts/lagoon-gatekeeper) (centralized policy library for Lagoon) + +- Elasticsearch (optional) + - [Open Distro for Elasticsearch](https://opendistro.github.io/for-elasticsearch/) (provides centralized log storage, search and analysis) + - [Kibana](https://opendistro.github.io/for-elasticsearch-docs/docs/kibana/) (the default user interface for Elasticsearch searching and visualization) + +- Managed databases, for use with DBaaS operator (optional) + - MariaDB (self managed or via [Amazon RDS for MariaDB](https://aws.amazon.com/rds/mariadb/), [Azure Database for MariaDB](https://docs.microsoft.com/en-us/azure/mariadb/#:~:text=Azure Database for MariaDB is,predictable performance and dynamic scalability.)) + + - MySQL (self managed or via [Amazon RDS for MySQL](https://aws.amazon.com/rds/mysql/), [Amazon Aurora MySQL](https://aws.amazon.com/rds/aurora/mysql-features/), [Azure Database for MySQL](https://azure.microsoft.com/en-au/services/mysql), [Cloud SQL for MySQL](https://cloud.google.com/sql/docs/mysql)) + + - PostgreSQL (self managed or via [Amazon RDS for PostgreSQL](https://aws.amazon.com/rds/postgresql/), [Amazon Aurora PostgreSQL](https://aws.amazon.com/rds/aurora/postgresql-features/), [Azure Database for PostgreSQL](https://docs.microsoft.com/en-us/azure/postgresql), [Cloud SQL for PostgreSQL](https://cloud.google.com/sql/docs/postgres) ) + + - MongoDB (self managed, or via [Amazon DocumentDB](https://aws.amazon.com/documentdb/), [Azure Cosmos DB](https://azure.microsoft.com/en-au/services/cosmos-db/) ) + +### Testing + +Lagoon has a comprehensive [test suite](https://github.com/amazeeio/lagoon/tree/main/tests/tests), designed to cover most end-user scenarios. The testing is automated in Ansible, and runs in Jenkins, but can also be run locally in a self-contained cluster. The testing provisions a standalone Lagoon cluster, running on Kind (Kubernetes in Docker). This cluster is made of Lagoon Core, Lagoon Remote, an image registry and a set of managed databases. It runs test deployments and scenarios for a range of Node.js, Drupal, Python and NGINX projects, all built using the latest Lagoon images. + + +## Other Lagoon components + +Here are a number of other repositories, tools and components used in Lagoon + +### [Lagoon Images](https://github.com/uselagoon/lagoon-images) + +These images are used by developers to build web applications on, and come preconfigured for running on Lagoon as well as locally. There are php, NGINX, Node.JS, Python (and more) variants. These images are regularly updated, and are not only used in hosted projects, they're used in Lagoon too! + +To browse the full set of images, head to https://hub.docker.com/u/uselagoon + +### [Lagoon Examples](https://github.com/uselagoon/lagoon-examples) + +A meta-project that houses a wide range of example projects, ready-made for use on Lagoon. These projects also include test suites that are used in the testing of the images. Please request an example via that repository if you want to see a particular one, or even better, have a crack at making one! + +### [Lagoon Charts](https://github.com/uselagoon/lagoon-charts) + +Houses all the Helm Charts used to deploy Lagoon, it comes with a built-in test suite. + +To add the repository `helm repo add lagoon https://uselagoon.github.io/lagoon-charts/` + +### [amazee.io Charts](https://github.com/amazeeio/charts) + +amazee.io has developed a number of tools, charts and operators designed to work with Lagoon and other Kubernetes services. + +To add the repository `helm repo add lagoon https://amazeeio.github.io/charts/` -Lagoon solves what developers are dreaming about: A system that allows developers to locally develop their code and their services with Docker and run the exact same system in production. The same Docker images, the same service configurations and the same code. -Please reference our [documentation](https://lagoon.readthedocs.io/) for detailed information on using, developing, and administering Lagoon. ## Contribute -Do you want to contribute to Lagoon? Fabulous! [See our Documentation](https://lagoon.readthedocs.io/en/latest/contributing/) on how to get started. - -## Services - -This project contains the following services: -- [UI](/services/ui/) -- [logs2microsoftteams](/services/logs2microsoftteams/) -- [logs2rocketchat](/services/logs2rocketchat/) -- [logs-db-ui](/services/logs-db-ui/) -- [logs-db](/services/logs-db/) -- [auth-server](/services/auth-server/) -- [ssh](/services/ssh/) -- [logs2slack](/services/logs2slack/) -- [drush-alias](/services/drush-alias/) -- [webhooks2tasks](/services/webhooks2tasks/) -- [logs2email](/services/logs2email/) -- [backup-handler](/services/backup-handler/) -- [webhook-handler](/services/webhook-handler/) -- [logs2logs-db](/services/logs2logs-db/) +Do you want to contribute to Lagoon? Fabulous! [See our Documentation](https://docs.lagoon.sh/lagoon/contributing-to-lagoon/developing-lagoon) on how to get started. + + + +## History + +Lagoon was originally created and open sourced by the team at [amazee.io](https://www.amazee.io/) in August 2017, and powers their global hosting platform. + + + +## Connect + +Find more information about Lagoon: + +At our website - https://lagoon.sh + +In our documentation - https://docs.lagoon.sh + +In our blog - https://dev.to/uselagoon + +Via our socials - https://twitter.com/uselagoon diff --git a/charts/dbaas-operator.yaml b/charts/dbaas-operator.yaml deleted file mode 100644 index 3181b097fe..0000000000 --- a/charts/dbaas-operator.yaml +++ /dev/null @@ -1,382 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - control-plane: controller-manager - name: dbaas-operator-system ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.4 - creationTimestamp: null - name: mariadbconsumers.mariadb.amazee.io -spec: - group: mariadb.amazee.io - names: - kind: MariaDBConsumer - listKind: MariaDBConsumerList - plural: mariadbconsumers - singular: mariadbconsumer - scope: Namespaced - validation: - openAPIV3Schema: - description: MariaDBConsumer is the Schema for the mariadbconsumers API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: MariaDBConsumerSpec defines the desired state of MariaDBConsumer - properties: - consumer: - description: MariaDBConsumerData defines the provider link for this - consumer - properties: - database: - type: string - password: - type: string - services: - description: MariaDBConsumerServices defines the provider link for - this consumer - properties: - primary: - type: string - replicas: - items: - type: string - type: array - type: object - username: - type: string - type: object - environment: - description: These are the spec options for consumers - type: string - provider: - description: MariaDBConsumerProvider defines the provider link for this - consumer - properties: - hostname: - type: string - name: - type: string - namespace: - type: string - port: - type: string - readReplicas: - items: - type: string - type: array - type: - type: string - type: object - type: object - status: - description: MariaDBConsumerStatus defines the observed state of MariaDBConsumer - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.4 - creationTimestamp: null - name: mariadbproviders.mariadb.amazee.io -spec: - group: mariadb.amazee.io - names: - kind: MariaDBProvider - listKind: MariaDBProviderList - plural: mariadbproviders - singular: mariadbprovider - scope: Namespaced - validation: - openAPIV3Schema: - description: MariaDBProvider is the Schema for the mariadbproviders API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: MariaDBProviderSpec defines the desired state of MariaDBProvider - properties: - environment: - description: These are the spec options for providers - type: string - hostname: - type: string - name: - type: string - namespace: - type: string - password: - type: string - port: - type: string - readReplicaHostnames: - items: - type: string - type: array - type: - type: string - user: - type: string - type: object - status: - description: MariaDBProviderStatus defines the observed state of MariaDBProvider - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: dbaas-operator-leader-election-role - namespace: dbaas-operator-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - name: dbaas-operator-manager-role -rules: -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - mariadb.amazee.io - resources: - - mariadbconsumers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - mariadb.amazee.io - resources: - - mariadbconsumers/status - verbs: - - get - - patch - - update -- apiGroups: - - mariadb.amazee.io - resources: - - mariadbproviders - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - mariadb.amazee.io - resources: - - mariadbproviders/status - verbs: - - get - - patch - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: dbaas-operator-proxy-role -rules: -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: dbaas-operator-leader-election-rolebinding - namespace: dbaas-operator-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: dbaas-operator-leader-election-role -subjects: -- kind: ServiceAccount - name: default - namespace: dbaas-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: dbaas-operator-manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: dbaas-operator-manager-role -subjects: -- kind: ServiceAccount - name: default - namespace: dbaas-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: dbaas-operator-proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: dbaas-operator-proxy-role -subjects: -- kind: ServiceAccount - name: default - namespace: dbaas-operator-system ---- -apiVersion: v1 -kind: Service -metadata: - labels: - control-plane: controller-manager - name: dbaas-operator-controller-manager-metrics-service - namespace: dbaas-operator-system -spec: - ports: - - name: https - port: 8443 - targetPort: https - selector: - control-plane: controller-manager ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - control-plane: controller-manager - name: dbaas-operator-controller-manager - namespace: dbaas-operator-system -spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=10 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - - args: - - --metrics-addr=127.0.0.1:8080 - - --enable-leader-election - command: - - /manager - image: amazeeio/dbaas-operator:v0.1.0 - name: manager - resources: - limits: - cpu: 100m - memory: 30Mi - requests: - cpu: 100m - memory: 20Mi - terminationGracePeriodSeconds: 10 \ No newline at end of file diff --git a/charts/dbaas-providers.yaml b/charts/dbaas-providers.yaml deleted file mode 100644 index 0f711f0cda..0000000000 --- a/charts/dbaas-providers.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: mariadb.amazee.io/v1 -kind: MariaDBProvider -metadata: - name: mariadbprovider-development -spec: - environment: development - hostname: development.172.17.0.1.nip.io - readreplica_hostnames: - - development.replica.172.17.0.1.nip.io - password: password - port: '3306' - user: root ---- -apiVersion: mariadb.amazee.io/v1 -kind: MariaDBProvider -metadata: - name: mariadbprovider-production -spec: - environment: production - hostname: production.172.17.0.1.nip.io - readreplica_hostnames: - - production.replica.172.17.0.1.nip.io - password: password - port: '3306' - user: root \ No newline at end of file diff --git a/charts/role-mariadb-operator.yaml b/charts/role-mariadb-operator.yaml deleted file mode 100644 index 25f7b44b50..0000000000 --- a/charts/role-mariadb-operator.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# use for lagoon-deployer to be able to create mariadbconsumer kinds -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: mariadbconsumer-role - labels: - # Add these permissions to the "admin" and "edit" default roles. - rbac.authorization.k8s.io/aggregate-to-admin: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" -rules: -- apiGroups: ["mariadb.amazee.io"] - resources: ["mariadbconsumers"] - verbs: ["*"] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: mariadbprovider-role - labels: - # Add these permissions to the "admin" and "edit" default roles. - rbac.authorization.k8s.io/aggregate-to-admin: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" -rules: -- apiGroups: ["mariadb.amazee.io"] - resources: ["mariadbproviders"] - verbs: ["*"] \ No newline at end of file diff --git a/docker-compose.end2end.yaml b/docker-compose.end2end.yaml deleted file mode 100644 index e0b5a7bde4..0000000000 --- a/docker-compose.end2end.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3.2' -services: - tests: - environment: - - WEBHOOK_HOST=webhook-handler-lagoon-master.lagoon.ch.amazee.io - - WEBHOOK_PORT=443 - - WEBHOOK_PROTOCOL=https - - OPENSHIFT_ROUTE_SUFFIX=ch.amazee.io - - WEBHOOK_REPO_PREFIX=git@github.com:lagoon-end2end-ci/ - - GIT_REPO_PREFIX=git@github.com:lagoon-end2end-ci/ - - SSH_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY----- - - SSH_HOST=api-lagoon-master.lagoon.ch.amazee.io - - SSH_PORT=31472 - - API_HOST=api-lagoon-master.lagoon.ch.amazee.io - - API_PROTOCOL=https - - API_PORT=443 \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 84b6caafc4..690549ed08 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,10 +7,6 @@ services: - ./services/api-db/rerun_initdb.sh:/rerun_initdb.sh ports: - '3366:3306' - labels: - lagoon.type: custom - lagoon.template: services/api-db/.lagoon.app.yml - lagoon.image: amazeeiolagoon/api-db:v1-9-1 webhook-handler: image: ${IMAGE_REPO:-lagoon}/webhook-handler command: yarn run dev @@ -19,19 +15,11 @@ services: volumes: - ./services/webhook-handler/src:/app/services/webhook-handler/src - ./node-packages:/app/node-packages:delegated - labels: - lagoon.type: custom - lagoon.template: services/webhook-handler/.lagoon.app.yml - lagoon.image: amazeeiolagoon/webhook-handler:v1-9-1 backup-handler: image: ${IMAGE_REPO:-lagoon}/backup-handler restart: on-failure ports: - '7778:3000' - labels: - lagoon.type: custom - lagoon.template: services/backup-handler/.lagoon.app.yml - lagoon.image: amazeeiolagoon/backup-handler:v1-9-1 depends_on: - broker broker: @@ -39,60 +27,36 @@ services: ports: - '15672:15672' - '5672:5672' - labels: - lagoon.type: rabbitmq-cluster - lagoon.template: services/broker/.lagoon.app.yml - lagoon.image: amazeeiolagoon/broker:v1-9-1 controllerhandler: image: ${IMAGE_REPO:-lagoon}/controllerhandler command: yarn run dev volumes: - ./services/controllerhandler/src:/app/services/controllerhandler/src - ./node-packages:/app/node-packages:delegated - labels: - lagoon.type: custom - lagoon.template: services/controllerhandler/.lagoon.app.yml - lagoon.image: amazeeiolagoon/controllerhandler:v1-9-1 logs2rocketchat: image: ${IMAGE_REPO:-lagoon}/logs2rocketchat command: yarn run dev volumes: - ./services/logs2rocketchat/src:/app/services/logs2rocketchat/src - ./node-packages:/app/node-packages:delegated - labels: - lagoon.type: custom - lagoon.template: services/logs2rocketchat/.lagoon.app.yml - lagoon.image: amazeeiolagoon/logs2rocketchat:v1-9-1 logs2slack: image: ${IMAGE_REPO:-lagoon}/logs2slack command: yarn run dev volumes: - ./services/logs2slack/src:/app/services/logs2slack/src - ./node-packages:/app/node-packages:delegated - labels: - lagoon.type: custom - lagoon.template: services/logs2slack/.lagoon.app.yml - lagoon.image: amazeeiolagoon/logs2slack:v1-9-1 logs2microsoftteams: image: ${IMAGE_REPO:-lagoon}/logs2microsoftteams command: yarn run dev volumes: - ./services/logs2microsoftteams/src:/app/services/logs2microsoftteams/src - ./node-packages:/app/node-packages:delegated - labels: - lagoon.type: custom - lagoon.template: services/logs2microsoftteams/.lagoon.app.yml - lagoon.image: amazeeiolagoon/logs2microsoftteams:v1-9-1 logs2email: image: ${IMAGE_REPO:-lagoon}/logs2email command: yarn run dev volumes: - ./services/logs2email/src:/app/services/logs2email/src - ./node-packages:/app/node-packages:delegated - labels: - lagoon.type: custom - lagoon.template: services/logs2slack/.lagoon.app.yml - lagoon.image: amazeeiolagoon/logs2email:v1-9-1 depends_on: - mailhog mailhog: @@ -107,19 +71,16 @@ services: volumes: - ./services/webhooks2tasks/src:/app/services/webhooks2tasks/src - ./node-packages:/app/node-packages:delegated - labels: - lagoon.type: custom - lagoon.template: services/webhooks2tasks/.lagoon.app.yml - lagoon.image: amazeeiolagoon/webhooks2tasks:v1-9-1 api: image: ${IMAGE_REPO:-lagoon}/api command: yarn run dev volumes: - ./services/api/src:/app/services/api/src - ./node-packages:/app/node-packages:delegated + - /app/node-packages/commons/dist environment: - CI=${CI:-true} - - REGISTRY=172.17.0.1:8084 # Docker network bridge and forwarded port for harbor-nginx + - REGISTRY=harbor.172.17.0.1.nip.io:18080 # Docker network bridge and forwarded port for harbor-nginx depends_on: - api-db - keycloak @@ -143,10 +104,6 @@ services: - ./services/ui/package.json:/app/services/ui/package.json ports: - '8888:3000' - labels: - lagoon.type: custom - lagoon.template: services/ui/.lagoon.app.yml - lagoon.image: amazeeiolagoon/ui:v1-9-1 ssh: image: ${IMAGE_REPO:-lagoon}/ssh depends_on: @@ -164,10 +121,6 @@ services: volumes: - ./services/ssh/home/command.sh:/home/command.sh - ./services/ssh/home/rsh.sh:/home/rsh.sh - labels: - lagoon.type: custom - lagoon.template: services/ssh/.lagoon.app.yml - lagoon.image: amazeeiolagoon/ssh:v1-9-1 auth-server: image: ${IMAGE_REPO:-lagoon}/auth-server command: yarn run dev @@ -178,10 +131,6 @@ services: - ./services/auth-server/src:/app/services/auth-server/src ports: - '3001:3000' - labels: - lagoon.type: custom - lagoon.template: services/auth-server/.lagoon.app.yml - lagoon.image: amazeeiolagoon/auth-server:v1-9-1 keycloak: image: ${IMAGE_REPO:-lagoon}/keycloak user: '111111111' @@ -189,10 +138,6 @@ services: - keycloak-db ports: - '8088:8080' - labels: - lagoon.type: custom - lagoon.template: services/keycloak/.lagoon.app.yml - lagoon.image: amazeeiolagoon/keycloak:v1-9-1 keycloak-db: image: ${IMAGE_REPO:-lagoon}/keycloak-db ports: @@ -224,8 +169,6 @@ services: - DELETED_STATUS_CODE=404 volumes: - ./tests:/ansible - labels: - lagoon.type: none tests-openshift: image: ${IMAGE_REPO:-lagoon}/tests environment: @@ -249,16 +192,12 @@ services: - DELETED_STATUS_CODE=503 volumes: - ./tests:/ansible - labels: - lagoon.type: none local-git: image: ${IMAGE_REPO:-lagoon}/local-git environment: - GIT_AUTHORIZED_KEYS=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw== ansible-testing ports: - '2222:22' - labels: - lagoon.type: none remotedev: image: jhen0409/remotedev-server command: node main.js @@ -267,8 +206,6 @@ services: - PORT=9090 ports: - '9090:9090' - labels: - lagoon.type: none local-api-data-watcher-pusher: depends_on: - api @@ -276,8 +213,6 @@ services: volumes: - ./local-dev/api-data:/api-data - ./local-dev/api-data-watcher-pusher:/home - labels: - lagoon.type: none local-dbaas-provider: image: ${IMAGE_REPO:-lagoon}/local-dbaas-provider restart: always @@ -290,6 +225,13 @@ services: MYSQL_ROOT_PASSWORD: 'password' ports: - '3306:3306' + local-mongodb-dbaas-provider: + image: ${IMAGE_REPO:-lagoon}/local-mongodb-dbaas-provider + restart: always + labels: + lagoon.type: none + ports: + - '27017:27017' local-minio: image: minio/minio entrypoint: sh @@ -299,14 +241,10 @@ services: environment: - MINIO_ACCESS_KEY=minio - MINIO_SECRET_KEY=minio123 - labels: - lagoon.type: none local-registry: image: ${IMAGE_REPO:-lagoon}/local-registry ports: - '5000:5000' - labels: - lagoon.type: none drush-alias: image: ${IMAGE_REPO:-lagoon}/drush-alias volumes: @@ -314,67 +252,7 @@ services: ports: - '8087:8080' labels: - lagoon.type: custom - lagoon.template: services/drush-alias/.lagoon.app.yml - lagoon.image: amazeeiolagoon/drush-alias:v1-9-1 version: '2' - logs-db: - image: ${IMAGE_REPO:-lagoon}/logs-db - user: '111111111' - environment: - KEYCLOAK_URL: http://keycloak:8080 - ports: - - '9200:9200' - networks: - default: - aliases: - - logs-db-service - labels: - lagoon.type: elasticsearch - lagoon.template: services/logs-db/.lagoon.single.yml - lagoon.image: amazeeiolagoon/logs-db:v1-9-1 - logs-forwarder: - image: ${IMAGE_REPO:-lagoon}/logs-forwarder - user: '111111111' - labels: - lagoon.type: custom - lagoon.template: services/logs-forwarder/.lagoon.single.yml - lagoon.image: amazeeiolagoon/logs-forwarder:v1-9-1 - logs-db-ui: - image: ${IMAGE_REPO:-lagoon}/logs-db-ui - user: '111111111' - ports: - - '5601:5601' - environment: - KEYCLOAK_URL: http://${KEYCLOAK_URL:-docker.for.mac.localhost:8088} - LOGSDB_UI_URL: http://0.0.0.0:5601 - labels: - lagoon.type: kibana - lagoon.template: services/logs-db-ui/.lagoon.yml - lagoon.image: amazeeiolagoon/logs-db-ui:v1-9-1 - logs-db-curator: - image: ${IMAGE_REPO:-lagoon}/logs-db-curator - user: '111111111' - labels: - lagoon.type: cli - lagoon.template: services/logs-db-curator/.lagoon.app.yml - lagoon.image: amazeeiolagoon/logs-db-curator:v1-9-1 - logs2logs-db: - image: ${IMAGE_REPO:-lagoon}/logs2logs-db - user: '111111111' - command: - - '--config.reload.automatic' - - '--config.reload.interval' - - '1s' - ports: - - '5140:5140/udp' - - '5141:5141/udp' - volumes: - - './services/logs2logs-db/pipeline:/usr/share/logstash/pipeline' - labels: - lagoon.type: logstash - lagoon.template: services/logs2logs-db/.lagoon.yml - lagoon.image: amazeeiolagoon/logs2logs-db:v1-9-1 auto-idler: image: ${IMAGE_REPO:-lagoon}/auto-idler user: '111111111' @@ -384,242 +262,10 @@ services: - './services/auto-idler/openshift-services.sh:/openshift-services.sh' - './services/auto-idler/openshift-clis.sh:/openshift-clis.sh' - './services/auto-idler/create_jwt.py:/create_jwt.py' - labels: - lagoon.type: custom - lagoon.template: services/auto-idler/.lagoon.yml - lagoon.image: amazeeiolagoon/auto-idler:v1-9-1 storage-calculator: image: ${IMAGE_REPO:-lagoon}/storage-calculator user: '111111111' volumes: - './services/storage-calculator/calculate-storage.sh:/calculate-storage.sh' - labels: - lagoon.type: custom - lagoon.template: services/storage-calculator/.lagoon.yml - lagoon.image: amazeeiolagoon/storage-calculator:v1-9-1 - logs-collector: - image: openshift/origin-logging-fluentd:v3.6.1 - labels: - lagoon.type: custom - lagoon.template: services/logs-collector/.lagoon.yml - lagoon.rollout: daemonset - harbor-core: - image: ${IMAGE_REPO:-lagoon}/harbor-core - hostname: harbor-core - volumes: - - ${PWD}/services/harbor-core/harbor-core_ci.conf.yaml:/etc/core/app.conf - - ${PWD}/services/harbor-core/ci-secret.key:/etc/core/key - - ${PWD}/services/harbor-core/ci_tls.key:/etc/core/private_key.pem - - /etc/core/token - depends_on: - - harbor-database - - harbor-redis - ports: - - '8081:8080' - environment: - - DATABASE_TYPE=postgresql - - POSTGRESQL_HOST=harbor-database - - POSTGRESQL_PORT=5432 - - POSTGRESQL_USERNAME=postgres - - POSTGRESQL_PASSWORD=test123 - - POSTGRESQL_DATABASE=registry - - POSTGRESQL_SSLMODE=disable - - POSTGRESQL_MAX_IDLE_CONNS=50 - - POSTGRESQL_MAX_OPEN_CONNS=100 - - CORE_URL=http://harbor-core:8080 - - JOBSERVICE_URL=http://harbor-jobservice:8080 - - REGISTRY_URL=http://harborregistry:5000 - - TOKEN_SERVICE_URL=http://harbor-core:8080/service/token - - WITH_NOTARY=false - - CFG_EXPIRATION=5 - - ADMIRAL_URL=NA - - WITH_CLAIR=true - - CLAIR_DB_HOST=harbor-database - - CLAIR_DB_PORT=5432 - - CLAIR_DB_USERNAME=postgres - - CLAIR_DB=postgres - - CLAIR_DB_SSLMODE=disable - - CLAIR_URL=http://harbor-trivy:6060 - - CLAIR_ADAPTER_URL=http://harbor-trivy:8080 - - REGISTRY_STORAGE_PROVIDER_NAME=s3 - - WITH_CHARTMUSEUM=false - - LOG_LEVEL=error - - CONFIG_PATH=/etc/core/app.conf - - SYNC_REGISTRY=false - - CHART_CACHE_DRIVER=redis - - _REDIS_URL=harbor-redis:6379,100, - - _REDIS_URL_REG=redis://harbor-redis:6379/2 - - PORTAL_URL=http://harbor-portal:8080 - - REGISTRYCTL_URL=http://harborregistryctl:8080 - - CLAIR_HEALTH_CHECK_SERVER_URL=http://harbor-trivy:6061 - - HTTP_PROXY= - - HTTPS_PROXY= - - NO_PROXY=harbor-core,harbor-jobservice,harbor-database,harborregistry,harbor-portal,harbor-trivy,127.0.0.1,localhost,.local,.internal - - HARBOR_NGINX_ENDPOINT=http://harbor-nginx:8080 - - ROBOT_TOKEN_DURATION=500 - - CORE_SECRET=secret123 - - JOBSERVICE_SECRET=secret123 - - REGISTRY_HTTP_SECRET=secret123 - - HARBOR_ADMIN_PASSWORD=admin - - CLAIR_DB_PASSWORD=test123 - - WITH_TRIVY=true - - TRIVY_ADAPTER_URL=http://harbor-trivy:8080 - restart: always - labels: - lagoon.type: custom - lagoon.template: services/harbor-core/harbor-core.yml - lagoon.image: amazeeiolagoon/harbor-core:v1-9-1 - harbor-database: - image: ${IMAGE_REPO:-lagoon}/harbor-database - hostname: harbor-database - ports: - - '5432:5432' - environment: - - POSTGRES_PASSWORD=test123 - - POSTGRES_USER=postgres - - POSTGRES_DB=postgres - restart: always - labels: - lagoon.type: custom - lagoon.template: services/harbor-database/harbor-database.yml - lagoon.image: amazeeiolagoon/harbor-database:v1-9-1 - harbor-jobservice: - image: ${IMAGE_REPO:-lagoon}/harbor-jobservice - hostname: harbor-jobservice - ports: - - '8083:8080' - volumes: - - /tmp - - ${PWD}/services/harbor-jobservice/ci-config.yaml:/etc/jobservice/config.yml - depends_on: - - harbor-database - - harbor-redis - - harbor-nginx - environment: - - CORE_SECRET=secret123 - - JOBSERVICE_SECRET=secret123 - - CORE_URL=http://harbor-core:8080 - - REGISTRY_CONTROLLER_URL=http://harborregistryctl:8080 - - LOG_LEVEL=error - - HTTP_PROXY= - - HTTPS_PROXY= - - NO_PROXY=harbor-core,harbor-jobservice,harbor-database,harborregistry,harbor-portal,harbor-trivy,127.0.0.1,localhost,.local,.internal - - SCANNER_CLAIR_DATABASE_URL=postgres://postgres:test123@harbor-database:5432/postgres?sslmode=disable - - SCANNER_STORE_REDIS_URL=redis://harbor-redis:6379/4 - - SCANNER_LOG_LEVEL=error - restart: always - labels: - lagoon.type: custom - lagoon.template: services/harbor-jobservice/harbor-jobservice.yml - lagoon.image: amazeeiolagoon/harbor-jobservice:v1-9-1 - harbor-nginx: - image: ${IMAGE_REPO:-lagoon}/harbor-nginx - hostname: harbor-nginx - ports: - - '8084:8080' - volumes: - - ${PWD}/services/harbor-nginx/ci.nginx.conf:/etc/nginx/nginx.conf - depends_on: - - harbor-core - - harborregistry - - harbor-portal - restart: always - labels: - lagoon.type: custom - lagoon.template: services/harbor-nginx/harbor-nginx.yml - lagoon.image: amazeeiolagoon/harbor-nginx:v1-9-1 - harbor-portal: - image: ${IMAGE_REPO:-lagoon}/harbor-portal - hostname: harbor-portal - ports: - - '8085:8080' - restart: always - labels: - lagoon.type: custom - lagoon.template: services/harbor-portal/harbor-portal.yml - lagoon.image: amazeeiolagoon/harbor-portal:v1-9-1 - harbor-redis: - image: ${IMAGE_REPO:-lagoon}/harbor-redis - hostname: harbor-redis - volumes: - - /var/lib/redis - restart: always - labels: - lagoon.type: custom - lagoon.template: services/harbor-redis/harbor-redis.yml - lagoon.image: amazeeiolagoon/harbor-redis:v1-9-1 - harbor-trivy: - image: ${IMAGE_REPO:-lagoon}/harbor-trivy - hostname: harbor-trivy - volumes: - - /tmp - depends_on: - - harbor-redis - - harbor-database - environment: - - SCANNER_LOG_LEVEL=error - - SCANNER_TRIVY_CACHE_DIR=/home/scanner/.cache/trivy - - SCANNER_TRIVY_REPORTS_DIR=/home/scanner/.cache/reports - - SCANNER_TRIVY_DEBUG_MODE=false - - SCANNER_TRIVY_VULN_TYPE=os,library - - SCANNER_TRIVY_GITHUB_TOKEN= - - SCANNER_TRIVY_SEVERITY=UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL - - SCANNER_TRIVY_IGNORE_UNFIXED=false - - SCANNER_TRIVY_SKIP_UPDATE=false - - SCANNER_STORE_REDIS_URL=redis://harbor-redis:6379/5 - - SCANNER_JOB_QUEUE_REDIS_URL=redis://harbor-redis:6379/5 - - TRIVY_NON_SSL=true - restart: on-failure - deploy: - resources: - limits: - cpus: "1" - memory: 1g - labels: - lagoon.type: custom - lagoon.template: services/harbor-trivy/harbor-trivy.yml - lagoon.name: harbor-trivy - lagoon.image: amazeeiolagoon/harbor-trivy:v1-9-1 - harborregistry: - image: ${IMAGE_REPO:-lagoon}/harborregistry - hostname: harborregistry - volumes: - - ${PWD}/services/harborregistry/registry_ci.cfg.yaml:/etc/registry/config.yml - - ${PWD}/services/harbor-core/ci_tls.crt:/etc/registry/root.crt - depends_on: - - harbor-database - - harbor-redis - environment: - - HARBOR_NGINX_ENDPOINT=http://harbor-nginx:8080 - - REGISTRY_REDIS_PASSWORD= - - CORE_SECRET=secret123 - - JOBSERVICE_SECRET=secret123 - - REGISTRY_HTTP_SECRET=secret123 - restart: always - command: ["serve", "/etc/registry/config.yml"] - labels: - lagoon.type: custom - lagoon.template: services/harborregistry/harborregistry.yml - lagoon.name: harborregistry - lagoon.image: amazeeiolagoon/harborregistry:v1-9-1 - harborregistryctl: - image: ${IMAGE_REPO:-lagoon}/harborregistryctl - hostname: harborregistryctl - volumes: - - ${PWD}/services/harborregistryctl/registryctl_ci.cfg.yaml:/etc/registryctl/config.yml - environment: - - REGISTRY_REDIS_PASSWORD= - - CORE_SECRET=secret123 - - JOBSERVICE_SECRET=secret123 - - REGISTRY_HTTP_SECRET=secret123 - labels: - lagoon.type: custom - lagoon.template: services/harborregistryctl/harborregistry.yml - lagoon.name: harborregistry - lagoon.image: amazeeiolagoon/harborregistryctl:v1-9-1 api-redis: image: ${IMAGE_REPO:-lagoon}/api-redis - labels: - lagoon.type: custom - lagoon.template: services/api-redis/.lagoon.app.yml - lagoon.image: amazeeiolagoon/api-redis:v1-9-1 diff --git a/docs/.gitbook/assets/container_overview (1).png b/docs/.gitbook/assets/container_overview.png similarity index 100% rename from docs/.gitbook/assets/container_overview (1).png rename to docs/.gitbook/assets/container_overview.png diff --git a/docs/.gitbook/assets/screen-shot-2020-01-23-at-1.04.06-pm.png b/docs/.gitbook/assets/gitlab-settings.png similarity index 100% rename from docs/.gitbook/assets/screen-shot-2020-01-23-at-1.04.06-pm.png rename to docs/.gitbook/assets/gitlab-settings.png diff --git a/docs/.gitbook/assets/graphiql-2020-01-29-18-05-54 (1) (1).png b/docs/.gitbook/assets/graphiql-2020-01-29-18-05-54 (1).png similarity index 100% rename from docs/.gitbook/assets/graphiql-2020-01-29-18-05-54 (1) (1).png rename to docs/.gitbook/assets/graphiql-2020-01-29-18-05-54 (1).png diff --git a/docs/.gitbook/assets/projects_overview (1).png b/docs/.gitbook/assets/projects_overview.png similarity index 100% rename from docs/.gitbook/assets/projects_overview (1).png rename to docs/.gitbook/assets/projects_overview.png diff --git a/docs/.gitbook/assets/repositories_overview (1).png b/docs/.gitbook/assets/repositories_overview.png similarity index 100% rename from docs/.gitbook/assets/repositories_overview (1).png rename to docs/.gitbook/assets/repositories_overview.png diff --git a/docs/.gitbook/assets/scanning_image_1 (2) (1).png b/docs/.gitbook/assets/scanning_image_1 (1).png similarity index 100% rename from docs/.gitbook/assets/scanning_image_1 (2) (1).png rename to docs/.gitbook/assets/scanning_image_1 (1).png diff --git a/docs/.gitbook/assets/scanning_image_1 (2).png b/docs/.gitbook/assets/scanning_image_1.png similarity index 100% rename from docs/.gitbook/assets/scanning_image_1 (2).png rename to docs/.gitbook/assets/scanning_image_1.png diff --git a/docs/.gitbook/assets/topgun (1).gif b/docs/.gitbook/assets/topgun.gif similarity index 100% rename from docs/.gitbook/assets/topgun (1).gif rename to docs/.gitbook/assets/topgun.gif diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 49e55e0166..1a6b53847a 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -26,8 +26,10 @@ * [Backups](using-lagoon-advanced/backups.md) * [Remote Shell](using-lagoon-advanced/remote-shell.md) * [GraphQL](using-lagoon-advanced/graphql.md) +* [Project Default Users and SSH keys](using-lagoon-advanced/project-default-users-keys.md) * [Node.js Graceful Shutdown](using-lagoon-advanced/nodejs.md) -* [Migrations from amazee.io](using-lagoon-advanced/migration.md) +* [Setting up Xdebug with Lagoon](using-lagoon-advanced/setting-up-xdebug-with-lagoon.md) +* [Environment Idling](using-lagoon-advanced/environment-idling.md) ## Drupal @@ -46,23 +48,6 @@ * [Logging](logging/logging.md) * [Kibana Examples](logging/kibana-examples.md) -## Administering Lagoon - -* [Install Lagoon 1.x on OpenShift](administering-lagoon/install.md) -* [OpenShift Requirements](administering-lagoon/openshift_requirements.md) -* [Install local Kubernetes cluster for Lagoon](administering-lagoon/install-local-kubernetes-cluster-for-lagoon.md) -* [GraphQL API](administering-lagoon/graphql-queries.md) -* [Role-Based Access Control \(RBAC\)](administering-lagoon/rbac.md) -* [Harbor](administering-lagoon/using_harbor/README.md) - * [Security Scanning](administering-lagoon/using_harbor/security_scanning.md) - * [Harbor Settings](administering-lagoon/using_harbor/harbor-settings/README.md) - * [Harbor-Core](administering-lagoon/using_harbor/harbor-settings/harbor-core.md) - * [Harbor-Database](administering-lagoon/using_harbor/harbor-settings/harbor-database.md) - * [Harbor-Jobservice](administering-lagoon/using_harbor/harbor-settings/harbor-jobservice.md) - * [Harbor-Trivy](administering-lagoon/using_harbor/harbor-settings/harbor-trivy.md) - * [HarborRegistry](administering-lagoon/using_harbor/harbor-settings/harborregistry.md) - * [HarborRegistryCtl](administering-lagoon/using_harbor/harbor-settings/harborregistryctl.md) - ## Docker Images * [Elasticsearch](docker-images/elasticsearch.md) @@ -84,11 +69,28 @@ * [Varnish](docker-images/varnish/README.md) * [Varnish-Drupal](docker-images/varnish/varnish-drupal.md) +## Administering Lagoon + +* [GraphQL API](administering-lagoon/graphql-queries.md) +* [Role-Based Access Control \(RBAC\)](administering-lagoon/rbac.md) +* [Harbor](administering-lagoon/using_harbor/README.md) + * [Security Scanning](administering-lagoon/using_harbor/security_scanning.md) + * [Harbor Settings](administering-lagoon/using_harbor/harbor-settings/README.md) + * [Harbor-Core](administering-lagoon/using_harbor/harbor-settings/harbor-core.md) + * [Harbor-Database](administering-lagoon/using_harbor/harbor-settings/harbor-database.md) + * [Harbor-Jobservice](administering-lagoon/using_harbor/harbor-settings/harbor-jobservice.md) + * [Harbor-Trivy](administering-lagoon/using_harbor/harbor-settings/harbor-trivy.md) + * [HarborRegistry](administering-lagoon/using_harbor/harbor-settings/harborregistry.md) + * [HarborRegistryCtl](administering-lagoon/using_harbor/harbor-settings/harborregistryctl.md) + ## Contributing to Lagoon +* [Developing Lagoon](contributing-to-lagoon/developing-lagoon.md) +* [Install Local Kubernetes Cluster for Lagoon](contributing-to-lagoon/install-local-kubernetes-cluster-for-lagoon.md) +* [Install Lagoon 1.x on OpenShift](contributing-to-lagoon/install/README.md) + * [OpenShift Requirements](contributing-to-lagoon/install/openshift_requirements.md) * [Code of Conduct](contributing-to-lagoon/code-of-conduct.md) * [Contributing](contributing-to-lagoon/contributing.md) -* [Developing Lagoon](contributing-to-lagoon/developing-lagoon.md) * [Tests](contributing-to-lagoon/tests.md) * [API Debugging](contributing-to-lagoon/api-debugging.md) @@ -97,4 +99,5 @@ * [FAQ](resources/faq.md) * [Glossary](resources/glossary.md) * [Tutorials, Webinars, and Videos](resources/tutorials-and-webinars.md) +* [Lagoon Examples](https://github.com/uselagoon/lagoon-examples) diff --git a/docs/administering-lagoon/graphql-queries.md b/docs/administering-lagoon/graphql-queries.md index 1fae896493..4dcd039e1a 100644 --- a/docs/administering-lagoon/graphql-queries.md +++ b/docs/administering-lagoon/graphql-queries.md @@ -29,7 +29,7 @@ Under "GraphQL Endpoint", enter the API endpoint URL with `/graphql` on the end. Press ESC to close the HTTP header overlay and now we are ready to send the first GraphQL request! -![Editing HTTP Headers in GraphiQL.](../.gitbook/assets/graphiql-2020-01-29-18-05-54%20%281%29%20%281%29.png) +![Editing HTTP Headers in GraphiQL.](../.gitbook/assets/graphiql-2020-01-29-18-05-54%20%281%29.png) Enter this in the left panel @@ -43,7 +43,7 @@ query allProjects{ ![Running a query in GraphiQL.](../.gitbook/assets/graphiql-2020-01-29-20-10-32%20%281%29%20%281%29.png) -And press the ▶️button \(or press CTRL+ENTER\). +And press the ▶️ button \(or press CTRL+ENTER\). If all went well, your first GraphQL response should appear shortly afterwards in the right pane. @@ -220,7 +220,7 @@ Now for every deployment you will receive messages in your defined channel. ### Adding a new OpenShift target {% hint style="info" %} -In Lagoon 1.x `addOpenshift` is used for both Openshift and Kubernetes targets. In Lagoon 2.x this will change. +In Lagoon 1.x `addOpenshift` is used for both OpenShift and Kubernetes targets. In Lagoon 2.x this will change. {% endhint %} The OpenShift cluster to which Lagoon should deploy. Lagoon is not only capable of deploying to its own OpenShift, but also to any OpenShift anywhere in the world. @@ -414,7 +414,7 @@ mutation { Update the production environment within a project: {% hint style="warning" %} -This required a redeploy in order for the changes to be reflected in the containers. +This requires a redeploy in order for the changes to be reflected in the containers. {% endhint %} ```graphql @@ -504,7 +504,7 @@ query search{ ## Maintaining project metadata -Project metadata can be assigned using arbitrary key/value pairs. Projects can then be queried by the associated metadata; for example you may categorise projects by type of software, version number, or any other categorisation you may wish to query on later. +Project metadata can be assigned using arbitrary key/value pairs. Projects can then be queried by the associated metadata; for example you may categorize projects by type of software, version number, or any other categorization you may wish to query on later. ### Add/update metadata on a project diff --git a/docs/administering-lagoon/rbac.md b/docs/administering-lagoon/rbac.md index 39389b7142..f2d42bb21a 100644 --- a/docs/administering-lagoon/rbac.md +++ b/docs/administering-lagoon/rbac.md @@ -52,7 +52,7 @@ Here is a table that lists the roles and the access they have: | :--- | :--- | :--- | :--- | ---: | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | addBackup | backup | add | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | deleteBackup | backup | delete | projectID | Yes | Yes | Yes | Yes | No | No | No | | -| deleteAllBackups | backup | deleteAll | | Yes | | | | | No | No | | +| deleteAllBackups | backup | deleteAll | | Yes | No | No | No | No | No | No | | | getBackupsByEnvironmentId | backup | view | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | | deployment | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | addEnvVariable \(to Project\) | env\_var | project:add | projectID | Yes | Yes | Yes | No | No | No | No | | @@ -64,12 +64,12 @@ Here is a table that lists the roles and the access they have: | getEnvVarsByEnvironmentId | env\_var | environment:view:production | projectID | Yes | Yes | Yes | Yes | No | No | No | | | addOrUpdateEnvironment | environment | addOrUpdate:development | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | addOrUpdateEnvironment | environment | addOrUpdate:production | projectID | Yes | Yes | Yes | Yes | No | No | No | | -| updateEnvironment | environment | update:development | projectID | Yes | Yes | Yes | Yes | Yes | | | | +| updateEnvironment | environment | update:development | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | updateEnvironment | environment | update:production | projectID | Yes | Yes | Yes | Yes | No | No | No | | | deleteEnvironment | environment | delete:development | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | deleteEnvironment | environment | delete:production | projectID | Yes | Yes | Yes | No | No | No | No | | -| deleteAllEnvironments | environment | deleteAll | | Yes | | | | | | | | -| addOrUpdateEnvironmentStorage | environment | storage | | Yes | Yes | | | | | | | +| deleteAllEnvironments | environment | deleteAll | | Yes | No | No | No | No | No | No | | +| addOrUpdateEnvironmentStorage | environment | storage | | Yes | Yes | No | No | No | No | No | | | addDeployment | environment | deploy:development | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | addDeployment | environment | deploy:production | projectID | Yes | Yes | Yes | Yes | No | No | No | | | deleteDeployment | deployment | delete | projectID | Yes | Yes | Yes | Yes | No | No | No | | @@ -85,52 +85,52 @@ Here is a table that lists the roles and the access they have: | deployEnvironmentPromote | environment | deploy:development | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | deployEnvironmentPromote | environment | deploy:production | projectID | Yes | Yes | Yes | Yes | No | No | No | | | getEnvironmentsByProjectId | environment | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | -| getEnvironmentStorageMonthByEnvironmentId | environment | storage | | Yes | | | | | | | | -| getEnvironmentHoursMonthByEnvironmentId | environment | storage | | Yes | | | | | | | | -| getEnvironmentHitsMonthByEnvironmentId | environment | storage | | Yes | | | | | | | | +| getEnvironmentStorageMonthByEnvironmentId | environment | storage | | Yes | No | No | No | No | No | No | | +| getEnvironmentHoursMonthByEnvironmentId | environment | storage | | Yes | No | No | No | No | No | No | | +| getEnvironmentHitsMonthByEnvironmentId | environment | storage | | Yes | No | No | No | No | No | No | | | getEnvironmentServicesByEnvironmentId | environment | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | addGroup | group | add | | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | updateGroup | group | update | groupID | Yes | Yes | Yes | Yes | No | No | No | | | deleteGroup | group | delete | groupID | Yes | Yes | Yes | Yes | No | No | No | | -| deleteAllGroups | group | deleteAll | | Yes | | | | | | | | +| deleteAllGroups | group | deleteAll | | Yes | No | No | No | No | No | No | | | addUserToGroup | group | addUser | groupID | Yes | Yes | Yes | Yes | No | No | No | | | removeUserFromGroup | group | removeUser | groupID | Yes | Yes | Yes | Yes | No | No | No | | -| addNotificationSlack | notification | add | | Yes | Yes | | | | | | | -| updateNotificationSlack | notification | update | | Yes | Yes | | | | | | | -| deleteNotificationSlack | notification | delete | | Yes | Yes | | | | | | | -| deleteAllNotificationSlacks | notification | deleteAll | | Yes | | | | | | | | -| addNotificationRocketChat | notification | add | | Yes | Yes | | | | | | | -| updateNotificationRocketChat | notification | update | | Yes | Yes | | | | | | | -| deleteNotificationRocketChat | notification | delete | | Yes | Yes | | | | | | | -| deleteAllNotificationRocketChats | notification | deleteAll | | Yes | | | | | | | | -| removeAllNotificationsFromAllProjects | notification | removeAll | | Yes | | | | | | | | +| addNotificationSlack | notification | add | | Yes | Yes | No | No | No | No | No | | +| updateNotificationSlack | notification | update | | Yes | Yes | No | No | No | No | No | | +| deleteNotificationSlack | notification | delete | | Yes | Yes | No | No | No | No | No | | +| deleteAllNotificationSlacks | notification | deleteAll | | Yes | No | No | No | No | No | No | | +| addNotificationRocketChat | notification | add | | Yes | Yes | No | No | No | No | No | | +| updateNotificationRocketChat | notification | update | | Yes | Yes | No | No | No | No | No | | +| deleteNotificationRocketChat | notification | delete | | Yes | Yes | No | No | No | No | No | | +| deleteAllNotificationRocketChats | notification | deleteAll | | Yes | No | No | No | No | No | No | | +| removeAllNotificationsFromAllProjects | notification | removeAll | | Yes | No | No | No | No | No | No | | | getNotificationsByProjectId | notification | view | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | -| addOpenshift | openshift | add | | Yes | Yes | | | | | | | -| updateOpenshift | openshift | update | | Yes | Yes | | | | | | | -| deleteOpenshift | openshift | delete | | Yes | Yes | | | | | | | -| deleteAllOpenshifts | openshift | deleteAll | | Yes | Yes | | | | | | | -| getAllOpenshifts | openshift | viewAll | | Yes | | | | | | | | +| addOpenshift | openshift | add | | Yes | Yes | No | No | No | No | No | | +| updateOpenshift | openshift | update | | Yes | Yes | No | No | No | No | No | | +| deleteOpenshift | openshift | delete | | Yes | Yes | No | No | No | No | No | | +| deleteAllOpenshifts | openshift | deleteAll | | Yes | Yes | No | No | No | No | No | | +| getAllOpenshifts | openshift | viewAll | | Yes | No | No | No | No | No | No | | | getOpenshiftByProjectId | openshift | view | projectID | Yes | Yes | Yes | Yes | No | No | No | | | addNotificationToProject | project | addNotification | projectID | Yes | Yes | Yes | Yes | No | No | No | | | removeNotificationFromProject | project | removeNotification | projectID | Yes | Yes | Yes | Yes | No | No | No | | | addProject | project | add | | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | updateProject | project | update | projectID | Yes | Yes | Yes | Yes | No | No | No | | | deleteProject | project | delete | projectID | Yes | Yes | Yes | No | No | No | No | | -| deleteAllProjects | project | deleteAll | | Yes | | | | | | | | +| deleteAllProjects | project | deleteAll | | Yes | No | No | No | No | No | No | | | addGroupsToProject | project | addGroup | projectID | Yes | Yes | Yes | Yes | No | No | No | | | removeGroupsFromProject | project | removeGroup | projectID | Yes | Yes | Yes | Yes | No | No | No | | -| getAllProjects | project | viewAll | | Yes | Yes | | | | | | | +| getAllProjects | project | viewAll | | Yes | Yes | No | No | No | No | No | | | getProjectByEnvironmentId | project | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | getProjectByGitUrl | project | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | getProjectByName | project | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | addRestore | restore | add | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | updateRestore | restore | update | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | -| addSshKey | ssh\_key | add | userId | Yes | Yes | | | | | | Yes | -| updateSshKey | ssh\_key | update | userId | Yes | Yes | | | | | | Yes | -| deleteSshKey | ssh\_key | delete | userId | Yes | Yes | | | | | | Yes | -| deleteAllSshKeys | ssh\_key | deleteAll | | Yes | | | | | | | | -| removeAllSshKeysFromAllUsers | ssh\_key | removeAll | | Yes | | | | | | | | -| getUserSshKeys | ssh\_key | view:user | userID | Yes | Yes | | | | | | Yes | +| addSshKey | ssh\_key | add | userId | Yes | Yes | No | No | No | No | No | Yes | +| updateSshKey | ssh\_key | update | userId | Yes | Yes | No | No | No | No | No | Yes | +| deleteSshKey | ssh\_key | delete | userId | Yes | Yes | No | No | No | No | No | Yes | +| deleteAllSshKeys | ssh\_key | deleteAll | | Yes | No | No | No | No | No | No | No | +| removeAllSshKeysFromAllUsers | ssh\_key | removeAll | | Yes | No | No | No | No | No | No | No | +| getUserSshKeys | ssh\_key | view:user | userID | Yes | Yes | No | No | No | No | No | Yes | | addTask | task | add:development | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | | addTask | task | add:production | projectID | Yes | Yes | Yes | Yes | No | No | No | | | taskDrushArchiveDump | task | drushArchiveDump:development | projectID | Yes | Yes | Yes | Yes | Yes | No | No | | @@ -160,9 +160,9 @@ Here is a table that lists the roles and the access they have: | getTaskByRemoteId | task | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | getTaskById | task | view | projectID | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | addUser | user | add | | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | -| updateUser | user | update | userId | Yes | Yes | | | | | | Yes | -| deleteUser | user | delete | userId | Yes | Yes | | | | | | Yes | -| deleteAllUsers | user | deleteAll | | Yes | | | | | | | | +| updateUser | user | update | userId | Yes | Yes | No | No | No | No | No | Yes | +| deleteUser | user | delete | userId | Yes | Yes | No | No | No | No | No | Yes | +| deleteAllUsers | user | deleteAll | | Yes | No | No | No | No | No | No | | | getProjectByEnvironmentId | project | viewPrivateKey | projectID | Yes | Yes | Yes | No | No | No | No | | | getProjectByGitUrl | project | viewPrivateKey | projectID | Yes | Yes | Yes | No | No | No | No | | | getProjectByName | project | viewPrivateKey | projectID | Yes | Yes | Yes | No | No | No | No | | diff --git a/docs/administering-lagoon/using_harbor/README.md b/docs/administering-lagoon/using_harbor/README.md index 4cc90cb826..cf1817e213 100644 --- a/docs/administering-lagoon/using_harbor/README.md +++ b/docs/administering-lagoon/using_harbor/README.md @@ -14,13 +14,13 @@ If you are hosting a site with amazee.io, we do not allow customer access to the Once logged in, the first screen is a list of all repositories your user has access to. Each "repository" in Harbor correlates to a project in Lagoon. -![Harbor Projects Overview](../../.gitbook/assets/projects_overview%20%281%29.png) +![Harbor Projects Overview](../../.gitbook/assets/projects_overview.png) Within each Harbor repository, you'll see a list of container images from all environments with a single Lagoon project. -![Harbor Repositories Overview](../../.gitbook/assets/repositories_overview%20%281%29.png) +![Harbor Repositories Overview](../../.gitbook/assets/repositories_overview.png) From here, you can drill down into an individual container in order to see its details, including an overview of its security scan results. -![Harbor Container Overview](../../.gitbook/assets/container_overview%20%281%29.png) +![Harbor Container Overview](../../.gitbook/assets/container_overview.png) diff --git a/docs/administering-lagoon/using_harbor/harbor-settings/README.md b/docs/administering-lagoon/using_harbor/harbor-settings/README.md index 031d5a3470..2bb666faf8 100644 --- a/docs/administering-lagoon/using_harbor/harbor-settings/README.md +++ b/docs/administering-lagoon/using_harbor/harbor-settings/README.md @@ -2,15 +2,11 @@ There are a variety of settings you can configure for Harbor's services. Each has its own YAML file. -[HarborClair]() - -[HarborClairAdapter]() - [HarborRegistry](harborregistry.md) [HarborRegistryCtl](harborregistryctl.md) -[Harbor-Core]() +[Harbor-Core](harbor-core.md) [Harbor-Database](harbor-database.md) diff --git a/docs/administering-lagoon/using_harbor/security_scanning.md b/docs/administering-lagoon/using_harbor/security_scanning.md index 862afeefe8..f8fec0b4a5 100644 --- a/docs/administering-lagoon/using_harbor/security_scanning.md +++ b/docs/administering-lagoon/using_harbor/security_scanning.md @@ -4,5 +4,5 @@ Harbor comes with a built-in security scanning solution provided by the Trivy se An example of a security scan in Harbor, showing applicable vulnerabilities for a scanned container: -![Harbor Security Scanning Example Image](../../.gitbook/assets/scanning_image_1%20%282%29%20%281%29.png) +![Harbor Security Scanning Example Image](../../.gitbook/assets/scanning_image_1%20%281%29.png) diff --git a/docs/contributing-to-lagoon/developing-lagoon.md b/docs/contributing-to-lagoon/developing-lagoon.md index f4ac1e79d1..16bb8f1886 100644 --- a/docs/contributing-to-lagoon/developing-lagoon.md +++ b/docs/contributing-to-lagoon/developing-lagoon.md @@ -85,7 +85,7 @@ The API uses a [Puppet](https://puppet.com/docs/puppet/latest/puppet_index.html) ## Troubleshooting -\*\*\*\*⚠ **I can't build a docker image for any Node.js based service** +⚠ **I can't build a docker image for any Node.js based service** Rebuild the images via @@ -94,17 +94,17 @@ make clean make build ``` -\*\*\*\*⚠ **I get errors about missing node\_modules content when I try to build / run a Node.js based image** +⚠ **I get errors about missing node\_modules content when I try to build / run a Node.js based image** Make sure to run `yarn` in Lagoon's root directory, since some services have common dependencies managed by `yarn` workspaces. ⚠ **My builds can't resolve domains** -Some Internet Service Providers \(ISPs\) set up a "search domain" to catch domain name errors. Virtualbox will copy this setting into minishift, which can cause domain resolution errors in the OpenShift pods. To check for this problem, look at the `/etc/resolv.conf` in your failing pod and check for errant search domains. +Some Internet Service Providers \(ISPs\) set up a "search domain" to catch domain name errors. VirtualBox will copy this setting into MiniShift, which can cause domain resolution errors in the OpenShift pods. To check for this problem, look at the `/etc/resolv.conf` in your failing pod and check for errant search domains. To fix, you must remove the extra search domain. -* Log in to the minishift vm: `minishift ssh`. +* Log in to the MiniShift vm: `minishift ssh`. * Remove the setting from `/etc/resolv.conf`. * Restart openshift docker: `sudo docker restart origin`. * Redeploy `docker-host` in the `lagoon` project. diff --git a/docs/administering-lagoon/install-local-kubernetes-cluster-for-lagoon.md b/docs/contributing-to-lagoon/install-local-kubernetes-cluster-for-lagoon.md similarity index 97% rename from docs/administering-lagoon/install-local-kubernetes-cluster-for-lagoon.md rename to docs/contributing-to-lagoon/install-local-kubernetes-cluster-for-lagoon.md index 0201364c7a..e160b9544e 100644 --- a/docs/administering-lagoon/install-local-kubernetes-cluster-for-lagoon.md +++ b/docs/contributing-to-lagoon/install-local-kubernetes-cluster-for-lagoon.md @@ -4,7 +4,7 @@ description: >- Kubernetes is only supported to deploy projects and environments into. --- -# Install local Kubernetes cluster for Lagoon +# Install Local Kubernetes Cluster for Lagoon Let's see how to install a local lightweight Kubernetes cluster using k3s by Rancher: [rancher/k3s](https://github.com/rancher/k3s) @@ -116,11 +116,13 @@ In order to have the best experience we recommend the following: ## Deploy Lagoon on Kubernetes -1. TODO +{% hint style="info" %} +Coming Soon! +{% endhint %} ## Configure Installed Lagoon -We have a fully running Kubernetes cluster. Now it's time to configure the first project inside of it. Follow the examples in [GraphQL API](graphql-queries.md). +We have a fully running Kubernetes cluster. Now it's time to configure the first project inside of it. Follow the examples in [GraphQL API](../administering-lagoon/graphql-queries.md). ## Clean up diff --git a/docs/administering-lagoon/install.md b/docs/contributing-to-lagoon/install/README.md similarity index 96% rename from docs/administering-lagoon/install.md rename to docs/contributing-to-lagoon/install/README.md index 4802164d7a..13528283b9 100644 --- a/docs/administering-lagoon/install.md +++ b/docs/contributing-to-lagoon/install/README.md @@ -37,7 +37,7 @@ Technically, Lagoon can use any Service Account and also needs no admin permissi In this example we create the Service Account `lagoon` in the OpenShift Project `default`. -1. Make sure you have the `oc cli` tools already installed. If not, please see [here](https://docs.openshift.org/latest/cli_reference/get_started_cli.html#cli-reference-get-started-cli). +1. Make sure you have the `oc cli` tools already installed. If not, please see documentation [here](https://docs.openshift.org/latest/cli_reference/get_started_cli.html#cli-reference-get-started-cli). 2. Log into OpenShift as an admin: ```text @@ -92,5 +92,5 @@ Once Lagoon is install operational, you need to initialize OpendistroSecurity to ### Configure Installed Lagoon -We have a fully running Lagoon. Now it's time to configure the first project inside of it. Follow the examples in [GraphQL API](graphql-queries.md). +We have a fully running Lagoon. Now it's time to configure the first project inside of it. Follow the examples in [GraphQL API](../../administering-lagoon/graphql-queries.md). diff --git a/docs/administering-lagoon/openshift_requirements.md b/docs/contributing-to-lagoon/install/openshift_requirements.md similarity index 100% rename from docs/administering-lagoon/openshift_requirements.md rename to docs/contributing-to-lagoon/install/openshift_requirements.md diff --git a/docs/docker-images/elasticsearch.md b/docs/docker-images/elasticsearch.md index ecee7db0df..016f6b3231 100644 --- a/docs/docker-images/elasticsearch.md +++ b/docs/docker-images/elasticsearch.md @@ -6,8 +6,8 @@ ## Supported versions -* 6.8 [\[Dockerfile\]](https://github.com/amazeeio/lagoon/blob/master/images/elasticsearch/Dockerfile6) -* 7.6 [\[Dockerfile\]](https://github.com/amazeeio/lagoon/blob/master/images/elasticsearch/Dockerfile7) +* 6 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/elasticsearch/6.Dockerfile) +* 7 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/elasticsearch/7.Dockerfile) ## Known issues diff --git a/docs/docker-images/mariadb/README.md b/docs/docker-images/mariadb/README.md index 7c30b54f0b..36c2c646c7 100644 --- a/docs/docker-images/mariadb/README.md +++ b/docs/docker-images/mariadb/README.md @@ -2,7 +2,7 @@ MariaDB is the open source successor to MySQL. -The [Lagoon `MariaDB` image Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/mariadb/Dockerfile). Based on the official packages `mariadb` and `mariadb-client` provided by the `alpine:3.8` image. +The [Lagoon `MariaDB` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/Dockerfile). Based on the official packages `mariadb` and `mariadb-client` provided by the `alpine:3.8` image. This Dockerfile is intended to be used to set up a standalone MariaDB database server. @@ -16,7 +16,7 @@ This image is prepared to be used on Lagoon. There are therefore some things alr ## Included tools * [`mysqltuner.pl`](https://github.com/major/MySQLTuner-perl) - Perl script useful for database parameter tuning. -* [`mysql-backup.sh`](https://github.com/amazeeio/lagoon/blob/master/images/mariadb/mysql-backup.sh) - Script for automating the daily MySQL backups on development environment. +* [`mysql-backup.sh`](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/mysql-backup.sh) - Script for automating the daily MySQL backups on development environment. * [`pwgen`](https://linux.die.net/man/1/pwgen) - Utility to generate random and complex passwords. ## Included `my.cnf` configuration file diff --git a/docs/docker-images/mariadb/mariadb-drupal.md b/docs/docker-images/mariadb/mariadb-drupal.md index ca0ef9bc62..1681bf7644 100644 --- a/docs/docker-images/mariadb/mariadb-drupal.md +++ b/docs/docker-images/mariadb/mariadb-drupal.md @@ -2,7 +2,7 @@ MariaDB is the open source successor to MySQL. -The [Lagoon `mariadb-drupal` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/mariadb-drupal/Dockerfile) is a customized [`mariadb` image](./) to use within Drupal projects in Lagoon. It differs from the `mariadb` image only for initial database setup, made by some environment variables: +The Lagoon `mariadb-drupal` Docker image [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb-drupal/Dockerfile) is a customized [`mariadb` image](./) to use within Drupal projects in Lagoon. It differs from the `mariadb` image only for initial database setup, made by some environment variables: | Environment Variable | Default | Description | | :--- | :--- | :--- | diff --git a/docs/docker-images/mongodb.md b/docs/docker-images/mongodb.md index 4e2aa3089a..72211fce50 100644 --- a/docs/docker-images/mongodb.md +++ b/docs/docker-images/mongodb.md @@ -4,7 +4,7 @@ > > * from [mongodb.com](https://www.mongodb.com/) -[Lagoon `MongoDB` image Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/mongo/Dockerfile). Based on the official package `mongodb` provided by the `alpine:3.8` image. +[Lagoon `MongoDB` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mongo/Dockerfile). Based on the official package `mongodb` provided by the `alpine:3.8` image. This Dockerfile is intended to be used to set up a standalone MongoDB database server. diff --git a/docs/docker-images/nginx/README.md b/docs/docker-images/nginx/README.md index 8681fbc81f..79d01e5118 100644 --- a/docs/docker-images/nginx/README.md +++ b/docs/docker-images/nginx/README.md @@ -1,6 +1,6 @@ # NGINX -The [Lagoon `nginx` image Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/nginx/Dockerfile). Based on the official [`openresty/openresty` images](https://hub.docker.com/r/openresty/openresty/). +The [Lagoon `nginx` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/nginx/Dockerfile). Based on the official [`openresty/openresty` images](https://hub.docker.com/r/openresty/openresty/). This Dockerfile is intended to be used as a base for any web servers within Lagoon. @@ -23,8 +23,6 @@ Build the content during the build process and inject it into the `nginx` contai ## Helpers -{% embed url="https://www.youtube.com/watch?v=xQ7A-e8UPzY" caption="How do I add a redirect in Lagoon?" %} - ### `redirects-map.conf` In order to create redirects, we have `redirects-map.conf` in place. This helps you to redirect marketing domains to sub-sites or do non-www to www redirects. **If you have a lot of redirects, we suggest having `redirects-map.conf` stored next to your code for easier maintainability.** @@ -39,7 +37,7 @@ Here's an example showing how to redirect `www.example.com` to `example.com` and RUN echo "~^www.example.com http://example.com\$request_uri;" >> /etc/nginx/redirects-map.conf ``` -To get more details about the various types of redirects that can be achieved, see the documentation within the [`redirects-map.conf`](https://github.com/amazeeio/lagoon/blob/master/images/nginx/redirects-map.conf) directly. +To get more details about the various types of redirects that can be achieved, see the documentation within the [`redirects-map.conf`](https://github.com/uselagoon/lagoon-images/blob/main/images/nginx/redirects-map.conf) directly. After you put the `redirects-map.conf` in place, you also need to include it in your `nginx.dockerfile` in order to get the configuration file into your build. diff --git a/docs/docker-images/nginx/nginx-drupal.md b/docs/docker-images/nginx/nginx-drupal.md index b3e32830f4..36fbd46b32 100644 --- a/docs/docker-images/nginx/nginx-drupal.md +++ b/docs/docker-images/nginx/nginx-drupal.md @@ -1,6 +1,6 @@ # NGINX-Drupal -The [Lagoon `nginx-drupal` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/nginx-drupal/Dockerfile). Optimized to work with Drupal. Based on [Lagoon `nginx` image](./). +The [Lagoon `nginx-drupal` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/nginx-drupal/Dockerfile). Optimized to work with Drupal. Based on [Lagoon `nginx` image](./). ## Lagoon adaptions @@ -8,7 +8,7 @@ This image is prepared to be used on Lagoon. There are therefore some things alr * Folder permissions are automatically adapted with [`fix-permissions`](https://github.com/sclorg/s2i-base-container/blob/master/core/root/usr/bin/fix-permissions), so this image will work with a random user. * To keep `drupal.conf` 's configuration file as clean and customizable as possible, we added `include` directives in the main sections of the file:`server`, `location /`, `location @drupal` and `location @php`. -* Further information in the section [Drupal.conf customization](nginx-drupal.md#drupal-conf-customization). +* Further information in the section [`Drupal.conf` customization](nginx-drupal.md#drupal-conf-customization). ## Included Drupal configuration \(`drupal.conf`\) diff --git a/docs/docker-images/php-cli/README.md b/docs/docker-images/php-cli/README.md index f8ecdd0656..3355301b4d 100644 --- a/docs/docker-images/php-cli/README.md +++ b/docs/docker-images/php-cli/README.md @@ -1,6 +1,6 @@ # PHP-CLI -The [Lagoon `php-cli` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/php/cli/Dockerfile). Based on [Lagoon `php-fpm` image](../php-fpm.md), it has all the needed command line tools for daily operations. +The [Lagoon `php-cli` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli). Based on [Lagoon `php-fpm` image](../php-fpm.md), it has all the needed command line tools for daily operations. Containers \(or pods\) started from `cli` images are responsible for building code for Composer or Node.js based projects. @@ -10,6 +10,17 @@ The image also contains database `cli`s for both MariaDB and PostgreSQL. This Dockerfile is intended to be used as a base for any `cli` needs within Lagoon. {% endhint %} +## Supported versions + +* 5.6 \(available for compatibility, no longer officially supported\) +* 7.0 \(available for compatibility, no longer officially supported\) +* 7.2 \(available for compatibility, no longer officially supported\) +* 7.3 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli/7.3.Dockerfile) +* 7.4 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli/7.4.Dockerfile) +* 8.0 \(coming soon\) + +All PHP versions use their own Dockerfiles. + ## Lagoon adaptions This image is prepared to be used on Lagoon. There are therefore some things already done: diff --git a/docs/docker-images/php-cli/php-cli-drupal.md b/docs/docker-images/php-cli/php-cli-drupal.md index 062f21ab89..71a5a3d50b 100644 --- a/docs/docker-images/php-cli/php-cli-drupal.md +++ b/docs/docker-images/php-cli/php-cli-drupal.md @@ -1,11 +1,22 @@ # PHP-CLI-Drupal -The [Lagoon `php-cli-drupal` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/php/cli-drupal/Dockerfile) is optimized to work with Drupal. It is based on the [Lagoon `php-cli` image](./), and has all the command line tools needed for the daily maintenance of a Drupal website: +The [Lagoon `php-cli-drupal` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli-drupal) is optimized to work with Drupal. It is based on the [Lagoon `php-cli` image](./), and has all the command line tools needed for the daily maintenance of a Drupal website: * `drush` * `drupal console` * `drush launcher` \(which will fallback to Drush 8 if there is no site installed Drush found\) +## Supported versions + +* 5.6 \(available for compatibility, no longer officially supported\) +* 7.0 \(available for compatibility, no longer officially supported\) +* 7.2 \(available for compatibility, no longer officially supported\) +* 7.3 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli-drupal/7.3.Dockerfile) +* 7.4 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli-drupal/7.4.Dockerfile) +* 8.0 \(coming soon\) + +All PHP versions use their own Dockerfiles. + ## Lagoon adaptions This image is prepared to be used on Lagoon. There are therefore some things already done: diff --git a/docs/docker-images/php-fpm.md b/docs/docker-images/php-fpm.md index d52ef372e7..b92671582c 100644 --- a/docs/docker-images/php-fpm.md +++ b/docs/docker-images/php-fpm.md @@ -1,6 +1,6 @@ # PHP-FPM -The [Lagoon `php-fpm` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/php/fpm/Dockerfile). Based on [the official PHP Alpine images](https://hub.docker.com/_/php/). +The [Lagoon `php-fpm` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/php-fpm). Based on [the official PHP Alpine images](https://hub.docker.com/_/php/). > _PHP-FPM \(FastCGI Process Manager\) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites._ > @@ -12,27 +12,28 @@ The [Lagoon `php-fpm` Docker image](https://github.com/amazeeio/lagoon/blob/mast This Dockerfile is intended to be used as a base for any `PHP` needs within Lagoon. This image itself does not create a web server, rather a `php-fpm` fastcgi listener. You may need to adapt the `php-fpm` pool config. {% endhint %} -## Supported Versions +## Supported versions -* 5.6 \(available for compatibility, not officially supported\) -* 7.0 \(available for compatibility, not officially supported\) -* 7.2 \(available for compatibility, not officially supported - End of Support by 30 Nov 2020 \) -* 7.3 -* 7.4 +* 5.6 \(available for compatibility, no longer officially supported\) +* 7.0 \(available for compatibility, no longer officially supported\) +* 7.2 \(available for compatibility, no longer officially supported\) +* 7.3 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/php-fpm/7.3.Dockerfile) +* 7.4 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/php-fpm/7.4.Dockerfile) +* 8.0 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/php-fpm/8.0.Dockerfile) + +All PHP versions use their own Dockerfiles. {% hint style="info" %} We stop updating End of Life (EOL) PHP images usually with the Lagoon release that comes after the officially communicated EOL date: https://www.php.net/supported-versions.php. {% endhint %} -All PHP versions use the same Dockerfile. - ## Lagoon adaptions This image is prepared to be used on Lagoon. There are therefore some things are already done: * Folder permissions are automatically adapted with [`fix-permissions`](https://github.com/sclorg/s2i-base-container/blob/master/core/root/usr/bin/fix-permissions), so this image will work with a random user. * The `/usr/local/etc/php/php.ini` and `/usr/local/etc/php-fpm.conf`, plus all files within `/usr/local/etc/php-fpm.d/` , are parsed through [`envplate`](https://github.com/kreuzwerker/envplate) with a container-entrypoint. -* See the [Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/php/fpm/Dockerfile) for installed `PHP` extensions. +* See the [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/php-fpm/7.4.Dockerfile) for installed `PHP` extensions. * To install further extensions, extend your Dockerfile from this image. Install extensions according to the docs, under the heading[ How to install more PHP extensions.](https://github.com/docker-library/docs/blob/master/php/README.md#how-to-install-more-php-extensions) ## Included PHP config. @@ -68,7 +69,7 @@ Also, `php-fpm` error logging happens in `stderr`. ## default fpm-pool -This image is shipped with an `fpm-pool` config \([`php-fpm.d/www.conf`](https://github.com/amazeeio/lagoon/blob/master/images/php/fpm/php-fpm.d/www.conf)\) that creates an `fpm-pool` and listens on port 9000. This is because we try to provide an image which already covers most needs for PHP, so you don't need to create your own. You are welcome to do so if you like, though! +This image is shipped with an `fpm-pool` config \([`php-fpm.d/www.conf`](https://github.com/uselagoon/lagoon-images/blob/main/images/php-fpm/php-fpm.d/www.conf)\) that creates an `fpm-pool` and listens on port 9000. This is because we try to provide an image which already covers most needs for PHP, so you don't need to create your own. You are welcome to do so if you like, though! Here a short description of what this file does: diff --git a/docs/docker-images/postgres.md b/docs/docker-images/postgres.md index ee41c6158c..1eca054101 100644 --- a/docs/docker-images/postgres.md +++ b/docs/docker-images/postgres.md @@ -1,10 +1,11 @@ # PostgreSQL -The [Lagoon PostgreSQL Docker image](https://github.com/amazeeio/lagoon/blob/master/images/postgres/Dockerfile). Based on [the official PostgreSQL Alpine images](https://hub.docker.com/_/postgres). +The [Lagoon PostgreSQL Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres). Based on [the official PostgreSQL Alpine images](https://hub.docker.com/_/postgres). ## Supported versions -* 11.6 [\[Dockerfile\]](https://github.com/amazeeio/lagoon/blob/master/images/postgres/Dockerfile) +* 11 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/11.Dockerfile) +* 12 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/12.Dockerfile) ## Tips & Tricks diff --git a/docs/docker-images/rabbitmq.md b/docs/docker-images/rabbitmq.md index 7bf245b9ba..67d3eba740 100644 --- a/docs/docker-images/rabbitmq.md +++ b/docs/docker-images/rabbitmq.md @@ -1,6 +1,6 @@ # RabbitMQ -The [Lagoon RabbitMQ Dockerfile](https://github.com/amazeeio/lagoon/tree/master/images/rabbitmq) with management plugin installed. Based on the official `rabbitmq:3-management` image at [docker-hub](https://hub.docker.com/_/rabbitmq). +The [Lagoon RabbitMQ Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/rabbitmq) with management plugin installed. Based on the official `rabbitmq:3-management` image at [docker-hub](https://hub.docker.com/_/rabbitmq). This Dockerfile is intended to be used to set up a standalone RabbitMQ queue broker, as well as a base image to set up a cluster with high availability queue support by default \([Mirrored queues](https://www.rabbitmq.com/ha.html)\). diff --git a/docs/docker-images/redis/README.md b/docs/docker-images/redis/README.md index e75e85ab94..9d531e18a4 100644 --- a/docs/docker-images/redis/README.md +++ b/docs/docker-images/redis/README.md @@ -1,12 +1,13 @@ # Redis -[Lagoon `Redis` image Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/redis/Dockerfile), based on [offical `redis:alpine` image](https://hub.docker.com/_/redis/). +[Lagoon `Redis` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/redis), based on [offical `redis:alpine` image](https://hub.docker.com/_/redis/). This Dockerfile is intended to be used to set up a standalone Redis _ephemeral_ server by default. -## Version +## Supported versions -Currently supports alpine version 5.x. +* 5 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/redis/5.Dockerfile) +* 6 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/redis/6.Dockerfile) ## Lagoon adaptions diff --git a/docs/docker-images/redis/redis-persistent.md b/docs/docker-images/redis/redis-persistent.md index b1df0e0736..87ad6243b2 100644 --- a/docs/docker-images/redis/redis-persistent.md +++ b/docs/docker-images/redis/redis-persistent.md @@ -1,6 +1,6 @@ # Redis-persistent -The [Lagoon `redis-persistent` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/redis-persistent/Dockerfile). Based on the [Lagoon `redis` image](./), it is intended for use if the Redis service must be in `persistent` mode \(ie. with a persistent volume where transactions will be saved\). +The [Lagoon `redis-persistent` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/redis-persistent/5.Dockerfile). Based on the [Lagoon `redis` image](./), it is intended for use if the Redis service must be in `persistent` mode \(ie. with a persistent volume where transactions will be saved\). It differs from `redis` only for `FLAVOR` environment variable. diff --git a/docs/docker-images/solr/README.md b/docs/docker-images/solr/README.md index c34c31e5ab..40e24bf503 100644 --- a/docs/docker-images/solr/README.md +++ b/docs/docker-images/solr/README.md @@ -1,14 +1,14 @@ # Solr -The [Lagoon `Solr` image Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/solr/Dockerfile). Based on the official [`solr:-alpine` images](https://hub.docker.com/_/solr). +The [Lagoon `Solr` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/7.7.Dockerfile). Based on the official [`solr:-alpine` images](https://hub.docker.com/_/solr). This Dockerfile is intended to be used to set up a standalone Solr server with an initial core `mycore`. ## Supported Versions -* 5.5 -* 6.6 -* 7.7 +* 5.5 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/5.5.Dockerfile) +* 6.6 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/6.6.Dockerfile) +* 7.7 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/7.7.Dockerfile) ## Lagoon adaptions diff --git a/docs/docker-images/solr/solr-drupal.md b/docs/docker-images/solr/solr-drupal.md index 78f8b0e1ee..56c37808b4 100644 --- a/docs/docker-images/solr/solr-drupal.md +++ b/docs/docker-images/solr/solr-drupal.md @@ -1,6 +1,6 @@ # Solr-Drupal -The [Lagoon `solr-drupal` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/solr-drupal/Dockerfile), is a customized[`Solr` image](./) to use within Drupal projects in Lagoon. +The [Lagoon `solr-drupal` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/7.7.Dockerfile), is a customized[`Solr` image](./) to use within Drupal projects in Lagoon. The initial core created is `Drupal` , and it is created and configured starting from a Drupal customized and optimized configuration, copied from the [search\_api\_solr](https://www.drupal.org/project/search_api_solr) Drupal module. @@ -8,9 +8,9 @@ The [documentation](./#lagoon-and-openshift-adaptions) outlines how to provide y For each Solr version, there is a specific `solr-drupal:` Docker image. -## Supported versions +## Supported Versions -* 5.5 -* 6.6 -* 7.7 +* 5.5 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/5.5.Dockerfile) +* 6.6 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/6.6.Dockerfile) +* 7.7 [\[Dockerfile\]](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/7.7.Dockerfile) diff --git a/docs/docker-images/varnish/README.md b/docs/docker-images/varnish/README.md index b239954767..4cc0b80c12 100644 --- a/docs/docker-images/varnish/README.md +++ b/docs/docker-images/varnish/README.md @@ -1,6 +1,6 @@ # Varnish -The [Lagoon `Varnish` image Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/varnish/Dockerfile). Based on the [official `varnish` package](https://hub.docker.com/_/varnish) provided by `alpine:3.7` image. +The [Lagoon `Varnish` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish/Dockerfile). Based on the [official `varnish` package](https://hub.docker.com/_/varnish) provided by `alpine:3.7` image. By default, `vmod-dynamic` and `vmod-bodyaccess` modules are installed. diff --git a/docs/docker-images/varnish/varnish-drupal.md b/docs/docker-images/varnish/varnish-drupal.md index 9ec92724fd..4bb30bd33b 100644 --- a/docs/docker-images/varnish/varnish-drupal.md +++ b/docs/docker-images/varnish/varnish-drupal.md @@ -1,6 +1,6 @@ # Varnish-Drupal -The [Lagoon `varnish-drupal` Docker image](https://github.com/amazeeio/lagoon/blob/master/images/varnish-drupal/Dockerfile). It is a customized [`varnish` image](./) to use within Drupal projects in Lagoon. +The [Lagoon `varnish-drupal` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish-drupal/Dockerfile). It is a customized [`varnish` image](./) to use within Drupal projects in Lagoon. It differs from `varnish` only for `default.vcl` file, optimized for Drupal on Lagoon. diff --git a/docs/docs/.gitbook/assets/0.gif b/docs/docs/.gitbook/assets/0.gif deleted file mode 100644 index b93949847f..0000000000 Binary files a/docs/docs/.gitbook/assets/0.gif and /dev/null differ diff --git a/docs/docs/.gitbook/assets/2.gif b/docs/docs/.gitbook/assets/2.gif deleted file mode 100644 index 73113734a4..0000000000 Binary files a/docs/docs/.gitbook/assets/2.gif and /dev/null differ diff --git a/docs/docs/.gitbook/assets/bb_webhook_1.png b/docs/docs/.gitbook/assets/bb_webhook_1.png deleted file mode 100644 index 23dea3aded..0000000000 Binary files a/docs/docs/.gitbook/assets/bb_webhook_1.png and /dev/null differ diff --git a/docs/docs/.gitbook/assets/first_deployment_slack_2nd_success.jpg b/docs/docs/.gitbook/assets/first_deployment_slack_2nd_success.jpg deleted file mode 100644 index e3d69f28c4..0000000000 Binary files a/docs/docs/.gitbook/assets/first_deployment_slack_2nd_success.jpg and /dev/null differ diff --git a/docs/docs/.gitbook/assets/gh_webhook_1.png b/docs/docs/.gitbook/assets/gh_webhook_1.png deleted file mode 100644 index b20b4c985b..0000000000 Binary files a/docs/docs/.gitbook/assets/gh_webhook_1.png and /dev/null differ diff --git a/docs/docs/.gitbook/assets/gh_webhook_2.png b/docs/docs/.gitbook/assets/gh_webhook_2.png deleted file mode 100644 index 6a0c5b672b..0000000000 Binary files a/docs/docs/.gitbook/assets/gh_webhook_2.png and /dev/null differ diff --git a/docs/docs/.gitbook/assets/gitlab_webhook.png b/docs/docs/.gitbook/assets/gitlab_webhook.png deleted file mode 100644 index c7162d204b..0000000000 Binary files a/docs/docs/.gitbook/assets/gitlab_webhook.png and /dev/null differ diff --git a/docs/docs/.gitbook/assets/graphiql-2020-01-29-18-05-54.png b/docs/docs/.gitbook/assets/graphiql-2020-01-29-18-05-54.png deleted file mode 100644 index 60912674a3..0000000000 Binary files a/docs/docs/.gitbook/assets/graphiql-2020-01-29-18-05-54.png and /dev/null differ diff --git a/docs/docs/.gitbook/assets/graphiql-2020-01-29-18-07-28.png b/docs/docs/.gitbook/assets/graphiql-2020-01-29-18-07-28.png deleted file mode 100644 index 891ac952f3..0000000000 Binary files a/docs/docs/.gitbook/assets/graphiql-2020-01-29-18-07-28.png and /dev/null differ diff --git a/docs/docs/.gitbook/assets/step2_require.gif b/docs/docs/.gitbook/assets/step2_require.gif deleted file mode 100644 index 285ab2a145..0000000000 Binary files a/docs/docs/.gitbook/assets/step2_require.gif and /dev/null differ diff --git a/docs/docs/.gitbook/assets/webhooks-2020-01-23-12-40-16.png b/docs/docs/.gitbook/assets/webhooks-2020-01-23-12-40-16.png deleted file mode 100644 index 982e3d2345..0000000000 Binary files a/docs/docs/.gitbook/assets/webhooks-2020-01-23-12-40-16.png and /dev/null differ diff --git a/docs/drupal/drush-9.md b/docs/drupal/drush-9.md index d5a3199b36..66a73dc776 100644 --- a/docs/drupal/drush-9.md +++ b/docs/drupal/drush-9.md @@ -18,9 +18,9 @@ Drush 9 provides a new command, `drush site:alias-convert` , which can convert D In order to be able to use `drush site:alias-convert` , you need to do the following: -* Rename the `aliases.drushrc.php` inside the `drush` folder to `lagooncd ...aliases.drushrc.php`. +* Rename the `aliases.drushrc.php` inside the `drush` folder to `lagoon.aliases.drushrc.php`. -### Generate Site aliases +### Generate Site Aliases You can now convert your Drush aliases by running the following command in your project using the `cli` container: diff --git a/docs/drupal/first-deployment-of-drupal.md b/docs/drupal/first-deployment-of-drupal.md index 785b25dff1..05516f65f6 100644 --- a/docs/drupal/first-deployment-of-drupal.md +++ b/docs/drupal/first-deployment-of-drupal.md @@ -44,7 +44,7 @@ With full Drush site alias support in Lagoon, you can synchronize a local databa {% hint style="warning" %} You may have to tell pygmy about your public keys before the next step. -If you get an error like `Permission denied (publickey)`, check out the documentation here: [pygmy - adding ssh keys](https://pygmy.readthedocs.io/en/master/usage/#adding-ssh-keys) +If you get an error like `Permission denied (publickey)`, check out the documentation here: [pygmy - adding ssh keys](https://docs.lagoon.sh/pygmy/ssh-agent) {% endhint %} First let's make sure that you can see the Drush site aliases: diff --git a/docs/drupal/services/README.md b/docs/drupal/services/README.md index 84ce4cd597..21759d3519 100644 --- a/docs/drupal/services/README.md +++ b/docs/drupal/services/README.md @@ -20,8 +20,6 @@ Redis is a fast, open-source, in-memory key-value data store for use as a databa [Learn about Redis with Drupal.](redis.md) -[Documentation on the plain Redis image](../../docker-images/varnish/) - [Documentation on the Redis-persistent image.](../../docker-images/redis/redis-persistent.md) {% endtab %} diff --git a/docs/drupal/services/solr.md b/docs/drupal/services/solr.md index 1a0d2c1865..44906ff197 100644 --- a/docs/drupal/services/solr.md +++ b/docs/drupal/services/solr.md @@ -2,11 +2,11 @@ ## Standard use -For Solr 5.5, 6.6 and 7.7, we ship the default schema files provided by the [search\_api\_solr](https://www.drupal.org/project/search_api_solr) Drupal module. Add the Solr version you would like to use in your `docker-compose.yml` file, following [our example](https://github.com/amazeeio/drupal-example/blob/master/docker-compose.yml#L103-L111). +For Solr 5.5, 6.6 and 7.7, we ship the default schema files provided by the [search\_api\_solr](https://www.drupal.org/project/search_api_solr) Drupal module. Add the Solr version you would like to use in your `docker-compose.yml` file, following [our example](https://github.com/amazeeio/drupal-example-simple/blob/63b3fc613260d5192b7e2dd0167c6fc85d8d9162/docker-compose.yml#L110). ## Custom schema -To implement schema customizations for Solr in your project, look to how Lagoon [creates our standard images](https://github.com/amazeeio/lagoon/blob/master/images/solr-drupal/Dockerfile). +To implement schema customizations for Solr in your project, look to how Lagoon [creates our standard images](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/7.7.Dockerfile). * In the `solr` section of your `docker-compose.yml` file, replace `image: amazeeio/solr:7.7` with: diff --git a/docs/drupal/services/varnish.md b/docs/drupal/services/varnish.md index 5bd20c368e..548c3f750e 100644 --- a/docs/drupal/services/varnish.md +++ b/docs/drupal/services/varnish.md @@ -1,6 +1,6 @@ # Varnish -We suggest using Drupal with a Varnish reverse proxy. Lagoon provides a `varnish-drupal` Docker image that has Varnish already configured with a [Drupal Varnish config](https://github.com/amazeeio/lagoon/blob/master/images/varnish-drupal/drupal.vcl). +We suggest using Drupal with a Varnish reverse proxy. Lagoon provides a `varnish-drupal` Docker image that has Varnish already configured with a [Drupal Varnish config](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish-drupal/drupal.vcl). This Varnish config does the following: @@ -8,11 +8,13 @@ This Varnish config does the following: * It automatically caches any assets \(images, css, js, etc.\) for one month, and also sends this header to the browser, so browser cache the assets as well. This happens for authenticated and non-authenticated requests. * It has support for `BAN` and `URIBAN` which is used by the Drupal 8 purge module. * It removes `utm_` and `gclid` from the URL parameter to prevent Google Analytics links from creating multiple cache objects. -* Many other good things - just check out the [drupal.vcl](https://github.com/amazeeio/lagoon/blob/master/images/varnish-drupal/drupal.vcl). +* Many other good things - just check out the [drupal.vcl](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish-drupal/drupal.vcl). ## Usage with Drupal 8 -TL;DR: Check out the [Drupal 8 Example](https://github.com/amazeeio/drupal-example), it ships with the needed modules and needed Drupal configuration. +**TL;DR**: [Check out the drupal8-advanced example in our examples repo](https://github.com/uselagoon/lagoon-examples), it ships with the needed modules and needed Drupal configuration. + +**Note**: many of these examples are on the same `drupal-example-simple` repo, but different branches/hashes. Be sure to get the exact branch from the examples list! ### Install Purge and Varnish Purge modules diff --git a/docs/drupal/step-by-step-getting-drupal-ready-to-run-on-lagoon.md b/docs/drupal/step-by-step-getting-drupal-ready-to-run-on-lagoon.md index b37c05f1fb..cb59644137 100644 --- a/docs/drupal/step-by-step-getting-drupal-ready-to-run-on-lagoon.md +++ b/docs/drupal/step-by-step-getting-drupal-ready-to-run-on-lagoon.md @@ -22,6 +22,10 @@ Drupal is shipped with `sites/*/settings*.php` and `sites/*/services*.yml` in `. Unfortunately the Drupal community has not decided on a standardized `WEBROOT` folder name. Some projects put Drupal within `web`, and others within `docroot` or somewhere else. The Lagoon Drupal settings files assume that your Drupal is within `web`, but if this is different for your Drupal, please adapt the files accordingly. +### Note about composer.json + +If you installed Drupal via composer, please check your `composer.json` and make sure that the `name` is NOT `drupal/drupal`, as this could confuse Drush and other tools of the Drupal universe, just rename it to something like `myproject/drupal` + ## 2. Customise `docker-compose.yml` Don't forget to customize the values in `lagoon-project` & `LAGOON_ROUTE` with your site-specific name & the URL you'd like to access the site with. Here's an example: @@ -74,7 +78,7 @@ This might sound weird, as there was already a `composer install` executed durin * In order to be able to edit files on the host and have them immediately available in the container, the default `docker-composer.yml` mounts the whole folder into the the containers \(this happens with `.:/app:delegated` in the volumes section\). This also means that all dependencies installed during the Docker build are overwritten with the files on the host. * Locally, you probably want dependencies defined as `require-dev` in `composer.json` to exist as well, while on a production deployment they would just use unnecessary space. So we run `composer install --no-dev` in the Dockerfile and `composer install` manually. -If everything went well, open the `LAGOON_ROUTE` defined in `docker-compose.yml` \(for example [http://drupal.docker.amazee.io](http://drupal.docker.amazee.io)\) and you should be greeted by a nice Drupal error. Don't worry - that's ok right now, most important is that it tries to load a Drupal site. +If everything went well, open the `LAGOON_ROUTE` defined in `docker-compose.yml` \(for example `http://drupal.docker.amazee.io`\) and you should be greeted by a nice Drupal error. Don't worry - that's ok right now, most important is that it tries to load a Drupal site. If you get a 500 or similar error, make sure everything loaded properly with Composer. @@ -114,7 +118,7 @@ Site path : sites/default {% hint style="warning" %} You may have to tell pygmy about your public key before the next step. -If you get an error like `Permission denied (publickey)`, check out the documentation here: [pygmy - adding ssh keys](https://pygmy.readthedocs.io/en/master/usage/#adding-ssh-keys) +If you get an error like `Permission denied (publickey)`, check out the documentation here: [pygmy - adding ssh keys](https://docs.lagoon.sh/pygmy/ssh-agent) {% endhint %} Now it is time to install Drupal \(if instead you would like to import an existing SQL file, please [skip to step 7](step-by-step-getting-drupal-ready-to-run-on-lagoon.md#7-import-existing-database-dump), but we suggest you start with a clean Drupal installation in the beginning to be sure everything works\). diff --git a/docs/drupal/subfolders.md b/docs/drupal/subfolders.md index 73e5d80711..f5d74c4666 100644 --- a/docs/drupal/subfolders.md +++ b/docs/drupal/subfolders.md @@ -46,6 +46,8 @@ location ~ ^/subfolder { proxy_pass $subfolder_drupal_host; proxy_set_header Host $proxy_host; # $proxy_host will be automatically generated by Nginx based on proxy_pass (it needs to be without scheme and port). + + expires off; # make sure we honor cache headers from the proxy and not overwrite them ``` {% endtab %} {% endtabs %} diff --git a/docs/logging/kibana-examples.md b/docs/logging/kibana-examples.md index 66036b7a5a..d81b4269c5 100644 --- a/docs/logging/kibana-examples.md +++ b/docs/logging/kibana-examples.md @@ -99,5 +99,7 @@ Also note that you can save your visualizations \(and searches\)! That will make ## Troubleshooting -{% embed url="https://www.youtube.com/watch?v=hyUMRlQTXEA" caption="How do I fix an internal server error in Kibana?" %} +{% embed url="https://www.youtube.com/watch?v=BuQo5J0Qc2c&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=5" %} + + diff --git a/docs/resources/faq.md b/docs/resources/faq.md index b9d77c6501..27f57a419d 100644 --- a/docs/resources/faq.md +++ b/docs/resources/faq.md @@ -26,7 +26,7 @@ If you ever need to recover or restore a backup feel free to submit a ticket or ## How can I download a database dump? -{% embed url="https://www.youtube.com/watch?v=amkyV2skidc" caption="" %} +{% embed url="https://www.youtube.com/watch?v=bluTyxKqLbw&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=3" %} ## I'm getting an invalid SSL certificate error @@ -58,7 +58,7 @@ Upgrading Drush should fix that for you. We strongly suggest that you use versio ## I'm seeing an Internal Server Error when trying to access my Kibana logs! -{% embed url="https://www.youtube.com/watch?v=hyUMRlQTXEA" caption="" %} +{% embed url="https://www.youtube.com/watch?v=BuQo5J0Qc2c&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=5" %} No need to panic! This usually happens when a tenant has not been selected. To fix this, follow these steps: @@ -73,17 +73,31 @@ You should now be able to see your logs. I'm unable to SSH into any environment. I'm getting the following message: `Permission denied (publickey)`. -## How can I check the status of a build? +## How can I check the status of a build + +{% embed url="https://www.youtube.com/watch?v=PyrlZqTjf68&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd" %} + +## +a cron job? + +{% embed url="https://www.youtube.com/watch?v=Yd\_JfDyfbR0&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=2" %} + +## How do I add a new route? + +{% embed url="https://www.youtube.com/watch?v=vQxh87F3fW4&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=4" %} + +## How do I remove a route? + +You will need to contact your helpful Lagoon administrator should you need to remove a route. You can use either the private RocketChat or Slack channel that was set up for you to communicate - if not, you can always reach us at support@amazee.io. -{% embed url="https://www.youtube.com/watch?v=tVx-IGaN0Bg" caption="How can I check the status of a build?" %} ## **When I run `pygmy status`, no keys are loaded:** -You'll need to load your SSH key into pygmy. Here's how: [https://pygmy.readthedocs.io/en/master/troubleshooting/](https://pygmy.readthedocs.io/en/master/troubleshooting/) +You'll need to load your SSH key into pygmy. Here's how: [https://docs.lagoon.sh/pygmy/ssh-agent](https://docs.lagoon.sh/pygmy/ssh-agent) ## **When I run `drush sa` no aliases are returned:** -This typically indicates an issue with Pygmy. You can find our troubleshooting docs for Pygmy here: [https://pygmy.readthedocs.io/en/master/troubleshooting/](https://pygmy.readthedocs.io/en/master/troubleshooting/). +This typically indicates an issue with Pygmy. You can find our troubleshooting docs for Pygmy here: [https://docs.lagoon.sh/pygmy/troubleshooting](https://docs.lagoon.sh/pygmy/troubleshooting) ## My deployments fail with a message saying: "drush needs a more functional environment" @@ -91,7 +105,7 @@ This usually means that there is no database uploaded to the project. [Follow ou ## When I start pygmy I see an "address already in use" error? -\`\`Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use Error: failed to start containers: amazeeio-haproxy\`\`\` +`Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use Error: failed to start containers: amazeeio-haproxy` This is a known error! Most of the time it means that there is already something running on port 80. You can find the culprit by running the following query: @@ -105,6 +119,10 @@ That should list everything running on port 80. Kill the process running on port You can make that change using the Lagoon API! You can find the documentation for this change [in our GraphQL documentation](../administering-lagoon/graphql-queries.md#updating-objects). +## How do I add a redirect? + +{% embed url="https://www.youtube.com/watch?v=rWb-PkRDhY4&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=6" %} + ## How can I add new users \(and SSH keys\) to my project/group? This can be done via the Lagoon API. You can find the steps documentation for this change [in our GraphQL documentation](../administering-lagoon/graphql-queries.md#allowing-access-to-the-project). @@ -123,7 +141,7 @@ Once you've added a runtime environment variable to your production environment For cloud hosting customers, you can SFTP to your Lagoon environment by using the following information: -* **Server Hostname**: ssh.lagoon.amazeeio.cloud +* **Server Hostname**: `ssh.lagoon.amazeeio.cloud` * **Port**: 32222 * **Username**: <Project-Environment-Name> diff --git a/docs/resources/glossary.md b/docs/resources/glossary.md index 17dfee4321..2ff3eb7d1a 100644 --- a/docs/resources/glossary.md +++ b/docs/resources/glossary.md @@ -19,6 +19,7 @@ description: >- | DNS | Domain Name System | | Docker | A container engine using Linux features and automating application deployment. | | Drupal | Open-source Content Management System | +| Drush | | | EC2 | Amazon Elastic Compute Cloud | | Elasticsearch | An open-source search engine. It provides a distributed, multi-tenant-capable full-text search engine with a web interface and schema-free JSON documents. | | Galera | A generic synchronous multi-master replication library for transactional databases. | @@ -50,6 +51,7 @@ description: >- | Node.js | An open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a browser. | | OpenShift | Container application platform that brings Docker and Kubernetes to the enterprise. | | PHP | PHP \(Personal Home Page\) is a general-purpose programming language originally designed for web development. | +| PHPStorm | | | Pod | A group of containers that are deployed together on the same host. The basic unit that Kubernetes works with. | | PostgreSQL | A free and open-source relational database management system emphasizing extensibility and technical standards compliance. | | Public/Private Key | Public-key encryption is a cryptographic system that uses two keys -- a public key known to everyone and a private or secret key known only to the recipient of the message. | @@ -61,10 +63,10 @@ description: >- | Solr | An open-source enterprise-search platform, written in Java. | | SSH | Secure Socket Shell, a network protocol that provides administrators with a secure way to access a remote computer. | | SSL | Secure Socket Layer | -| Symfony | | +| Symfony | Symfony is a PHP web application framework and a set of reusable PHP components/libraries, Drupal 8 and up are based on Symfony. | | TCP | Transmission Control Protocol, a standard that defines how to establish and maintain a network conversation through which application programs can exchange data. | | TLS | Transport Layer Security | -| Trivy | | +| Trivy | A simple and comprehensive vulnerability scanner for containers, suitable for CI. | | TTL | Time to live or hop limit is a mechanism that limits the lifespan or lifetime of data in a computer or network. | | Varnish | A powerful, open-source HTTP engine/reverse HTTP proxy that can speed up a website by caching \(or storing\) a copy of a webpage the first time a user visits. | | VM | Virtual Machine | diff --git a/docs/resources/tutorials-and-webinars.md b/docs/resources/tutorials-and-webinars.md index 2011676525..c34c406367 100644 --- a/docs/resources/tutorials-and-webinars.md +++ b/docs/resources/tutorials-and-webinars.md @@ -38,25 +38,37 @@ ## How do I fix an internal server error in Kibana? -{% embed url="https://www.youtube.com/watch?v=is-mt6oBQs8" caption="" %} +{% embed url="https://www.youtube.com/watch?v=BuQo5J0Qc2c&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=5" %} + + ## How do I add a new route? -{% embed url="https://www.youtube.com/watch?v=0D8vp55z1qc" caption="" %} +{% embed url="https://www.youtube.com/watch?v=vQxh87F3fW4&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=4" %} + + ## How do I check the status of a build? -{% embed url="https://www.youtube.com/watch?v=UM6lM12ACK4" caption="" %} +{% embed url="https://www.youtube.com/watch?v=PyrlZqTjf68&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=1" %} + + ## How do I add a redirect in Lagoon? -{% embed url="https://www.youtube.com/watch?v=zmlfJT1FlL0" caption="" %} +{% embed url="https://www.youtube.com/watch?v=rWb-PkRDhY4&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=6" %} + + ## How do I download a database dump? -{% embed url="https://www.youtube.com/watch?v=vnr3EITlQys" caption="" %} +{% embed url="https://www.youtube.com/watch?v=bluTyxKqLbw&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=3" %} + + ## How do I add a cron job? -{% embed url="https://youtube.com/watch?v=7mtw8wM\_Ntg" caption="" %} +{% embed url="https://www.youtube.com/watch?v=Yd\_JfDyfbR0&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=2" %} + + diff --git a/docs/using-lagoon-advanced/active_standby.md b/docs/using-lagoon-advanced/active_standby.md index 5a254eb7c2..b6b1a63bbc 100644 --- a/docs/using-lagoon-advanced/active_standby.md +++ b/docs/using-lagoon-advanced/active_standby.md @@ -141,7 +141,7 @@ mutation updateProject { ## Notes -When the active/standby trigger has been executed, the `productionEnvironment` and `standbyProductionEnvironments` will switch within the Lagoon API. Both environments are still classed as `production` environment types. We use the `productionEnvironment` to determine which one is labelled as `active`. For more information on the differences between environment types, read the [documentation for `environment types`](https://github.com/amazeeio/lagoon/tree/5cd57792f638b841dca84d99b7fcbf06af793817/docs/using-lagoon-advanced/environment_types.md#environment-types) +When the active/standby trigger has been executed, the `productionEnvironment` and `standbyProductionEnvironments` will switch within the Lagoon API. Both environments are still classed as `production` environment types. We use the `productionEnvironment` to determine which one is labelled as `active`. For more information on the differences between environment types, read the [documentation for `environment types`](environment-types.md) ```graphql query projectByName { diff --git a/docs/using-lagoon-advanced/backups.md b/docs/using-lagoon-advanced/backups.md index f726e91ab0..5c88136fca 100644 --- a/docs/using-lagoon-advanced/backups.md +++ b/docs/using-lagoon-advanced/backups.md @@ -8,9 +8,9 @@ description: >- ## Short-Term Backups -These backups are provided by Lagoon itself, and are implemented for databases **only**. Lagoon will automatically instruct the `MariaDB` and `Postgres` [services types](service-types.md) to set up a cron job which creates backups once a day \(see example [backup script](https://github.com/amazeeio/lagoon/blob/docs/images/mariadb/mysql-backup.sh) for MariaDB\). These backups are kept for four days and automatically cleaned up after that. +These backups are provided by Lagoon itself, and are implemented for databases **only**. Lagoon will automatically instruct the `MariaDB` and `Postgres` [services types](service-types.md) to set up a cron job which creates backups once a day \(see example [backup script](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/mysql-backup.sh) for MariaDB\). These backups are kept for four days and automatically cleaned up after that. -These backups are accessible for developers directly by connecting via the [remote shell](remote-shell.md) to the corresponding container \(like `mariadb`\) and checking the [folder](https://github.com/amazeeio/lagoon/blob/docs/images/mariadb/mysql-backup.sh#L24) where the backups are stored\). They can then be downloaded, extracted, or used in any other way. +These backups are accessible for developers directly by connecting via the [remote shell](remote-shell.md) to the corresponding container \(like `mariadb`\) and checking the [folder](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/mysql-backup.sh#L24) where the backups are stored\). They can then be downloaded, extracted, or used in any other way. ## Mid-Term Backups diff --git a/docs/using-lagoon-advanced/environment-idling.md b/docs/using-lagoon-advanced/environment-idling.md new file mode 100644 index 0000000000..a8dbd2804c --- /dev/null +++ b/docs/using-lagoon-advanced/environment-idling.md @@ -0,0 +1,31 @@ +# Environment Idling + +### What is the Environment Idler? + +Lagoon automatically idles environments if they have been unused for a couple of hours. This is done in order to reduce the load on the Kubernetes clusters and improve the overall performance of production environments and development environments that are actually in use. + +### How does an environment get idled? + +The Environment Idler has many different configuration capabilities, here are the defaults of a standard Lagoon installation \(these could be quite different in your Lagoon, check with your Lagoon administrator!\) + +* Idling is tried every 4 hours. +* Production environments are never idled. +* CLI pods are idled if they don't include a cronjob and if there is no remote shell connection active. +* All other services and pods are idled if there was no traffic on the environment in the last 4 hours. +* If there is an active build happening, there will be no idling. + +### How does an environment get un-idled? + +The Lagoon Idler will automatically un-idle an environment as soon as it is visited, therefore just visiting any URL of the environment will start the environment. + +The un-idling will take a couple of seconds, as the Kubernetes cluster needs to start all containers again. During this time there will be waiting screen shown to the visitor that their environment is currently started. + +### **Can I disable / prevent the Idler from idling my environment?** + +Yes, there is a field `autoIdle` on the project \(impacts all environments\) and environment \(if you need to target just 1 environment\), as to whether idling is allowed to take place. A value of `1` indicates the project/environment is eligible for idling. If the project is set to `0` the environments will never be idled, even if the environment is set to `0` +The default is always `1`\(idling is enabled\). + +Talk to your Lagoon administrator if you are unsure how to set these project/environment fields. + + + diff --git a/docs/using-lagoon-advanced/graphql.md b/docs/using-lagoon-advanced/graphql.md index e58709d747..636d18e92f 100644 --- a/docs/using-lagoon-advanced/graphql.md +++ b/docs/using-lagoon-advanced/graphql.md @@ -52,7 +52,7 @@ query whatIsThere { } ``` -And press the ▶️button \(or press CTRL+ENTER\). +And press the ▶️ button \(or press CTRL+ENTER\). ![Entering a query in the GraphiQL UI.](../.gitbook/assets/graphiql-2020-01-29-18-07-28.png) diff --git a/docs/using-lagoon-advanced/project-default-users-keys.md b/docs/using-lagoon-advanced/project-default-users-keys.md new file mode 100644 index 0000000000..9d9e0e578e --- /dev/null +++ b/docs/using-lagoon-advanced/project-default-users-keys.md @@ -0,0 +1,11 @@ +# Project default users and SSH keys + +When a Lagoon project is created, by default an associated SSH "project key" is generated and the private key made available inside the CLI pods of the project. A service account `default-user@project` is also created and given `MAINTAINER` access to the project. The SSH "project key" is attached to that `default-user@project`. + +The result of this is that from inside the CLI pod of any environment it is possible to SSH to any other environment within the same project. This access is used for running tasks from the command line such as synchronising databases between environments (e.g. drush `sql-sync`). + +There is more information on the `MAINTAINER` role available in the [RBAC](https://docs.lagoon.sh/lagoon/administering-lagoon/rbac) documentation. + +## Specifying the project key + +It is possible to specify an SSH private key when creating a project, but this is not recommended as it has security implications. diff --git a/docs/using-lagoon-advanced/remote-shell.md b/docs/using-lagoon-advanced/remote-shell.md index 8b6018bd23..8d2020421d 100644 --- a/docs/using-lagoon-advanced/remote-shell.md +++ b/docs/using-lagoon-advanced/remote-shell.md @@ -64,3 +64,16 @@ ssh -p 32222 -t drupal-example-master@ssh.lagoon.amazeeio.cloud service=nginx co This will execute `whoami` within the `cli` container. +## Multiple SSH Keys + +If you have multiple SSH keys, you can specify which key to use for a given domain by setting this in your `~/.ssh/config` file. + +~/.ssh/.config +``` +Host * + AddKeysToAgent yes + UseKeychain yes + IdentityFile ~/.ssh/[YOUR-DEFAULT-PRIVATE-KEY] +Host ssh.lagoon.amazeeio.cloud + IdentityFile ~/.ssh/[YOUR-PRIVATE-KEY-FOR-USE-ON-LAGOON] +``` diff --git a/docs/using-lagoon-advanced/setting-up-xdebug-with-lagoon.md b/docs/using-lagoon-advanced/setting-up-xdebug-with-lagoon.md new file mode 100644 index 0000000000..70c61fc84d --- /dev/null +++ b/docs/using-lagoon-advanced/setting-up-xdebug-with-lagoon.md @@ -0,0 +1,88 @@ +# Setting up Xdebug with Lagoon + +{% hint style="info" %} +Note: amazee.io's base images are currently using Xdebug v2, and will be upgraded soon. You can [keep track on this issue](https://github.com/uselagoon/lagoon-images/issues/40). +{% endhint %} + +## Enable Xdebug Extension + +Base images provided by amazee.io are pre-configured to include `Xdebug`. For performance reasons, the extension is not installed by default. To install Xdebug, set the environment variable `XDEBUG_ENABLE` to any string. + +1. **Locally** \(pygmy and Lando\) + 1. If you’re using the amazee.io example `docker-compose.yml` file, this setting already exists. Uncomment these lines: [https://github.com/amazeeio/drupal-example-simple/blob/c352e7dc9b2d452bc8a3aecbdd38c8b46981600e/docker-compose.yml\#L16-L17](https://github.com/amazeeio/drupal-example-simple/blob/c352e7dc9b2d452bc8a3aecbdd38c8b46981600e/docker-compose.yml#L16-L17). + 2. Make sure to rebuild and restart the container after changing this setting. +2. **Remotely** \(dev/prod\) + 1. You can [use the Lagoon API to add the environment variable to a running environment](environment-variables.md#runtime-environment-variables-lagoon-api). Make sure to redeploy the environment after changing this setting. + +## Activate xDebug Extension + +Even if Xdebug is installed, it may not be enabled. Base images provided by amazee.io are pre-configured to require an activation trigger for the Xdebug extension to start a session. You can [view the complete documentation](https://2.xdebug.org/docs/remote#starting) for starting the debugger but the most straightforward instructions are below. + +### CLI + +The `php-cli` image is configured to _always_ activate Xdebug when it’s installed, so there is nothing else that needs to be done. Running any PHP script will start a debugging session. + +### Web + +[Install a browser extension](https://2.xdebug.org/docs/remote#browser-extensions) to set/unset an activation cookie. + +Make sure the activation cookie is set for the website you want to start debugging. + +## Configure PHPStorm + +1. PHPStorm is configured correctly out of the box. +2. Click the “**Start Listening for PHP Debug Connections**” icon in the toolbar. +3. Load a webpage or run a Drush command. +4. On first run, PHPStorm should pop up a window asking you to: + 1. Confirm path mappings. + 2. Select the correct file locally that was triggered on the server. + +![](https://lh5.googleusercontent.com/V9lugsEA2VWQSe88tUFQ73ihGoOZ24YIigAfvh2PRl-ACz7jbvk1qKniLvEdhvBPKI5XiVnegd2gC48ICphTSJqZsgCSfrJaIhfgFb5Xp8Jt7gFoyCqn1AjYeRAd0KqJ7w6WUNg9) + +## Configure Visual Studio Code + +1. [Install the PHP Debug extension](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) by Felix Becker. +2. [Follow the instructions](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug#vs-code-configuration) to create a basic `launch.json` for PHP. +3. Add correct path mappings. For a typical Drupal site, an example would be: + + ```text + "pathMappings": { + "/app": "${workspaceFolder}", + }, + ``` + +4. In the **Run** tab of Visual Studio Code, click the green arrow next to “**Listen for Xdebug**” +5. Load a webpage or run a Drush command. + +## Troubleshooting + +* Verify that Xdebug extension is installed. The best way to do this on a Drupal site is to check the PHP status page. You should find a section about Xdebug and all its settings. + +![phpinfo results](https://lh4.googleusercontent.com/Vj4VmT8NTQe-losaowuw5ni3px2oFaGpcANEcp6Tqun3TUyI0A4pPw6PU1n57viw4xcZep0tubUthjffasX17YuhX4TbmOnqUCbo683mubW6vGjCgEvVA4dcIFmkxRci_pCacYnI) + +* Verify the following settings: + +| | | +| :--- | :--- | +| `xdebug.remote_enabled` | On | +| `xdebug.remote_host` | `host.docker.internal` or your IP address | +| `xdebug.remote_port` | 9000 | + +* Verify you have the activation cookie set. You can use the browser tools in Chrome or Firefox to check that a `XDEBUG_SESSION` cookie is set. +* Verify that Xdebug is activated and attempting to start a debug session with your computer. You can use the `nc -l 9000` command line tool to open the Xdebug port. If everything is configured in PHP correctly, you should get a Xdebug init response when you load a webpage or run a Drush command: + +![Xdebug init response](https://lh5.googleusercontent.com/jCK7APIdUwp7XXOZaADYTArPorzqT-v-zhT-6w_A4BTJqpn62RQdrG17NC4jpjZzXW83B0nL_BcKt5hA5SBZ8jP2SFKeJpXpRYsinM2h9Yk6JAL3sMOtEgVCCQjSzFmhXMLnOUdP) + +* Verify that the `xdebug.remote_host` has been set correctly. For local debugging with docker for mac, this value should be `host.docker.internal`. For remote debugging this value should be your IP address. If this value was not correctly determined, you can override it by setting the `DOCKERHOST` environment variable. +* Verify that Docker for Mac networking is not broken. On your host machine, run `nc -l 9000`, then in a new terminal window, run: + + ```text + docker-compose run cli nc -zv host.docker.internal 9000 + ``` + +* You should see a message like: `host.docker.internal (192.168.65.2:9000) open`. +* When using Lando locally, in order to debug scripts run from the CLI you must first SSH into the cli container via `lando ssh`. You won’t be able to debug things by running `lando drush` or `lando php`. +* You can enable the Xdebug log by setting the `XDEBUG_LOG` environment variable. Logs will be saved to `/tmp/xdebug.log`. + + + diff --git a/docs/using-lagoon-the-basics/build-and-deploy-process.md b/docs/using-lagoon-the-basics/build-and-deploy-process.md index 05b42e921d..fa2c9b019f 100644 --- a/docs/using-lagoon-the-basics/build-and-deploy-process.md +++ b/docs/using-lagoon-the-basics/build-and-deploy-process.md @@ -6,25 +6,25 @@ Watch the video below for a walk-through of the deployment process. {% embed url="https://www.youtube.com/watch?v=XiaH7gqUXWc" caption="Lagoon Deployment Demo Video" %} -## 1. Set up OpenShift Project/Kubernetes Namespace for Environment +### 1. Set up OpenShift Project/Kubernetes Namespace for Environment First, Lagoon checks if the OpenShift project/Kubernetes namespace for the given environment exists and is correctly set up. It will make sure that we have the needed service accounts, create secrets, and will configure environment variables into a ConfigMap `lagoon-env` which is filled with information like the environment type and name, the Lagoon project name, and so on. -## 2. Git Checkout & Merge +### 2. Git Checkout & Merge Next, Lagoon will check out your code from Git. It needs that to be able to read the `.lagoon.yml` ,`docker-compose.yml` and any `.env` files, but also to build the Docker images. Note that Lagoon will only process these actions if the branch/PR matches the branch regex set in Lagoon. Based on how the deployment has been triggered, different things will happen: -### **Branch Webhook Push** +#### **Branch Webhook Push** If the deployment is triggered automatically via a Git webhook and is for a single branch, Lagoon will check out the Git SHA which is included in the webhook payload. This will trigger a deployment for every Git SHA pushed. -### **Branch REST trigger** +#### **Branch REST trigger** If you trigger a branch deployment manually via the REST API \(via the UI, or GraphQL\) and do NOT define a `SHA` in the POST payload, Lagoon will just check out the latest commit in that branch and deploy it. -### **Pull Requests** +#### **Pull Requests** If the deployment is a pull request \(PR\) deployment, Lagoon will load the base and the HEAD branch and SHAs for the pull request and will: @@ -35,7 +35,7 @@ If the deployment is a pull request \(PR\) deployment, Lagoon will load the base If the merge fails, Lagoon will also stop and inform you about this. -## 3. Build Image +### 3. Build Image For each service defined in the `docker-compose.yml` Lagoon will check if images need to be built or not. If they need to be built, this will happen now. The order of building is based on the order they are configured in `docker-compose.yml` , and some build arguments are injected: @@ -56,59 +56,63 @@ Also, if this is a pull request build: Additionally, for each already built image, its name is also injected. If your `docker-compose.yml` is configured to first build the `cli` image and then the `nginx` image, the name of the `nginx` image is injected as `NGINX_IMAGE`. -## 4. Configure OpenShift/Kubernetes Services and Routes +### 4. Configure OpenShift/Kubernetes Services and Routes Next, Lagoon will configure OpenShift/Kubernetes with all services and routes that are defined from the service types, plus possible additional custom routes that you have defined in `.lagoon.yml`. In this step it will expose all defined routes in the `LAGOON_ROUTES` as comma separated URLs. It will also define one route as the "main" route, in this order: 1. If custom routes defined: the first defined custom route in `.lagoon.yml`. -2. The first auto generated one from a service defined in `docker-compose.yml`. +2. The first auto-generated route from a service defined in `docker-compose.yml`. 3. None. The "main" route is injected via the `LAGOON_ROUTE` environment variable. -## 5. Push and Tag Images +### 5. Push and Tag Images Now it is time to push the previously built Docker images into the internal Docker image registry. For services that didn't specify a Dockerfile to be built in `docker-compose.yml` and only gave an image, they are also tagged and will cause the internal Docker image registry to know about the images, so that they can be used in containers. -## 6. Persistent Storage +### 6. Persistent Storage Lagoon will now create persistent storage \(PVC\) for each service that needs and requested persistent storage. -## 7. Cron jobs +### 7. Cron jobs For each service that requests a cron job \(like MariaDB\), plus for each custom cron job defined in `.lagoon.yml,` Lagoon will now generate the cron job environment variables which are later injected into the [Deployment](https://docs.openshift.com/container-platform/4.4/applications/deployments/what-deployments-are.html#deployments-and-deploymentconfigs_what-deployments-are). -## 8. Run defined pre-rollout tasks +### 8. Run defined pre-rollout tasks -Now Lagoon will check the `.lagoon.yml` file for defined tasks in `pre-rollout` and will run them one by one in the defined services. Note that these tasks are executed on the pods currently running \(so cannot utilise features or scripts that only exist in the latest commit\) and therefore they are also not run on first deployments. +Now Lagoon will check the `.lagoon.yml` file for defined tasks in `pre-rollout` and will run them one by one in the defined services. Note that these tasks are executed on the pods currently running \(so cannot utilize features or scripts that only exist in the latest commit\) and therefore they are also not run on first deployments. If any of them fail, Lagoon will immediately stop and notify you, and the rollout will not proceed. -## 9. DeploymentConfigs, Statefulsets, Daemonsets +### 9. DeploymentConfigs, Statefulsets, Daemonsets -This is probably the most important step. Based on the defined service type, Lagoon will create the [Deployment](https://docs.openshift.com/container-platform/4.4/applications/deployments/what-deployments-are.html#deployments-and-deploymentconfigs_what-deployments-are), [Statefulset](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) or [Daemonsets](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) for the service. \(Note that Deployments are analogous DeploymentConfigs in Openshift\) +This is probably the most important step. Based on the defined service type, Lagoon will create the [Deployment](https://docs.openshift.com/container-platform/4.4/applications/deployments/what-deployments-are.html#deployments-and-deploymentconfigs_what-deployments-are), [Statefulset](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) or [Daemonsets](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) for the service. \(Note that Deployments are analogous DeploymentConfigs in OpenShift\) It will include all previously gathered information like the cron jobs, the location of persistent storage, the pushed images and so on. Creation of these objects will also automatically cause OpenShift/Kubernetes to trigger new deployments of the pods if necessary, like when an environment variable has changed or an image has changed. But if there is no change, there will be no deployment! This means if you only update the PHP code in your application, the Varnish, Solr, MariaDB, Redis and any other service that is defined but does not include your code will not be deployed. This makes everything much much faster. -## 10. Wait for all rollouts to be done +### 10. Wait for all rollouts to be done Now Lagoon waits! It waits for all of the just-triggered deployments of the new pods to be finished, as well as for their health checks to be successful. If any of the deployments or health checks fail, the deployment will be stopped here, and you will be informed via the defined notification systems \(like Slack\) that the deployment has failed. -## 11. Run defined post-rollout tasks +### 11. Run defined post-rollout tasks Now Lagoon will check the `.lagoon.yml` file for defined tasks in `post-rollout` and will run them one by one in the defined services. If any of them fail, Lagoon will immediately stop and notify you. -## 12. Success +### 12. Success If all went well and nothing threw any errors, Lagoon will mark this build as successful and inform you via defined notifications. ✅ +### Push without deploying + +There may be a case where you want to push without a deployment. Make sure your commit message contains "`[skip deploy]`" or "`[deploy skip]`" and Lagoon will not trigger a deployment from that commit. + diff --git a/docs/using-lagoon-the-basics/configure-webhooks.md b/docs/using-lagoon-the-basics/configure-webhooks.md index 5df3f5276e..aa53fdeb55 100644 --- a/docs/using-lagoon-the-basics/configure-webhooks.md +++ b/docs/using-lagoon-the-basics/configure-webhooks.md @@ -33,7 +33,7 @@ Managing the following settings will require you to have a high level of access * Navigate to Settings -> Integrations in your GitLab repository. -![Go to Settings &gt; Integrations in your GitLab repository.](../.gitbook/assets/screen-shot-2020-01-23-at-1.04.06-pm.png) +![Go to Settings &gt; Integrations in your GitLab repository.](../.gitbook/assets/gitlab-settings.png) * The `URL` is the route to the `webhook-handler` of your Lagoon instance, provided by your Lagoon administrator. * Select the `Trigger` events which will send a notification to Lagoon. We suggest that you send `Push events` and `Merge request events`, and then filter further in the Lagoon configuration of your project. diff --git a/docs/using-lagoon-the-basics/docker-compose-yml.md b/docs/using-lagoon-the-basics/docker-compose-yml.md index cde148d39f..6a6356a011 100644 --- a/docs/using-lagoon-the-basics/docker-compose-yml.md +++ b/docs/using-lagoon-the-basics/docker-compose-yml.md @@ -218,7 +218,7 @@ You can also overwrite the rollout for just one specific environment. This is do Feeling adventurous and want to do something completely customized? Welcome to the Danger Zone! -![Welcome to the Danger Zone](../.gitbook/assets/topgun%20%281%29.gif) +![Welcome to the Danger Zone](../.gitbook/assets/topgun.gif) When defining a service as `lagoon.type: custom`, you can tell Lagoon to not use any pre-defined service type templates and pass your full own custom YAML file. diff --git a/docs/using-lagoon-the-basics/index.md b/docs/using-lagoon-the-basics/index.md index fb63c636e0..e5dd076b5b 100644 --- a/docs/using-lagoon-the-basics/index.md +++ b/docs/using-lagoon-the-basics/index.md @@ -15,7 +15,7 @@ gem install pygmy pygmy up ``` -[Pygmy](https://pygmy.readthedocs.io/en/master/) is an amazee.io flavored local development system. +[Pygmy](https://docs.lagoon.sh/pygmy/) is an amazee.io flavored local development system. Learn more about Lagoon, pygmy, and [Local Development Environments](local-development-environments.md) @@ -31,11 +31,11 @@ Learn more about Lagoon, pygmy, and [Local Development Environments](local-devel ### `.lagoon.yml` -This is the main file that will be used by Lagoon to understand what should be deployed, as well as many other things. See [Documentation for `.lagoon.yml`](lagoon-yml.md). +This is the main file that will be used by Lagoon to understand what should be deployed, as well as many other things. See [documentation for `.lagoon.yml`](lagoon-yml.md). ### `docker-compose.yml` -This file is used by `Docker Compose` to start your local development environment. Lagoon also uses it to understand which of the services should be deployed, which type, and how to build them. This happens via `labels`. See [Documentation for `docker-compose.yml`](docker-compose-yml.md). +This file is used by `Docker Compose` to start your local development environment. Lagoon also uses it to understand which of the services should be deployed, which type, and how to build them. This happens via `labels`. See [documentation for `docker-compose.yml`](docker-compose-yml.md). ### Dockerfiles @@ -48,26 +48,29 @@ Some Docker images and containers need additional customizations from the provid | Type | Versions | Dockerfile | | :--- | :--- | :--- | -| [Elasticsearch](../docker-images/elasticsearch.md) | 6.8, 7.6 | [elasticsearch/Dockerfiles](https://github.com/amazeeio/lagoon/tree/master/images/elasticsearch) | -| [MariaDB-Drupal](../docker-images/mariadb/mariadb-drupal.md) | | [mariadb-drupal/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/mariadb-drupal/Dockerfile) | -| [MariaDB](../docker-images/mariadb/) | 10.4 | [mariadb/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/mariadb/Dockerfile) | -| [MongoDB](../docker-images/mongodb.md) | 3.6 | [mongo/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/mongo/Dockerfile) | -| [NGINX](../docker-images/nginx/) | openresty/1.15.8.2 | [nginx/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/nginx/Dockerfile) | -| [NGINX-Drupal](../docker-images/nginx/nginx-drupal.md) | | [nginx-drupal/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/nginx-drupal/Dockerfile) | -| [PHP-fpm-Drupal](../docker-images/php-cli/php-cli-drupal.md) | 7.2, 7.3, 7.4 | [php/cli-drupal/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/php/cli-drupal/Dockerfile) | -| [PHP-cli](../docker-images/php-cli/) | 7.2, 7.3, 7.4 | [php/cli/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/php/cli/Dockerfile) | -| [PHP-fpm](../docker-images/php-fpm.md) | 7.2, 7.3, 7.4 | [php/fpm/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/php/fpm/Dockerfile) | -| [PostgreSQL](../docker-images/postgres.md) | 11.6 | [postgres/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/postgres/Dockerfile) | -| Python | 2.7, 3.7 | [python/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/python/Dockerfile) | -| [RabbitMQ](../docker-images/rabbitmq.md) | 3.8 | [rabbitmq/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/rabbitmq/Dockerfile) | -| [Redis-persistent](../docker-images/redis/redis-persistent.md) | 5.0 | [redis-persistent/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/redis-persistent/Dockerfile) | -| [Redis](https://github.com/AlannaBurke/lagoon/tree/6c60efce4fc48ebd7d5858cedaafb6ed86b704ee/docs/docker_images/redis.md) | 5.0 | [redis/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/redis/Dockerfile) | -| [Solr-Drupal](../docker-images/solr/solr-drupal.md) | 5.5, 6.6, 7.7 | [solr-drupal/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/solr-drupal/Dockerfile) | -| [Solr](../docker-images/solr/) | 5.5, 6.6, 7.7 | [solr/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/solr/Dockerfile) | -| [Varnish-Drupal](../docker-images/varnish/varnish-drupal.md) | 5.2 | [varnish-drupal/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/varnish-drupal/Dockerfile) | -| [Varnish](../docker-images/varnish/) | 5.2 | [varnish/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/varnish/Dockerfile) | - -All images are pushed to [https://hub.docker.com/u/amazeeio](https://hub.docker.com/u/amazeeio). We suggest always using the latest tag \(like `amazeeio/nginx:latest`\) or unsuffixed images \(like `amazeeio/node:14`\), as they are kept up to date in terms of features and security. - -If you choose to use a specific Lagoon version of an image like `amazeeio/nginx:v0.21.0` or `amazeeio/node:10-v0.21.0` it is your own responsibility to upgrade the version of the images as soon as a new Lagoon version is released! +| [MariaDB](../docker-images/mariadb/) | 10.4 | [mariadb/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb) | +| [MariaDB \(Drupal\)](../docker-images/mariadb/mariadb-drupal.md) | | [mariadb-drupal/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb-drupal) | +| [PostgreSQL](../docker-images/postgres.md) | 11, 12 | [postgres/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres) | +| [MongoDB](../docker-images/mongodb.md) | 3.6 | [mongo/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mongo) | +| [NGINX](../docker-images/nginx/) | openresty/1.19 | [nginx/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/nginx) | +| [NGINX \(Drupal\)](../docker-images/nginx/nginx-drupal.md) | openresty/1.19 | [nginx-drupal/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/nginx-drupal) | +| Node.js | 10, 12, 14 | [node/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/node) | +| [PHP FPM](../docker-images/php-fpm.md) | 7.2, 7.3, 7.4 | [php/fpm/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/php-fpm) | +| [PHP CLI](../docker-images/php-cli/) | 7.2, 7.3, 7.4 | [php/cli/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli) | +| [PHP CLI \(Drupal\)](../docker-images/php-cli/php-cli-drupal.md) | 7.3, 7.4, 8.0 | [php/cli-drupal/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/php-cli-drupal) | +| Python | 2.7, 3.7, 3.8 | [python/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/python) | +| [Redis](https://github.com/amazeeio/lagoon/tree/0ea0472705f825feb5fe0b946a8f4c9fc0bba707/docs/docker-images/redis.md) | 5, 6 | [redis/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/redis) | +| [Redis-persistent](../docker-images/redis/redis-persistent.md) | 5, 6 | [redis-persistent/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/redis-persistent) | +| [Solr](../docker-images/solr/) | 5.5, 6.6, 7.7 | [solr/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr) | +| [Solr \(Drupal\)](../docker-images/solr/solr-drupal.md) | 5.5, 6.6, 7.7 | [solr-drupal/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal) | +| [Varnish](../docker-images/varnish/) | 5 | [varnish/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish) | +| [Varnish \(Drupal\)](../docker-images/varnish/varnish-drupal.md) | 5 | [varnish-drupal/Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish-drupal) | +| [Elasticsearch](../docker-images/elasticsearch.md) | 6, 7 | [elasticsearch/Dockerfiles](https://github.com/uselagoon/lagoon-images/blob/main/images/elasticsearch) | +| [Logstash](../docker-images/elasticsearch.md) | 6, 7 | [logstash/Dockerfiles](https://github.com/uselagoon/lagoon-images/blob/main/images/logstash) | +| [Kibana](../docker-images/elasticsearch.md) | 6, 7 | [kibana/Dockerfiles](https://github.com/uselagoon/lagoon-images/blob/main/images/kibana) | +| [RabbitMQ](../docker-images/rabbitmq.md) | 3.8 | [rabbitmq/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/rabbitmq) | + +All images are pushed to [https://hub.docker.com/u/uselagoon](https://hub.docker.com/u/uselagoon). We suggest always using the latest tag \(like `uselagoon/nginx:latest`\) or unsuffixed images \(like `amazeeio/node:14`\), as they are kept up to date in terms of features and security. + +If you choose to use a specific Lagoon version of an image like `uselagoon/nginx:20.10.0` or `uselagoon/node-10:20.10.0` it is your own responsibility to upgrade the version of the images as soon as a new Lagoon version is released! diff --git a/docs/using-lagoon-the-basics/lagoon-yml.md b/docs/using-lagoon-the-basics/lagoon-yml.md index c291398b08..90149a10f6 100644 --- a/docs/using-lagoon-the-basics/lagoon-yml.md +++ b/docs/using-lagoon-the-basics/lagoon-yml.md @@ -40,7 +40,8 @@ tasks: service: cli routes: - insecure: Redirect + autogenerate: + insecure: Redirect environments: master: @@ -124,7 +125,7 @@ Note: If you would like to temporarily disable pre/post-rollout tasks during a d ## Routes -{% embed url="https://www.youtube.com/watch?v=un23Vivz\_-Q" caption="How do I add a new route?" %} +{% embed url="https://www.youtube.com/watch?v=vQxh87F3fW4&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=4" caption="" %} ### `routes.autogenerate.enabled` @@ -205,7 +206,7 @@ In the `"www.example.com"` example repeated below, we see two more options \(als * `hsts` can be set to a value of `max-age=31536000;includeSubDomains;preload`. Ensure there are no spaces and no other parameters included. Only the `max-age` parameter is required. The required `max-age` parameter indicates the length of time, in seconds, the HSTS policy is in effect for. {% hint style="info" %} -If you plan to switch from a SSL certificate signed by a Certificate Authority \(CA\) to a Let's Encrypt certificate, it's best get in touch with your Lagoon administrator to oversee the transition. There are [known issues](https://github.com/tnozicka/openshift-acme/issues/68) during the transition. The workaround would be manually removing the CA certificate and then triggering the Let's Encrypt process. +If you plan to switch from a SSL certificate signed by a Certificate Authority \(CA\) to a Let's Encrypt certificate, it's best to get in touch with your Lagoon administrator to oversee the transition. There are [known issues](https://github.com/tnozicka/openshift-acme/issues/68) during the transition. The workaround would be manually removing the CA certificate and then triggering the Let's Encrypt process. {% endhint %} {% tabs %} @@ -221,7 +222,7 @@ If you plan to switch from a SSL certificate signed by a Certificate Authority \ ### **Monitoring a specific path** -When [UptimeRobot](https://uptimerobot.com/) is configured for your cluster \(OpenShift or Kubernetes\), Lagoon will inject annotations to each route/ingress for use by the `stakater/IngressControllerMonitor`. The default action is to monitor the homepage of the route. If you have a specific route to be monitored, this can be overriden by adding a `monitoring-path` to your route specification. A common use is to set up a path for monitoring which bypasses caching to give a more real-time monitoring of your site. +When [UptimeRobot](https://uptimerobot.com/) is configured for your cluster \(OpenShift or Kubernetes\), Lagoon will inject annotations to each route/ingress for use by the `stakater/IngressControllerMonitor`. The default action is to monitor the homepage of the route. If you have a specific route to be monitored, this can be overridden by adding a `monitoring-path` to your route specification. A common use is to set up a path for monitoring which bypasses caching to give a more real-time monitoring of your site. {% tabs %} {% tab title=".lagoon.yml" %} @@ -232,13 +233,15 @@ When [UptimeRobot](https://uptimerobot.com/) is configured for your cluster \(Op {% endtab %} {% endtabs %} -### **Ingress annotations \(Redirects\)** +### **Ingress annotations** {% hint style="info" %} Route/Ingress annotations are only supported by projects that deploy into clusters that run nginx-ingress controllers! Check with your Lagoon administrator if this is supported. {% endhint %} -* `annotations` can be a yaml map of [annotations supported by the nginx-ingress controller](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/), this is specifically useful for easy redirects: +* `annotations` can be a yaml map of [annotations supported by the nginx-ingress controller](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/), this is specifically useful for easy redirects and other configurations + +#### **Ingress annotations redirects** In this example any requests to `example.ch` will be redirected to `https://www.example.ch` with keeping folders or query parameters intact \(`example.com/folder?query` -> `https://www.example.ch/folder?query`\) @@ -265,6 +268,25 @@ You can of course also redirect to any other URL not hosted on Lagoon, this will {% endtab %} {% endtabs %} +#### Trusted Reverse Proxies + +Some configurations involve a reverse proxy \(like a CDN\) in front of the Kubernetes Clusters. In these configurations the IP of the Reverse Proxy will appear as the `REMOTE_ADDR` `HTTP_X_REAL_IP` `HTTP_X_FORWARDED_FOR` headers field in your applications. While the original IP of the requester can be found in the `HTTP_X_ORIGINAL_FORWARDED_FOR` header. + +If you like the original IP to appear in the `REMOTE_ADDR` `HTTP_X_REAL_IP` `HTTP_X_FORWARDED_FOR` headers, you need to tell the ingress which reverse proxy IPs you want to trust: + +{% tabs %} +{% tab title=".lagoon.yml" %} +```yaml + - "example.ch": + annotations: + nginx.ingress.kubernetes.io/server-snippet: | + set_real_ip_from 1.2.3.4/32; +``` +{% endtab %} +{% endtabs %} + +This example would trust the CIDR `1.2.3.4/32` \(the IP `1.2.3.4` in this case\). Therefore if there is a request sent to the Kubernetes clustesr from the IP `1.2.3.4` the `X-Forwarded-For` Header is analyzed and it's contents injected into `REMOTE_ADDR` `HTTP_X_REAL_IP` `HTTP_X_FORWARDED_FOR` headers. + ### `Environments.[name].types` The Lagoon build process checks the `lagoon.type` label from the `docker-compose.yml` file in order to learn what type of service should be deployed \(read more about them in the [documentation of `docker-compose.yml`](docker-compose-yml.md#custom-templates)\). @@ -349,17 +371,31 @@ routes: enabled: false environments: develop: - autogenerateRoutes: tru + autogenerateRoutes: true ``` {% endtab %} {% endtabs %} ### `Cron jobs - environments.[name].cronjobs` -{% embed url="https://www.youtube.com/watch?v=6qqY-XmBZ8c" caption="How do I add a cron job?" %} +{% embed url="https://www.youtube.com/watch?v=Yd\_JfDyfbR0&list=PLOM3iGqJj\_UdTtl4eVDszI9VgGW9Dcefd&index=2" caption="" %} As most of the time it is not desirable to run the same cron jobs across all environments, you must explicitly define which jobs you want to run for each environment. +Example: + +{% tabs %} +{% tab title=".lagoon.yml" %} +```yaml + cronjobs: + - name: drush cron + schedule: "H * * * *" # This will run the cron once per hour. + command: drush cron + service: cli +``` +{% endtab %} +{% endtabs %} + * `name:` * Just a friendly name for identifying what the cron job will do. * `schedule:` @@ -410,7 +446,7 @@ With the key `ssh` you can define another SSH endpoint that should be used by th ### `additional-yaml` -The `additional-yaml` has some super powers. Basically, it allows you to define any arbitrary YAML configuration file to be inserted before the build step \(it still needs to be valid Kubernetes/OpenShift YAML , though☺\). +The `additional-yaml` has some super powers. Basically, it allows you to define any arbitrary YAML configuration file to be inserted before the build step \(it still needs to be valid Kubernetes/OpenShift YAML, though ☺\). Example: diff --git a/docs/using-lagoon-the-basics/local-development-environments.md b/docs/using-lagoon-the-basics/local-development-environments.md index 71716ad267..bfde94e684 100644 --- a/docs/using-lagoon-the-basics/local-development-environments.md +++ b/docs/using-lagoon-the-basics/local-development-environments.md @@ -8,16 +8,20 @@ Even though Lagoon has only a hard dependency on Docker and [Docker Compose](htt * A system that receives and displays mail locally. {% hint style="warning" %} -You do not need to _install_ Lagoon locally in order to _use_ it locally! That sounds confusing, but follow the documentation. Lagoon is the system that **deploys** your local development environment to your production environment, it's **not** the environment itself. +You do not need to _install_ Lagoon locally to _use_ it locally! That sounds confusing but follow the documentation. Lagoon is the system that **deploys** your local development environment to your production environment, it's **not** the environment itself. {% endhint %} -Lagoon currently works best with `pygmy` , which is the amazee.io flavored system of the above tools and works out of the box with Lagoon. +## pygmy or Lando - the choice is yours -`pygmy` is a [Ruby](https://www.ruby-lang.org/en/) gem, so to install it, run: `gem install pygmy`. +Lagoon has traditionally worked best with `pygmy` , which is the amazee.io flavored system of the above tools and works out of the box with Lagoon. It lives at [https://github.com/amazeeio/pygmy](https://github.com/amazeeio/pygmy) -For detailed usage info on `pygmy`, see the [documentation of pygmy](https://pygmy.readthedocs.io/). +`pygmy` is a [Ruby](https://www.ruby-lang.org/en/) gem, so to install it, run: `gem install pygmy`. For detailed usage info on pygmy, see its [documentation](https://docs.lagoon.sh/pygmy/). -[Lando integration with Lagoon is coming soon!](https://www.amazee.io/blog/post/announcing-lando-integration-for-lagoon) +As announced in our[ blog post](https://www.amazee.io/blog/post/announcing-lando-integration-for-lagoon), Lagoon is now also compatible with Lando! For more information, please see the documentation at [https://docs.lando.dev/config/lagoon.html](https://docs.lando.dev/config/lagoon.html) to get yourself up and running. -We are evaluating adding support for other systems like [Docksal](https://docksal.io/), [DDEV](https://www.ddev.com/ddev-local/), and [Docker4Drupal](https://wodby.com/docs/stacks/drupal/local/), and will possibly add full support for these in the future. If you do have Lagoon running with a system like these, we would love for you to submit a [PR on GitHub](https://github.com/amazeeio/pygmy)! +Lando's workflow for Lagoon will be familiar to users of Lando, and will also be the easiest way for Lagoon newcomers to get up and running. Pygmy presents a closer integration with Docker, which will lend itself better to more complex scenarios and use cases but will also require a deeper understanding. + +There is also a community-built fork of Pygmy, re-written in Go, available at [https://github.com/fubarhouse/pygmy-go](https://github.com/fubarhouse/pygmy-go) that presents even more opportunity for local customisation and control. + +We have previously evaluated adding support for other systems like [Docksal](https://docksal.io/), [DDEV](https://www.ddev.com/ddev-local/), and [Docker4Drupal](https://wodby.com/docs/stacks/drupal/local/), and whilst we may add support for these in the future, our current focus is on supporting using Lando and pygmy. If you do have Lagoon running with one of these \(or other\) tools, we would love for you to submit a [PR on GitHub](https://github.com/amazeeio/pygmy)! diff --git a/helpers/annotate-pvc-backup.sh b/helpers/annotate-pvc-backup.sh deleted file mode 100644 index 1b5dd04067..0000000000 --- a/helpers/annotate-pvc-backup.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -## -## This annotates all PVCs with the name `solr` and `nginx` with appuio.ch/backup="true" in order that the restic backup system will back them up -## - -oc get pvc --all-namespaces | grep solr | sed '1d' | awk '{ print $2, "--namespace", $1 }' | while read line; do oc annotate --overwrite pvc $line appuio.ch/backup="true"; done -oc get pvc --all-namespaces | grep nginx | sed '1d' | awk '{ print $2, "--namespace", $1 }' | while read line; do oc annotate --overwrite pvc $line appuio.ch/backup="true"; done - -oc get --all-namespaces pod -l 'service in (cli)' | sed '1d' | awk '{ print "--namespace", $1, "pod", $2 }' | while read line; do oc annotate $line --overwrite appuio.ch/backupcommand='/bin/sh -c "if [[ $MARIADB_HOST ]]; then dump=$(mktemp) && mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db -h $MARIADB_HOST -u $MARIADB_USERNAME -p$MARIADB_PASSWORD $MARIADB_DATABASE > $dump && cat $dump && rm $dump; fi"'; done \ No newline at end of file diff --git a/helpers/check_acme_routes.sh b/helpers/check_acme_routes.sh deleted file mode 100755 index c4dc864235..0000000000 --- a/helpers/check_acme_routes.sh +++ /dev/null @@ -1,301 +0,0 @@ -#!/bin/bash - -# Description: script to check routes with exposer pods. -# In case of no DNS record or mis-configuration, script will update the route -# by disabling the tls-acme, removing other acme related annotations and add -# an interal one for filtering purpose - -set -eu -o pipefail - -# Set DEBUG variable to true, to start bash in debug mode -DEBUG="${DEBUG:-"false"}" -if [ "$DEBUG" = "true" ]; then - set -x -fi - -# Some variables - -# Cluster full hostname and API hostname -CLUSTER_HOSTNAME="${CLUSTER_HOSTNAME:-""}" -CLUSTER_API_HOSTNAME="${CLUSTER_API_HOSTNAME:-"$CLUSTER_HOSTNAME"}" - -# Default command -COMMAND=${1:-"help"} - -# Set DRYRUN variable to true to run in dry-run mode -DRYRUN="${DRYRUN:-"false"}" - - -# Set a REGEX variable to filter the execution of the script -REGEX=${REGEX:-".*"} - -# Set NOTIFYONLY to true if you want to send customers a notification -# explaining why Lagoon is not able to issue Let'S Encrypt certificate for -# some routes defined in customer's .lagoon.yml file. -# If set to true, no other action rather than notification is done (ie: no annotation or deletion) -NOTIFYONLY=${NOTIFYONLY:-"false"} - -# Help function -function usage() { - echo -e "The available commands are: - - help (get this help) - - getpendingroutes (get a list of routes with acme \"orderStatus\" in Pending - - getdisabledroutes (get a list of routes with \"administratively-disabled\" annotation - - getbrokenroutes (get a list of all possible broken routes) - - updateroutes (update broken routes) - - By default, script doesn't set any default cluster to run routes' checks. Please set CLUSTER_HOSTNAME and CLUSTER_API_HOSTNAME variables. - If you want to change the API endpoint, set CLUSTER_API_HOSTNAME variable. - If you want to change the cluster's hostname, set CLUSTER_HOSTNAME variable. - If you want to filter the execution of the script only for certain projects, set the REGEX variable. - If you want to test against a specific IP, set the CLUSTER_IPS array. - - Examples: - CLUSTER_HOSTNAME=\"ch.amazee.io\" CLUSTER_API_HOSTNAME=\"ch.amazeeio.cloud\" ./check_acme_routes.sh getpendingroutes (Returns a list of all routes witl TLS in Pending status for the defined cluster) - REGEX=\"drupal-example\" ./check_acme_routes.sh getpendingroutes (Returns a list of all routes for all projects matchiing the regex \`drupal-example\` with TLS in Pending status) - REGEX=\"drupal-example-master\" DRYRUN=true ./check_acme_routes.sh updateroutes (Will run in DRYRUN mode to check and update all broken routes in \`drupal-example-master\` project)" - -} - -# Function that performs mandatory variales and dependencies checks -function initial_checks() { - # By default script doesn't set CLUSTER_HOSTNAME and CLUSTER_API_HOSTNAME. At least CLUSTER_HOSTNAME must be set - if [ -z "$CLUSTER_HOSTNAME" ]; then - echo "Please set CLUSTER_HOSTNAME variable" - usage - exit 1 - fi - - # Script depends on `lagoon-cli`. Check if it in installed - if [[ ! $(command -v lagoon) ]]; then - echo "Please install \`lagoon-cli\` from https://github.com/amazeeio/lagoon-cli because the script relys on it" - exit 1 - fi -} - -# function to get a list of all "administratively-disabled" routes -function get_all_disabled_routes() { - echo -e "List of routes administratively disabled\n" - oc get route --all-namespaces -o=jsonpath="{range .items[?(@.metadata.annotations.amazee\.io/administratively-disabled)]}{.metadata.namespace}{'\t'}{.metadata.name}{'\n'}{end}" - exit 0 -} - -# Function to check if you are running the script on the right cluster and if you're logged in correctly -function check_cluster_api() { - # Check on which cluster you're going to run commands - if oc whoami --show-server | grep -q -v "$CLUSTER_API_HOSTNAME"; then - echo "Please connect to the right cluster" - exit 1 - fi - - # Check if you're logged in correctly - if [ $(oc status|grep -q "Unauthorized";echo $?) -eq 0 ]; then - echo "Please login into the cluster" - exit 1 - fi -} - -# Function to get a list of all routes with acme.openshift.io/status.provisioningStatus.orderStatus=pending -function get_pending_routes() { - for namespace in $(oc get projects --no-headers=true |awk '{print $1}'|sort -u|grep -E "$REGEX") - do - IFS=$';' - # For each route in a namespace with `tls-acme` set to true, check the `orderStatus` if in pending status - for routelist in $(oc get route -n "$namespace" -o=jsonpath="{range .items[?(@.metadata.annotations.kubernetes\.io/tls-acme=='true')]}{.metadata.name}{'\n'}{.metadata.annotations.acme\.openshift\.io/status}{';'}{end}"|sed "s/^[[:space:]]*//") - do - PENDING_ROUTE_NAME=$(echo "$routelist"|sed -n 1p) - if echo "$routelist"|sed -n 4p | grep -q pending; then - STATUS="Pending" - echo "Route $PENDING_ROUTE_NAME in $namespace is in $STATUS status" - fi - - done - unset IFS - done -} - -# Function for creating an array with all routes that might be updated -function create_routes_array() { - # Get the list of namespaces with broker routes, according to REGEX - for namespace in $(oc get routes --all-namespaces|grep exposer|awk '{print $1}'|sort -u|grep -E "$REGEX") - do - # Raw JSON Openshift project output - PROJECTJSON="$(oc get project "$namespace" -o json)" - - # Gather project name based on a label or an annotation - if [ $(echo $PROJECTJSON |grep -q 'lagoon.sh/project'; echo $?) -eq 0 ]; then - PROJECTNAME=$(echo "${PROJECTJSON}" | grep 'lagoon.sh/project' | awk -F'"' '{print $4}') - else - PROJECTNAME=$(echo "${PROJECTJSON}" |grep display-name|awk -F'[][]' '{print $2}'|tr "_" "-") - fi - - # Get the list of broken unique routes for each namespace - for routelist in $(oc get -n "$namespace" route|grep exposer|awk -vNAMESPACE="$namespace" -vPROJECTNAME="$PROJECTNAME" '{print $1";"$2";"NAMESPACE";"PROJECTNAME}'|sort -u -k2 -t ";") - do - # Put the list into an array - ROUTES_ARRAY+=("$routelist") - done - done - - # Create a sorted array of unique route to check - ROUTES_ARRAY_SORTED=($(sort -u -k 2 -t ";"<<<"${ROUTES_ARRAY[*]}")) -} - -# Function to check the routes, update them and delete the exposer's routes -function check_routes() { - - # Cluster array of IPs - CLUSTER_IPS=($(dig +short "$CLUSTER_HOSTNAME")) - for i in "${ROUTES_ARRAY_SORTED[@]}" - do - # Tranform the item into an array - route=($(echo "$i" | tr ";" "\n")) - - # Gather some useful variables - ROUTE_NAME=${route[0]} - ROUTE_HOSTNAME=${route[1]} - ROUTE_NAMESPACE=${route[2]} - ROUTE_PROJECTNAME=${route[3]} - - # Get route DNS record(s) - if [[ $(dig +short "$ROUTE_HOSTNAME" &> /dev/null; echo $?) -ne 0 ]]; then - ROUTE_HOSTNAME_IP="null" - else - ROUTE_HOSTNAME_IP=$(dig +short "$ROUTE_HOSTNAME") - fi - - # Check if the route matches the Cluster's IP(s) - if echo "$ROUTE_HOSTNAME_IP" | grep -E -q -v "${CLUSTER_IPS[*]}"; then - - # If IP is empty, then no DNS record set - if [ -z "$ROUTE_HOSTNAME_IP" ]; then - DNS_ERROR="No A or CNAME record set" - else - DNS_ERROR="$ROUTE_HOSTNAME in $ROUTE_NAMESPACE has no DNS record poiting to ${CLUSTER_IPS[*]} and going to disable tls-acme" - fi - - # Print the error on stdout - echo "$DNS_ERROR" - - if [[ "$NOTIFYONLY" = "true" ]]; then - notify_customer "$ROUTE_PROJECTNAME" - else - # Call the update function to update the route - update_annotation "$ROUTE_HOSTNAME" "$ROUTE_NAMESPACE" - notify_customer "$ROUTE_PROJECTNAME" - - # Now once the main route is updated, it's time to get rid of exposers' routes - for j in $(oc get -n "$ROUTE_NAMESPACE" route|grep exposer|grep -E '(^|\s)'"$ROUTE_HOSTNAME"'($|\s)'|awk '{print $1";"$2}') - do - ocroute=($(echo "$j" | tr ";" "\n")) - OCROUTE_NAME=${ocroute[0]} - if [[ $DRYRUN = true ]]; then - echo -e "DRYRUN oc delete -n $ROUTE_NAMESPACE route $OCROUTE_NAME" - else - echo -e "\nDelete route $OCROUTE_NAME" - oc delete -n "$ROUTE_NAMESPACE" route "$OCROUTE_NAME" - fi - done - fi - fi - echo -e "\n" - - - done -} - -# Function to update route's annotation (ie: update tls-amce, remove tls-acme-awaiting-* and set a new one for internal purpose) -function update_annotation() { - echo "Update route's annotations" - OCOPTIONS="--overwrite" - if [[ "$DRYRUN" = "true" ]]; then - OCOPTIONS="--dry-run --overwrite" - fi - - # Annotate the route - oc annotate -n "$2" $OCOPTIONS route "$1" acme.openshift.io/status- kubernetes.io/tls-acme-awaiting-authorization-owner- kubernetes.io/tls-acme-awaiting-authorization-at-url- kubernetes.io/tls-acme="false" amazee.io/administratively-disabled="$(date +%s)" -} - - -# Function to notify customer about the misconfiguration of their routes -function notify_customer() { - - # Get Slack|Rocketchat channel and webhook - if [ $(TEST=$(lagoon list slack -p "$1" --no-header|awk '{print $3";"$4}'); echo $?) -eq 0 ]; then - NOTIFICATION="slack" - elif [ $(TEST=$(lagoon list rocketchat -p "$1" --no-header|awk '{print $3";"$4}'); echo $?) -eq 0 ]; then - NOTIFICATION="rocketchat" - else - echo "No notification set" - return 0 - fi - - MESSAGE="Your $ROUTE_HOSTNAME route is configured in the \`.lagoon.yml\` file to issue an TLS certificate from Lets Encrypt. Unfortunately Lagoon is unable to issue a certificate as $DNS_ERROR.\nTo be issued correctly, the DNS records for $ROUTE_HOSTNAME should point to $CLUSTER_HOSTNAME with an CNAME record (preferred) or to ${CLUSTER_IPS[*]} via an A record (also possible but not preferred).\nIf you don't need the SSL certificate or you are using a CDN that provides you with an TLS certificate, please update your .lagoon.yml file by setting the tls-acme parameter to false for $ROUTE_HOSTNAME, as described here: https://lagoon.readthedocs.io/en/latest/using_lagoon/lagoon_yml/#ssl-configuration-tls-acme.\nWe have now administratively disabled the issuing of Lets Encrypt certificate for $ROUTE_HOSTNAME in order to protect the cluster, this will be reset during the next deployment, therefore we suggest to resolve this issue as soon as possible. Feel free to reach out to us for further information.\nThanks you.\namazee.io team" - - NOTIFICATION_DATA=($(lagoon list $NOTIFICATION -p "$1" --no-header|awk '{print $3";"$4}')) - for notification in ${NOTIFICATION_DATA[@]} - do - CHANNEL=$(echo "$notification"|cut -f1 -d ";") - WEBHOOK=$(echo "$notification"|cut -f2 -d ";") - - # json Payload - PAYLOAD="\"channel\": \"$CHANNEL\", \"text\": \"${MESSAGE}\"" - - echo -e "Sending notification into ${CHANNEL}" - - # Execute curl to send message into the channel - if [[ $DRYRUN = true ]]; then - echo "DRYRUN Sending notification on \"$NOTIFICATION\" curl -X POST -H 'Content-type: application/json' --data '{'"$PAYLOAD"'}' "$WEBHOOK"" - else - curl -X POST -H 'Content-type: application/json' --data '{'"${PAYLOAD}"'}' ${WEBHOOK} - fi - done -} - -# Main function -function main() { - - COMMAND="$1" - - # Check first the cluster you're connected to - echo -e "You're running the script on $CLUSTER_HOSTNAME\nDRYRUN mode is set to \"$DRYRUN\"" - check_cluster_api - - case "$COMMAND" in - help) - usage - ;; - getpendingroutes) - get_pending_routes - ;; - getdisabledroutes) - get_all_disabled_routes - ;; - getbrokenroutes) - echo -e "\nCreating a list of possible broken routes" - create_routes_array - echo -e "ROUTE_NAMESPACE;ROUTE_NAME;ROUTE_HOSTNAME"|column -t -s ";" - for i in "${ROUTES_ARRAY_SORTED[@]}" - do - # Tranform the item into an array - route=($(echo "$i" | tr ";" "\n")) - # Gather some useful variables - ROUTE_NAME=${route[0]} - ROUTE_HOSTNAME=${route[1]} - ROUTE_NAMESPACE=${route[2]} - echo -e "$ROUTE_NAMESPACE;$ROUTE_NAME;$ROUTE_HOSTNAME"|column -t -s ";" - done - ;; - updateroutes) - echo -e "Checking routes\n" - create_routes_array - check_routes - ;; - *) - usage - ;; - esac -} - -initial_checks "$COMMAND" -main "$COMMAND" diff --git a/helpers/k8up-initiate-archive.sh b/helpers/k8up-initiate-archive.sh deleted file mode 100755 index ba2cc4999d..0000000000 --- a/helpers/k8up-initiate-archive.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -function outputToYaml() { - IFS='' - while read data; do - echo "$data" >> /tmp/k8up-archive-initiate.yml; - done; -} - -if [ -z "$OPENSHIFT_PROJECT" ]; then - echo "OPENSHIFT_PROJECT not set" - exit 1 -fi - -if [ -z "$ARCHIVE_BUCKET" ]; then - echo "ARCHIVE_BUCKET not set" - exit 1 -fi - -set -e -o pipefail - -OC="oc" - -rm -f /tmp/k8up-archive-initiate.yml; - -echo "${OPENSHIFT_PROJECT}: starting ==================================================================" - -# Fill environment variables which are needed by exec-openshift-resources.sh and the lagoon templates -CONFIGMAP=$($OC -n $OPENSHIFT_PROJECT get configmap lagoon-env -o json) -PROJECT=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_PROJECT') -SAFE_PROJECT=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_SAFE_PROJECT') -BRANCH=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_GIT_BRANCH') -SAFE_BRANCH=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_GIT_SAFE_BRANCH') -ENVIRONMENT_TYPE=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_ENVIRONMENT_TYPE') -LAGOON_GIT_SHA="00000000000000000000000000000000000000000" -OPENSHIFT_REGISTRY="docker-registry.default.svc:5000" -ROUTER_URL="" -SERVICE_NAME="none" - -# If restic backups are supported by this cluster we create the schedule definition -if oc get customresourcedefinition schedules.backup.appuio.ch > /dev/null; then - - # create archive only if there is a backup-schedule already existing for this project - if oc -n ${OPENSHIFT_PROJECT} get schedule backup-schedule &> /dev/null; then - - # create archive only if this is a production environment - if [[ "${ENVIRONMENT_TYPE}" == "production" ]]; then - TEMPLATE_PARAMETERS=() - - # Run Archive on Monday at 0300-0600 - ARCHIVE_SCHEDULE=$( $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(3-9) 7 * *") - TEMPLATE_PARAMETERS+=(-p ARCHIVE_SCHEDULE="${ARCHIVE_SCHEDULE}") - - TEMPLATE_PARAMETERS+=(-p ARCHIVE_BUCKET="${ARCHIVE_BUCKET}") - - OPENSHIFT_TEMPLATE="$(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/openshift-templates/backup-archive-schedule.yml" - . $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/exec-openshift-resources.sh - - oc apply -n ${OPENSHIFT_PROJECT} -f /tmp/k8up-archive-initiate.yml - rm /tmp/k8up-archive-initiate.yml - else - echo "${OPENSHIFT_PROJECT}: Not production environment, not creating an archive-schedule" - fi - else - echo "${OPENSHIFT_PROJECT}: No backup-schedule found for project, not creating an archive-schedule" - fi -else - echo "k8up is not supported by this cluster" - exit 1 -fi - -echo "${OPENSHIFT_PROJECT}: done ==================================================================" diff --git a/helpers/k8up-initiate.sh b/helpers/k8up-initiate.sh deleted file mode 100755 index 9939931f12..0000000000 --- a/helpers/k8up-initiate.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -function outputToYaml() { - IFS='' - while read data; do - echo "$data" >> /tmp/k8up-initiate.yml; - done; -} - -if [ -z "$JWTSECRET" ]; then - echo "JWTSECRET not set" - exit 1 -fi - -if [ -z "$OPENSHIFT_PROJECT" ]; then - echo "OPENSHIFT_PROJECT not set" - exit 1 -fi - -set -eu -o pipefail - -OC="oc" - -echo "${OPENSHIFT_PROJECT}: starting ==================================================================" - -# Fill environment variables which are needed by exec-openshift-resources.sh and the lagoon templates -CONFIGMAP=$($OC -n $OPENSHIFT_PROJECT get configmap lagoon-env -o json) -PROJECT=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_PROJECT') -SAFE_PROJECT=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_SAFE_PROJECT') -BRANCH=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_GIT_BRANCH') -SAFE_BRANCH=$(echo "$CONFIGMAP" | jq -r '.data.LAGOON_GIT_SAFE_BRANCH') -LAGOON_GIT_SHA="00000000000000000000000000000000000000000" -OPENSHIFT_REGISTRY="docker-registry.default.svc:5000" -ROUTER_URL="" -SERVICE_NAME="none" - -PROJECT_SECRET=$(echo -n "$PROJECT-$JWTSECRET" | sha256sum | cut -d " " -f 1) - -# If restic backups are supported by this cluster we create the schedule definition -if oc get customresourcedefinition schedules.backup.appuio.ch > /dev/null; then - - baas_repo_pw=$(oc -n ${OPENSHIFT_PROJECT} create secret generic baas-repo-pw --from-literal=repo-pw=$(echo -n "$PROJECT_SECRET-BAAS-REPO-PW" | sha256sum | cut -d " " -f 1) -o json --dry-run) - - if ! oc -n ${OPENSHIFT_PROJECT} get secret baas-repo-pw &> /dev/null; then - # Create baas-repo-pw secret based on the project secret - echo "$baas_repo_pw" | oc -n ${OPENSHIFT_PROJECT} create -f - - else - echo "$baas_repo_pw" | oc -n ${OPENSHIFT_PROJECT} replace -f - - fi - - TEMPLATE_PARAMETERS=() - - # Run Backups every day at 2200-0200 - BACKUP_SCHEDULE=$( $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(22-2) * * *") - TEMPLATE_PARAMETERS+=(-p BACKUP_SCHEDULE="${BACKUP_SCHEDULE}") - - # Run Checks on Sunday at 0300-0600 - CHECK_SCHEDULE=$( $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(3-6) * * 0") - TEMPLATE_PARAMETERS+=(-p CHECK_SCHEDULE="${CHECK_SCHEDULE}") - - # Run Prune on Saturday at 0300-0600 - PRUNE_SCHEDULE=$( $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(3-6) * * 6") - TEMPLATE_PARAMETERS+=(-p PRUNE_SCHEDULE="${PRUNE_SCHEDULE}") - - OPENSHIFT_TEMPLATE="$(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/openshift-templates/backup/schedule.yml" - . $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/exec-openshift-resources.sh - - oc apply -n ${OPENSHIFT_PROJECT} -f /tmp/k8up-initiate.yml - rm /tmp/k8up-initiate.yml -else - echo "k8sup is not supported by this cluster" - exit 1 -fi - -# Disable backup of solr pvc's -if solr=$(oc -n ${OPENSHIFT_PROJECT} get pvc solr -o json 2> /dev/null) && [[ $(echo "$solr" | jq -r '.metadata.annotations."appuio.ch/backup"') != "false" ]]; then - oc -n ${OPENSHIFT_PROJECT} annotate --overwrite pvc solr appuio.ch/backup="false"; -fi - -# Enable backup of nginx pvc's -if nginx=$(oc -n ${OPENSHIFT_PROJECT} get pvc nginx -o json 2> /dev/null) && [[ $(echo "$nginx" | jq -r '.metadata.annotations."appuio.ch/backup"') != "true" ]]; then - oc -n ${OPENSHIFT_PROJECT} annotate --overwrite pvc nginx appuio.ch/backup="true"; -fi - -# Remove any backupcommand from nginx pods if they exit -if oc -n ${OPENSHIFT_PROJECT} get deploymentconfig nginx -o json 2> /dev/null | jq -r -e '.spec.template.metadata.annotations."appuio.ch/backupcommand"' &> /dev/null; then - oc -n ${OPENSHIFT_PROJECT} patch deploymentconfig nginx --type json -p='[{"op": "remove", "path": "/spec/template/metadata/annotations/appuio.ch~1backupcommand"}]' -fi - -# add backupcommand to clis to backup mariadb -if oc -n ${OPENSHIFT_PROJECT} get deploymentconfig cli &> /dev/null; then - oc -n ${OPENSHIFT_PROJECT} patch deploymentconfig cli -p '{"spec":{"template":{"metadata":{"annotations":{"appuio.ch/backupcommand":"/bin/sh -c \"if [[ $MARIADB_HOST ]]; then dump=$(mktemp) && mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db -h $MARIADB_HOST -u $MARIADB_USERNAME -p$MARIADB_PASSWORD $MARIADB_DATABASE > $dump && cat $dump && rm $dump; fi\"", "backup.appuio.ch/file-extension": ".mysql.sql"}}}}}' || true -fi - -echo "${OPENSHIFT_PROJECT}: done ==================================================================" diff --git a/helpers/k8up-remove-prune.sh b/helpers/k8up-remove-prune.sh deleted file mode 100755 index 8403870c45..0000000000 --- a/helpers/k8up-remove-prune.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -if [ -z "$OPENSHIFT_PROJECT" ]; then - echo "OPENSHIFT_PROJECT not set" - exit 1 -fi - -set -e -o pipefail - -echo "${OPENSHIFT_PROJECT}: starting ==================================================================" - -if oc -n "${OPENSHIFT_PROJECT}" patch schedule backup-schedule --type=json -p="[{\"op\": \"remove\", \"path\": \"/spec/prune\"}]" 2>/dev/null; then - echo "${OPENSHIFT_PROJECT}: patched backup-schedule" -else - echo "${OPENSHIFT_PROJECT}: backup-schedule already patched" -fi - -echo "${OPENSHIFT_PROJECT}: done ==================================================================" diff --git a/helpers/label-namespaces.sh b/helpers/label-namespaces.sh deleted file mode 100755 index e9f1f93c8e..0000000000 --- a/helpers/label-namespaces.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -## -# Label all namespaces with lagoon info -# -# Old environments weren't labelled the way that Lagoon expects. This script -# can be run against a cluster to add the missing labels. - -set -euo pipefail -#set -x - -# Loop through all oc projects. -while read -r project ; do - - # Check if lagoon-env configmap exists. - if oc get configmap -n "$project" lagoon-env >/dev/null 2>&1; then - - echo "################################################" - echo "Annotating project: $project..." - echo "################################################" - - LAGOON_PROJECT=$(oc get configmaps -n "$project" lagoon-env -o yaml | awk '/LAGOON_PROJECT:/ { print $2 }') - LAGOON_ENVIRONMENT_TYPE=$(oc get configmaps -n "$project" lagoon-env -o yaml | awk '/LAGOON_ENVIRONMENT_TYPE:/ { print $2 }') - LAGOON_GIT_SAFE_BRANCH=$(oc get configmaps -n "$project" lagoon-env -o yaml | awk '/LAGOON_GIT_SAFE_BRANCH:/ { print $2 }') - MARIADB_DATABASE=$(oc get configmaps -n "$project" lagoon-env -o yaml | awk '/MARIADB_DATABASE:/ { print $2 }') - MARIADB_USERNAME=$(oc get configmaps -n "$project" lagoon-env -o yaml | awk '/MARIADB_USERNAME:/ { print $2 }') - - oc label namespace "$project" "lagoon.sh/project=$LAGOON_PROJECT" --overwrite - oc label namespace "$project" "lagoon.sh/environmentType=$LAGOON_ENVIRONMENT_TYPE" --overwrite - oc label namespace "$project" "lagoon.sh/environment=$LAGOON_GIT_SAFE_BRANCH" --overwrite - oc label namespace "$project" "lagoon.sh/mariadb-schema=$MARIADB_DATABASE" --overwrite - oc label namespace "$project" "lagoon.sh/mariadb-username=$MARIADB_USERNAME" --overwrite - else - - echo "No lagoon-env configmap found for $project" - - fi - -done < <(oc get ns -l '!lagoon.sh/project' | sed '1d' | awk '{print $1}') diff --git a/helpers/lagoon-sync.sh b/helpers/lagoon-sync.sh deleted file mode 100644 index 38316b9097..0000000000 --- a/helpers/lagoon-sync.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -# to create serviceaccounts: -# oc -n $namespace create serviceaccount lagoon-sync -# oc -n $namespace adm policy add-role-to-user edit -z lagoon-sync -# oc -n $namespace serviceaccounts get-token lagoon-sync - -set -eu -o pipefail - -#SOURCE_CONSOLE="" -#SOURCE_NAMESPACE="" -#SOURCE_SERVICEACCOUNT_TOKEN="" - -#DESTINATION_CONSOLE="" -#DESTINATION_NAMESPACE="" -#DESTINATION_SERVICEACCOUNT_TOKEN="" - -if [ -z "$SOURCE_CONSOLE" ]; then - echo "SOURCE_CONSOLE not set" - exit 1 -fi - -if [ -z "$DESTINATION_CONSOLE" ]; then - echo "DESTINATION_CONSOLE not set" - exit 1 -fi - -if [ -z "$SOURCE_SERVICEACCOUNT_TOKEN" ]; then - echo "SOURCE_SERVICEACCOUNT_TOKEN not set" - exit 1 -fi - -if [ -z "$DESTINATION_SERVICEACCOUNT_TOKEN" ]; then - echo "DESTINATION_SERVICEACCOUNT_TOKEN not set" - exit 1 -fi - -if [ -z "$SOURCE_NAMESPACE" ]; then - echo "SOURCE_NAMESPACE not set" - exit 1 -fi - -if [ -z "$DESTINATION_NAMESPACE" ]; then - echo "DESTINATION_NAMESPACE not set" - exit 1 -fi - -echo "SOURCE_CONSOLE: $SOURCE_CONSOLE" -echo "SOURCE_NAMESPACE: $SOURCE_NAMESPACE" -echo "DESTINATION_CONSOLE: $DESTINATION_CONSOLE" -echo "DESTINATION_NAMESPACE: $DESTINATION_NAMESPACE" - -set -v - -mkdir -p /tmp/lagoon-sync/backup - -oc login $SOURCE_CONSOLE --token=$SOURCE_SERVICEACCOUNT_TOKEN -source_context=$(oc config current-context) - -oc login $DESTINATION_CONSOLE --token=$DESTINATION_SERVICEACCOUNT_TOKEN -destination_context=$(oc config current-context) - -source_api_db_pod=$(oc --context=$source_context -n $SOURCE_NAMESPACE get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=api-db) -oc --context=$source_context -n $SOURCE_NAMESPACE exec $source_api_db_pod -- /lagoon/mysql-backup.sh 127.0.0.1 || true -source_api_db_backup=$(oc --context=$source_context -n $SOURCE_NAMESPACE exec $source_api_db_pod -- sh -c "find . -name \"*.sql.gz\" -print0 | xargs -r -0 ls -1 -t | head -1") -oc --context=$source_context -n $SOURCE_NAMESPACE exec $source_api_db_pod -- cat $source_api_db_backup > /tmp/lagoon-sync/$source_api_db_backup - - -destination_api_db_pod=$(oc --context=$destination_context -n $DESTINATION_NAMESPACE get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=api-db) -oc --context=$destination_context -n $DESTINATION_NAMESPACE exec -i $destination_api_db_pod -- sh -c "mkdir -p backup" -oc --context=$destination_context -n $DESTINATION_NAMESPACE exec -i $destination_api_db_pod -- sh -c "cat > $source_api_db_backup" < /tmp/lagoon-sync/$source_api_db_backup -oc --context=$destination_context -n $DESTINATION_NAMESPACE exec -i $destination_api_db_pod -- sh -c "zcat $source_api_db_backup | mysql infrastructure" - - -source_keycloak_db_pod=$(oc --context=$source_context -n $SOURCE_NAMESPACE get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=keycloak-db) -oc --context=$source_context -n $SOURCE_NAMESPACE exec $source_keycloak_db_pod -- /lagoon/mysql-backup.sh 127.0.0.1 -source_keycloak_db_backup=$(oc --context=$source_context -n $SOURCE_NAMESPACE exec $source_keycloak_db_pod -- sh -c "find . -name \"*.sql.gz\" -print0 | xargs -r -0 ls -1 -t | head -1") -oc --context=$source_context -n $SOURCE_NAMESPACE exec $source_keycloak_db_pod -- cat $source_keycloak_db_backup > /tmp/lagoon-sync/$source_keycloak_db_backup - -destination_keycloak_db_pod=$(oc --context=$destination_context -n $DESTINATION_NAMESPACE get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=keycloak-db) -oc --context=$destination_context -n $DESTINATION_NAMESPACE exec -i $destination_keycloak_db_pod -- sh -c "mkdir -p backup" -oc --context=$destination_context -n $DESTINATION_NAMESPACE exec -i $destination_keycloak_db_pod -- sh -c "cat > $source_keycloak_db_backup" < /tmp/lagoon-sync/$source_keycloak_db_backup -oc --context=$destination_context -n $DESTINATION_NAMESPACE exec -i $destination_keycloak_db_pod -- sh -c "zcat $source_keycloak_db_backup | mysql keycloak" - - -oc --context=$destination_context -n $DESTINATION_NAMESPACE rollout latest dc/keycloak -oc --context=$destination_context -n $DESTINATION_NAMESPACE rollout latest dc/api - -oc --context=$destination_context -n $DESTINATION_NAMESPACE exec -i $destination_api_db_pod -- /rerun_initdb.sh - - diff --git a/helpers/mariadb-galera2shared.sh b/helpers/mariadb-galera2shared.sh deleted file mode 100755 index fffab3c708..0000000000 --- a/helpers/mariadb-galera2shared.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash - - - -if [ ! "$1" ]; then - echo "please define openshift project as first argument" - exit 1; -fi - -set -uo pipefail - -which shyaml > /dev/null -if [ $? -gt 0 ]; then - echo "please install shyaml (pip3 install shyaml)" - exit 1 -fi - -which jq > /dev/null -if [ $? -gt 0 ]; then - echo "please install jq" - exit 1 -fi - -which svcat > /dev/null -if [ $? -gt 0 ]; then - echo "please install svcat" - exit 1 -fi - -set -e - -PROJECT_NAME=$1 - -echo "*** Starting mariadb-galera --> mariadb-shared migration in ${PROJECT_NAME}" - -SERVICE_NAME=mariadb -SERVICE_NAME_UPPERCASE=$(echo $SERVICE_NAME | tr [:lower:] [:upper:]) -SERVICE_TYPE=mariadb-shared - -ENVIRONMENT_TYPE=$(oc -n $1 get configmap lagoon-env -o json | jq -r '.data.LAGOON_ENVIRONMENT_TYPE') - -OLD_POD="mariadb-galera-0" - -if [[ "$OLD_POD" ]]; then - echo "found $SERVICE_NAME pod $OLD_POD" -else - echo "no running pod found for service '${SERVICE_NAME}'', is it running?" - exit 1 -fi - -echo "*** Pausing nginx and cli" -NGINX_REPLICAS=$(oc -n $1 get dc/nginx -o json | jq -r '.spec.replicas') -CLI_REPLICAS=$(oc -n $1 get dc/cli -o json | jq -r '.spec.replicas') -oc -n $1 scale dc/nginx --replicas=0 -oc -n $1 scale dc/cli --replicas=0 - - -# create service broker -## taken from build-deploy-docker-compose.sh - -OPENSHIFT_TEMPLATE="$(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/openshift-templates/${SERVICE_TYPE}/servicebroker.yml" -SERVICEBROKER_CLASS="lagoon-dbaas-mariadb-apb" -SERVICEBROKER_PLAN="${ENVIRONMENT_TYPE}" -OPENSHIFT_PROJECT=$1 -. $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/exec-openshift-create-servicebroker.sh - -# ServiceBrokers take a bit, wait until the credentials secret is available -until oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -do - echo "Secret ${SERVICE_NAME}-servicebroker-credentials not available yet, waiting for 10 secs" - sleep 10 -done - -# Load credentials out of secret -SECRETS=/tmp/${PROJECT_NAME}-${OLD_POD}-migration.yaml -oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -o yaml > $SECRETS - -DB_HOST=$(cat $SECRETS | shyaml get-value data.DB_HOST | base64 -D) -DB_USER=$(cat $SECRETS | shyaml get-value data.DB_USER | base64 -D) -DB_PASSWORD=$(cat $SECRETS | shyaml get-value data.DB_PASSWORD | base64 -D) -DB_NAME=$(cat $SECRETS | shyaml get-value data.DB_NAME | base64 -D) -DB_PORT=$(cat $SECRETS | shyaml get-value data.DB_PORT | base64 -D) - -echo "*** Transfering 'drupal' database from $OLD_POD to $DB_HOST" -# transfer database between from old to new -oc -n $1 exec $OLD_POD -- bash -eo pipefail -c "{ mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db drupal || mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db -S /tmp/mysql.sock -u \$MYSQL_USER -p\$MYSQL_PASSWORD \$MYSQL_DATABASE; } | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h $DB_HOST -u $DB_USER -p${DB_PASSWORD} -P $DB_PORT $DB_NAME" - -CONFIG_BAK="/tmp/${PROJECT_NAME}-$(date +%F-%T)-lagoon-env.yaml" -echo "*** Backing up configmap in case we need to revert: ${CONFIG_BAK}" -oc -n $1 get configmap lagoon-env -o yaml > $CONFIG_BAK - -echo "*** updating configmap to point to ${DB_HOST}." -# Add credentials to our configmap, prefixed with the name of the servicename of this servicebroker -oc -n $1 patch --insecure-skip-tls-verify configmap lagoon-env \ - -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\"}}" - - -echo "*** Deleting mariadb service. Scaling old mariadb to 0; you can clean up the DC and pv later" -oc -n $1 delete service mariadb -oc -n $1 scale dc/mariadb-maxscale --replicas=0 -oc -n $1 scale statefulset/mariadb-galera --replicas=0 - - -# transfer complete, clean up -rm -f $SECRETS - -oc -n $1 scale dc/nginx --replicas=$NGINX_REPLICAS -oc -n $1 scale dc/cli --replicas=$CLI_REPLICAS - -oc -n $1 rollout latest dc/nginx -oc -n $1 rollout latest dc/cli -oc -n $1 rollout status dc/nginx -oc -n $1 rollout status dc/cli -echo "*** done." diff --git a/helpers/mariadb-single2shared-no-nginx.sh b/helpers/mariadb-single2shared-no-nginx.sh deleted file mode 100755 index 8b59b98a62..0000000000 --- a/helpers/mariadb-single2shared-no-nginx.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash - - - -if [ ! "$1" ]; then - echo "please define openshift project as first argument" - exit 1; -fi - -set -uo pipefail - -which shyaml > /dev/null -if [ $? -gt 0 ]; then - echo "please install shyaml (pip3 install shyaml)" - exit 1 -fi - -which jq > /dev/null -if [ $? -gt 0 ]; then - echo "please install jq" - exit 1 -fi - -which svcat > /dev/null -if [ $? -gt 0 ]; then - echo "please install svcat" - exit 1 -fi - -set -e - -PROJECT_NAME=$1 - -echo "*** Starting mariadb-single --> mariadb-shared migration in ${PROJECT_NAME}" - -SERVICE_NAME=mariadb -SERVICE_NAME_UPPERCASE=$(echo $SERVICE_NAME | tr [:lower:] [:upper:]) -SERVICE_TYPE=mariadb-shared - -ENVIRONMENT_TYPE=$(oc -n $1 get configmap lagoon-env -o json | jq -r '.data.LAGOON_ENVIRONMENT_TYPE') - -MARIADB_REPLICAS=$(oc -n $1 get dc/mariadb -o json | jq -r '.spec.replicas') - -if [ "$MARIADB_REPLICAS" == "0" ]; then - oc -n $1 scale dc/mariadb --replicas=1 - oc -n $1 rollout status dc/mariadb -fi - -# export old mariadb pod name -OLD_POD=$(oc -n $1 get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=$SERVICE_NAME) - -if [[ "$OLD_POD" ]]; then - echo "found $SERVICE_NAME pod $OLD_POD" -else - echo "no running pod found for service '${SERVICE_NAME}'', is it running?" - exit 1 -fi - -# create service broker -## taken from build-deploy-docker-compose.sh - -OPENSHIFT_TEMPLATE="$(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/openshift-templates/${SERVICE_TYPE}/servicebroker.yml" -SERVICEBROKER_CLASS="lagoon-dbaas-mariadb-apb" -SERVICEBROKER_PLAN="${ENVIRONMENT_TYPE}" -OPENSHIFT_PROJECT=$1 -. $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/exec-openshift-create-servicebroker.sh - -# ServiceBrokers take a bit, wait until the credentials secret is available -until oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -do - echo "Secret ${SERVICE_NAME}-servicebroker-credentials not available yet, waiting for 10 secs" - sleep 10 -done - -# Load credentials out of secret -SECRETS=/tmp/${PROJECT_NAME}-${OLD_POD}-migration.yaml -oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -o yaml > $SECRETS - -DB_HOST=$(cat $SECRETS | shyaml get-value data.DB_HOST | base64 -D) -DB_USER=$(cat $SECRETS | shyaml get-value data.DB_USER | base64 -D) -DB_PASSWORD=$(cat $SECRETS | shyaml get-value data.DB_PASSWORD | base64 -D) -DB_NAME=$(cat $SECRETS | shyaml get-value data.DB_NAME | base64 -D) -DB_PORT=$(cat $SECRETS | shyaml get-value data.DB_PORT | base64 -D) - -echo "*** Transfering 'drupal' database from $OLD_POD to $DB_HOST" -# transfer database between from old to new -oc -n $1 exec $OLD_POD -- bash -eo pipefail -c "{ mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db \$MARIADB_DATABASE || mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db -S /tmp/mysql.sock -u \$MYSQL_USER -p\$MYSQL_PASSWORD \$MYSQL_DATABASE; } | mysql -h $DB_HOST -u $DB_USER -p${DB_PASSWORD} -P $DB_PORT $DB_NAME" - -CONFIG_BAK="/tmp/${PROJECT_NAME}-$(date +%F-%T)-lagoon-env.yaml" -echo "*** Backing up configmap in case we need to revert: ${CONFIG_BAK}" -oc -n $1 get configmap lagoon-env -o yaml > $CONFIG_BAK - -echo "*** updating configmap to point to ${DB_HOST}." -# Add credentials to our configmap, prefixed with the name of the servicename of this servicebroker -oc -n $1 patch --insecure-skip-tls-verify configmap lagoon-env \ - -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\"}}" - - -echo "*** Deleting mariadb service. Scaling old mariadb to 0; you can clean up the DC and pv later" -oc -n $1 delete service mariadb -oc -n $1 scale dc/mariadb --replicas=0 - -# transfer complete, clean up -rm -f $SECRETS - -echo "*** done." diff --git a/helpers/mariadb-single2shared-wordpress.sh b/helpers/mariadb-single2shared-wordpress.sh deleted file mode 100755 index 13461cfbf5..0000000000 --- a/helpers/mariadb-single2shared-wordpress.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - - - -if [ ! "$1" ]; then - echo "please define openshift project as first argument" - exit 1; -fi - -set -uo pipefail - -which shyaml > /dev/null -if [ $? -gt 0 ]; then - echo "please install shyaml (pip3 install shyaml)" - exit 1 -fi - -which jq > /dev/null -if [ $? -gt 0 ]; then - echo "please install jq" - exit 1 -fi - -which svcat > /dev/null -if [ $? -gt 0 ]; then - echo "please install svcat" - exit 1 -fi - -set -e - -PROJECT_NAME=$1 - -echo "*** Starting mariadb-single --> mariadb-shared migration in ${PROJECT_NAME}" - -SERVICE_NAME=mariadb -SERVICE_NAME_UPPERCASE=$(echo $SERVICE_NAME | tr [:lower:] [:upper:]) -SERVICE_TYPE=mariadb-shared - -ENVIRONMENT_TYPE=$(oc -n $1 get configmap lagoon-env -o json | jq -r '.data.LAGOON_ENVIRONMENT_TYPE') - -MARIADB_REPLICAS=$(oc -n $1 get dc/mariadb -o json | jq -r '.spec.replicas') - -if [ "$MARIADB_REPLICAS" == "0" ]; then - oc -n $1 scale dc/mariadb --replicas=1 - oc -n $1 rollout status dc/mariadb -fi - -# export old mariadb pod name -OLD_POD=$(oc -n $1 get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=$SERVICE_NAME) - -if [[ "$OLD_POD" ]]; then - echo "found $SERVICE_NAME pod $OLD_POD" -else - echo "no running pod found for service '${SERVICE_NAME}'', is it running?" - exit 1 -fi - -echo "*** Pausing nginx and cli" -NGINX_REPLICAS=$(oc -n $1 get dc/nginx -o json | jq -r '.spec.replicas') -CLI_REPLICAS=$(oc -n $1 get dc/cli -o json | jq -r '.spec.replicas') -oc -n $1 scale dc/nginx --replicas=0 -oc -n $1 scale dc/cli --replicas=0 - - -# create service broker -## taken from build-deploy-docker-compose.sh - -OPENSHIFT_TEMPLATE="$(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/openshift-templates/${SERVICE_TYPE}/servicebroker.yml" -SERVICEBROKER_CLASS="lagoon-dbaas-mariadb-apb" -SERVICEBROKER_PLAN="${ENVIRONMENT_TYPE}" -OPENSHIFT_PROJECT=$1 -. $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/exec-openshift-create-servicebroker.sh - -# ServiceBrokers take a bit, wait until the credentials secret is available -until oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -do - echo "Secret ${SERVICE_NAME}-servicebroker-credentials not available yet, waiting for 10 secs" - sleep 10 -done - -# Load credentials out of secret -SECRETS=/tmp/${PROJECT_NAME}-${OLD_POD}-migration.yaml -oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -o yaml > $SECRETS - -DB_HOST=$(cat $SECRETS | shyaml get-value data.DB_HOST | base64 -D) -DB_USER=$(cat $SECRETS | shyaml get-value data.DB_USER | base64 -D) -DB_PASSWORD=$(cat $SECRETS | shyaml get-value data.DB_PASSWORD | base64 -D) -DB_NAME=$(cat $SECRETS | shyaml get-value data.DB_NAME | base64 -D) -DB_PORT=$(cat $SECRETS | shyaml get-value data.DB_PORT | base64 -D) - -echo "*** Transfering 'drupal' database from $OLD_POD to $DB_HOST" -# transfer database between from old to new -oc -n $1 exec $OLD_POD -- bash -eo pipefail -c "{ mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db lagoon || mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db -S /tmp/mysql.sock -u \$MYSQL_USER -p\$MYSQL_PASSWORD \$MYSQL_DATABASE; } | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h $DB_HOST -u $DB_USER -p${DB_PASSWORD} -P $DB_PORT $DB_NAME" - -CONFIG_BAK="/tmp/${PROJECT_NAME}-$(date +%F-%T)-lagoon-env.yaml" -echo "*** Backing up configmap in case we need to revert: ${CONFIG_BAK}" -oc -n $1 get configmap lagoon-env -o yaml > $CONFIG_BAK - -echo "*** updating configmap to point to ${DB_HOST}." -# Add credentials to our configmap, prefixed with the name of the servicename of this servicebroker -oc -n $1 patch --insecure-skip-tls-verify configmap lagoon-env \ - -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\"}}" - - -echo "*** Deleting mariadb service. Scaling old mariadb to 0; you can clean up the DC and pv later" -oc -n $1 delete service mariadb -oc -n $1 scale dc/mariadb --replicas=0 - -# transfer complete, clean up -rm -f $SECRETS - -oc -n $1 scale dc/nginx --replicas=$NGINX_REPLICAS -oc -n $1 scale dc/cli --replicas=$CLI_REPLICAS - -oc -n $1 rollout latest dc/nginx -oc -n $1 rollout latest dc/cli -oc -n $1 rollout status dc/nginx -oc -n $1 rollout status dc/cli -echo "*** done." diff --git a/helpers/mariadb-single2shared.sh b/helpers/mariadb-single2shared.sh deleted file mode 100755 index 9a281271bd..0000000000 --- a/helpers/mariadb-single2shared.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - - - -if [ ! "$1" ]; then - echo "please define openshift project as first argument" - exit 1; -fi - -set -uo pipefail - -which shyaml > /dev/null -if [ $? -gt 0 ]; then - echo "please install shyaml (pip3 install shyaml)" - exit 1 -fi - -which jq > /dev/null -if [ $? -gt 0 ]; then - echo "please install jq" - exit 1 -fi - -which svcat > /dev/null -if [ $? -gt 0 ]; then - echo "please install svcat" - exit 1 -fi - -set -e - -PROJECT_NAME=$1 - -echo "*** Starting mariadb-single --> mariadb-shared migration in ${PROJECT_NAME}" - -SERVICE_NAME=mariadb -SERVICE_NAME_UPPERCASE=$(echo $SERVICE_NAME | tr [:lower:] [:upper:]) -SERVICE_TYPE=mariadb-shared - -ENVIRONMENT_TYPE=$(oc -n $1 get configmap lagoon-env -o json | jq -r '.data.LAGOON_ENVIRONMENT_TYPE') - -MARIADB_REPLICAS=$(oc -n $1 get dc/mariadb -o json | jq -r '.spec.replicas') - -if [ "$MARIADB_REPLICAS" == "0" ]; then - oc -n $1 scale dc/mariadb --replicas=1 - oc -n $1 rollout status dc/mariadb -fi - -# export old mariadb pod name -OLD_POD=$(oc -n $1 get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=$SERVICE_NAME) - -if [[ "$OLD_POD" ]]; then - echo "found $SERVICE_NAME pod $OLD_POD" -else - echo "no running pod found for service '${SERVICE_NAME}'', is it running?" - exit 1 -fi - -echo "*** Pausing nginx and cli" -NGINX_REPLICAS=$(oc -n $1 get dc/nginx -o json | jq -r '.spec.replicas') -CLI_REPLICAS=$(oc -n $1 get dc/cli -o json | jq -r '.spec.replicas') -oc -n $1 scale dc/nginx --replicas=0 -oc -n $1 scale dc/cli --replicas=0 - - -# create service broker -## taken from build-deploy-docker-compose.sh - -OPENSHIFT_TEMPLATE="$(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/openshift-templates/${SERVICE_TYPE}/servicebroker.yml" -SERVICEBROKER_CLASS="lagoon-dbaas-mariadb-apb" -SERVICEBROKER_PLAN="${ENVIRONMENT_TYPE}" -OPENSHIFT_PROJECT=$1 -. $(git rev-parse --show-toplevel)/images/oc-build-deploy-dind/scripts/exec-openshift-create-servicebroker.sh - -# ServiceBrokers take a bit, wait until the credentials secret is available -until oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -do - echo "Secret ${SERVICE_NAME}-servicebroker-credentials not available yet, waiting for 10 secs" - sleep 10 -done - -# Load credentials out of secret -SECRETS=/tmp/${PROJECT_NAME}-${OLD_POD}-migration.yaml -oc -n $1 get --insecure-skip-tls-verify secret ${SERVICE_NAME}-servicebroker-credentials -o yaml > $SECRETS - -DB_HOST=$(cat $SECRETS | shyaml get-value data.DB_HOST | base64 -D) -DB_USER=$(cat $SECRETS | shyaml get-value data.DB_USER | base64 -D) -DB_PASSWORD=$(cat $SECRETS | shyaml get-value data.DB_PASSWORD | base64 -D) -DB_NAME=$(cat $SECRETS | shyaml get-value data.DB_NAME | base64 -D) -DB_PORT=$(cat $SECRETS | shyaml get-value data.DB_PORT | base64 -D) - -echo "*** Transfering 'drupal' database from $OLD_POD to $DB_HOST" -# transfer database between from old to new -oc -n $1 exec $OLD_POD -- bash -eo pipefail -c "{ mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db drupal || mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --no-create-db -S /tmp/mysql.sock -u \$MYSQL_USER -p\$MYSQL_PASSWORD \$MYSQL_DATABASE; } | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h $DB_HOST -u $DB_USER -p${DB_PASSWORD} -P $DB_PORT $DB_NAME" - -CONFIG_BAK="/tmp/${PROJECT_NAME}-$(date +%F-%T)-lagoon-env.yaml" -echo "*** Backing up configmap in case we need to revert: ${CONFIG_BAK}" -oc -n $1 get configmap lagoon-env -o yaml > $CONFIG_BAK - -echo "*** updating configmap to point to ${DB_HOST}." -# Add credentials to our configmap, prefixed with the name of the servicename of this servicebroker -oc -n $1 patch --insecure-skip-tls-verify configmap lagoon-env \ - -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\"}}" - - -echo "*** Deleting mariadb service. Scaling old mariadb to 0; you can clean up the DC and pv later" -oc -n $1 delete service mariadb -oc -n $1 scale dc/mariadb --replicas=0 - -# transfer complete, clean up -rm -f $SECRETS - -oc -n $1 scale dc/nginx --replicas=$NGINX_REPLICAS -oc -n $1 scale dc/cli --replicas=$CLI_REPLICAS - -oc -n $1 rollout latest dc/nginx -oc -n $1 rollout latest dc/cli -oc -n $1 rollout status dc/nginx -oc -n $1 rollout status dc/cli -echo "*** done." diff --git a/helpers/migrate-resize-pv-nginx.sh b/helpers/migrate-resize-pv-nginx.sh deleted file mode 100755 index d3976d1d25..0000000000 --- a/helpers/migrate-resize-pv-nginx.sh +++ /dev/null @@ -1,222 +0,0 @@ -#!/bin/bash - -set -e -o pipefail - -# use oc -OC=oc - -usage() { - echo "Usage: ./migrate-resize-pv-nginx.sh -p solr -s 20Gi -d nginx,cli -n solr-namespace -c gp2 -m gluster" - echo "WARNING: Specify the storageclass(-m) for the migrator pvc to be created in, must be multi-az mountable" - echo " otherwise loss of data can occur" - echo "Options:" - echo " -m #required, should be a storageclass that is multi-az mountable, eg gluster,efs,etc.." - echo " -p #required" - echo " -s #optional, set to the size you want to resize it to, defaults to original requested claim" - echo " -d #required, separate with commas to define multiple deploymentconfigs" - echo " -n #required" - echo " -c #optional, change the storage class of the new migrated/resized pv" - exit 1 -} - -if [[ ! $@ =~ ^\-.+ ]] -then - usage -fi - -while getopts ":p:d:s:n:c:m:h:" opt; do - case ${opt} in - p ) # process option p - PVC=$OPTARG;; - d ) # process option d - DC=$OPTARG;; - s ) # process option s - PVSIZE=$OPTARG;; - n ) # process option n - NS=$OPTARG;; - c ) # process option c - SC=$OPTARG;; - m ) # process option m - MIGRATOR_SC=$OPTARG;; - h ) - usage;; - *) - usage;; - esac -done - -# need these, make sure we have them -if [[ -z "$PVC" || -z "$DC" || -z "$NS" || -z "$MIGRATOR_SC" ]]; then - usage -fi - -# convert given DC into an array -IFS=',' read -r -a DC_ARRAY <<< "$DC" - -# check if the storage class exists if a request to change is made -if [ ! -z "$SC" ]; then - SC_EXIST=$(${OC} -n ${NS} get sc ${SC} -o name --no-headers) - if [ "$SC_EXIST" = "" ]; then - exit 1 - fi -fi -# check if the migrator storage class exists too -if [ ! -z "$MIGRATOR_SC" ]; then - MIGRATOR_SC_EXIST=$(${OC} -n ${NS} get sc ${MIGRATOR_SC} -o name --no-headers) - if [ "$MIGRATOR_SC_EXIST" = "" ]; then - exit 1 - fi -fi -if [ "$(${OC} -n ${NS} get sc ${MIGRATOR_SC} -o json | jq -r .provisioner)" == "kubernetes.io/aws-ebs" ]; then - echo "You are using ${MIGRATOR_SC} which uses aws-ebs. This may result in loss of data if the pvc is created in a different az to the migrator pod." - read -p "Are you sure? " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]] - then - echo "Proceeding" - else - exit 1 - fi -fi - -PVC_EXIST=$(${OC} -n ${NS} get pvc ${PVC} -o name --no-headers) -if [ "$PVC_EXIST" = "" ]; then - exit 1 -else - # get the existing size of the PV - OLDSIZE=$(${OC} -n ${NS} get -o json pvc/${PVC} --export=true | jq -r '.spec.resources.requests.storage') - if [ -z "$PVSIZE" ]; then - echo "using existing PV size when migrating - $OLDSIZE" - #if a new size is not defined, use the original size when creating the new pv - PVSIZE=$OLDSIZE - else - if [ "$PVSIZE" != "$OLDSIZE" ]; then - echo "migrated PV will be created with the new size $PVSIZE" - fi - fi - - # cleanup objects in case they already exist. - ${OC} -n ${NS} adm policy remove-scc-from-user privileged -z pvc-migrator || true - ${OC} -n ${NS} delete serviceaccount pvc-migrator || true - ${OC} -n ${NS} delete deploymentconfig/pv-migrator || true - #${OC} -n ${NS} delete pvc/${PVC}-migrator --wait || true - -# create the migrator pvc early and fail if it can't be created -cat << EOF | ${OC} -n ${NS} apply -f - - apiVersion: v1 - items: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: ${PVC}-migrator - spec: - storageClassName: ${MIGRATOR_SC} - accessModes: - - ReadWriteOnce - resources: - requests: - storage: $OLDSIZE - kind: List - metadata: {} -EOF - MIGRATOR_PVC_EXIST=$(${OC} -n ${NS} get pvc ${PVC}-migrator -o name --no-headers) - if [ "$PVC_EXIST" = "" ]; then - exit 1 - fi - - - - # create a svc account - ${OC} -n ${NS} create serviceaccount pvc-migrator - ${OC} -n ${NS} adm policy add-scc-to-user privileged -z pvc-migrator - - # run alpine base - ${OC} -n ${NS} run --image alpine pv-migrator -- sh -c "apk add --no-cache rsync; trap : TERM INT; (while true; do sleep 3600; done) & wait" - # pause the rollout to allow making multiple changes on the deploymentconfig - ${OC} -n ${NS} rollout pause deploymentconfig/pv-migrator - # change serviceaccount name so i can run as privileged - ${OC} -n ${NS} patch deploymentconfig/pv-migrator -p '{"spec":{"template":{"spec":{"serviceAccountName": "pvc-migrator"}}}}' - # now run as root - ${OC} -n ${NS} patch deploymentconfig/pv-migrator -p '{"spec":{"template":{"spec":{"securityContext":{ "privileged": "true", "runAsUser": 0 }}}}}' - echo "adding ${PVC} to pv-migrator." - ${OC} -n ${NS} set volume deploymentconfig/pv-migrator --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --mount-path=/storage - # add migration pvc to migrator - ${OC} -n ${NS} set volume deploymentconfig/pv-migrator --add --name=${PVC}-migrator --type=persistentVolumeClaim --claim-name=${PVC}-migrator --mount-path=/migrator - ${OC} -n ${NS} rollout resume deploymentconfig/pv-migrator - ${OC} -n ${NS} rollout status deploymentconfig/pv-migrator --watch - - # check if the migrator pod is actually running - MIGRATOR=$(${OC} -n ${NS} get pods -l run=pv-migrator -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') - if [[ ! $MIGRATOR ]]; then - echo "No running pod found for migrator" - exit 1 - fi - - echo "copy ${PVC} to ${PVC}-migrator" - ${OC} -n ${NS} exec $MIGRATOR -- rsync -av -W --inplace --delete --exclude='/css/' --exclude='/js/' --exclude='/advagg_css/' --exclude='/advagg_js/' --exclude='/styles/' --exclude='/php/' --info=progress2 /storage/. /migrator - - # update actual production pods with migrator PVC (this allows them to keep running while we migrate a second time) - for DC in "${DC_ARRAY[@]}" - do - ${OC} -n ${NS} set volume deploymentconfig/${DC} --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC}-migrator --overwrite - done - for DC in "${DC_ARRAY[@]}" - do - ${OC} -n ${NS} rollout status deploymentconfig/${DC} --watch - done - - TMP=$(mktemp temp.${PVC}.json.XXXX) - - echo "dumping pvc ${PVC} to ${TMP}." - ## we can change the storage class instead of using the default - if [ ! -z "$SC" ]; then - ${OC} -n ${NS} get -o json pvc/${PVC} --export=true | jq 'del(.metadata.annotations, .metadata.selfLink, .spec.volumeName, .spec.storageClassName, .status)' | jq --arg PVSIZE "${PVSIZE}" '.spec.resources.requests.storage=$PVSIZE' | jq --arg SC "${SC}" '.spec.storageClassName=$SC' > $TMP - else - ${OC} -n ${NS} get -o json pvc/${PVC} --export=true | jq 'del(.metadata.annotations, .metadata.selfLink, .spec.volumeName, .spec.storageClassName, .status)' | jq --arg PVSIZE "${PVSIZE}" '.spec.resources.requests.storage=$PVSIZE' > $TMP - fi - - # scale down migrator to change the volumes on it - ${OC} -n ${NS} scale --replicas=0 deploymentconfig/pv-migrator - # remove the original PVC from the migrator - - # remove the original PVC now that we have migrated everything to the PVC-migrator, we call `--wait` to make sure the PVC really has been deleted - ${OC} -n ${NS} delete pvc/${PVC} --wait - - # recreate the PVC based on what we dumped before - ${OC} -n ${NS} create -f $TMP && rm $TMP - - # check if deploymenconfig has at least 1 ready pod, if not, scale and check again in 3 secounds. - while [[ $(${OC} -n ${NS} get deploymentconfig/pv-migrator -o go-template --template='{{.status.readyReplicas}}') = "" ]] || [[ $(${OC} -n ${NS} get deploymentconfig/pv-migrator -o go-template --template='{{.status.readyReplicas}}') = "0" ]] - do - # Sending the scaling command while it already scaling is no problem for the Kubernetes API - ${OC} -n ${NS} scale --replicas=1 deploymentconfig/pv-migrator - sleep 3 - done - - MIGRATOR=$(${OC} -n ${NS} get pods -l run=pv-migrator -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') - if [[ ! $MIGRATOR ]]; then - echo "No running pod found for migrator" - exit 1 - fi - - # copy data from the pvc-migrator to the newly created pvc - ${OC} -n ${NS} exec $MIGRATOR -- rsync -av -W --inplace --delete --exclude='/css/' --exclude='/js/' --exclude='/advagg_css/' --exclude='/advagg_js/' --info=progress2 --exclude='/styles/' --exclude='/php/' /migrator/. /storage - - # updating the production pods with the copied storage again - for DC in "${DC_ARRAY[@]}" - do - ${OC} -n ${NS} set volume deploymentconfig/${DC} --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --overwrite - done - for DC in "${DC_ARRAY[@]}" - do - ${OC} -n ${NS} rollout status deploymentconfig/${DC} --watch - done - - # delete the migrator DC and PVC - ${OC} -n ${NS} delete deploymentconfig/pv-migrator - ${OC} -n ${NS} delete pvc/${PVC}-migrator - - # cleanup serviceaccounts - ${OC} -n ${NS} adm policy remove-scc-from-user privileged -z pvc-migrator - ${OC} -n ${NS} delete serviceaccount pvc-migrator -fi diff --git a/helpers/migrate-resize-pv.sh b/helpers/migrate-resize-pv.sh deleted file mode 100755 index 40ff2fc429..0000000000 --- a/helpers/migrate-resize-pv.sh +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/bash - -# use oc -OC=oc - -usage() { - echo "Usage: ./migrate-resize-pv.sh -p solr -s 20Gi -d solr -n solr-namespace -c gp2 -m gluster" - echo "WARNING: Specify the storageclass(-m) for the migrator pvc to be created in, must be multi-az mountable" - echo " otherwise loss of data can occur" - echo "Options:" - echo " -m #required, should be a storageclass that is multi-az mountable, eg gluster,efs,etc.." - echo " -p #required" - echo " -s #optional, set to the size you want to resize it to, defaults to original requested claim" - echo " -d #required" - echo " -n #required" - echo " -c #optional, change the storage class of the new migrated/resized pv" - exit 1 -} - -if [[ ! $@ =~ ^\-.+ ]] -then - usage -fi - -while getopts ":p:d:s:n:c:m:h:" opt; do - case ${opt} in - p ) # process option p - PVC=$OPTARG;; - d ) # process option d - DC=$OPTARG;; - s ) # process option s - PVSIZE=$OPTARG;; - n ) # process option n - NS=$OPTARG;; - c ) # process option c - SC=$OPTARG;; - m ) # process option m - MIGRATOR_SC=$OPTARG;; - h ) - usage;; - *) - usage;; - esac -done - -# echo "Select which storage class is multi-az mountable, or exit:" -# COLUMNS=1 -# resourcelist=$(${OC} get sc --no-headers | awk '{print $1}') -# select opt in $(echo ${resourcelist} | tr -s " " "\n") "Q) exit" -# do -# if [[ "$opt" == "Q) exit-mach" || $REPLY == [Qq] ]]; then -# echo "Exiting" -# exit 1 -# fi -# MIGRATOR_SC=$opt -# break -# done - -# need these, make sure we have them -if [[ -z "$PVC" || -z "$DC" || -z "$NS" || -z "$MIGRATOR_SC" ]]; then - usage -fi - -# check if the storage class exists if a request to change is made -if [ ! -z "$SC" ]; then - SC_EXIST=$(${OC} -n ${NS} get sc ${SC} -o name --no-headers) - if [ "$SC_EXIST" = "" ]; then - exit 1 - fi -fi -# check if the migrator storage class exists too -if [ ! -z "$MIGRATOR_SC" ]; then - MIGRATOR_SC_EXIST=$(${OC} -n ${NS} get sc ${MIGRATOR_SC} -o name --no-headers) - if [ "$MIGRATOR_SC_EXIST" = "" ]; then - exit 1 - fi -fi -if [ "$(${OC} -n ${NS} get sc ${MIGRATOR_SC} -o json | jq -r .provisioner)" == "kubernetes.io/aws-ebs" ]; then - echo "You are using ${MIGRATOR_SC} which uses aws-ebs. This may result in loss of data if the pvc is created in a different az to the migrator pod." - read -p "Are you sure? " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]] - then - echo "Proceeding" - else - exit 1 - fi -fi - -PVC_EXIST=$(${OC} -n ${NS} get pvc ${PVC} -o name --no-headers) -if [ "$PVC_EXIST" = "" ]; then - exit 1 -else - # get the existing size of the PV - OLDSIZE=$(${OC} -n ${NS} get -o json pvc/${PVC} --export=true | jq -r '.spec.resources.requests.storage') - if [ -z "$PVSIZE" ]; then - echo "using existing PV size when migrating - $OLDSIZE" - #if a new size is not defined, use the original size when creating the new pv - PVSIZE=$OLDSIZE - else - if [ "$PVSIZE" != "$OLDSIZE" ]; then - echo "migrated PV will be created with the new size $PVSIZE" - fi - fi - -# create the migrator pvc early and fail if it can't be created -cat << EOF | ${OC} -n ${NS} apply -f - - apiVersion: v1 - items: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: migrator - spec: - storageClassName: ${MIGRATOR_SC} - accessModes: - - ReadWriteOnce - resources: - requests: - storage: $OLDSIZE - kind: List - metadata: {} -EOF - MIGRATOR_PVC_EXIST=$(${OC} -n ${NS} get pvc migrator -o name --no-headers) - if [ "$PVC_EXIST" = "" ]; then - exit 1 - fi - - # create a svc account - ${OC} -n ${NS} create serviceaccount pvcreclaim - ${OC} -n ${NS} adm policy add-scc-to-user privileged -z pvcreclaim - # scale the DC to 0 - ${OC} -n ${NS} scale --replicas=0 dc/${DC} - # run alpine base - ${OC} -n ${NS} run --image alpine pv-migrator -- sh -c "while sleep 3600; do :; done" - # change serviceaccount name so i can run as privileged - ${OC} -n ${NS} patch deploymentconfig/pv-migrator -p '{"spec":{"template":{"spec":{"serviceAccountName": "pvcreclaim"}}}}' - # now run as root - ${OC} -n ${NS} patch deploymentconfig/pv-migrator -p '{"spec":{"template":{"spec":{"securityContext":{ "privileged": "true", "runAsUser": 0 }}}}}' - # pause the rollout - ${OC} -n ${NS} rollout pause deploymentconfig/pv-migrator - echo "adding ${PVC} to pv-migrator." - ${OC} -n ${NS} volume deploymentconfig/pv-migrator --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --mount-path=/storage/${PVC} - - - - ${OC} -n ${NS} volume deploymentconfig/pv-migrator --add --name=migrator --type=persistentVolumeClaim --claim-name=migrator --mount-path=/migrator - ${OC} -n ${NS} rollout resume deploymentconfig/pv-migrator - ${OC} -n ${NS} rollout status deploymentconfig/pv-migrator --watch - - # - MIGRATOR=$(${OC} -n ${NS} get pods -l run=pv-migrator -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') - if [[ ! $MIGRATOR ]]; then - echo "No running pod found for migrator" - exit 1 - fi - - echo "copy ${PVC} to storage" - ${OC} -n ${NS} exec $MIGRATOR -- cp -Rpav /storage/${PVC} /migrator/ - - TMP=$(mktemp temp.${PVC}.json.XXXX) - - echo "dumping pvc ${PVC} to ${TMP}." - ## we can change the storage class instead of using the default - if [ ! -z "$SC" ]; then - ${OC} -n ${NS} get -o json pvc/${PVC} --export=true | jq 'del(.metadata.annotations, .metadata.selfLink, .spec.volumeName, .spec.storageClassName, .status)' | jq --arg PVSIZE "${PVSIZE}" '.spec.resources.requests.storage=$PVSIZE' | jq --arg SC "${SC}" '.spec.storageClassName=$SC' > $TMP - else - ${OC} -n ${NS} get -o json pvc/${PVC} --export=true | jq 'del(.metadata.annotations, .metadata.selfLink, .spec.volumeName, .spec.storageClassName, .status)' | jq --arg PVSIZE "${PVSIZE}" '.spec.resources.requests.storage=$PVSIZE' > $TMP - fi - - ${OC} -n ${NS} rollout pause deploymentconfig/pv-migrator - - ${OC} -n ${NS} volume deploymentconfig/pv-migrator --remove --name=${PVC} - ${OC} -n ${NS} delete pvc/${PVC} - ${OC} -n ${NS} create -f $TMP && rm $TMP - ${OC} -n ${NS} volume deploymentconfig/pv-migrator --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --mount-path=/storage/${PVC} - - ${OC} -n ${NS} rollout resume deploymentconfig/pv-migrator - ${OC} -n ${NS} rollout status deploymentconfig/pv-migrator --watch - - MIGRATOR=$(${OC} -n ${NS} get pods -l run=pv-migrator -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') - - ${OC} -n ${NS} exec $MIGRATOR -- cp -Rpav /migrator/${PVC} /storage/ - ${OC} -n ${NS} exec $MIGRATOR -- ls -la /storage/${PVC} - - ${OC} -n ${NS} delete deploymentconfig/pv-migrator - ${OC} -n ${NS} delete pvc/migrator - ${OC} -n ${NS} scale --replicas=1 dc/${DC} - - ${OC} -n ${NS} adm policy remove-scc-from-user privileged -z pvcreclaim - ${OC} -n ${NS} delete serviceaccount pvcreclaim -fi diff --git a/helpers/nginx-healthchecks.sh b/helpers/nginx-healthchecks.sh deleted file mode 100755 index 9dde57a5ab..0000000000 --- a/helpers/nginx-healthchecks.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -if [ -z "$OPENSHIFT_PROJECT" ]; then - echo "OPENSHIFT_PROJECT not set" - exit 1 -fi - -set -eu -o pipefail - -OC="oc" - -echo "${OPENSHIFT_PROJECT}: starting ==================================================================" - -# Remove any backupcommand from nginx pods if they exit -if oc -n ${OPENSHIFT_PROJECT} get deploymentconfig nginx -o yaml --ignore-not-found | grep -q php &> /dev/null; then - oc -n ${OPENSHIFT_PROJECT} patch dc/nginx --patch '{"spec":{"template":{"spec":{"containers":[{"name":"php","livenessProbe":{"$patch":"replace","tcpSocket":{"port":9000},"initialDelaySeconds":60,"periodSeconds":10},"readinessProbe":{"$patch":"replace","tcpSocket":{"port":9000},"initialDelaySeconds":2,"periodSeconds":10}}]}}}}' || true - oc -n ${OPENSHIFT_PROJECT} rollout status --watch dc/nginx -fi - - -echo "${OPENSHIFT_PROJECT}: done ==================================================================" diff --git a/helpers/reclaim-pv.sh b/helpers/reclaim-pv.sh deleted file mode 100755 index 53ad5bfba2..0000000000 --- a/helpers/reclaim-pv.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash - -# written for openshift 3.7; small changes may be required for other versions. -# -# usage ./reclaim-pv.sh -# -# using the current openshift server and namepsace this script will: -# 1. scale all deployments to zero pods -# 2. create a pod and attach all temporary pvc. -# 3. attach all other pvcs in the namepace current claims to this pod. -# 4. for each pvc, -# copy the contents to temporary pvc, recreate the claim. -# this allows for the prefered pv to be used -# attach the newly created pvc, copy contents back to it -# 6. clean up - -OC=oc -PVCS=($(${OC} get pvc -o name | sed 's/persistentvolumeclaims\///')) - -if [[ $# -gt 0 ]]; then - unset PVCS - PVCS=("${BASH_ARGV[@]}") -fi - -if [[ ! ${#PVCS[@]} -gt 0 ]]; then - echo "no PVCs found." - -else - ${OC} create serviceaccount pvcreclaim - ${OC} adm policy add-scc-to-user privileged -z pvcreclaim - - ${OC} get dc -o name --no-headers | xargs -P3 -n1 ${OC} scale --replicas=0 - - ${OC} run --image alpine pv-migrator -- sh -c "while sleep 3600; do :; done" - - # change serviceaccount name so i can run as privileged - ${OC} patch deploymentconfig/pv-migrator -p '{"spec":{"template":{"spec":{"serviceAccountName": "pvcreclaim"}}}}' - # now run as root - ${OC} patch deploymentconfig/pv-migrator -p '{"spec":{"template":{"spec":{"securityContext":{ "privileged": "true", "runAsUser": 0 }}}}}' - - ${OC} rollout pause deploymentconfig/pv-migrator - - for PVC in "${PVCS[@]}" - do - echo "adding ${PVC} to pv-migrator." - ${OC} volume deploymentconfig/pv-migrator --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --mount-path=/storage/${PVC} - done - -cat << EOF | ${OC} apply -f - - apiVersion: v1 - items: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: migrator - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 20Gi - kind: List - metadata: {} -EOF - - - ${OC} volume deploymentconfig/pv-migrator --add --name=migrator --type=persistentVolumeClaim --claim-name=migrator --mount-path=/migrator - - ${OC} rollout resume deploymentconfig/pv-migrator - ${OC} rollout status deploymentconfig/pv-migrator --watch - - # - MIGRATOR=$(${OC} get pods -l run=pv-migrator -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') - #MIGRATOR=$(${OC} get pod -o custom-columns=NAME:.metadata.name --no-headers -l run=pv-migrator) - if [[ ! $MIGRATOR ]]; then - echo "No running pod found for migrator" - exit 1 - fi - - for PVC in "${PVCS[@]}" - do - echo "copy ${PVC} to storage" - ${OC} exec $MIGRATOR -- cp -Rpav /storage/${PVC} /migrator/ - - TMP=$(mktemp temp.${PVC}.json.XXXX) - - echo "dumping pvc ${PVC} to ${TMP}." - ${OC} get -o json pvc/${PVC} --export=true | jq 'del(.metadata.annotations, .metadata.selfLink, .spec.volumeName, .spec.storageClassName, .status)' > $TMP - - - ${OC} rollout pause deploymentconfig/pv-migrator - - ${OC} volume deploymentconfig/pv-migrator --remove --name=${PVC} - ${OC} delete pvc/${PVC} - ${OC} create -f $TMP && rm $TMP - ${OC} volume deploymentconfig/pv-migrator --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --mount-path=/storage/${PVC} - - ${OC} rollout resume deploymentconfig/pv-migrator - ${OC} rollout status deploymentconfig/pv-migrator --watch - - - MIGRATOR=$(${OC} get pods -l run=pv-migrator -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') - - ${OC} exec $MIGRATOR -- cp -Rpav /migrator/${PVC} /storage/ - ${OC} exec $MIGRATOR -- ls -la /storage/${PVC} - - - - - done - - ${OC} delete deploymentconfig/pv-migrator - ${OC} delete pvc/migrator - ${OC} get dc -o name --no-headers | xargs -P3 -n1 ${OC} scale --replicas=1 - - ${OC} adm policy remove-scc-from-user privileged -z pvcreclaim - ${OC} delete serviceaccount pvcreclaim - -fi diff --git a/helpers/run-in-all-lagoon-projects.sh b/helpers/run-in-all-lagoon-projects.sh deleted file mode 100755 index dbb82b969b..0000000000 --- a/helpers/run-in-all-lagoon-projects.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -e -o pipefail - -oc get configmaps --all-namespaces --no-headers | grep lagoon-env | awk '{ print $1 }' | while read OPENSHIFT_PROJECT; do - REGEX=${REGEX:-.*} - if [[ $OPENSHIFT_PROJECT =~ $REGEX ]]; then - . "$1" - fi -done diff --git a/helpers/shared-cleanup.sh b/helpers/shared-cleanup.sh deleted file mode 100755 index 6dedc3e62d..0000000000 --- a/helpers/shared-cleanup.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env bash - -# this script will assumed you're logged into an openshift cluster locally. -# and that you can connect directly to the database servers listed in DB_HOST -# on port 3306 with a .my.cnf that allows you to run -# non-interactive mysql commands. - -# use oc -n openshift-ansible-service-broker get secret/lagoon-dbaas-db-credentials -# if the database is not directly connectable, an ssh tunnel can be used: -# ~/.my.cnf-mysql-development-cluster.cluster-xxx.rds.amazonaws.com -# [client] -# host=127.0.0.1 -# port=33007 -# user=root -# password=af105380aa4a2f034a083daeb9ed27b7a8395a44 - -# ssh -L 33007:mysql-development-cluster.cluster-xxx.rds.amazonaws.com:3306 infra1.cluster1.amazee.io - -# after running this script, the user will be presented with a list of -# databases that are probably ok to remove. - -set -euo pipefail - -for util in oc jq mysql; do - if ! command -v ${util} > /dev/null; then - echo "please install ${util}" - exit 1 - fi -done - -# Colours. -shw_grey () { - echo $(tput bold)$(tput setaf 0) $@ $(tput sgr 0) -} -shw_norm () { - echo $(tput bold)$(tput setaf 9) $@ $(tput sgr 0) -} -shw_info () { - echo $(tput bold)$(tput setaf 4) $@ $(tput sgr 0) -} -shw_warn () { - echo $(tput bold)$(tput setaf 2) $@ $(tput sgr 0) -} -shw_err () { - echo $(tput bold)$(tput setaf 1) $@ $(tput sgr 0) -} - -# Services with a port are not servicebrokers. -shw_grey "Getting a list of services for cluster $(oc whoami --show-server)." -oc get service --all-namespaces -o=jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{.spec.externalName}{"\n"}{end}' \ - | awk '$2 ~ /^mariadb-/ {print}' > /tmp/mariadb-services -# Remove read replica services. -sed -i.bak '/mariadb-readreplica-/d' /tmp/mariadb-services -# Remove random database pods. -sed -i.bak '/mariadb-d7[[:space:]]*$/d' /tmp/mariadb-services - -# Get a list of database clusters: -# - Ignore the dedicated clusters. -# - Ignore the read replicas. -SERVERS=$(awk '{print $3}' /tmp/mariadb-services | sort -u | grep -v "^dedicated" | grep -v ".cluster-ro-") - -# Ensure you can connect to all database clusters, once you do that, list every -# database that you can that belongs to the Ansible Service Broker. -for SERVER in $SERVERS; do - CONFFILE="${HOME}/.my.cnf-${SERVER}" - if [ -f "$CONFFILE" ]; then - shw_info "Getting current database list for cluster ${SERVER}..." - # The ASB will never create a database smaller than 5 characters. - mysql --defaults-file="$CONFFILE" -se 'show databases;' | grep -Ev "mysql$|_schema$" | grep -E '^.{5,}$' > "/tmp/${SERVER}-databases" - else - shw_err "ERROR: please create $CONFFILE so I can know how to connect to $SERVER" - exit 2 - fi -done - -# For every active project, find out it's database name, and remove this the -# database cluster file (to indicate it has been found). -ERRORS=() -for PROJECT in $(awk '$3 ~ /^dedicated/ {next} {print $1}' /tmp/mariadb-services); do - shw_info "Checking namespace '${PROJECT}'." - - # In the case that there are multiple ASB configs for the 1 project, this will - # return an array with each database in it. - DATABASES=($(oc -n "${PROJECT}" get configmap lagoon-env -o json | jq -r '.data | with_entries(select(.key|match("_DATABASE";"i")))[]' || :)) - - if [ ${#DATABASES[@]} -eq 0 ]; then - shw_err " > Some problem with ${PROJECT}" - ERRORS+=("${PROJECT}") - else - # Iterate over the potential many database names. - for (( i=0; i<${#DATABASES[@]}; i++ )) ; do - # @TODO it would be technically possible to have the 2 databases spread - # across multiple database clusters, this code assumes a single project - # uses a single database cluster. - DBHOST=$(grep --max-count=1 "^${PROJECT}[[:space:]]" /tmp/mariadb-services | awk '{print $3}') - shw_warn " > Found database '${DATABASES[$i]}' on host '${DBHOST}'." - sed -i.bak -e "/${DATABASES[$i]}/d" "/tmp/${DBHOST}-databases" - done - fi -done - -echo; echo -if [ ${#ERRORS[@]} -gt 0 ]; then - shw_info "These projects could not adaquately checked:" - printf "%s\\n" "${ERRORS[@]}" - echo -fi - -for SERVER in $SERVERS; do - CONFFILE="${HOME}/.my.cnf-${SERVER}" - echo - shw_info "Orphaned databases for '${SERVER}'" - - # List servcer uptime. - shw_grey "MySQL uptime (last_update can only ever be this old)" - mysql --defaults-file="${CONFFILE}" -e "SELECT TIME_FORMAT(SEC_TO_TIME(VARIABLE_VALUE ),'%Hh %im') as Uptime from performance_schema.global_status where VARIABLE_NAME='Uptime';" - - rm -f /tmp/${SERVER}-databases-drop - while IFS= read -r line || [[ -n "$line" ]]; do - shw_info " $line" - echo -n " - Last updated: " - mysql --defaults-file="${CONFFILE}" -se "SELECT from_unixtime(UNIX_TIMESTAMP(MAX(UPDATE_TIME))) as last_update FROM information_schema.tables WHERE TABLE_SCHEMA IN ('$line');" - echo -n " - Table count: " - mysql --defaults-file="${CONFFILE}" -se "SELECT COUNT(1) AS TableCount FROM information_schema.tables WHERE table_schema = '$line';" - echo "DROP DATABASE \`$line\`;" >> /tmp/${SERVER}-databases-drop - done < "/tmp/${SERVER}-databases" - - if [ -f "/tmp/${SERVER}-databases-drop" ]; then - shw_grey "To remove these databases:" - cat /tmp/${SERVER}-databases-drop - fi -done diff --git a/helpers/shared-to-shared-migrate.sh b/helpers/shared-to-shared-migrate.sh deleted file mode 100755 index f734e3d663..0000000000 --- a/helpers/shared-to-shared-migrate.sh +++ /dev/null @@ -1,281 +0,0 @@ -#!/usr/bin/env bash - -# -# What this script is for -# ======================= -# This script will migrate a database user, access, database and contents from -# an existing cluster to a destination cluster. -# -# At the moment, this is geared towards the Ansible Service Broker, but likely -# can be modified in the future to work with the DBaaS operator. -# -# It has been used successfully to migrate databases between RDS clusters. -# -# There are a whole bunch of checks after the migration to check to ensure the -# migration was a success. Likely you should do additional testing as well. -# -# Requirements -# ============ -# * You are logged into OpenShift CLI and have access to the NAMESPACE you want -# to migrate. -# * You have a `.my.cnf` file for the destination database cluster. -# * If your destination database cluster is not directly accessible, then you -# have created SSH tunnels to expose them on a local port. -# -# How to get your existing ASB root credentials -# ============================================= -# oc -n openshift-ansible-service-broker get secret/lagoon-dbaas-db-credentials -o json | jq '.data | map_values(@base64d)' -# -# How to create a `.my.cnf` file -# ============================== -# ~/.my.cnf-shared-cluster.cluster-banana.ap-southeast-2.rds.amazonaws.com -# [client] -# host=127.0.0.1 -# port=33007 -# user=root -# password=banana2 -# -# How to create an SSH tunnel through a jump box to your database cluster -# ======================================================================= -# ssh -L 33007:shared-cluster.cluster-banana.ap-southeast-2.rds.amazonaws.com:3306 jumpbox.aws.amazee.io -# -# Example command 1 -# ================= -# ./helpers/shared-to-shared-migrate.sh \ -# --destination shared-cluster.cluster-apple.ap-southeast-2.rds.amazonaws.com \ -# --replica shared-cluster.cluster-r0-apple.ap-southeast-2.rds.amazonaws.com \ -# --namespace NAMESPACE \ -# --dry-run -# -# Example command 2 -# ================= -# namespaces=" -# foo-example-com-production -# bar-example-com-production -# baz-example-com-production -# quux-example-com-production -# " -# for namespace in $namespaces; do -# ./helpers/shared-to-shared-migrate.sh \ -# --dry-run \ -# --namespace "$namespace" \ -# --destination shared-mysql-production-1-cluster.cluster-plum.ap-southeast-2.rds.amazonaws.com \ -# --replica shared-mysql-production-1-cluster.cluster-ro-plum.ap-southeast-2.rds.amazonaws.com -# done -# -set -euo pipefail - -# Initialize our own variables: -DESTINATION_CLUSTER="" -REPLICA_CLUSTER="" -NAMESPACE="" -DRY_RUN="" -TIMESTAMP=$(date +%s) - -# Colours. -shw_grey () { - tput bold - tput setaf 0 - echo "$@" - tput sgr0 -} -shw_norm () { - tput bold - tput setaf 9 - echo "$@" - tput sgr0 -} -shw_info () { - tput bold - tput setaf 4 - echo "$@" - tput sgr0 -} -shw_warn () { - tput bold - tput setaf 2 - echo "$@" - tput sgr0 -} -shw_err () { - tput bold - tput setaf 1 - echo "$@" - tput sgr0 -} - -# Parse input arguments. -while [[ $# -gt 0 ]] ; do - case $1 in - -d|--destination) - DESTINATION_CLUSTER="$2" - shift # past argument - shift # past value - ;; - -r|--replica) - REPLICA_CLUSTER="$2" - shift # past argument - shift # past value - ;; - -n|--namespace) - NAMESPACE="$2" - shift # past argument - shift # past value - ;; - --dry-run) - DRY_RUN="TRUE" - shift # past argument - ;; - *) - echo "Invalid Argument: $1" - exit 3 - ;; - esac -done - -shw_grey "================================================" -shw_grey " START_TIMESTAMP='$(date +%Y-%m-%dT%H:%M:%S%z)'" -shw_grey "================================================" -shw_grey " DESTINATION_CLUSTER=$DESTINATION_CLUSTER" -shw_grey " REPLICA_CLUSTER=$REPLICA_CLUSTER" -shw_grey " NAMESPACE=$NAMESPACE" -shw_grey "================================================" - -for util in oc jq mysql; do - if ! command -v ${util} > /dev/null; then - shw_err "Please install ${util}" - exit 1 - fi -done - -CONF_FILE=${HOME}/.my.cnf-${DESTINATION_CLUSTER} -if [ ! -f "$CONF_FILE" ]; then - shw_err "ERROR: please create $CONF_FILE so I can know how to connect to ${DESTINATION_CLUSTER}" - exit 2 -fi - -if [ "$DRY_RUN" ] ; then - shw_warn "Dry run is enabled, so no network service changes will take place." -fi - -# Load the DBaaS credentials for the project -SECRETS=$(oc -n "$NAMESPACE" get secret mariadb-servicebroker-credentials -o json) - -DB_NETWORK_SERVICE=$(echo "$SECRETS" | jq -er '.data.DB_HOST | @base64d') -if echo "$SECRETS" | grep -q DB_READREPLICA_HOSTS ; then - DB_READREPLICA_HOSTS=$(echo "$SECRETS" | jq -er '.data.DB_READREPLICA_HOSTS | @base64d') -else - DB_READREPLICA_HOSTS="" -fi -DB_USER=$(echo "$SECRETS" | jq -er '.data.DB_USER | @base64d') -DB_PASSWORD=$(echo "$SECRETS" | jq -er '.data.DB_PASSWORD | @base64d') -DB_NAME=$(echo "$SECRETS" | jq -er '.data.DB_NAME | @base64d') -DB_PORT=$(echo "$SECRETS" | jq -er '.data.DB_PORT | @base64d') - -shw_grey "================================================" -shw_grey " DB_NETWORK_SERVICE=$DB_NETWORK_SERVICE" -shw_grey " DB_READREPLICA_HOSTS=$DB_READREPLICA_HOSTS" -shw_grey " DB_USER=$DB_USER" -shw_grey " DB_PASSWORD=$DB_PASSWORD" -shw_grey " DB_NAME=$DB_NAME" -shw_grey " DB_PORT=$DB_PORT" -shw_grey "================================================" - -# Ensure there is a database in the destination. -shw_info "> Preparing Database, User, and permissions on destination" -shw_info "================================================" -CONF_FILE=${HOME}/.my.cnf-${DESTINATION_CLUSTER} -mysql --defaults-file="$CONF_FILE" -se "CREATE DATABASE IF NOT EXISTS \`${DB_NAME}\`;" -mysql --defaults-file="$CONF_FILE" -se "CREATE USER IF NOT EXISTS \`${DB_USER}\`@'%' IDENTIFIED BY '${DB_PASSWORD}';" -mysql --defaults-file="$CONF_FILE" -se "GRANT ALL ON \`${DB_NAME}\`.* TO \`${DB_USER}\`@'%';" -mysql --defaults-file="$CONF_FILE" -se "FLUSH PRIVILEGES;" - -# Verify access. -shw_info "> Verify MySQL access for the new user" -shw_info "================================================" -mysql --defaults-file="$CONF_FILE" -e "SELECT * FROM mysql.db WHERE Db = '${DB_NAME}'\G;" - -# Dump the database inside the CLI pod. -POD=$(oc -n "$NAMESPACE" get pods -o json --field-selector=status.phase=Running -l service=cli | jq -r '.items[0].metadata.name // empty') -if [ -z "$POD" ]; then - shw_warn "No running cli pod in namespace $NAMESPACE" - shw_warn "Scaling up 1 cli DeploymentConfig pod" - oc -n "$NAMESPACE" scale dc cli --replicas=1 --timeout=2m - sleep 32 # hope for timely scheduling - POD=$(oc -n "$NAMESPACE" get pods -o json --field-selector=status.phase=Running -l service=cli | jq -er '.items[0].metadata.name') -fi -shw_info "> Dumping database $DB_NAME on pod $POD on host $DB_NETWORK_SERVICE" -shw_info "================================================" -oc -n "$NAMESPACE" exec "$POD" -- bash -c "time mysqldump -h '$DB_NETWORK_SERVICE' -u '$DB_USER' -p'$DB_PASSWORD' '$DB_NAME' > /tmp/migration.sql" -oc -n "$NAMESPACE" exec "$POD" -- ls -lh /tmp/migration.sql -oc -n "$NAMESPACE" exec "$POD" -- head -n 5 /tmp/migration.sql -oc -n "$NAMESPACE" exec "$POD" -- tail -n 5 /tmp/migration.sql -shw_norm "> Dump is done" -shw_norm "================================================" - -# Import to new database. -shw_info "> Importing the dump into ${DESTINATION_CLUSTER}" -shw_info "================================================" -oc -n "$NAMESPACE" exec "$POD" -- bash -c "time mysql -h '$DESTINATION_CLUSTER' -u '$DB_USER' -p'$DB_PASSWORD' '$DB_NAME' < /tmp/migration.sql" -oc -n "$NAMESPACE" exec "$POD" -- rm /tmp/migration.sql - -shw_norm "> Import is done" -shw_norm "================================================" - -# Alter the network service(s). -shw_info "> Altering the Network Service $DB_NETWORK_SERVICE to point at $DESTINATION_CLUSTER" -shw_info "================================================" -ORIGINAL_DB_HOST=$(oc -n "$NAMESPACE" get "svc/$DB_NETWORK_SERVICE" -o json --export | tee "/tmp/$NAMESPACE-svc.json" | jq -er '.spec.externalName') -if [ "$DRY_RUN" ] ; then - echo "**DRY RUN**" -else - oc -n "$NAMESPACE" patch "svc/$DB_NETWORK_SERVICE" -p "{\"spec\":{\"externalName\": \"$DESTINATION_CLUSTER\"}}" -fi -if [ "$DB_READREPLICA_HOSTS" ]; then - shw_info "> Altering the Network Service $DB_READREPLICA_HOSTS to point at $REPLICA_CLUSTER" - shw_info "================================================" - ORIGINAL_DB_READREPLICA_HOSTS=$(oc -n "$NAMESPACE" get "svc/$DB_READREPLICA_HOSTS" -o json --export | tee "/tmp/$NAMESPACE-svc-replica.json" | jq -er '.spec.externalName') - if [ "$DRY_RUN" ] ; then - echo "**DRY RUN**" - else - oc -n "$NAMESPACE" patch "svc/$DB_READREPLICA_HOSTS" -p "{\"spec\":{\"externalName\": \"$REPLICA_CLUSTER\"}}" - fi -fi - -# Unsure what if any delay there is in this to take effect, but 1 second sounds -# completely reasonable. -sleep 1 - -# Verify the correct RDS cluster. -shw_info "> Output the RDS cluster that Drush is connecting to" -shw_info "================================================" -oc -n "$NAMESPACE" exec "$POD" -- bash -c "drush sqlq 'SELECT @@aurora_server_id;'" - -# Drush status. -shw_info "> Drush status" -shw_info "================================================" -oc -n "$NAMESPACE" exec "$POD" -- bash -c "drush status" - -# Get routes, and ensure a cache bust works. -ROUTE=$(oc -n "$NAMESPACE" get routes -o json | jq -er '.items[0].spec.host') -shw_info "> Testing the route https://${ROUTE}/?${TIMESTAMP}" -shw_info "================================================" -curl -skLIXGET "https://${ROUTE}/?${TIMESTAMP}" \ - -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36" \ - --cookie "NO_CACHE=1" | grep -E "HTTP|Cache|Location|LAGOON" || true - -shw_grey "================================================" -shw_grey "" -shw_grey "In order to rollback this change, edit the Network Service(s) like so:" -shw_grey "" -shw_grey "oc -n $NAMESPACE patch svc/$DB_NETWORK_SERVICE -p '{\"spec\":{\"externalName\": \"$ORIGINAL_DB_HOST\"}}'" -if [ "$DB_READREPLICA_HOSTS" ]; then - shw_grey "oc -n $NAMESPACE patch svc/$DB_READREPLICA_HOSTS -p '{\"spec\":{\"externalName\": \"$ORIGINAL_DB_READREPLICA_HOSTS\"}}'" -fi - -echo "" -shw_grey "================================================" -shw_grey " END_TIMESTAMP='$(date +%Y-%m-%dT%H:%M:%S%z)'" -shw_grey "================================================" -shw_norm "Done in $SECONDS seconds" -exit 0 diff --git a/helpers/sharedmigrate.sh b/helpers/sharedmigrate.sh deleted file mode 100755 index 973ea90645..0000000000 --- a/helpers/sharedmigrate.sh +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/sh - -for util in oc svcat jq; do -which ${util} > /dev/null -if [ $? -gt 0 ]; then - echo "please install ${util}" - exit 1 -fi -done; - -usage() { - cat << EOF - ${0}: migrate a mariadb servicebroker to another mariadb servicebroker - This script is useful when needing to change either the class or the plan - of and existing service broker. - By default, it will use: - 'lagoon-dbaas-mariadb-apb' as the class, - 'production' as the plan, - current openshift context as the namespace, and - first servicebroker in the namespace. - - when completed, run with -x to delete migration pvc, dc and serviceaccount. - - e.g: $0 -n mysite-devel -c lagoon-dbaas-mariadb-apb -p development -i mariadb - $0 -n mysite-devel -x -EOF -} - -# n- namespace -# c- class ( lagoon-dbaas-mariadb-apb ) -# p- plan ( production / stage ) - -args=`getopt n:c:p:i:xh $*` -if [[ $# -eq 0 ]]; then - usage - exit -fi - -# set some defaults -NAMESPACE=$(oc project -q) -PLAN=production -CLASS=lagoon-dbaas-mariadb-apb - -set -- $args -for i -do - case "$i" in - -n) - NAMESPACE="$2"; shift; - shift;; - -c) - CLASS="$2"; shift; - shift;; - -p) - PLAN="$2"; shift; - shift;; - -i) - INSTANCE="$2"; shift; - shift;; - -h) - usage - exit 0 - shift;; - - -x) - echo "cleaning up " - oc -n ${NAMESPACE} delete dc/migrator - oc -n ${NAMESPACE} delete pvc/migrator - oc -n ${NAMESPACE} adm policy remove-scc-from-user privileged -z migrator - oc -n ${NAMESPACE} delete serviceaccount migrator - exit 0 - shift;; - - --) - shift; break;; - esac -done - -# set a default instance, if not specified. -if [ -z ${INSTANCE+x} ]; then - INSTANCE=$(svcat -n ${NAMESPACE} get instance -o json |jq -r '.items[0].metadata.name') - echo "instance not specified, using $INSTANCE" -fi - -# verify instance exists -svcat -n ${NAMESPACE} get instance $INSTANCE -if [ $? -gt 0 ] ;then - echo "no instance found" - exit 2 -fi - -echo "Verifying secret ${INSTANCE}-servicebroker-credentials " -oc -n ${NAMESPACE} get --insecure-skip-tls-verify secret ${INSTANCE}-servicebroker-credentials || svcat bind $INSTANCE --name ${INSTANCE}-servicebroker-credentials - -# validate $broker - -oc -n ${NAMESPACE} create serviceaccount migrator -oc -n ${NAMESPACE} adm policy add-scc-to-user privileged -z migrator - -oc -n ${NAMESPACE} run --image mariadb --env="MYSQL_RANDOM_ROOT_PASSWORD=yes" migrator - -# pause and make some changes -oc -n ${NAMESPACE} rollout pause deploymentconfig/migrator - -# We don't care about the database in /var/lib/mysql; just privilege it and let it do its thing. -oc -n ${NAMESPACE} patch deploymentconfig/migrator -p '{"spec":{"template":{"spec":{"serviceAccountName": "migrator"}}}}' -oc -n ${NAMESPACE} patch deploymentconfig/migrator -p '{"spec":{"template":{"spec":{"securityContext":{ "privileged": "true", "runAsUser": 0 }}}}}' -oc -n ${NAMESPACE} patch deploymentconfig/migrator -p '{"spec":{"strategy":{"type":"Recreate"}}}' - - -# create a volume to store the dump. -cat << EOF | oc -n ${NAMESPACE} apply -f - - apiVersion: v1 - items: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: migrator - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 20Gi - kind: List - metadata: {} -EOF - -oc -n ${NAMESPACE} volume deploymentconfig/migrator --add --name=migrator --type=persistentVolumeClaim --claim-name=migrator --mount-path=/migrator - - -# look up the secret from the instance and add it to the new container -SECRET=$(svcat -n ${NAMESPACE} get binding -o json |jq -r ".items[] | select (.spec.instanceRef.name == \"$INSTANCE\") | .spec.secretName") -echo secret: $SECRET -oc -n ${NAMESPACE} set env --from=secret/${SECRET} --prefix=OLD_ dc/migrator - -oc -n ${NAMESPACE} rollout resume deploymentconfig/migrator -oc -n ${NAMESPACE} rollout latest deploymentconfig/migrator -oc -n ${NAMESPACE} rollout status deploymentconfig/migrator --watch - -sleep 20; -# Do the dump: -POD=$(oc -n ${NAMESPACE} get pods -o json --show-all=false -l run=migrator | jq -r '.items[].metadata.name') - -oc -n ${NAMESPACE} exec $POD -- bash -c 'time mysqldump -h $OLD_DB_HOST -u $OLD_DB_USER -p${OLD_DB_PASSWORD} $OLD_DB_NAME > /migrator/migration.sql' - -echo "DUMP IS DONE;" -oc -n ${NAMESPACE} exec $POD -- ls -al /migrator/migration.sql || exit 1 -oc -n ${NAMESPACE} exec $POD -- head /migrator/migration.sql -oc -n ${NAMESPACE} exec $POD -- tail /migrator/migration.sql || exit 1 - - -printf "\n\n\nLAST CHANCE TO CANCEL BEFORE I DELETE THE OLD SERVICEBROKER.\n\n" -echo "sleeping 30 seconds..." -sleep 30 - -# delete the old servicebroker -time svcat -n ${NAMESPACE} unbind $INSTANCE -time svcat -n ${NAMESPACE} deprovision $INSTANCE --wait --interval 2s --timeout=1h -echo "===== old instance deprovisioned, waiting 30 seconds." -sleep 30; - -echo "===== provisioning new $CLASS of plan $PLAN" -time svcat -n ${NAMESPACE} provision $INSTANCE --class $CLASS --plan $PLAN --wait -echo " and binding" -time svcat -n ${NAMESPACE} bind $INSTANCE --name ${INSTANCE}-servicebroker-credentials --wait - -until oc get -n ${NAMESPACE} secret ${INSTANCE}-servicebroker-credentials -do - echo "Secret ${SERVICE_NAME}-servicebroker-credentials not available yet, waiting for 5 secs" - sleep 5 -done - - -echo "rolling out migrator again so the secrets get propagated." -oc -n ${NAMESPACE} rollout latest deploymentconfig/migrator -oc -n ${NAMESPACE} rollout status deploymentconfig/migrator --watch - -sleep 10; - -# Do the dump: -POD=$(oc -n ${NAMESPACE} get pods -o json --show-all=false -l run=migrator | jq -r '.items[].metadata.name') - -oc -n ${NAMESPACE} exec $POD -- bash -c 'cat /migrator/migration.sql |sed -e "s/DEFINER[ ]*=[ ]*[^*]*\*/\*/" | mysql -h $OLD_DB_HOST -u $OLD_DB_USER -p${OLD_DB_PASSWORD} $OLD_DB_NAME' - - -# Load credentials out of secret -SECRETS=$(mktemp).yaml -echo "Exporting ${INSTANCE}-servicebroker-credentials into $SECRETS " -oc -n ${NAMESPACE} get --insecure-skip-tls-verify secret ${INSTANCE}-servicebroker-credentials -o yaml > $SECRETS - -DB_HOST=$(cat $SECRETS | shyaml get-value data.DB_HOST | base64 -D) -DB_USER=$(cat $SECRETS | shyaml get-value data.DB_USER | base64 -D) -DB_PASSWORD=$(cat $SECRETS | shyaml get-value data.DB_PASSWORD | base64 -D) -DB_NAME=$(cat $SECRETS | shyaml get-value data.DB_NAME | base64 -D) -DB_PORT=$(cat $SECRETS | shyaml get-value data.DB_PORT | base64 -D) - -SERVICE_NAME_UPPERCASE=$(echo $INSTANCE | tr [:lower:] [:upper:]) -oc -n $NAMESPACE patch configmap lagoon-env \ - -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\"}}" diff --git a/helpers/update-versions.yml b/helpers/update-versions.yml deleted file mode 100644 index db508c68fa..0000000000 --- a/helpers/update-versions.yml +++ /dev/null @@ -1,58 +0,0 @@ -# Lagoon Version Update Helper -# -# Helper to update Version inside Dockerfiles -# Update versions below in `vars` and execute locally -# -# ansible-playbook helpers/update-versions.yml -- name: update versions - hosts: 127.0.0.1 - connection: local - vars: - # Newrelic - https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes/ - NEWRELIC_VERSION: '9.12.0.268' - # Composer - https://getcomposer.org/download/ - COMPOSER_VERSION: '1.10.9' - COMPOSER_HASH_SHA256: '70d6b9c3e0774b398a372dcb7f89dfe22fc25884e6e09ebf277286dd64cfaf35' - # Drupal Console Launcher - https://github.com/hechoendrupal/drupal-console-launcher/releases - DRUPAL_CONSOLE_LAUNCHER_VERSION: 1.9.4 - DRUPAL_CONSOLE_LAUNCHER_SHA: b7759279668caf915b8e9f3352e88f18e4f20659 - # Drush - https://github.com/drush-ops/drush/releases - DRUSH_VERSION: 8.3.5 - # Drush Launcher Version - https://github.com/drush-ops/drush-launcher/releases - DRUSH_LAUNCHER_VERSION: 0.6.0 - tasks: - - name: update NEWRELIC_VERSION - lineinfile: - path: "{{ lookup('env', 'PWD') }}/images/php/fpm/Dockerfile" - regexp: 'ENV NEWRELIC_VERSION=' - line: 'ENV NEWRELIC_VERSION={{ NEWRELIC_VERSION }}' - - name: update COMPOSER_VERSION - lineinfile: - path: "{{ lookup('env', 'PWD') }}/images/php/cli/Dockerfile" - regexp: 'ENV COMPOSER_VERSION=' - line: 'ENV COMPOSER_VERSION={{ COMPOSER_VERSION }} \' - - name: update COMPOSER_HASH_SHA256 - lineinfile: - path: "{{ lookup('env', 'PWD') }}/images/php/cli/Dockerfile" - regexp: 'COMPOSER_HASH_SHA256=' - line: ' COMPOSER_HASH_SHA256={{ COMPOSER_HASH_SHA256 }}' - - name: update DRUPAL_CONSOLE_LAUNCHER_VERSION - lineinfile: - path: "{{ lookup('env', 'PWD') }}/images/php/cli-drupal/Dockerfile" - regexp: 'ENV DRUPAL_CONSOLE_LAUNCHER_VERSION=' - line: 'ENV DRUPAL_CONSOLE_LAUNCHER_VERSION={{ DRUPAL_CONSOLE_LAUNCHER_VERSION }} \' - - name: update DRUPAL_CONSOLE_LAUNCHER_SHA - lineinfile: - path: "{{ lookup('env', 'PWD') }}/images/php/cli-drupal/Dockerfile" - regexp: 'DRUPAL_CONSOLE_LAUNCHER_SHA=' - line: ' DRUPAL_CONSOLE_LAUNCHER_SHA={{ DRUPAL_CONSOLE_LAUNCHER_SHA }} \' - - name: update DRUSH_VERSION - lineinfile: - path: "{{ lookup('env', 'PWD') }}/images/php/cli-drupal/Dockerfile" - regexp: 'DRUSH_VERSION=' - line: ' DRUSH_VERSION={{ DRUSH_VERSION }} \' - - name: update DRUSH_LAUNCHER_VERSION - lineinfile: - path: "{{ lookup('env', 'PWD') }}/images/php/cli-drupal/Dockerfile" - regexp: 'DRUSH_LAUNCHER_VERSION=' - line: ' DRUSH_LAUNCHER_VERSION={{ DRUSH_LAUNCHER_VERSION }} \' diff --git a/images/athenapdf-service/Dockerfile b/images/athenapdf-service/Dockerfile index b67e1e1d11..8fa9ba4fb0 100644 --- a/images/athenapdf-service/Dockerfile +++ b/images/athenapdf-service/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM arachnysdocker/athenapdf-service:2.13.0 LABEL maintainer="amazee.io" diff --git a/images/commons/.bashrc b/images/commons/.bashrc deleted file mode 100644 index c5fb3f4205..0000000000 --- a/images/commons/.bashrc +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# Make sure that new files generated by Docker have group write permission -source /lagoon/entrypoints/00-umask.sh - -# Loading environment variables from .env and friends -source /lagoon/entrypoints/50-dotenv.sh - -# Generate some additional enviornment variables -source /lagoon/entrypoints/55-generate-env.sh - -# a nicer prompt -if [ "$PS1" ]; then - NORMAL="\[\e[0m\]" - RED="\[\e[1;31m\]" - GREEN="\[\e[0;32m\]" - YELLOW="\[\e[1;33m\]" - BLUE="\[\e[1;34m\]" - WHITE="\[\e[1;37m\]" - PS1="${YELLOW}\w${NORMAL}$ " - if [ "$LAGOON" ]; then - PS1="${GREEN}$LAGOON${NORMAL}:$PS1" - fi - if [ "$LAGOON_GIT_BRANCH" ]; then - # production environments get a red color - if [ "$LAGOON_ENVIRONMENT_TYPE" == "production" ]; then - PS1="${RED}$LAGOON_GIT_BRANCH${NORMAL}@$PS1" - else - PS1="${BLUE}$LAGOON_GIT_BRANCH${NORMAL}@$PS1" - fi - fi - if [ "$LAGOON_PROJECT" ]; then - PS1="[${WHITE}$LAGOON_PROJECT${NORMAL}]$PS1" - fi -fi - -# Helpers -alias ll="ls -l" diff --git a/images/commons/Dockerfile b/images/commons/Dockerfile deleted file mode 100644 index 153be44ea1..0000000000 --- a/images/commons/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -ARG ALPINE_VERSION -FROM alpine:${ALPINE_VERSION} - -LABEL maintainer="amazee.io" - -ENV LAGOON=commons - -COPY lagoon/ /lagoon/ -RUN mkdir -p /lagoon/bin -COPY fix-permissions docker-sleep entrypoint-readiness /bin/ -COPY .bashrc /home/.bashrc - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache curl tini \ - && rm -rf /var/cache/apk/* \ - && curl -sLo /bin/ep https://github.com/kreuzwerker/envplate/releases/download/1.0.0-RC1/ep-linux \ - && echo "48e234e067874a57a4d4bb198b5558d483ee37bcc285287fffb3864818b42f2785be0568faacbc054e97ca1c5047ec70382e1ca0e71182c9dba06649ad83a5f6 /bin/ep" | sha512sum -c \ - && chmod +x /bin/ep \ - && curl -sLo /lagoon/bin/cron https://github.com/christophlehmann/go-crond/releases/download/0.6.1-2-g7022a21/go-crond-64-linux \ - && echo "4ecbf269a00416086a855b760b6a691d1b8a6385adb18debec893bdbebccd20822b945c476406e3ca27c784812027c23745048fadc36c4067f12038aff972dce /lagoon/bin/cron" | sha512sum -c \ - && chmod +x /lagoon/bin/cron \ - && mkdir -p /lagoon/crontabs && fix-permissions /lagoon/crontabs \ - && ln -s /home/.bashrc /home/.profile - -RUN chmod g+w /etc/passwd - -ARG LAGOON_VERSION -RUN echo $LAGOON_VERSION > /lagoon/version -ENV LAGOON_VERSION=$LAGOON_VERSION - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/bin/docker-sleep"] diff --git a/images/commons/docker-sleep b/images/commons/docker-sleep deleted file mode 100755 index 426fb9e2a7..0000000000 --- a/images/commons/docker-sleep +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -while sleep 3600; do :; done \ No newline at end of file diff --git a/images/commons/entrypoint-readiness b/images/commons/entrypoint-readiness deleted file mode 100755 index 64f88f0100..0000000000 --- a/images/commons/entrypoint-readiness +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# simple readiness check to see if a late-running entrypoint has completed -# but only if the entrypoint actually exists -if [ -f /lagoon/entrypoints/999-readiness.sh ]; then - test -f /tmp/ready -fi diff --git a/images/commons/fix-permissions b/images/commons/fix-permissions deleted file mode 100755 index 8259c29048..0000000000 --- a/images/commons/fix-permissions +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Fix permissions on the given directory to allow group read/write of -# regular files and execute of directories. -find -L "$1" -exec chgrp 0 {} \; -find -L "$1" -exec chmod g+rw {} \; -find -L "$1" -type d -exec chmod g+x {} + diff --git a/images/commons/lagoon/cronjob.sh b/images/commons/lagoon/cronjob.sh deleted file mode 100755 index a558cfc7df..0000000000 --- a/images/commons/lagoon/cronjob.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -exit_trap() { - rv=$? - # TODO: Send Lagoon API information about our CronJob Success or Failure - exit $rv -} - -# on exit, always call exit_trap -trap exit_trap EXIT - -echo "$(date --utc +%FT%TZ) CRONJOB: $@" - -sh -c "/lagoon/entrypoints.sh $@" \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints.bash b/images/commons/lagoon/entrypoints.bash deleted file mode 100755 index 8c07b21421..0000000000 --- a/images/commons/lagoon/entrypoints.bash +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# This script will be the default ENTRYPOINT for all children docker images. -# It just sources all files within /lagoon/entrypoints/* in an alphabetical order and then runs `exec` on the given parameter. - -if [ -d /lagoon/entrypoints ]; then - for i in /lagoon/entrypoints/*; do - if [ -r $i ]; then - . $i - fi - done - unset i -fi - -exec "$@" \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints.sh b/images/commons/lagoon/entrypoints.sh deleted file mode 100755 index 55cedfac83..0000000000 --- a/images/commons/lagoon/entrypoints.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# This script will be the default ENTRYPOINT for all children docker images. -# It just sources all files within /lagoon/entrypoints/* in an alphabetical order and then runs `exec` on the given parameter. - -if [ -d /lagoon/entrypoints ]; then - for i in /lagoon/entrypoints/*; do - if [ -r $i ]; then - . $i - fi - done - unset i -fi - -exec "$@" \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/00-umask.sh b/images/commons/lagoon/entrypoints/00-umask.sh deleted file mode 100755 index 1f70ab745d..0000000000 --- a/images/commons/lagoon/entrypoints/00-umask.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Make sure that new files generated by Docker have group write permission -umask 002 \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/10-passwd.sh b/images/commons/lagoon/entrypoints/10-passwd.sh deleted file mode 100644 index 09aff906c2..0000000000 --- a/images/commons/lagoon/entrypoints/10-passwd.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -if [ -w /etc/passwd ]; then - # Change root's home folder to /home - # (we can't use `sed -i` as we sed would create the tempfile in /etc) - TMPFILE=$(mktemp -p /tmp passwd.XXXXXX) - sed 's/root:\/root:/root:\/home:/' /etc/passwd > "$TMPFILE" - cat "$TMPFILE" > /etc/passwd - rm "$TMPFILE" - - # If we don't know who we are (whoami returns false) add a new entry into the users list - if ! whoami &> /dev/null; then - echo "${USER_NAME:-user}:x:$(id -u):0:${USER_NAME:-user}:${HOME}:/bin/sh" >> /etc/passwd - fi -fi diff --git a/images/commons/lagoon/entrypoints/50-dotenv.sh b/images/commons/lagoon/entrypoints/50-dotenv.sh deleted file mode 100644 index a588ce1360..0000000000 --- a/images/commons/lagoon/entrypoints/50-dotenv.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# dotenv implementation in Bash: -# We basically search for files within the current working directory (defined by WORKDIR in the Dockerfile). -# If it exists, we source them, which means their variables will exist as environment variables for all next processes -# The files are expected to be in this format: -# -# var1=value -# VAR2=value -# -# As there can already be env variables defined in either the Dockerfile of during runtime (via docker run), we have an hierarchy of Environment variables: -# (env variables defined in lower numbers are stronger) -# 1. Runtime env variables (docker run) -# 2. Env variables defined in Dockerfile (ENV) -# 3. Env variables defined in `.lagoon.env.$BRANCHNAME` (if file exists and where $BRANCHNAME is the Branch this Dockerimage has been built for), -# use this for overwriting variables for only specific branches -# 4. Env variables defined in `.env` -# 5. Env variables defined in `.env.defaults` - -# first export all current environment variables into a file. -# We do that in order to keep the hierarchy of environment variables. Already defined ones are probably overwritten -# via an `docker run -e VAR=VAL` system and they should still be used even they are defined in dotenv files. -TMPFILE=$(mktemp -t dotenv.XXXXXXXX) -export -p > $TMPFILE - -# set -a is short for `set -o allexport` which will export all variables in a file -set -a -[ -f .env.defaults ] && . ./.env.defaults || true -[ -f .env ] && . ./.env || true -# Provide a file that adds variables to all Lagoon envs, but is overridable in a specific env below -[ -f .lagoon.env ] && . ./.lagoon.env || true -[ -f .lagoon.env.$LAGOON_GIT_BRANCH ] && . ./.lagoon.env.$LAGOON_GIT_BRANCH || true -# Branch names can have weird special chars in them which are not allowed in File names, so we also try the Branch name with special chars replaced by dashes. -[ -f .lagoon.env.$LAGOON_GIT_SAFE_BRANCH ] && . ./.lagoon.env.$LAGOON_GIT_SAFE_BRANCH || true -set +a - -# now export all previously existing environments variables so they are stronger than maybe existing ones in the dotenv files -. $TMPFILE || true - -# remove the tmpfile -rm $TMPFILE diff --git a/images/commons/lagoon/entrypoints/55-generate-env.sh b/images/commons/lagoon/entrypoints/55-generate-env.sh deleted file mode 100644 index dc9aaa7783..0000000000 --- a/images/commons/lagoon/entrypoints/55-generate-env.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Create a LAGOON_DOMAIN from LAGOON_ROUTE but without the scheme (http:// or https://) -export LAGOON_DOMAIN=${LAGOON_ROUTE#*://} \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/90-cronjobs.sh b/images/commons/lagoon/entrypoints/90-cronjobs.sh deleted file mode 100644 index c53b6a7d9a..0000000000 --- a/images/commons/lagoon/entrypoints/90-cronjobs.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Only if $CRONJOBS is not empty and /lagoon/crontabs/crontab is not existing yet -if [ -x /lagoon/bin/cron ] && [ ! -z "$CRONJOBS" ] && [ ! -f /lagoon/crontabs/crontab ]; then - echo "Setting up Cronjobs:" - echo "${CRONJOBS}" - echo "${CRONJOBS}" > /lagoon/crontabs/crontab - # go-crond does not like if group and others have write access to the crontab - chmod go-w /lagoon/crontabs/crontab - /lagoon/bin/cron $(whoami):/lagoon/crontabs/crontab --allow-unprivileged --no-auto -v & -fi \ No newline at end of file diff --git a/images/commons/lagoon/entrypoints/999-readiness.sh b/images/commons/lagoon/entrypoints/999-readiness.sh deleted file mode 100644 index 701997993e..0000000000 --- a/images/commons/lagoon/entrypoints/999-readiness.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -touch /tmp/ready diff --git a/images/curator/Dockerfile b/images/curator/Dockerfile index a7e771630b..cb5e20721c 100644 --- a/images/curator/Dockerfile +++ b/images/curator/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM bobrik/curator:5.7.6 USER root diff --git a/images/docker-host/Dockerfile b/images/docker-host/Dockerfile index 5587f2bf4b..9cd6d536ba 100644 --- a/images/docker-host/Dockerfile +++ b/images/docker-host/Dockerfile @@ -1,6 +1,7 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker:19.03.10-dind +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons +FROM docker:19.03.14-dind LABEL maintainer="amazee.io" ENV LAGOON=docker-host @@ -27,14 +28,16 @@ RUN apk add --no-cache bash ENV DOCKER_HOST=docker-host \ REGISTRY=docker-registry.default.svc:5000 \ REPOSITORY_TO_UPDATE=amazeeio \ - BIP=172.16.0.1/16 + BIP=172.16.0.1/16 \ + REGISTRY_MIRROR=https://imagecache.amazeeio.cloud RUN fix-permissions /home COPY update-push-images.sh /update-push-images.sh +COPY update-images.sh /update-images.sh COPY prune-images.sh /prune-images.sh COPY remove-exited.sh /remove-exited.sh ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["sh", "-c", "sh /usr/local/bin/dind /usr/local/bin/dockerd --host=tcp://0.0.0.0:2375 --host=unix:///var/run/docker.sock --insecure-registry=${REGISTRY} --insecure-registry=172.17.0.1:8084 --bip=${BIP} --storage-driver=overlay2 --storage-opt=overlay2.override_kernel_check=1"] +CMD ["sh", "-c", "sh /usr/local/bin/dind /usr/local/bin/dockerd --host=tcp://0.0.0.0:2375 --host=unix:///var/run/docker.sock --insecure-registry=${REGISTRY} --insecure-registry=harbor-harbor-core.harbor.svc.cluster.local:80 --bip=${BIP} --storage-driver=overlay2 --storage-opt=overlay2.override_kernel_check=1 --registry-mirror=${REGISTRY_MIRROR}"] diff --git a/images/docker-host/update-images.sh b/images/docker-host/update-images.sh new file mode 100755 index 0000000000..0de8fbba86 --- /dev/null +++ b/images/docker-host/update-images.sh @@ -0,0 +1,12 @@ +#!/bin/bash -e +set -x + +if ! docker -H ${DOCKER_HOST} info &> /dev/null; then + echo "could not connect to ${DOCKER_HOST}"; exit 1 +fi + +# Iterates through all images that have the name of the repository we are interested in in it +for FULL_IMAGE in $(docker image ls --format "{{.Repository}}:{{.Tag}}" | grep -E "${REPOSITORY_TO_UPDATE}/" | grep -v none); do + # pull newest version of found image + docker pull ${FULL_IMAGE} | cat +done diff --git a/images/elasticsearch/Dockerfile6 b/images/elasticsearch/Dockerfile6 deleted file mode 100644 index 4ecb16fede..0000000000 --- a/images/elasticsearch/Dockerfile6 +++ /dev/null @@ -1,57 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# Defining Versions - https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docker.html -FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.2 - -LABEL maintainer="amazee.io" -ENV LAGOON=elasticsearch - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -COPY docker-entrypoint.sh.6 /lagoon/entrypoints/90-elasticsearch.sh - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN sed -i 's/discovery.zen.minimum_master_nodes: 1//' config/elasticsearch.yml - -RUN echo $'xpack.security.enabled: false\n\ -\n\ -node.name: "${HOSTNAME}"\n\ -node.master: "${NODE_MASTER}"\n\ -cluster.routing.allocation.disk.threshold_enabled: "true"\n\ -discovery.zen.minimum_master_nodes: "${DISCOVERY_ZEN_MINIMUM_MASTER_NODES}"' >> config/elasticsearch.yml - -RUN fix-permissions config - -ENV ES_JAVA_OPTS="-Xms200m -Xmx200m" \ - DISCOVERY_ZEN_MINIMUM_MASTER_NODES=1 \ - NODE_MASTER=true - -# Copy es-curl wrapper -COPY es-curl /usr/share/elasticsearch/bin/es-curl - -VOLUME [ "/usr/share/elasticsearch/data" ] - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] - -CMD ["/usr/local/bin/docker-entrypoint.sh"] diff --git a/images/elasticsearch/Dockerfile7 b/images/elasticsearch/Dockerfile7 deleted file mode 100644 index 4013e5dbde..0000000000 --- a/images/elasticsearch/Dockerfile7 +++ /dev/null @@ -1,70 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# Defining Versions - https://www.elastic.co/guide/en/elasticsearch/reference/7.6/docker.html -FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.1 - -LABEL maintainer="amazee.io" -ENV LAGOON=elasticsearch - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -COPY docker-entrypoint.sh.7 /lagoon/entrypoints/90-elasticsearch.sh - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN echo $'\n\ -node.name: "${HOSTNAME}"\n\ -node.master: "${NODE_MASTER}"\n\ -node.data: "${NODE_DATA}"\n\ -node.ingest: "${NODE_INGEST}"\n\ -node.ml: "${NODE_ML}"\n\ -xpack.ml.enabled: "${XPACK_ML_ENABLED}"\n\ -xpack.watcher.enabled: "${XPACK_WATCHER_ENABLED}"\n\ -xpack.security.enabled: "${XPACK_SECURITY_ENABLED}"\n\ -processors: "${PROCESSORS}"\n\ -cluster.routing.allocation.disk.threshold_enabled: "true"\n\ -cluster.remote.connect: "${CLUSTER_REMOTE_CONNECT}"' >> config/elasticsearch.yml - -RUN fix-permissions config - -ENV ES_JAVA_OPTS="-Xms400m -Xmx400m" \ - NODE_MASTER=true \ - NODE_DATA=true \ - NODE_INGEST=true \ - NODE_ML=true \ - XPACK_ML_ENABLED=true \ - XPACK_WATCHER_ENABLED=true \ - XPACK_SECURITY_ENABLED=false \ - PROCESSORS=2 \ - CLUSTER_REMOTE_CONNECT=true \ - EXTRA_OPTS="" - -# Copy es-curl wrapper -COPY es-curl /usr/share/elasticsearch/bin/es-curl - - -VOLUME [ "/usr/share/elasticsearch/data" ] - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] - -CMD ["/usr/local/bin/docker-entrypoint.sh"] diff --git a/images/elasticsearch/docker-entrypoint.sh.6 b/images/elasticsearch/docker-entrypoint.sh.6 deleted file mode 100755 index 06acef3331..0000000000 --- a/images/elasticsearch/docker-entrypoint.sh.6 +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -ep /usr/share/elasticsearch/config/elasticsearch.yml - -if [ ! -z "$EXTRA_OPTS" ]; then - echo -e "${EXTRA_OPTS}" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi - -if [ -z "$POD_NAMESPACE" ]; then - # Single container runs in docker - echo "POD_NAMESPACE not set, spin up single node" -else - # Is running in Kubernetes/OpenShift, so find all other pods - # belonging to the namespace - echo "Elasticsearch: Running in Kubernetes, setting up for clustering" - K8S_SVC_NAME=$(hostname -f | cut -d"." -f2) - echo "Using service name: ${K8S_SVC_NAME}" - echo "discovery.zen.ping.unicast.hosts: ${K8S_SVC_NAME}" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi diff --git a/images/elasticsearch/docker-entrypoint.sh.7 b/images/elasticsearch/docker-entrypoint.sh.7 deleted file mode 100755 index 92391dd7df..0000000000 --- a/images/elasticsearch/docker-entrypoint.sh.7 +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -ep /usr/share/elasticsearch/config/elasticsearch.yml - -if [ ! -z "$EXTRA_OPTS" ]; then - echo -e "${EXTRA_OPTS}" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi - -if [ -z "$POD_NAMESPACE" ]; then - # Single container runs in docker - echo "POD_NAMESPACE not set, spin up single node" - sed -i 's/cluster.initial_master_nodes:.*//' /usr/share/elasticsearch/config/elasticsearch.yml - echo "cluster.initial_master_nodes: ${HOSTNAME}" >> /usr/share/elasticsearch/config/elasticsearch.yml -else - # Is running in Kubernetes/OpenShift, so find all other pods - # belonging to the namespace - echo "Elasticsearch: Running in Kubernetes, setting up for clustering" - K8S_SVC_NAME=$(hostname -f | cut -d"." -f2) - echo "Using service name: ${K8S_SVC_NAME}" - sed -i 's/discovery.seed_hosts:.*//' /usr/share/elasticsearch/config/elasticsearch.yml - sed -i 's/cluster.initial_master_nodes:.*//' /usr/share/elasticsearch/config/elasticsearch.yml - echo "discovery.seed_hosts: ${K8S_SVC_NAME}" >> /usr/share/elasticsearch/config/elasticsearch.yml - echo "cluster.initial_master_nodes: ${K8S_SVC_NAME}-0" >> /usr/share/elasticsearch/config/elasticsearch.yml -fi diff --git a/images/elasticsearch/es-curl b/images/elasticsearch/es-curl deleted file mode 100755 index 168b531372..0000000000 --- a/images/elasticsearch/es-curl +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ] || [ -z "$2" ]; then - echo "Usage: es-curl.sh VERB COMMAND" - exit 1 -fi - -VERB=$1 -COMMAND=$2 - -shift -shift - -if [ "$LOGSDB_ADMIN_PASSWORD" ]; then - curl -X $VERB -k -u "admin:$LOGSDB_ADMIN_PASSWORD" "http://localhost:9200/$COMMAND" -H 'Content-Type: application/json' "$@" -else - curl -X $VERB -k "http://localhost:9200/$COMMAND" -H 'Content-Type: application/json' "$@" -fi diff --git a/images/kibana/Dockerfile6 b/images/kibana/Dockerfile6 deleted file mode 100644 index f7f2c63c23..0000000000 --- a/images/kibana/Dockerfile6 +++ /dev/null @@ -1,42 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/kibana/kibana:6.8.2 - -LABEL maintainer="amazee.io" -ENV LAGOON=kibana - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/kibana - -# tells the local development environment on which port we are running -# ENV LAGOON_LOCALDEV_HTTP_PORT=5601 - -ENV NODE_OPTIONS="--max-old-space-size=200" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["/bin/bash", "/usr/local/bin/kibana-docker"] diff --git a/images/kibana/Dockerfile7 b/images/kibana/Dockerfile7 deleted file mode 100644 index 983ca496c2..0000000000 --- a/images/kibana/Dockerfile7 +++ /dev/null @@ -1,42 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/kibana/kibana:7.6.1 - -LABEL maintainer="amazee.io" -ENV LAGOON=kibana - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/kibana - -# tells the local development environment on which port we are running -# ENV LAGOON_LOCALDEV_HTTP_PORT=5601 - -ENV NODE_OPTIONS="--max-old-space-size=200" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["/bin/bash", "/usr/local/bin/kibana-docker"] diff --git a/images/kubectl-build-deploy-dind/Dockerfile b/images/kubectl-build-deploy-dind/Dockerfile index fb0c4da20b..7135f04685 100644 --- a/images/kubectl-build-deploy-dind/Dockerfile +++ b/images/kubectl-build-deploy-dind/Dockerfile @@ -6,7 +6,6 @@ RUN rm -rf /root && ln -s /home /root ENV LAGOON=kubectl-build-deploy-dind RUN mkdir -p /kubectl-build-deploy/git -RUN mkdir -p /kubectl-build-deploy/tug RUN mkdir -p /kubectl-build-deploy/lagoon WORKDIR /kubectl-build-deploy/git @@ -14,11 +13,11 @@ WORKDIR /kubectl-build-deploy/git COPY docker-entrypoint.sh /lagoon/entrypoints/100-docker-entrypoint.sh COPY build-deploy.sh /kubectl-build-deploy/build-deploy.sh COPY build-deploy-docker-compose.sh /kubectl-build-deploy/build-deploy-docker-compose.sh -COPY tug.sh /kubectl-build-deploy/tug.sh -COPY tug /kubectl-build-deploy/tug COPY scripts /kubectl-build-deploy/scripts COPY helmcharts /kubectl-build-deploy/helmcharts +ENV IMAGECACHE_REGISTRY=imagecache.amazeeio.cloud + CMD ["/kubectl-build-deploy/build-deploy.sh"] diff --git a/images/kubectl-build-deploy-dind/build-deploy-docker-compose.sh b/images/kubectl-build-deploy-dind/build-deploy-docker-compose.sh index 9792f967c4..f712854742 100755 --- a/images/kubectl-build-deploy-dind/build-deploy-docker-compose.sh +++ b/images/kubectl-build-deploy-dind/build-deploy-docker-compose.sh @@ -21,6 +21,10 @@ function cronScheduleMoreOftenThan30Minutes() { fi } +function contains() { + [[ $1 =~ (^|[[:space:]])$2($|[[:space:]]) ]] && return 0 || return 1 +} + ############################################## ### PREPARATION ############################################## @@ -72,7 +76,24 @@ if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then LAGOON_SERVICE_TYPES=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_SERVICE_TYPES") | "\(.value)"')) fi if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then - LAGOON_SERVICE_TYPES=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_SERVICE_TYPES") | "\(.value)"')) + TEMP_LAGOON_SERVICE_TYPES=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_SERVICE_TYPES") | "\(.value)"')) + if [ ! -z $TEMP_LAGOON_SERVICE_TYPES ]; then + LAGOON_SERVICE_TYPES=$TEMP_LAGOON_SERVICE_TYPES + fi +fi +# Allow the dbaas environment type to be overridden by the lagoon API +# This accepts colon separated values like so `SERVICE_NAME:DBAAS_ENVIRONMENT_TYPE`, and multiple overrides +# separated by commas +# Example 1: mariadb:production < tells any docker-compose services named mariadb to use the production dbaas environment type +# Example 2: mariadb:production,mariadb-test:development +if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + LAGOON_DBAAS_ENVIRONMENT_TYPES=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_DBAAS_ENVIRONMENT_TYPES") | "\(.value)"')) +fi +if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then + TEMP_LAGOON_DBAAS_ENVIRONMENT_TYPES=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_DBAAS_ENVIRONMENT_TYPES") | "\(.value)"')) + if [ ! -z $TEMP_LAGOON_DBAAS_ENVIRONMENT_TYPES ]; then + LAGOON_DBAAS_ENVIRONMENT_TYPES=$TEMP_LAGOON_DBAAS_ENVIRONMENT_TYPES + fi fi set -x @@ -104,6 +125,11 @@ do done fi + # Previous versions of Lagoon used "python-ckandatapusher", this should be mapped to "python" + if [[ "$SERVICE_TYPE" == "python-ckandatapusher" ]]; then + SERVICE_TYPE="python" + fi + # "mariadb" is a meta service, which allows lagoon to decide itself which of the services to use: # - mariadb-single (a single mariadb pod) # - mariadb-dbaas (use the dbaas shared operator) @@ -112,7 +138,7 @@ do # mariadb-single deployed (probably from the past where there was no mariadb-shared yet, or mariadb-dbaas) and use that one if kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get service "$SERVICE_NAME" &> /dev/null; then SERVICE_TYPE="mariadb-single" - # heck if this cluster supports the default one, if not we assume that this cluster is not capable of shared mariadbs and we use a mariadb-single + # check if this cluster supports the default one, if not we assume that this cluster is not capable of shared mariadbs and we use a mariadb-single # real basic check to see if the mariadbconsumer exists as a kind elif [[ "${CAPABILITIES[@]}" =~ "mariadb.amazee.io/v1/MariaDBConsumer" ]]; then SERVICE_TYPE="mariadb-dbaas" @@ -137,20 +163,103 @@ do DBAAS_ENVIRONMENT=$ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE fi + # If we have a dbaas environment type override in the api, consume it here + if [ ! -z "$LAGOON_DBAAS_ENVIRONMENT_TYPES" ]; then + IFS=',' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPES" + for LAGOON_DBAAS_ENVIRONMENT_TYPE in "${LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT[@]}" + do + IFS=':' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPE" + if [ "${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[0]}" == "$SERVICE_NAME" ]; then + DBAAS_ENVIRONMENT=${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[1]} + fi + done + fi + MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]="${DBAAS_ENVIRONMENT}" fi - if [ "$SERVICE_TYPE" == "mongodb-shared" ]; then - MONGODB_SHARED_CLASS=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.mongo-shared\\.class "${MONGODB_SHARED_DEFAULT_CLASS}") - MONGODB_SHARED_PLAN=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.mongo-shared\\.plan "${ENVIRONMENT_TYPE}") + # "postgres" is a meta service, which allows lagoon to decide itself which of the services to use: + # - postgres-single (a single postgres pod) + # - postgres-dbaas (use the dbaas shared operator) + if [ "$SERVICE_TYPE" == "postgres" ]; then + # if there is already a service existing with the service_name we assume that for this project there has been a + # postgres-single deployed (probably from the past where there was no postgres-shared yet, or postgres-dbaas) and use that one + if kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get service "$SERVICE_NAME" &> /dev/null; then + SERVICE_TYPE="postgres-single" + # heck if this cluster supports the default one, if not we assume that this cluster is not capable of shared PostgreSQL and we use a postgres-single + # real basic check to see if the postgreSQLConsumer exists as a kind + elif [[ "${CAPABILITIES[@]}" =~ "postgres.amazee.io/v1/PostgreSQLConsumer" ]]; then + SERVICE_TYPE="postgres-dbaas" + else + SERVICE_TYPE="postgres-single" + fi + + fi + + # Previous versions of Lagoon supported "postgres-shared", this has been superseeded by "postgres-dbaas" + if [[ "$SERVICE_TYPE" == "postgres-shared" ]]; then + SERVICE_TYPE="postgres-dbaas" + fi + + if [[ "$SERVICE_TYPE" == "postgres-dbaas" ]]; then + # Default plan is the enviroment type + DBAAS_ENVIRONMENT=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.postgres-dbaas\\.environment "${ENVIRONMENT_TYPE}") + + # Allow the dbaas shared servicebroker plan to be overriden by environment in .lagoon.yml + ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.overrides.$SERVICE_NAME.postgres-dbaas\\.environment false) + if [ ! $DBAAS_ENVIRONMENT_OVERRIDE == "false" ]; then + DBAAS_ENVIRONMENT=$ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE + fi + + MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]="${DBAAS_ENVIRONMENT}" + fi - # Check if the defined service broker plan exists - if svcat --scope cluster get plan --class "${MONGODB_SHARED_CLASS}" "${MONGODB_SHARED_PLAN}" > /dev/null; then - MAP_SERVICE_NAME_TO_SERVICEBROKER_PLAN["${SERVICE_NAME}"]="${MONGODB_SHARED_PLAN}" + # "mongo" is a meta service, which allows lagoon to decide itself which of the services to use: + # - mongodb-single (a single mongodb pod) + # - mongodb-dbaas (use the dbaas shared operator) + if [ "$SERVICE_TYPE" == "mongo" ]; then + # if there is already a service existing with the service_name we assume that for this project there has been a + # mongodb-single deployed (probably from the past where there was no mongodb-shared yet, or mongodb-dbaas) and use that one + if kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get service "$SERVICE_NAME" &> /dev/null; then + SERVICE_TYPE="mongodb-single" + # heck if this cluster supports the default one, if not we assume that this cluster is not capable of shared MongoDB and we use a mongodb-single + # real basic check to see if the MongoDBConsumer exists as a kind + elif [[ "${CAPABILITIES[@]}" =~ "mongodb.amazee.io/v1/MongoDBConsumer" ]]; then + SERVICE_TYPE="mongodb-dbaas" else - echo "defined service broker plan '${MONGODB_SHARED_PLAN}' for service '$SERVICE_NAME' and service broker '$MONGODB_SHARED_CLASS' not found in cluster"; - exit 1 + SERVICE_TYPE="mongodb-single" fi + + fi + + # Previous versions of Lagoon supported "mongo-shared", this has been superseeded by "mongodb-dbaas" + if [[ "$SERVICE_TYPE" == "mongo-shared" ]]; then + SERVICE_TYPE="mongodb-dbaas" + fi + + if [[ "$SERVICE_TYPE" == "mongodb-dbaas" ]]; then + # Default plan is the enviroment type + DBAAS_ENVIRONMENT=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.mongodb-dbaas\\.environment "${ENVIRONMENT_TYPE}") + + # Allow the dbaas shared servicebroker plan to be overriden by environment in .lagoon.yml + ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.overrides.$SERVICE_NAME.mongodb-dbaas\\.environment false) + if [ ! $DBAAS_ENVIRONMENT_OVERRIDE == "false" ]; then + DBAAS_ENVIRONMENT=$ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE + fi + + # If we have a dbaas environment type override in the api, consume it here + if [ ! -z "$LAGOON_DBAAS_ENVIRONMENT_TYPES" ]; then + IFS=',' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPES" + for LAGOON_DBAAS_ENVIRONMENT_TYPE in "${LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT[@]}" + do + IFS=':' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPE" + if [ "${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[0]}" == "$SERVICE_NAME" ]; then + DBAAS_ENVIRONMENT=${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[1]} + fi + done + fi + + MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]="${DBAAS_ENVIRONMENT}" fi if [ "$SERVICE_TYPE" == "none" ]; then @@ -167,8 +276,16 @@ do # The ImageName is the same as the Name of the Docker Compose ServiceName IMAGE_NAME=$COMPOSE_SERVICE - # Generate List of Images to build - IMAGES+=("${IMAGE_NAME}") + # Do not handle images for shared services + if [[ "$SERVICE_TYPE" != "mariadb-dbaas" ]] && + [[ "$SERVICE_TYPE" != "mariadb-shared" ]] && + [[ "$SERVICE_TYPE" != "postgres-shared" ]] && + [[ "$SERVICE_TYPE" != "postgres-dbaas" ]] && + [[ "$SERVICE_TYPE" != "mongodb-dbaas" ]] && + [[ "$SERVICE_TYPE" != "mongodb-shared" ]]; then + # Generate List of Images to build + IMAGES+=("${IMAGE_NAME}") + fi # Map Deployment ServiceType to the ImageName MAP_DEPLOYMENT_SERVICETYPE_TO_IMAGENAME["${SERVICE_NAME}:${DEPLOYMENT_SERVICETYPE}"]="${IMAGE_NAME}" @@ -196,8 +313,8 @@ done ### BUILD IMAGES ############################################## -# we only need to build images for pullrequests and branches, but not during a TUG build -if [[ ( "$BUILD_TYPE" == "pullrequest" || "$BUILD_TYPE" == "branch" ) && ! $THIS_IS_TUG == "true" ]]; then +# we only need to build images for pullrequests and branches +if [[ "$BUILD_TYPE" == "pullrequest" || "$BUILD_TYPE" == "branch" ]]; then BUILD_ARGS=() @@ -240,6 +357,7 @@ if [[ ( "$BUILD_TYPE" == "pullrequest" || "$BUILD_TYPE" == "branch" ) && ! $TH BUILD_ARGS+=(--build-arg IMAGE_REPO="${CI_OVERRIDE_IMAGE_REPO}") BUILD_ARGS+=(--build-arg LAGOON_PROJECT="${PROJECT}") BUILD_ARGS+=(--build-arg LAGOON_ENVIRONMENT="${ENVIRONMENT}") + BUILD_ARGS+=(--build-arg LAGOON_ENVIRONMENT_TYPE="${ENVIRONMENT_TYPE}") BUILD_ARGS+=(--build-arg LAGOON_BUILD_TYPE="${BUILD_TYPE}") BUILD_ARGS+=(--build-arg LAGOON_GIT_SOURCE_REPOSITORY="${SOURCE_REPOSITORY}") @@ -253,6 +371,7 @@ if [[ ( "$BUILD_TYPE" == "pullrequest" || "$BUILD_TYPE" == "branch" ) && ! $TH fi if [ "$BUILD_TYPE" == "pullrequest" ]; then + BUILD_ARGS+=(--build-arg LAGOON_GIT_SHA="${LAGOON_GIT_SHA}") BUILD_ARGS+=(--build-arg LAGOON_PR_HEAD_BRANCH="${PR_HEAD_BRANCH}") BUILD_ARGS+=(--build-arg LAGOON_PR_HEAD_SHA="${PR_HEAD_SHA}") BUILD_ARGS+=(--build-arg LAGOON_PR_BASE_BRANCH="${PR_BASE_BRANCH}") @@ -294,6 +413,12 @@ if [[ ( "$BUILD_TYPE" == "pullrequest" || "$BUILD_TYPE" == "branch" ) && ! $TH PULL_IMAGE=$(echo "${OVERRIDE_IMAGE}" | envsubst) fi + # if the image just is an image name (like "alpine") we prefix it with `libary/` as the imagecache does not understand + # the magic `alpine` images + if [[ ! "$PULL_IMAGE" =~ "/" ]]; then + PULL_IMAGE="library/$PULL_IMAGE" + fi + # Add the images we should pull to the IMAGES_PULL array, they will later be tagged from dockerhub IMAGES_PULL["${IMAGE_NAME}"]="${PULL_IMAGE}" @@ -332,18 +457,6 @@ if [[ ( "$BUILD_TYPE" == "pullrequest" || "$BUILD_TYPE" == "branch" ) && ! $TH fi -# if $DEPLOY_TYPE is tug we just push the images to the defined docker registry and create a clone -# of ourselves and push it into `lagoon-tug` image which is then executed in the destination openshift -# If though this is the actual tug deployment in the destination openshift, we don't run this -if [[ $DEPLOY_TYPE == "tug" && ! $THIS_IS_TUG == "true" ]]; then -echo "TODO: lagoon-tug is not implemented yet in kubernetes" -exit 1 - . /kubectl-build-deploy/tug/tug-build-push.sh - - # exit here, we are done - exit -fi - ############################################## ### RUN PRE-ROLLOUT tasks defined in .lagoon.yml ############################################## @@ -393,14 +506,14 @@ else ROUTES_AUTOGENERATE_INSECURE=$(cat .lagoon.yml | shyaml get-value routes.autogenerate.insecure Allow) fi -ROUTES_AUTOGENERATE_ENABLED=$(cat .lagoon.yml | shyaml get-value routes.autogenerate.enabled true) -ROUTES_AUTOGENERATE_ALLOW_PRS=$(cat .lagoon.yml | shyaml get-value routes.autogenerate.allowPullrequests $ROUTES_AUTOGENERATE_ENABLED) +ROUTES_AUTOGENERATE_ENABLED=$(set -o pipefail; cat .lagoon.yml | shyaml get-value routes.autogenerate.enabled true | tr '[:upper:]' '[:lower:]') +ROUTES_AUTOGENERATE_ALLOW_PRS=$(set -o pipefail; cat .lagoon.yml | shyaml get-value routes.autogenerate.allowPullrequests $ROUTES_AUTOGENERATE_ENABLED | tr '[:upper:]' '[:lower:]') if [[ "$TYPE" == "pullrequest" && "$ROUTES_AUTOGENERATE_ALLOW_PRS" == "true" ]]; then ROUTES_AUTOGENERATE_ENABLED=true fi ## fail silently if the key autogenerateRoutes doesn't exist and default to whatever ROUTES_AUTOGENERATE_ENABLED is set to -ROUTES_AUTOGENERATE_BRANCH=$(cat .lagoon.yml | shyaml -q get-value environments.${BRANCH//./\\.}.autogenerateRoutes $ROUTES_AUTOGENERATE_ENABLED) -if [ "$ROUTES_AUTOGENERATE_BRANCH" =~ [Tt]rue ]; then +ROUTES_AUTOGENERATE_BRANCH=$(set -o pipefail; cat .lagoon.yml | shyaml -q get-value environments.${BRANCH//./\\.}.autogenerateRoutes $ROUTES_AUTOGENERATE_ENABLED | tr '[:upper:]' '[:lower:]') +if [[ "$ROUTES_AUTOGENERATE_BRANCH" == "true" ]]; then ROUTES_AUTOGENERATE_ENABLED=true fi @@ -417,6 +530,7 @@ yq write -i -- /kubectl-build-deploy/values.yaml 'buildType' $BUILD_TYPE yq write -i -- /kubectl-build-deploy/values.yaml 'routesAutogenerateInsecure' $ROUTES_AUTOGENERATE_INSECURE yq write -i -- /kubectl-build-deploy/values.yaml 'routesAutogenerateEnabled' $ROUTES_AUTOGENERATE_ENABLED yq write -i -- /kubectl-build-deploy/values.yaml 'routesAutogenerateSuffix' $ROUTER_URL +yq write -i -- /kubectl-build-deploy/values.yaml 'routesAutogenerateShortSuffix' $SHORT_ROUTER_URL for i in $ROUTES_AUTOGENERATE_PREFIXES; do yq write -i -- /kubectl-build-deploy/values.yaml 'routesAutogeneratePrefixes[+]' $i; done yq write -i -- /kubectl-build-deploy/values.yaml 'kubernetes' $KUBERNETES yq write -i -- /kubectl-build-deploy/values.yaml 'lagoonVersion' $LAGOON_VERSION @@ -488,20 +602,21 @@ do helm template ${SERVICE_NAME} /kubectl-build-deploy/helmcharts/${SERVICE_TYPE} -s $HELM_SERVICE_TEMPLATE -f /kubectl-build-deploy/values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${SERVICE_NAME}.yaml fi - HELM_INGRESS_TEMPLATE="templates/ingress.yaml" - if [ -f /kubectl-build-deploy/helmcharts/${SERVICE_TYPE}/$HELM_INGRESS_TEMPLATE ]; then + if [ $ROUTES_AUTOGENERATE_ENABLED == "true" ]; then + HELM_INGRESS_TEMPLATE="templates/ingress.yaml" + if [ -f /kubectl-build-deploy/helmcharts/${SERVICE_TYPE}/$HELM_INGRESS_TEMPLATE ]; then - # The very first generated route is set as MAIN_GENERATED_ROUTE - if [ -z "${MAIN_GENERATED_ROUTE+x}" ]; then - MAIN_GENERATED_ROUTE=$SERVICE_NAME - fi + # The very first generated route is set as MAIN_GENERATED_ROUTE + if [ -z "${MAIN_GENERATED_ROUTE+x}" ]; then + MAIN_GENERATED_ROUTE=$SERVICE_NAME + fi - helm template ${SERVICE_NAME} /kubectl-build-deploy/helmcharts/${SERVICE_TYPE} -s $HELM_INGRESS_TEMPLATE -f /kubectl-build-deploy/values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${SERVICE_NAME}.yaml + helm template ${SERVICE_NAME} /kubectl-build-deploy/helmcharts/${SERVICE_TYPE} -s $HELM_INGRESS_TEMPLATE -f /kubectl-build-deploy/values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${SERVICE_NAME}.yaml + fi fi HELM_DBAAS_TEMPLATE="templates/dbaas.yaml" if [ -f /kubectl-build-deploy/helmcharts/${SERVICE_TYPE}/$HELM_DBAAS_TEMPLATE ]; then - # cat $KUBERNETES_SERVICES_TEMPLATE # Load the requested class and plan for this service DBAAS_ENVIRONMENT="${MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]}" yq write -i -- /kubectl-build-deploy/${SERVICE_NAME}-values.yaml 'environment' $DBAAS_ENVIRONMENT @@ -513,6 +628,132 @@ done TEMPLATE_PARAMETERS=() + +############################################## +### CUSTOM FASTLY API SECRETS .lagoon.yml +############################################## + +# if a customer is using their own fastly configuration, then they can define their api token and platform tls configuration ID in the .lagoon.yml file +# this will get created as a `kind: Secret` in kubernetes so that created ingresses will be able to use this secret to talk to the fastly api. +# +# in this example, the customer needs to add a build envvar called `FASTLY_API_TOKEN` and then populates the .lagoon.yml file with something like this +# +# fastly: +# api-secrets: +# - name: customer +# apiTokenVariableName: FASTLY_API_TOKEN +# platformTLSConfiguration: A1bcEdFgH12eD242Sds +# +# then the build process will attempt to check the lagoon variables for one called `FASTLY_API_TOKEN` and will use the value of this variable when creating the +# `kind: Secret` in kubernetes +# +# support for multiple api-secrets is possible in the instance that a customer uses 2 separate services in different accounts in the one project + + +## any fastly api secrets will be prefixed with this, so that we always add this to whatever the customer provides +FASTLY_API_SECRET_PREFIX="fastly-api-" + +FASTLY_API_SECRETS_COUNTER=0 +FASTLY_API_SECRETS=() +if [ -n "$(cat .lagoon.yml | shyaml keys fastly.api-secrets.$FASTLY_API_SECRETS_COUNTER 2> /dev/null)" ]; then + while [ -n "$(cat .lagoon.yml | shyaml get-value fastly.api-secrets.$FASTLY_API_SECRETS_COUNTER 2> /dev/null)" ]; do + FASTLY_API_SECRET_NAME=$FASTLY_API_SECRET_PREFIX$(cat .lagoon.yml | shyaml get-value fastly.api-secrets.$FASTLY_API_SECRETS_COUNTER.name 2> /dev/null) + if [ -z "$FASTLY_API_SECRET_NAME" ]; then + echo -e "A fastly api secret was defined in the .lagoon.yml file, but no name could be found the .lagoon.yml\n\nPlease check if the name has been set correctly." + exit 1 + fi + FASTLY_API_TOKEN_VALUE=$(cat .lagoon.yml | shyaml get-value fastly.api-secrets.$FASTLY_API_SECRETS_COUNTER.apiTokenVariableName false) + if [[ $FASTLY_API_TOKEN_VALUE == "false" ]]; then + echo "No 'apiTokenVariableName' defined for fastly secret $FASTLY_API_SECRET_NAME"; exit 1; + fi + # if we have everything we need, we can proceed to logging in + if [ $FASTLY_API_TOKEN_VALUE != "false" ]; then + FASTLY_API_TOKEN="" + # check if we have a password defined anywhere in the api first + if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + FASTLY_API_TOKEN=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.scope == "build" and .name == "'$FASTLY_API_TOKEN_VALUE'") | "\(.value)"')) + fi + if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then + TEMP_FASTLY_API_TOKEN=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.scope == "build" and .name == "'$FASTLY_API_TOKEN_VALUE'") | "\(.value)"')) + if [ ! -z "$TEMP_FASTLY_API_TOKEN" ]; then + FASTLY_API_TOKEN=$TEMP_FASTLY_API_TOKEN + fi + fi + if [ -z "$FASTLY_API_TOKEN" ]; then + echo -e "A fastly api secret was defined in the .lagoon.yml file, but no token could be found in the Lagoon API matching the variable name provided\n\nPlease check if the token has been set correctly." + exit 1 + fi + fi + FASTLY_API_PLATFORMTLS_CONFIGURATION=$(cat .lagoon.yml | shyaml get-value fastly.api-secrets.$FASTLY_API_SECRETS_COUNTER.platformTLSConfiguration "") + if [ -z "$FASTLY_API_PLATFORMTLS_CONFIGURATION" ]; then + echo -e "A fastly api secret was defined in the .lagoon.yml file, but no platform tls configuration id could be found in the .lagoon.yml\n\nPlease check if the platform tls configuration id has been set correctly." + exit 1 + fi + + # run the script to create the secrets + . /kubectl-build-deploy/scripts/exec-fastly-api-secrets.sh + + let FASTLY_API_SECRETS_COUNTER=FASTLY_API_SECRETS_COUNTER+1 + done +fi + +# FASTLY API SECRETS FROM LAGOON API VARIABLE +# Allow for defining fastly api secrets using lagoon api variables +# This accepts colon separated values like so `SECRET_NAME:FASTLY_API_TOKEN:FASTLY_PLATFORMTLS_CONFIGURATION_ID`, and multiple overrides +# separated by commas +# Example 1: examplecom:x1s8asfafasf7ssf:fa23rsdgsdgas +# ^^^ will create a kubernetes secret called `$FASTLY_API_SECRET_PREFIX-examplecom` with 2 data fields (one for api token, the other for platform tls id) +# populated with `x1s8asfafasf7ssf` and `fa23rsdgsdgas` for whichever field it should be +# and the name will get created with the prefix defined in `FASTLY_API_SECRET_PREFIX` +# Example 2: examplecom:x1s8asfafasf7ssf:fa23rsdgsdgas,example2com:fa23rsdgsdgas:x1s8asfafasf7ssf,example3com:fa23rsdgsdgas:x1s8asfafasf7ssf:example3com +if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + LAGOON_FASTLY_API_SECRETS=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_FASTLY_API_SECRETS") | "\(.value)"')) +fi +if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then + TEMP_LAGOON_FASTLY_API_SECRETS=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_FASTLY_API_SECRETS") | "\(.value)"')) + if [ ! -z $TEMP_LAGOON_FASTLY_API_SECRETS ]; then + LAGOON_FASTLY_API_SECRETS=$TEMP_LAGOON_FASTLY_API_SECRETS + fi +fi +if [ ! -z "$LAGOON_FASTLY_API_SECRETS" ]; then + IFS=',' read -ra LAGOON_FASTLY_API_SECRETS_SPLIT <<< "$LAGOON_FASTLY_API_SECRETS" + for LAGOON_FASTLY_API_SECRETS_DATA in "${LAGOON_FASTLY_API_SECRETS_SPLIT[@]}" + do + IFS=':' read -ra LAGOON_FASTLY_API_SECRET_SPLIT <<< "$LAGOON_FASTLY_API_SECRETS_DATA" + if [ -z "${LAGOON_FASTLY_API_SECRET_SPLIT[0]}" ] || [ -z "${LAGOON_FASTLY_API_SECRET_SPLIT[1]}" ] || [ -z "${LAGOON_FASTLY_API_SECRET_SPLIT[2]}" ]; then + echo -e "An override was defined in the lagoon API with LAGOON_FASTLY_API_SECRETS but was not structured correctly, the format should be NAME:FASTLY_API_TOKEN:FASTLY_PLATFORMTLS_CONFIGURATION_ID and comma separated for multiples" + exit 1 + fi + # the fastly api secret name will be created with the prefix that is defined above + FASTLY_API_SECRET_NAME=$FASTLY_API_SECRET_PREFIX${LAGOON_FASTLY_API_SECRET_SPLIT[0]} + FASTLY_API_TOKEN=${LAGOON_FASTLY_API_SECRET_SPLIT[1]} + FASTLY_API_PLATFORMTLS_CONFIGURATION=${LAGOON_FASTLY_API_SECRET_SPLIT[2]} + # run the script to create the secrets + . /kubectl-build-deploy/scripts/exec-fastly-api-secrets.sh + done +fi + +# FASTLY SERVICE ID PER INGRESS OVERRIDE FROM LAGOON API VARIABLE +# Allow the fastly serviceid for specific ingress to be overridden by the lagoon API +# This accepts colon separated values like so `INGRESS_DOMAIN:FASTLY_SERVICE_ID:WATCH_STATUS:SECRET_NAME(OPTIONAL)`, and multiple overrides +# separated by commas +# Example 1: www.example.com:x1s8asfafasf7ssf:true +# ^^^ tells the ingress creation to use the service id x1s8asfafasf7ssf for ingress www.example.com, with the watch status of true +# Example 2: www.example.com:x1s8asfafasf7ssf:true,www.not-example.com:fa23rsdgsdgas:false +# ^^^ same as above, but also tells the ingress creation to use the service id fa23rsdgsdgas for ingress www.not-example.com, with the watch status of false +# Example 3: www.example.com:x1s8asfafasf7ssf:true:examplecom +# ^^^ tells the ingress creation to use the service id x1s8asfafasf7ssf for ingress www.example.com, with the watch status of true +# but it will also be annotated to be told to use the secret named `examplecom` that could be defined elsewhere +if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + LAGOON_FASTLY_SERVICE_IDS=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_FASTLY_SERVICE_IDS") | "\(.value)"')) +fi +if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then + TEMP_LAGOON_FASTLY_SERVICE_IDS=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_FASTLY_SERVICE_IDS") | "\(.value)"')) + if [ ! -z $TEMP_LAGOON_FASTLY_SERVICE_IDS ]; then + LAGOON_FASTLY_SERVICE_IDS=$TEMP_LAGOON_FASTLY_SERVICE_IDS + fi +fi + ############################################## ### CUSTOM ROUTES FROM .lagoon.yml ############################################## @@ -533,10 +774,22 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) + MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") + ROUTE_ANNOTATIONS=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.annotations {}) + # get the fastly configuration values from .lagoon.yml + if cat .lagoon.yml | shyaml keys production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly &> /dev/null; then + ROUTE_FASTLY_SERVICE_ID=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.service-id "") + ROUTE_FASTLY_SERVICE_API_SECRET=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.api-secret-name "") + ROUTE_FASTLY_SERVICE_WATCH=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.watch false | tr '[:upper:]' '[:lower:]') + else + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi else # Only a value given, assuming some defaults ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) @@ -544,21 +797,66 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then ROUTE_MIGRATE=true ROUTE_INSECURE=Redirect ROUTE_HSTS=null + MONITORING_PATH="/" + ROUTE_ANNOTATIONS="{}" + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi + + # work out if there are any lagoon api variable overrides for the annotations that are being added + . /kubectl-build-deploy/scripts/exec-fastly-annotations.sh + # if we get any other populated service id overrides in any of the steps in exec-fastly-annotations.sh + # make it available to the ingress creation here by overriding what may be defined in the lagoon.yml + if [ ! -z "$LAGOON_FASTLY_SERVICE_ID" ]; then + ROUTE_FASTLY_SERVICE_ID=$LAGOON_FASTLY_SERVICE_ID + ROUTE_FASTLY_SERVICE_WATCH=$LAGOON_FASTLY_SERVICE_WATCH + if [ ! -z $LAGOON_FASTLY_SERVICE_API_SECRET ]; then + ROUTE_FASTLY_SERVICE_API_SECRET=$LAGOON_FASTLY_SERVICE_API_SECRET + fi + fi + + FASTLY_ARGS=() + if [ ! -z "$ROUTE_FASTLY_SERVICE_ID" ]; then + FASTLY_ARGS+=(--set fastly.serviceId=${ROUTE_FASTLY_SERVICE_ID}) + if [ ! -z "$ROUTE_FASTLY_SERVICE_API_SECRET" ]; then + if contains $FASTLY_API_SECRETS "${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}"; then + FASTLY_ARGS+=(--set fastly.apiSecretName=${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}) + else + echo "$ROUTE_FASTLY_SERVICE_API_SECRET requested, but not found in .lagoon.yml file"; exit 1; + fi + fi fi touch /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml echo "$ROUTE_ANNOTATIONS" | yq p - annotations > /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml + # ${ROUTE_DOMAIN} is used as a helm release name which be max 53 characters long. + # So we need some logic to make sure it's always max 53 characters + if [[ ${#ROUTE_DOMAIN} -gt 53 ]] ; then + # Trim the route domain to 47 characters, and add an 5 character hash of the domain at the end + # this gives a total of 53 characters + INGRESS_NAME=${ROUTE_DOMAIN:0:47}-$(echo ${ROUTE_DOMAIN} | md5sum | cut -f 1 -d " " | cut -c 1-5) + else + INGRESS_NAME=${ROUTE_DOMAIN} + fi + # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then - MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + MAIN_CUSTOM_ROUTE=$INGRESS_NAME + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE cat /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml - helm template ${ROUTE_DOMAIN} \ + helm template ${INGRESS_NAME} \ /kubectl-build-deploy/helmcharts/custom-ingress \ --set host="${ROUTE_DOMAIN}" \ --set service="${ROUTE_SERVICE}" \ @@ -566,8 +864,15 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then --set insecure="${ROUTE_INSECURE}" \ --set hsts="${ROUTE_HSTS}" \ --set routeMigrate="${ROUTE_MIGRATE}" \ + --set ingressmonitorcontroller.enabled="${MONITORING_ENABLED}" \ + --set ingressmonitorcontroller.path="${MONITORING_PATH}" \ + --set ingressmonitorcontroller.alertContacts="${MONITORING_ALERTCONTACT}" \ + --set ingressmonitorcontroller.statuspageId="${MONITORING_STATUSPAGEID}" \ + "${FASTLY_ARGS[@]}" --set fastly.watch="${ROUTE_FASTLY_SERVICE_WATCH}" \ -f /kubectl-build-deploy/values.yaml -f /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${ROUTE_DOMAIN}.yaml + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -587,10 +892,22 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) + MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") + ROUTE_ANNOTATIONS=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.annotations {}) + # get the fastly configuration values from .lagoon.yml + if cat .lagoon.yml | shyaml keys production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly &> /dev/null; then + ROUTE_FASTLY_SERVICE_ID=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.service-id "") + ROUTE_FASTLY_SERVICE_API_SECRET=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.api-secret-name "") + ROUTE_FASTLY_SERVICE_WATCH=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.watch false | tr '[:upper:]' '[:lower:]') + else + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi else # Only a value given, assuming some defaults ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) @@ -598,21 +915,68 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then ROUTE_MIGRATE=true ROUTE_INSECURE=Redirect ROUTE_HSTS=null + MONITORING_PATH="/" + ROUTE_ANNOTATIONS="{}" + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi + + # work out if there are any lagoon api variable overrides for the annotations that are being added + . /kubectl-build-deploy/scripts/exec-fastly-annotations.sh + # if we get any other populated service id overrides in any of the steps in exec-fastly-annotations.sh + # make it available to the ingress creation here by overriding what may be defined in the lagoon.yml + if [ ! -z "$LAGOON_FASTLY_SERVICE_ID" ]; then + ROUTE_FASTLY_SERVICE_ID=$LAGOON_FASTLY_SERVICE_ID + ROUTE_FASTLY_SERVICE_WATCH=$LAGOON_FASTLY_SERVICE_WATCH + if [ ! -z $LAGOON_FASTLY_SERVICE_API_SECRET ]; then + ROUTE_FASTLY_SERVICE_API_SECRET=$LAGOON_FASTLY_SERVICE_API_SECRET + fi + fi + + # Create the fastly values required + FASTLY_ARGS=() + if [ ! -z "$ROUTE_FASTLY_SERVICE_ID" ]; then + FASTLY_ARGS+=(--set fastly.serviceId=${ROUTE_FASTLY_SERVICE_ID}) + if [ ! -z "$ROUTE_FASTLY_SERVICE_API_SECRET" ]; then + if contains $FASTLY_API_SECRETS "${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}"; then + FASTLY_ARGS+=(--set fastly.apiSecretName=${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}) + else + echo "$ROUTE_FASTLY_SERVICE_API_SECRET requested, but not found in .lagoon.yml file"; exit 1; + fi + fi + ROUTE_FASTLY_SERVICE_WATCH=true fi touch /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml echo "$ROUTE_ANNOTATIONS" | yq p - annotations > /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml + # ${ROUTE_DOMAIN} is used as a helm release name which be max 53 characters long. + # So we need some logic to make sure it's always max 53 characters + if [[ ${#ROUTE_DOMAIN} -gt 53 ]] ; then + # Trim the route domain to 47 characters, and add an 5 character hash of the domain at the end + # this gives a total of 53 characters + INGRESS_NAME=${ROUTE_DOMAIN:0:47}-$(echo ${ROUTE_DOMAIN} | md5sum | cut -f 1 -d " " | cut -c 1-5) + else + INGRESS_NAME=${ROUTE_DOMAIN} + fi + # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then - MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + MAIN_CUSTOM_ROUTE=$INGRESS_NAME + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE cat /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml - helm template ${ROUTE_DOMAIN} \ + helm template ${INGRESS_NAME} \ /kubectl-build-deploy/helmcharts/custom-ingress \ --set host="${ROUTE_DOMAIN}" \ --set service="${ROUTE_SERVICE}" \ @@ -620,8 +984,15 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then --set insecure="${ROUTE_INSECURE}" \ --set hsts="${ROUTE_HSTS}" \ --set routeMigrate="${ROUTE_MIGRATE}" \ + --set ingressmonitorcontroller.enabled="${MONITORING_ENABLED}" \ + --set ingressmonitorcontroller.path="${MONITORING_PATH}" \ + --set ingressmonitorcontroller.alertContacts="${MONITORING_ALERTCONTACT}" \ + --set ingressmonitorcontroller.statuspageId="${MONITORING_STATUSPAGEID}" \ + "${FASTLY_ARGS[@]}" --set fastly.watch="${ROUTE_FASTLY_SERVICE_WATCH}" \ -f /kubectl-build-deploy/values.yaml -f /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${ROUTE_DOMAIN}.yaml + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -631,13 +1002,7 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then fi fi -# set some monitoring defaults -if [ "${ENVIRONMENT_TYPE}" == "production" ]; then - MONITORING_ENABLED="true" -else - MONITORING_ENABLED="false" - -fi +MONITORING_ENABLED="false" # monitoring is by default disabled, it will be enabled for the first route again # Two while loops as we have multiple services that want routes and each service has multiple routes ROUTES_SERVICE_COUNTER=0 @@ -652,12 +1017,22 @@ if [ -n "$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\. ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") ROUTE_ANNOTATIONS=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.annotations {}) + # get the fastly configuration values from .lagoon.yml + if cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly &> /dev/null; then + ROUTE_FASTLY_SERVICE_ID=$(cat .lagoon.yml | shyaml ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.service-id "") + ROUTE_FASTLY_SERVICE_API_SECRET=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.api-secret-name "") + ROUTE_FASTLY_SERVICE_WATCH=$(set -o pipefail; cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.watch false | tr '[:upper:]' '[:lower:]') + else + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi else # Only a value given, assuming some defaults ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) @@ -665,7 +1040,47 @@ if [ -n "$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\. ROUTE_MIGRATE=false ROUTE_INSECURE=Redirect ROUTE_HSTS=null + MONITORING_PATH="/" ROUTE_ANNOTATIONS="{}" + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi + + # work out if there are any lagoon api variable overrides for the annotations that are being added + . /kubectl-build-deploy/scripts/exec-fastly-annotations.sh + # if we get any other populated service id overrides in any of the steps in exec-fastly-annotations.sh + # make it available to the ingress creation here by overriding what may be defined in the lagoon.yml + if [ ! -z "$LAGOON_FASTLY_SERVICE_ID" ]; then + ROUTE_FASTLY_SERVICE_ID=$LAGOON_FASTLY_SERVICE_ID + ROUTE_FASTLY_SERVICE_WATCH=$LAGOON_FASTLY_SERVICE_WATCH + if [ ! -z $LAGOON_FASTLY_SERVICE_API_SECRET ]; then + ROUTE_FASTLY_SERVICE_API_SECRET=$LAGOON_FASTLY_SERVICE_API_SECRET + fi + fi + + # Create the fastly values required + FASTLY_ARGS=() + if [ ! -z "$ROUTE_FASTLY_SERVICE_ID" ]; then + FASTLY_ARGS+=(--set fastly.serviceId=${ROUTE_FASTLY_SERVICE_ID}) + if [ ! -z "$ROUTE_FASTLY_SERVICE_API_SECRET" ]; then + if contains $FASTLY_API_SECRETS "${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}"; then + FASTLY_ARGS+=(--set fastly.apiSecretName=${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}) + else + echo "$ROUTE_FASTLY_SERVICE_API_SECRET requested, but not found in .lagoon.yml file"; exit 1; + fi + fi + ROUTE_FASTLY_SERVICE_WATCH=true + fi + + # ${ROUTE_DOMAIN} is used as a helm release name which be max 53 characters long. + # So we need some logic to make sure it's always max 53 characters + if [[ ${#ROUTE_DOMAIN} -gt 53 ]] ; then + # Trim the route domain to 47 characters, and add an 5 character hash of the domain at the end + # this gives a total of 53 characters + INGRESS_NAME=${ROUTE_DOMAIN:0:47}-$(echo ${ROUTE_DOMAIN} | md5sum | cut -f 1 -d " " | cut -c 1-5) + else + INGRESS_NAME=${ROUTE_DOMAIN} fi touch /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml @@ -673,14 +1088,20 @@ if [ -n "$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\. # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then - MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + MAIN_CUSTOM_ROUTE=$INGRESS_NAME + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE cat /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml - helm template ${ROUTE_DOMAIN} \ + helm template ${INGRESS_NAME} \ /kubectl-build-deploy/helmcharts/custom-ingress \ --set host="${ROUTE_DOMAIN}" \ --set service="${ROUTE_SERVICE}" \ @@ -692,8 +1113,11 @@ if [ -n "$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\. --set ingressmonitorcontroller.path="${MONITORING_PATH}" \ --set ingressmonitorcontroller.alertContacts="${MONITORING_ALERTCONTACT}" \ --set ingressmonitorcontroller.statuspageId="${MONITORING_STATUSPAGEID}" \ + "${FASTLY_ARGS[@]}" --set fastly.watch="${ROUTE_FASTLY_SERVICE_WATCH}" \ -f /kubectl-build-deploy/values.yaml -f /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${ROUTE_DOMAIN}.yaml + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -710,12 +1134,22 @@ else ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") ROUTE_ANNOTATIONS=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.annotations {}) + # get the fastly configuration values from .lagoon.yml + if cat .lagoon.yml | shyaml keys environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly &> /dev/null; then + ROUTE_FASTLY_SERVICE_ID=$(cat .lagoon.yml | shyaml environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.service-id "") + ROUTE_FASTLY_SERVICE_API_SECRET=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.api-secret-name "") + ROUTE_FASTLY_SERVICE_WATCH=$(set -o pipefail; cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.fastly.watch false | tr '[:upper:]' '[:lower:]') + else + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi else # Only a value given, assuming some defaults ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) @@ -723,22 +1157,68 @@ else ROUTE_MIGRATE=false ROUTE_INSECURE=Redirect ROUTE_HSTS=null + MONITORING_PATH="/" ROUTE_ANNOTATIONS="{}" + ROUTE_FASTLY_SERVICE_ID="" + ROUTE_FASTLY_SERVICE_API_SECRET="" + ROUTE_FASTLY_SERVICE_WATCH=false + fi + + # work out if there are any lagoon api variable overrides for the annotations that are being added + . /kubectl-build-deploy/scripts/exec-fastly-annotations.sh + # if we get any other populated service id overrides in any of the steps in exec-fastly-annotations.sh + # make it available to the ingress creation here by overriding what may be defined in the lagoon.yml + if [ ! -z "$LAGOON_FASTLY_SERVICE_ID" ]; then + ROUTE_FASTLY_SERVICE_ID=$LAGOON_FASTLY_SERVICE_ID + ROUTE_FASTLY_SERVICE_WATCH=$LAGOON_FASTLY_SERVICE_WATCH + if [ ! -z $LAGOON_FASTLY_SERVICE_API_SECRET ]; then + ROUTE_FASTLY_SERVICE_API_SECRET=$LAGOON_FASTLY_SERVICE_API_SECRET + fi + fi + + # Create the fastly values required + FASTLY_ARGS=() + if [ ! -z "$ROUTE_FASTLY_SERVICE_ID" ]; then + FASTLY_ARGS+=(--set fastly.serviceId=${ROUTE_FASTLY_SERVICE_ID}) + if [ ! -z "$ROUTE_FASTLY_SERVICE_API_SECRET" ]; then + if contains $FASTLY_API_SECRETS "${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}"; then + FASTLY_ARGS+=(--set fastly.apiSecretName=${FASTLY_API_SECRET_PREFIX}${ROUTE_FASTLY_SERVICE_API_SECRET}) + else + echo "$ROUTE_FASTLY_SERVICE_API_SECRET requested, but not found in .lagoon.yml file"; exit 1; + fi + fi + ROUTE_FASTLY_SERVICE_WATCH=true fi touch /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml echo "$ROUTE_ANNOTATIONS" | yq p - annotations > /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml + # ${ROUTE_DOMAIN} is used as a helm release name which be max 53 characters long. + # So we need some logic to make sure it's always max 53 characters + if [[ ${#ROUTE_DOMAIN} -gt 53 ]] ; then + # Trim the route domain to 47 characters, and add an 5 character hash of the domain at the end + # this gives a total of 53 characters + INGRESS_NAME=${ROUTE_DOMAIN:0:47}-$(echo ${ROUTE_DOMAIN} | md5sum | cut -f 1 -d " " | cut -c 1-5) + else + INGRESS_NAME=${ROUTE_DOMAIN} + fi + # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then - MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + MAIN_CUSTOM_ROUTE=$INGRESS_NAME + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE cat /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml - helm template ${ROUTE_DOMAIN} \ + helm template ${INGRESS_NAME} \ /kubectl-build-deploy/helmcharts/custom-ingress \ --set host="${ROUTE_DOMAIN}" \ --set service="${ROUTE_SERVICE}" \ @@ -750,8 +1230,11 @@ else --set ingressmonitorcontroller.path="${MONITORING_PATH}" \ --set ingressmonitorcontroller.alertContacts="${MONITORING_ALERTCONTACT}" \ --set ingressmonitorcontroller.statuspageId="${MONITORING_STATUSPAGEID}" \ + "${FASTLY_ARGS[@]}" --set fastly.watch="${ROUTE_FASTLY_SERVICE_WATCH}" \ -f /kubectl-build-deploy/values.yaml -f /kubectl-build-deploy/${ROUTE_DOMAIN}-values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${ROUTE_DOMAIN}.yaml + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -771,24 +1254,65 @@ if [[ "${CAPABILITIES[@]}" =~ "backup.appuio.ch/v1alpha1/Schedule" ]]; then TEMPLATE_PARAMETERS=() + # Check for custom baas bucket name + if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + BAAS_BUCKET_NAME=$(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_BAAS_BUCKET_NAME") | "\(.value)"') + fi + if [ -z $BAAS_BUCKET_NAME ]; then + BAAS_BUCKET_NAME=baas-${PROJECT} + fi + + # Pull in .lagoon.yml variables + PRODUCTION_MONTHLY_BACKUP_RETENTION=$(cat .lagoon.yml | shyaml get-value backup-retention.production.monthly "") + PRODUCTION_WEEKLY_BACKUP_RETENTION=$(cat .lagoon.yml | shyaml get-value backup-retention.production.weekly "") + PRODUCTION_DAILY_BACKUP_RETENTION=$(cat .lagoon.yml | shyaml get-value backup-retention.production.daily "") + + # Set template parameters for retention values (prefer .lagoon.yml values over supplied defaults after ensuring they are valid integers via "-eq" comparison) + if [ ! -z $PRODUCTION_MONTHLY_BACKUP_RETENTION ] && [ "$PRODUCTION_MONTHLY_BACKUP_RETENTION" -eq "$PRODUCTION_MONTHLY_BACKUP_RETENTION" ] && [ $ENVIRONMENT_TYPE = 'production' ]; then + MONTHLY_BACKUP_RETENTION=${PRODUCTION_MONTHLY_BACKUP_RETENTION} + else + MONTHLY_BACKUP_RETENTION=${MONTHLY_BACKUP_DEFAULT_RETENTION} + fi + if [ ! -z $PRODUCTION_WEEKLY_BACKUP_RETENTION ] && [ "$PRODUCTION_WEEKLY_BACKUP_RETENTION" -eq "$PRODUCTION_WEEKLY_BACKUP_RETENTION" ] && [ $ENVIRONMENT_TYPE = 'production' ]; then + WEEKLY_BACKUP_RETENTION=${PRODUCTION_WEEKLY_BACKUP_RETENTION} + else + WEEKLY_BACKUP_RETENTION=${WEEKLY_BACKUP_DEFAULT_RETENTION} + fi + if [ ! -z $PRODUCTION_DAILY_BACKUP_RETENTION ] && [ "$PRODUCTION_DAILY_BACKUP_RETENTION" -eq "$PRODUCTION_DAILY_BACKUP_RETENTION" ] && [ $ENVIRONMENT_TYPE = 'production' ]; then + DAILY_BACKUP_RETENTION=${PRODUCTION_DAILY_BACKUP_RETENTION} + else + DAILY_BACKUP_RETENTION=${DAILY_BACKUP_DEFAULT_RETENTION} + fi + # Run Backups every day at 2200-0200 BACKUP_SCHEDULE=$( /kubectl-build-deploy/scripts/convert-crontab.sh "${NAMESPACE}" "M H(22-2) * * *") - TEMPLATE_PARAMETERS+=(-p BACKUP_SCHEDULE="${BACKUP_SCHEDULE}") - # TODO: -p == --set in helm - # Run Checks on Sunday at 0300-0600 - CHECK_SCHEDULE=$( /kubectl-build-deploy/scripts/convert-crontab.sh "${NAMESPACE}" "M H(3-6) * * 0") - TEMPLATE_PARAMETERS+=(-p CHECK_SCHEDULE="${CHECK_SCHEDULE}") - # Run Prune on Saturday at 0300-0600 - PRUNE_SCHEDULE=$( /kubectl-build-deploy/scripts/convert-crontab.sh "${NAMESPACE}" "M H(3-6) * * 6") - TEMPLATE_PARAMETERS+=(-p PRUNE_SCHEDULE="${PRUNE_SCHEDULE}") + if [ ! -z $K8UP_WEEKLY_RANDOM_FEATURE_FLAG ] && [ $K8UP_WEEKLY_RANDOM_FEATURE_FLAG = 'enabled' ]; then + # Let the controller deduplicate checks (will run weekly at a random time throughout the week) + CHECK_SCHEDULE="@weekly-random" + else + # Run Checks on Sunday at 0300-0600 + CHECK_SCHEDULE=$( /kubectl-build-deploy/scripts/convert-crontab.sh "${NAMESPACE}" "M H(3-6) * * 0") + fi + + if [ ! -z $K8UP_WEEKLY_RANDOM_FEATURE_FLAG ] && [ $K8UP_WEEKLY_RANDOM_FEATURE_FLAG = 'enabled' ]; then + # Let the controller deduplicate prunes (will run weekly at a random time throughout the week) + PRUNE_SCHEDULE="@weekly-random" + else + # Run Prune on Saturday at 0300-0600 + PRUNE_SCHEDULE=$( /kubectl-build-deploy/scripts/convert-crontab.sh "${NAMESPACE}" "M H(3-6) * * 6") + fi OPENSHIFT_TEMPLATE="/kubectl-build-deploy/openshift-templates/backup-schedule.yml" helm template k8up-lagoon-backup-schedule /kubectl-build-deploy/helmcharts/k8up-schedule \ -f /kubectl-build-deploy/values.yaml \ --set backup.schedule="${BACKUP_SCHEDULE}" \ --set check.schedule="${CHECK_SCHEDULE}" \ - --set prune.schedule="${PRUNE_SCHEDULE}" "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/k8up-lagoon-backup-schedule.yaml + --set prune.schedule="${PRUNE_SCHEDULE}" "${HELM_ARGUMENTS[@]}" \ + --set baasBucketName="${BAAS_BUCKET_NAME}" > $YAML_FOLDER/k8up-lagoon-backup-schedule.yaml \ + --set prune.retention.keepMonthly=$MONTHLY_BACKUP_RETENTION \ + --set prune.retention.keepWeekly=$WEEKLY_BACKUP_RETENTION \ + --set prune.retention.keepDaily=$DAILY_BACKUP_RETENTION fi if [ "$(ls -A $YAML_FOLDER/)" ]; then @@ -887,6 +1411,14 @@ do . /kubectl-build-deploy/scripts/exec-kubectl-mariadb-dbaas.sh ;; + postgres-dbaas) + . /kubectl-build-deploy/scripts/exec-kubectl-postgres-dbaas.sh + ;; + + mongodb-dbaas) + . /kubectl-build-deploy/scripts/exec-kubectl-mongodb-dbaas.sh + ;; + *) echo "DBAAS Type ${SERVICE_TYPE} not implemented"; exit 1; @@ -906,37 +1438,51 @@ yq write -i -- /kubectl-build-deploy/values.yaml 'configMapSha' $CONFIG_MAP_SHA ### PUSH IMAGES TO OPENSHIFT REGISTRY ############################################## -if [[ $THIS_IS_TUG == "true" ]]; then - # TODO: lagoon-tug is not implemented yet in kubernetes - echo "lagoon-tug is not implemented yet in kubernetes" - exit 1 - # Allow to disable registry auth - if [ ! "${TUG_SKIP_REGISTRY_AUTH}" == "true" ]; then - # This adds the defined credentials to the serviceaccount/default so that the deployments can pull from the remote registry - if kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get secret tug-registry 2> /dev/null; then - kubectl --insecure-skip-tls-verify -n ${NAMESPACE} delete secret tug-registry - fi - - kubectl --insecure-skip-tls-verify -n ${NAMESPACE} secrets new-dockercfg tug-registry --docker-server="${TUG_REGISTRY}" --docker-username="${TUG_REGISTRY_USERNAME}" --docker-password="${TUG_REGISTRY_PASSWORD}" --docker-email="${TUG_REGISTRY_USERNAME}" - kubectl --insecure-skip-tls-verify -n ${NAMESPACE} secrets add serviceaccount/default secrets/tug-registry --for=pull - fi - - # Import all remote Images into ImageStreams - readarray -t TUG_IMAGES < /kubectl-build-deploy/tug/images - for TUG_IMAGE in "${TUG_IMAGES[@]}" - do - kubectl --insecure-skip-tls-verify -n ${NAMESPACE} tag --source=docker "${TUG_REGISTRY}/${TUG_REGISTRY_REPOSITORY}/${TUG_IMAGE_PREFIX}${TUG_IMAGE}:${SAFE_BRANCH}" "${TUG_IMAGE}:latest" - done - -elif [ "$BUILD_TYPE" == "pullrequest" ] || [ "$BUILD_TYPE" == "branch" ]; then +if [ "$BUILD_TYPE" == "pullrequest" ] || [ "$BUILD_TYPE" == "branch" ]; then - # All images that should be pulled are tagged as Images directly in OpenShift Registry + # All images that should be pulled are copied to the harbor registry for IMAGE_NAME in "${!IMAGES_PULL[@]}" do PULL_IMAGE="${IMAGES_PULL[${IMAGE_NAME}]}" - # . /kubectl-build-deploy/scripts/exec-kubernetes-tag-dockerhub.sh - # TODO: check if we can download and push the images to harbour (e.g. how artifactory does this) - IMAGE_HASHES[${IMAGE_NAME}]=$(skopeo inspect docker://${PULL_IMAGE} --tls-verify=false | jq ".Name + \"@\" + .Digest" -r) + + # Try to handle private registries first + if [ $PRIVATE_REGISTRY_COUNTER -gt 0 ]; then + if [ $PRIVATE_EXTERNAL_REGISTRY ]; then + EXTERNAL_REGISTRY=0 + for EXTERNAL_REGISTRY_URL in "${PRIVATE_REGISTRY_URLS[@]}" + do + # strip off "http://" or "https://" from registry url if present + bare_url="${EXTERNAL_REGISTRY_URL#http://}" + bare_url="${EXTERNAL_REGISTRY_URL#https://}" + + # Test registry to see if image is from an external registry or just private docker hub + case $bare_url in + "$PULL_IMAGE"*) + EXTERNAL_REGISTRY=1 + ;; + esac + done + + # If this image is hosted in an external registry, pull it from there + if [ $EXTERNAL_REGISTRY -eq 1 ]; then + skopeo copy --dest-tls-verify=false docker://${PULL_IMAGE} docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} + # If this image is not from an external registry, but docker hub creds were supplied, pull it straight from Docker Hub + elif [ $PRIVATE_DOCKER_HUB_REGISTRY -eq 1 ]; then + skopeo copy --dest-tls-verify=false docker://${PULL_IMAGE} docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} + # If image not from an external registry and no docker hub creds were supplied, pull image from the imagecache + else + skopeo copy --dest-tls-verify=false docker://${IMAGECACHE_REGISTRY}/${PULL_IMAGE} docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} + fi + # If the private registry counter is 1 and no external registry was listed, we know a private docker hub was specified + else + skopeo copy --dest-tls-verify=false docker://${PULL_IMAGE} docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} + fi + # If no private registries, use the imagecache + else + skopeo copy --dest-tls-verify=false docker://${IMAGECACHE_REGISTRY}/${PULL_IMAGE} docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} + fi + + IMAGE_HASHES[${IMAGE_NAME}]=$(skopeo inspect docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} --tls-verify=false | jq ".Name + \"@\" + .Digest" -r) done for IMAGE_NAME in "${!IMAGES_BUILD[@]}" @@ -960,12 +1506,13 @@ elif [ "$BUILD_TYPE" == "pullrequest" ] || [ "$BUILD_TYPE" == "branch" ]; then IMAGE_HASHES[${IMAGE_NAME}]=$(docker inspect ${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} --format '{{json .RepoDigests}}' | "${JQ_QUERY[@]}") done -# elif [ "$BUILD_TYPE" == "promote" ]; then +elif [ "$BUILD_TYPE" == "promote" ]; then -# for IMAGE_NAME in "${IMAGES[@]}" -# do -# . /kubectl-build-deploy/scripts/exec-kubernetes-tag.sh -# done + for IMAGE_NAME in "${IMAGES[@]}" + do + . /kubectl-build-deploy/scripts/exec-kubernetes-promote.sh + IMAGE_HASHES[${IMAGE_NAME}]=$(skopeo inspect docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} --tls-verify=false | jq ".Name + \"@\" + .Digest" -r) + done fi @@ -1071,36 +1618,7 @@ do yq write -i --tag '!!str' -- /kubectl-build-deploy/${SERVICE_NAME}-values.yaml 'inPodCronjobs' '' fi - #OVERRIDE_TEMPLATE=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.template false) - #ENVIRONMENT_OVERRIDE_TEMPLATE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.templates.$SERVICE_NAME false) - #if [[ "${OVERRIDE_TEMPLATE}" == "false" && "${ENVIRONMENT_OVERRIDE_TEMPLATE}" == "false" ]]; then # No custom template defined in docker-compose or .lagoon.yml, using the given service ones - # Generate deployment if service type defines it - . /kubectl-build-deploy/scripts/exec-kubectl-resources-with-images.sh - - # # Generate statefulset if service type defines it - # OPENSHIFT_STATEFULSET_TEMPLATE="/kubectl-build-deploy/openshift-templates/${SERVICE_TYPE}/statefulset.yml" - # if [ -f $OPENSHIFT_STATEFULSET_TEMPLATE ]; then - # OPENSHIFT_TEMPLATE=$OPENSHIFT_STATEFULSET_TEMPLATE - # . /kubectl-build-deploy/scripts/exec-kubernetes-resources-with-images.sh - # fi - # elif [[ "${ENVIRONMENT_OVERRIDE_TEMPLATE}" != "false" ]]; then # custom template defined for this service in .lagoon.yml, trying to use it - - # OPENSHIFT_TEMPLATE=$ENVIRONMENT_OVERRIDE_TEMPLATE - # if [ ! -f $OPENSHIFT_TEMPLATE ]; then - # echo "defined template $OPENSHIFT_TEMPLATE for service $SERVICE_TYPE in .lagoon.yml not found"; exit 1; - # else - # . /kubectl-build-deploy/scripts/exec-kubernetes-resources-with-images.sh - # fi - # elif [[ "${OVERRIDE_TEMPLATE}" != "false" ]]; then # custom template defined for this service in docker-compose, trying to use it - - # OPENSHIFT_TEMPLATE=$OVERRIDE_TEMPLATE - # if [ ! -f $OPENSHIFT_TEMPLATE ]; then - # echo "defined template $OPENSHIFT_TEMPLATE for service $SERVICE_TYPE in $DOCKER_COMPOSE_YAML not found"; exit 1; - # else - # . /kubectl-build-deploy/scripts/exec-kubernetes-resources-with-images.sh - # fi - #fi - + . /kubectl-build-deploy/scripts/exec-kubectl-resources-with-images.sh done @@ -1141,34 +1659,18 @@ do SERVICE_ROLLOUT_TYPE=$ENVIRONMENT_SERVICE_ROLLOUT_TYPE fi - if [ $SERVICE_TYPE == "elasticsearch-cluster" ]; then - - STATEFULSET="${SERVICE_NAME}" - . /kubectl-build-deploy/scripts/exec-monitor-statefulset.sh + if [ $SERVICE_TYPE == "mariadb-dbaas" ]; then - elif [ $SERVICE_TYPE == "rabbitmq-cluster" ]; then - - STATEFULSET="${SERVICE_NAME}" - . /kubectl-build-deploy/scripts/exec-monitor-statefulset.sh - - elif [ $SERVICE_ROLLOUT_TYPE == "statefulset" ]; then - - STATEFULSET="${SERVICE_NAME}" - . /kubectl-build-deploy/scripts/exec-monitor-statefulset.sh + echo "nothing to monitor for $SERVICE_TYPE" - elif [ $SERVICE_ROLLOUT_TYPE == "deamonset" ]; then + elif [ $SERVICE_TYPE == "postgres-dbaas" ]; then - DAEMONSET="${SERVICE_NAME}" - . /kubectl-build-deploy/scripts/exec-monitor-deamonset.sh + echo "nothing to monitor for $SERVICE_TYPE" - elif [ $SERVICE_TYPE == "mariadb-dbaas" ]; then + elif [ $SERVICE_TYPE == "mongodb-dbaas" ]; then echo "nothing to monitor for $SERVICE_TYPE" - elif [ $SERVICE_TYPE == "postgres" ]; then - # TODO: Remove - echo "nothing to monitor for $SERVICE_TYPE - for now" - elif [ ! $SERVICE_ROLLOUT_TYPE == "false" ]; then . /kubectl-build-deploy/scripts/exec-monitor-deploy.sh fi @@ -1225,3 +1727,15 @@ if [ "${LAGOON_POSTROLLOUT_DISABLED}" != "true" ]; then else echo "post-rollout tasks are currently disabled LAGOON_POSTROLLOUT_DISABLED is set to true" fi + +############################################## +### PUSH the latest .lagoon.yml into lagoon-yaml configmap +############################################## + +if kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get configmap lagoon-yaml &> /dev/null; then + # replace it + kubectl --insecure-skip-tls-verify -n ${NAMESPACE} create configmap lagoon-yaml --from-file=.lagoon.yml -o yaml --dry-run | kubectl replace -f - +else + # create it + kubectl --insecure-skip-tls-verify -n ${NAMESPACE} create configmap lagoon-yaml --from-file=.lagoon.yml +fi diff --git a/images/kubectl-build-deploy-dind/build-deploy.sh b/images/kubectl-build-deploy-dind/build-deploy.sh index ff7e1a557a..5100032dd1 100755 --- a/images/kubectl-build-deploy-dind/build-deploy.sh +++ b/images/kubectl-build-deploy-dind/build-deploy.sh @@ -44,6 +44,9 @@ fi REGISTRY_SECRETS=() PRIVATE_REGISTRY_COUNTER=0 +PRIVATE_REGISTRY_URLS=() +PRIVATE_DOCKER_HUB_REGISTRY=0 +PRIVATE_EXTERNAL_REGISTRY=0 set +x @@ -58,13 +61,7 @@ if [ ! -z ${INTERNAL_REGISTRY_URL} ] && [ ! -z ${INTERNAL_REGISTRY_USERNAME} ] & echo "docker login -u '${INTERNAL_REGISTRY_USERNAME}' -p '${INTERNAL_REGISTRY_PASSWORD}' ${INTERNAL_REGISTRY_URL}" | /bin/bash kubectl create secret docker-registry lagoon-internal-registry-secret --docker-server=${INTERNAL_REGISTRY_URL} --docker-username=${INTERNAL_REGISTRY_USERNAME} --docker-password=${INTERNAL_REGISTRY_PASSWORD} --dry-run -o yaml | kubectl apply -f - REGISTRY_SECRETS+=("lagoon-internal-registry-secret") - #docker login "-u '{$INTERNAL_REGISTRY_USERNAME}' -p '{$INTERNAL_REGISTRY_PASSWORD}' '{$INTERNAL_REGISTRY_URL}'" REGISTRY=$INTERNAL_REGISTRY_URL # This will handle pointing Lagoon at the correct registry for non local builds - #REGISTRY_REPOSITORY=$NAMESPACE - # If we go with a different naming scheme, we can inject that here? -#else -# DOCKER_REGISTRY_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) -# docker login -u=jenkins -p="${DOCKER_REGISTRY_TOKEN}" ${REGISTRY} fi ############################################## @@ -97,23 +94,34 @@ do PRIVATE_REGISTRY_CREDENTIAL=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.scope == "container_registry" and .name == "'$PRIVATE_CONTAINER_REGISTRY_PASSWORD'") | "\(.value)"')) fi if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then - PRIVATE_REGISTRY_CREDENTIAL=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.scope == "container_registry" and .name == "'$PRIVATE_CONTAINER_REGISTRY_PASSWORD'") | "\(.value)"')) + TEMP_PRIVATE_REGISTRY_CREDENTIAL=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.scope == "container_registry" and .name == "'$PRIVATE_CONTAINER_REGISTRY_PASSWORD'") | "\(.value)"')) + if [ ! -z "$TEMP_PRIVATE_REGISTRY_CREDENTIAL" ]; then + PRIVATE_REGISTRY_CREDENTIAL=$TEMP_PRIVATE_REGISTRY_CREDENTIAL + fi fi if [ -z $PRIVATE_REGISTRY_CREDENTIAL ]; then #if no password defined in the lagoon api, pass the one in `.lagoon.yml` as a password PRIVATE_REGISTRY_CREDENTIAL=$PRIVATE_CONTAINER_REGISTRY_PASSWORD fi + if [ -z "$PRIVATE_REGISTRY_CREDENTIAL" ]; then + echo -e "A private container registry was defined in the .lagoon.yml file, but no password could be found in either the .lagoon.yml or in the Lagoon API\n\nPlease check if the password has been set correctly." + exit 1 + fi if [ $PRIVATE_CONTAINER_REGISTRY_URL != "false" ]; then echo "Attempting to log in to $PRIVATE_CONTAINER_REGISTRY_URL with user $PRIVATE_CONTAINER_REGISTRY_USERNAME - $PRIVATE_CONTAINER_REGISTRY_PASSWORD" docker login --username $PRIVATE_CONTAINER_REGISTRY_USERNAME --password $PRIVATE_REGISTRY_CREDENTIAL $PRIVATE_CONTAINER_REGISTRY_URL kubectl create secret docker-registry "lagoon-private-registry-${PRIVATE_REGISTRY_COUNTER}-secret" --docker-server=$PRIVATE_CONTAINER_REGISTRY_URL --docker-username=$PRIVATE_CONTAINER_REGISTRY_USERNAME --docker-password=$PRIVATE_REGISTRY_CREDENTIAL --dry-run -o yaml | kubectl apply -f - REGISTRY_SECRETS+=("lagoon-private-registry-${PRIVATE_REGISTRY_COUNTER}-secret") + PRIVATE_REGISTRY_URLS+=($PRIVATE_CONTAINER_REGISTRY_URL) + PRIVATE_EXTERNAL_REGISTRY=1 let ++PRIVATE_REGISTRY_COUNTER else echo "Attempting to log in to docker hub with user $PRIVATE_CONTAINER_REGISTRY_USERNAME - $PRIVATE_CONTAINER_REGISTRY_PASSWORD" docker login --username $PRIVATE_CONTAINER_REGISTRY_USERNAME --password $PRIVATE_REGISTRY_CREDENTIAL kubectl create secret docker-registry "lagoon-private-registry-${PRIVATE_REGISTRY_COUNTER}-secret" --docker-server="https://index.docker.io/v1/" --docker-username=$PRIVATE_CONTAINER_REGISTRY_USERNAME --docker-password=$PRIVATE_REGISTRY_CREDENTIAL --dry-run -o yaml | kubectl apply -f - REGISTRY_SECRETS+=("lagoon-private-registry-${PRIVATE_REGISTRY_COUNTER}-secret") + PRIVATE_REGISTRY_URLS+=("") + PRIVATE_DOCKER_HUB_REGISTRY=1 let ++PRIVATE_REGISTRY_COUNTER fi fi @@ -121,23 +129,4 @@ done set -x -ADDITIONAL_YAMLS=($(cat .lagoon.yml | shyaml keys additional-yaml || echo "")) - -for ADDITIONAL_YAML in "${ADDITIONAL_YAMLS[@]}" -do - ADDITIONAL_YAML_PATH=$(cat .lagoon.yml | shyaml get-value additional-yaml.$ADDITIONAL_YAML.path false) - if [ $ADDITIONAL_YAML_PATH == "false" ]; then - echo "No 'path' defined for additional yaml $ADDITIONAL_YAML"; exit 1; - fi - - if [ ! -f $ADDITIONAL_YAML_PATH ]; then - echo "$ADDITIONAL_YAML_PATH for additional yaml $ADDITIONAL_YAML not found"; exit 1; - fi - - ADDITIONAL_YAML_COMMAND=$(cat .lagoon.yml | shyaml get-value additional-yaml.$ADDITIONAL_YAML.command apply) - ADDITIONAL_YAML_IGNORE_ERROR=$(cat .lagoon.yml | shyaml get-value additional-yaml.$ADDITIONAL_YAML.ignore_error false) - ADDITIONAL_YAML_IGNORE_ERROR="${ADDITIONAL_YAML_IGNORE_ERROR,,}" # convert to lowercase, as shyaml returns "True" if the yaml is set to "true" - . /kubectl-build-deploy/scripts/exec-additional-yaml.sh -done - . /kubectl-build-deploy/build-deploy-docker-compose.sh diff --git a/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/_helpers.tpl index 5685ea7827..af8b1a79ac 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/_helpers.tpl @@ -66,4 +66,4 @@ lagoon.sh/prNumber: {{ .Values.prNumber | quote }} lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} {{- end }} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/ingress.yaml index 9504bc6258..58ae3b9d6f 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/templates/ingress.yaml @@ -36,6 +36,15 @@ metadata: # haproxy.router.openshift.io/hsts_header: {{ .Values.route_hsts }} {{ end -}} kubernetes.io/tls-acme: {{ .Values.tls_acme | quote }} + # use a specific fastly service + {{- if .Values.fastly.serviceId }} + fastly.amazee.io/service-id: "{{ .Values.fastly.serviceId }}" + {{- end }} + fastly.amazee.io/watch: "{{ .Values.fastly.watch }}" + # use a custom secret for this ingress (customer supplied fastly integration) + {{- if .Values.fastly.apiSecretName }} + fastly.amazee.io/api-secret-name: "{{ .Values.fastly.apiSecretName }}" + {{- end }} {{- include "custom-ingress.annotations" . | nindent 4 }} {{- with .Values.annotations }} {{- toYaml . | nindent 4 }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/values.yaml index 59eec1e5ee..ff22a39dce 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/values.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/custom-ingress/values.yaml @@ -14,3 +14,9 @@ ingressmonitorcontroller: enabled: 'false' interval: '60' alertContacts: 'unconfigured' + +## example fastly block +fastly: + watch: false +# serviceId: '' +# apiSecretName: '' \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/.helmignore b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/Chart.yaml new file mode 100644 index 0000000000..5763d9a892 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: elasticsearch-persistent +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/_helpers.tpl new file mode 100644 index 0000000000..b1b3147864 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/_helpers.tpl @@ -0,0 +1,99 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "elasticsearch.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "elasticsearch.fullname" -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "elasticsearch.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create full hostname for autogenerated hosts +*/}} +{{- define "elasticsearch.autogeneratedHost" -}} +{{- printf "%s.%s" .Release.Name .Values.routesAutogenerateSuffix | trimSuffix "-" -}} +{{- end -}} + +{{/* +Generate name of Persistent Storage +Uses the Release Name (Lagoon Service Name) unless it's overwritten via .Values.persistentStorage.name +*/}} +{{- define "elasticsearch.persistentStorageName" -}} +{{- default .Release.Name .Values.persistentStorage.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "elasticsearch.labels" -}} +helm.sh/chart: {{ include "elasticsearch.chart" . }} +{{ include "elasticsearch.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "elasticsearch.lagoonLabels" . }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "elasticsearch.selectorLabels" -}} +app.kubernetes.io/name: {{ include "elasticsearch.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create a PriorityClassName. +(this is based on the Lagoon Environment Type)). +*/}} +{{- define "elasticsearch.lagoonPriority" -}} +{{- printf "lagoon-priority-%s" .Values.environmentType }} +{{- end -}} + +{{/* +Lagoon Labels +*/}} +{{- define "elasticsearch.lagoonLabels" -}} +lagoon.sh/service: {{ .Release.Name }} +lagoon.sh/service-type: {{ .Chart.Name }} +lagoon.sh/project: {{ .Values.project }} +lagoon.sh/environment: {{ .Values.environment }} +lagoon.sh/environmentType: {{ .Values.environmentType }} +lagoon.sh/buildType: {{ .Values.buildType }} +{{- end -}} + +{{/* +Datadog Admission Controller label +*/}} +{{- define "elasticsearch.datadogLabels" -}} +{{- if eq .Values.environmentType "production" -}} +admission.datadoghq.com/enabled: "true" +{{- end -}} +{{- end -}} + +{{/* +Annotations +*/}} +{{- define "elasticsearch.annotations" -}} +lagoon.sh/version: {{ .Values.lagoonVersion | quote }} +{{- if .Values.branch }} +lagoon.sh/branch: {{ .Values.branch | quote }} +{{- end }} +{{- if .Values.prNumber }} +lagoon.sh/prNumber: {{ .Values.prNumber | quote }} +lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} +lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} +{{- end }} +{{- end -}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/cronjob.yaml b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/cronjob.yaml new file mode 100644 index 0000000000..5abfbf9083 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/cronjob.yaml @@ -0,0 +1,71 @@ +{{- range $cronjobName, $cronjobConfig := .Values.nativeCronjobs }} +--- +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + labels: + {{- include "elasticsearch.labels" $ | nindent 4 }} + annotations: + {{- include "elasticsearch.annotations" . | nindent 4 }} +spec: + schedule: {{ $cronjobConfig.schedule | quote }} + concurrencyPolicy: Forbid + successfulJobsHistoryLimit: 0 + failedJobsHistoryLimit: 1 + jobTemplate: + metadata: + labels: + {{- include "elasticsearch.labels" $ | nindent 8 }} + annotations: + {{- include "elasticsearch.annotations" $ | nindent 8 }} + spec: + backoffLimit: 0 + template: + metadata: + labels: + {{- include "elasticsearch.labels" $ | nindent 12 }} + annotations: + {{- include "elasticsearch.annotations" $ | nindent 12 }} + spec: + {{- with $.Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 12 }} + {{- end }} + priorityClassName: {{ include "elasticsearch.lagoonPriority" $ }} + enableServiceLinks: false + securityContext: + {{- toYaml $.Values.podSecurityContext | nindent 12 }} + containers: + - image: {{ $.Values.image | quote }} + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + securityContext: + {{- toYaml $.Values.securityContext | nindent 16 }} + imagePullPolicy: {{ $.Values.imagePullPolicy }} + command: + - /lagoon/cronjob.sh + - {{ $cronjobConfig.command }} + env: + - name: LAGOON_GIT_SHA + value: {{ $.Values.gitSha | quote }} + - name: SERVICE_NAME + value: {{ $.Release.Name | quote }} + envFrom: + - configMapRef: + name: lagoon-env + resources: + {{- toYaml $.Values.resources | nindent 16 }} + restartPolicy: Never + {{- with $.Values.nodeSelector }} + nodeSelector: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.affinity }} + affinity: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.tolerations }} + tolerations: + {{- toYaml $ | nindent 12 }} + {{- end }} +{{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/deployment.yaml new file mode 100644 index 0000000000..61658e2980 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "elasticsearch.fullname" . }} + labels: + {{- include "elasticsearch.labels" . | nindent 4 }} + annotations: + {{- include "elasticsearch.annotations" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "elasticsearch.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "elasticsearch.labels" . | nindent 8 }} + {{- include "elasticsearch.datadogLabels" . | nindent 8 }} + annotations: + {{- include "elasticsearch.annotations" . | nindent 8 }} + lagoon.sh/configMapSha: {{ .Values.configMapSha | quote }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: {{ include "elasticsearch.persistentStorageName" . }} + persistentVolumeClaim: + claimName: {{ include "elasticsearch.persistentStorageName" . }} + priorityClassName: {{ include "elasticsearch.lagoonPriority" . }} + enableServiceLinks: false + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + initContainers: + # This init container sets the appropriate limits for mmap counts on the hosting node. + # https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html + - name: set-max-map-count + image: ubuntu:20.04 + imagePullPolicy: {{ .Values.imagePullPolicy }} + securityContext: + privileged: true + command: + - /bin/bash + - -c + - 'if [[ "$(sysctl vm.max_map_count --values)" -lt 262144 ]]; then sysctl -w vm.max_map_count=262144; fi' + containers: + - image: {{ .Values.image | quote }} + name: {{ .Chart.Name }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + ports: + - containerPort: 9200 + protocol: TCP + readinessProbe: + httpGet: + path: /_cluster/health?local=true + port: 9200 + initialDelaySeconds: 20 + livenessProbe: + httpGet: + path: /_cluster/health?local=true + port: 9200 + initialDelaySeconds: 120 + envFrom: + - configMapRef: + name: lagoon-env + env: + - name: CRONJOBS + value: {{ .Values.inPodCronjobs | quote }} + volumeMounts: + - name: {{ include "elasticsearch.persistentStorageName" . }} + mountPath: {{ .Values.persistentStorage.path | quote }} + resources: + {{- toYaml .Values.resources | nindent 12 }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/prebackuppod.yaml b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/prebackuppod.yaml similarity index 51% rename from images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/prebackuppod.yaml rename to images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/prebackuppod.yaml index 83a39f7899..c2b90366ad 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/prebackuppod.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/prebackuppod.yaml @@ -2,19 +2,19 @@ apiVersion: backup.appuio.ch/v1alpha1 kind: PreBackupPod metadata: - name: {{ include "redis-persistent.fullname" . }}-prebackuppod + name: {{ include "elasticsearch.fullname" . }}-prebackuppod labels: - {{- include "redis-persistent.labels" . | nindent 4 }} + {{- include "elasticsearch.labels" . | nindent 4 }} annotations: - {{- include "redis-persistent.annotations" . | nindent 4 }} + {{- include "elasticsearch.annotations" . | nindent 4 }} spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path }} ." - fileExtension: .{{ include "redis-persistent.fullname" . }}.tar + backupCommand: /bin/sh -c "tar -cf - -C {{ .Values.persistentStorage.path }} ." + fileExtension: .{{ include "elasticsearch.fullname" . }}.tar pod: metadata: labels: - prebackuppod: {{ include "redis-persistent.fullname" . }} - {{- include "redis-persistent.labels" . | nindent 8 }} + prebackuppod: {{ include "elasticsearch.fullname" . }} + {{- include "elasticsearch.labels" . | nindent 8 }} spec: affinity: podAffinity: @@ -25,25 +25,24 @@ spec: - key: lagoon.sh/service operator: In values: - - {{ include "redis-persistent.fullname" . }} + - {{ include "elasticsearch.fullname" . }} topologyKey: kubernetes.io/hostname weight: 100 containers: - args: - sleep - - '3600' + - infinity envFrom: - configMapRef: name: lagoon-env - image: alpine + image: imagecache.amazeeio.cloud/library/alpine imagePullPolicy: Always - name: {{ include "redis-persistent.fullname" . }}-prebackuppod + name: {{ include "elasticsearch.fullname" . }}-prebackuppod volumeMounts: - - name: {{ .Values.persistentStorage.name }} + - name: {{ include "elasticsearch.persistentStorageName" . }} mountPath: {{ .Values.persistentStorage.path | quote }} volumes: - - name: {{ .Values.persistentStorage.name }} + - name: {{ include "elasticsearch.persistentStorageName" . }} persistentVolumeClaim: - claimName: {{ .Values.persistentStorage.name }} + claimName: {{ include "elasticsearch.persistentStorageName" . }} {{ end }} - diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/pvc.yaml new file mode 100644 index 0000000000..bfeab78176 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/pvc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "elasticsearch.persistentStorageName" . }} + labels: + {{- include "elasticsearch.labels" . | nindent 4 }} + annotations: + k8up.syn.tools/backup: "false" + {{- include "elasticsearch.annotations" . | nindent 4 }} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.persistentStorage.size | quote }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/service.yaml b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/service.yaml new file mode 100644 index 0000000000..f5d37ba3b2 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "elasticsearch.fullname" . }} + labels: + {{- include "elasticsearch.labels" . | nindent 4 }} + annotations: + {{- include "elasticsearch.annotations" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: 9200 + protocol: TCP + name: 9200-tcp + selector: + {{- include "elasticsearch.selectorLabels" . | nindent 4 }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/values.yaml new file mode 100644 index 0000000000..6e55a8f9dd --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/elasticsearch/values.yaml @@ -0,0 +1,51 @@ +# Default values for elasticsearch. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: "" + +environmentType: production +persistentStorage: + size: 5Gi + path: '/usr/share/elasticsearch/data' + +imagePullPolicy: Always + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 9200 + +resources: + # limits: + # cpu: 100m + # memory: 128Mi + requests: + cpu: 10m + memory: 10Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +inPodCronjobs: "" + +configMapSha: "" \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/.helmignore b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/.helmignore new file mode 100644 index 0000000000..fbe01f88f2 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/Chart.yaml new file mode 100644 index 0000000000..78f90c0a9d --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: fastly-api-secret +description: A Helm chart for Kubernetes creating fastly-api-secret + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/templates/_helpers.tpl new file mode 100644 index 0000000000..04bbb10c04 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/templates/_helpers.tpl @@ -0,0 +1,69 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "fastly-api-secret.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "fastly-api-secret.fullname" -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "fastly-api-secret.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "fastly-api-secret.labels" -}} +helm.sh/chart: {{ include "fastly-api-secret.chart" . }} +{{ include "fastly-api-secret.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "fastly-api-secret.lagoonLabels" . }} + +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "fastly-api-secret.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fastly-api-secret.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Lagoon Labels +*/}} +{{- define "fastly-api-secret.lagoonLabels" -}} +lagoon.sh/service: {{ .Release.Name }} +lagoon.sh/service-type: {{ .Chart.Name }} +lagoon.sh/project: {{ .Values.project }} +lagoon.sh/environment: {{ .Values.environment }} +lagoon.sh/environmentType: {{ .Values.environmentType }} +lagoon.sh/buildType: {{ .Values.buildType }} +{{- end -}} + +{{/* +Annotations +*/}} +{{- define "fastly-api-secret.annotations" -}} +lagoon.sh/version: {{ .Values.lagoonVersion | quote }} +{{- if .Values.branch }} +lagoon.sh/branch: {{ .Values.branch | quote }} +{{- end }} +{{- if .Values.prNumber }} +lagoon.sh/prNumber: {{ .Values.prNumber | quote }} +lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} +lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} +{{- end }} +{{- end -}} \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/templates/secret.yaml b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/templates/secret.yaml new file mode 100644 index 0000000000..155623f80a --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/templates/secret.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "fastly-api-secret.fullname" . }} + labels: + {{- include "fastly-api-secret.labels" . | nindent 4 }} + annotations: + {{- include "fastly-api-secret.annotations" . | nindent 4 }} + {{- with .Values.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +stringData: + api-token: {{ .Values.fastly.apiToken }} + platform-tls-configuration: {{ .Values.fastly.platformTLSConfiguration }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/values.yaml new file mode 100644 index 0000000000..5e79ee471f --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/fastly-api-secret/values.yaml @@ -0,0 +1,7 @@ +# Default values for fastly-api-secret. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# fastly: +# apiToken: '' +# platformTLSConfiguration: '' \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/Chart.yaml index 4dae308ab1..6ca616e8bd 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/Chart.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/Chart.yaml @@ -14,4 +14,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.1.0 \ No newline at end of file +version: 0.2.0 \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/templates/schedule.yaml b/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/templates/schedule.yaml index 3849cd2f57..e76c51b08e 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/templates/schedule.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/templates/schedule.yaml @@ -12,13 +12,14 @@ spec: key: repo-pw name: baas-repo-pw s3: - bucket: baas-{{ .Values.project }} + bucket: '{{ .Values.baasBucketName }}' backup: schedule: '{{ .Values.backup.schedule }}' check: schedule: '{{ .Values.check.schedule }}' prune: retention: - keepDaily: 7 - keepWeekly: 6 + keepDaily: {{ .Values.prune.retention.keepDaily }} + keepWeekly: {{ .Values.prune.retention.keepWeekly }} + keepMonthly: {{ .Values.prune.retention.keepMonthly }} schedule: '{{ .Values.prune.schedule }}' diff --git a/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/values.yaml index c809a8d6ad..611a4a9d16 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/values.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/k8up-schedule/values.yaml @@ -11,4 +11,8 @@ check: schedule: '0 * * * 0' prune: + retention: + keepDaily: 7 + keepWeekly: 6 + keepMonthly: 1 schedule: '0 * * * 6' \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/mariadb-dbaas/templates/prebackuppod.yaml b/images/kubectl-build-deploy-dind/helmcharts/mariadb-dbaas/templates/prebackuppod.yaml index 56fd7d8d7f..e41d00d0d9 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/mariadb-dbaas/templates/prebackuppod.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/mariadb-dbaas/templates/prebackuppod.yaml @@ -38,7 +38,7 @@ spec: containers: - args: - sleep - - '3600' + - infinity env: - name: BACKUP_DB_HOST valueFrom: @@ -60,7 +60,7 @@ spec: configMapKeyRef: key: {{ include "mariadb-dbaas.fullnameUppercase" . }}_DATABASE name: lagoon-env - image: amazeeio/alpine-mysql-client + image: imagecache.amazeeio.cloud/amazeeio/alpine-mysql-client imagePullPolicy: Always name: {{ include "mariadb-dbaas.fullname" . }}-prebackuppod {{ end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/deployment.yaml index 6b80482742..b50bb073e7 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/deployment.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/deployment.yaml @@ -5,9 +5,7 @@ metadata: labels: {{- include "mariadb-single.labels" . | nindent 4 }} annotations: - {{- include "mariadb-single.annotations" . | nindent 4 -}} - appuio.ch/backupcommand: /bin/sh -c "mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --all-databases" - backup.appuio.ch/file-extension: .{{ include "mariadb-single.fullname" . }}.sql + {{- include "mariadb-single.annotations" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: @@ -21,6 +19,8 @@ spec: {{- include "mariadb-single.labels" . | nindent 8 }} annotations: {{- include "mariadb-single.annotations" . | nindent 8 }} + k8up.syn.tools/backupcommand: /bin/sh -c "mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --all-databases" + k8up.syn.tools/file-extension: .{{ include "mariadb-single.fullname" . }}.sql lagoon.sh/configMapSha: {{ .Values.configMapSha | quote }} spec: {{- with .Values.imagePullSecrets }} @@ -32,11 +32,9 @@ spec: persistentVolumeClaim: claimName: {{ include "mariadb-single.fullname" . }} securityContext: - fsGroup: 0 + {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} - securityContext: - runAsGroup: 0 image: "{{ .Values.image }}" imagePullPolicy: {{ .Values.imagePullPolicy }} env: diff --git a/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/pvc.yaml index 8cf7a2a68e..2de9304bb3 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/pvc.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/mariadb-single/templates/pvc.yaml @@ -7,7 +7,7 @@ metadata: annotations: {{- include "mariadb-single.annotations" . | nindent 4 }} annotations: - appuio.ch/backup: "false" + k8up.syn.tools/backup: "false" spec: accessModes: - ReadWriteOnce diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/.helmignore b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/Chart.yaml new file mode 100644 index 0000000000..a9c381b641 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: mongodb-dbaas +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/_helpers.tpl new file mode 100644 index 0000000000..a8487815ac --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/_helpers.tpl @@ -0,0 +1,79 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mongodb-dbaas.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "mongodb-dbaas.fullname" -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "mongodb-dbaas.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create full hostname for autogenerated hosts +*/}} +{{- define "mongodb-dbaas.autogeneratedHost" -}} +{{- printf "%s.%s" .Release.Name .Values.routesAutogenerateSuffix | trimSuffix "-" -}} +{{- end -}} + +{{- define "mongodb-dbaas.fullnameUppercase" -}} +{{ include "mongodb-dbaas.fullname" . | upper | replace "-" "_" }} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "mongodb-dbaas.labels" -}} +helm.sh/chart: {{ include "mongodb-dbaas.chart" . }} +{{ include "mongodb-dbaas.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "mongodb-dbaas.lagoonLabels" . }} + +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "mongodb-dbaas.selectorLabels" -}} +app.kubernetes.io/name: {{ include "mongodb-dbaas.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Lagoon Labels +*/}} +{{- define "mongodb-dbaas.lagoonLabels" -}} +lagoon.sh/service: {{ .Release.Name }} +lagoon.sh/service-type: {{ .Chart.Name }} +lagoon.sh/project: {{ .Values.project }} +lagoon.sh/environment: {{ .Values.environment }} +lagoon.sh/environmentType: {{ .Values.environmentType }} +lagoon.sh/buildType: {{ .Values.buildType }} +{{- end -}} + +{{/* +Annotations +*/}} +{{- define "mongodb-dbaas.annotations" -}} +lagoon.sh/version: {{ .Values.lagoonVersion | quote }} +{{- if .Values.branch }} +lagoon.sh/branch: {{ .Values.branch | quote }} +{{- end }} +{{- if .Values.prNumber }} +lagoon.sh/prNumber: {{ .Values.prNumber | quote }} +lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} +lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} +{{- end }} +{{- end -}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/dbaas.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/dbaas.yaml new file mode 100644 index 0000000000..84a1b3e447 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/dbaas.yaml @@ -0,0 +1,11 @@ +apiVersion: mongodb.amazee.io/v1 +kind: MongoDBConsumer +metadata: + name: {{ include "mongodb-dbaas.fullname" . }} + labels: + {{- include "mongodb-dbaas.labels" . | nindent 4 }} + annotations: + {{- include "mongodb-dbaas.annotations" . | nindent 4 }} + +spec: + environment: {{ .Values.environment}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/prebackuppod.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/prebackuppod.yaml new file mode 100644 index 0000000000..4f893420ac --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/templates/prebackuppod.yaml @@ -0,0 +1,67 @@ +{{ if .Capabilities.APIVersions.Has "backup.appuio.ch/v1alpha1/PreBackupPod" }} +apiVersion: backup.appuio.ch/v1alpha1 +kind: PreBackupPod +metadata: + name: {{ include "mongodb-dbaas.fullname" . }}-prebackuppod + labels: + {{- include "mongodb-dbaas.labels" . | nindent 4 }} + annotations: + {{- include "mongodb-dbaas.annotations" . | nindent 4 }} +spec: + backupCommand: /bin/sh -c "mongodump --uri=mongodb://${BACKUP_DB_USER}:${BACKUP_DB_PASSWORD}@${BACKUP_DB_HOST}:${BACKUP_DB_PORT}/${BACKUP_DB_NAME}?ssl=true&sslInsecure=true&tls=true&tlsInsecure=true --archive" + fileExtension: .{{ include "mongodb-dbaas.fullname" . }}.bson + pod: + metadata: + labels: + prebackuppod: {{ include "mongodb-dbaas.fullname" . }} + {{- include "mongodb-dbaas.labels" . | nindent 8 }} + spec: + containers: + - args: + - sleep + - infinity + env: + - name: BACKUP_DB_HOST + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_HOST + name: lagoon-env + - name: BACKUP_DB_USER + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_USER + name: lagoon-env + - name: BACKUP_DB_PASSWORD + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_PASSWORD + name: lagoon-env + - name: BACKUP_DB_NAME + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_DB_NAME + name: lagoon-env + - name: BACKUP_DB_PORT + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_DB_PORT + name: lagoon-env + - name: BACKUP_DB_AUTHSOURCE + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_DB_AUTHSOURCE + name: lagoon-env + - name: BACKUP_DB_AUTHMECHANISM + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_DB_AUTHMECHANISM + name: lagoon-env + - name: BACKUP_DB_AUTHTLS + valueFrom: + configMapKeyRef: + key: {{ include "mongodb-dbaas.fullnameUppercase" . }}_DB_AUTHTLS + name: lagoon-env + image: imagecache.amazeeio.cloud/uselagoon/php-8.0-cli + imagePullPolicy: Always + name: {{ include "mongodb-dbaas.fullname" . }}-prebackuppod +{{ end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/values.yaml new file mode 100644 index 0000000000..da55d1ce5c --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-dbaas/values.yaml @@ -0,0 +1,5 @@ +# Default values for nginx. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +environment: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/.helmignore b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/Chart.yaml new file mode 100644 index 0000000000..2b2cce9222 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: mongodb-single +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/_helpers.tpl new file mode 100644 index 0000000000..b52874eba9 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/_helpers.tpl @@ -0,0 +1,91 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mongodb-single.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "mongodb-single.fullname" -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "mongodb-single.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create full hostname for autogenerated hosts +*/}} +{{- define "mongodb-single.autogeneratedHost" -}} +{{- printf "%s.%s" .Release.Name .Values.routesAutogenerateSuffix | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "mongodb-single.labels" -}} +helm.sh/chart: {{ include "mongodb-single.chart" . }} +{{ include "mongodb-single.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "mongodb-single.lagoonLabels" . }} +{{- end -}} + +{{/* +Add annotations +*/}} +{{- define "mongodb-single.annotations" -}} +{{ if .Values.annotations }} +{{- toYaml .Values.annotations }} +{{- end }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "mongodb-single.selectorLabels" -}} +app.kubernetes.io/name: {{ include "mongodb-single.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create a PriorityClassName. +(this is based on the Lagoon Environment Type)). +*/}} +{{- define "mongodb-single.lagoonPriority" -}} +{{- printf "lagoon-priority-%s" .Values.environmentType }} +{{- end -}} + +{{/* +Lagoon Labels +*/}} +{{- define "mongodb-single.lagoonLabels" -}} +lagoon.sh/service: {{ .Release.Name }} +lagoon.sh/service-type: {{ .Chart.Name }} +lagoon.sh/project: {{ .Values.project }} +lagoon.sh/environment: {{ .Values.environment }} +lagoon.sh/environmentType: {{ .Values.environmentType }} +lagoon.sh/buildType: {{ .Values.buildType }} +{{- end -}} + +{{/* +Annotations +*/}} +{{- define "mongodb-single" -}} +lagoon.sh/version: {{ .Values.lagoonVersion | quote }} +{{- if .Values.branch }} +lagoon.sh/branch: {{ .Values.branch | quote }} +{{- end }} +{{- if .Values.prNumber }} +lagoon.sh/prNumber: {{ .Values.prNumber | quote }} +lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} +lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} +{{- end }} +{{- end -}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/cronjob.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/cronjob.yaml new file mode 100644 index 0000000000..8859436802 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/cronjob.yaml @@ -0,0 +1,78 @@ +{{- range $cronjobName, $cronjobConfig := .Values.nativeCronjobs }} +--- +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + labels: + {{- include "mongodb-single.labels" $ | nindent 4 }} + annotations: + {{- include "mongodb-single.annotations" $ | nindent 4 }} +spec: + schedule: {{ $cronjobConfig.schedule | quote }} + concurrencyPolicy: Forbid + successfulJobsHistoryLimit: 0 + failedJobsHistoryLimit: 1 + jobTemplate: + metadata: + labels: + {{- include "mongodb-single.labels" $ | nindent 8 }} + annotations: + {{- include "mongodb-single.annotations" $ | nindent 8 }} + spec: + backoffLimit: 0 + template: + metadata: + labels: + {{- include "mongodb-single.labels" $ | nindent 12 }} + annotations: + {{- include "mongodb-single.annotations" $ | nindent 12 }} + spec: + {{- with $.Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 12 }} + {{- end }} + priorityClassName: {{ include "mongodb-single.lagoonPriority" $ }} + enableServiceLinks: false + securityContext: + {{- toYaml $.Values.podSecurityContext | nindent 12 }} + volumes: + - name: {{ include "mongodb-single.fullname" $ }} + persistentVolumeClaim: + claimName: {{ include "mongodb-single.fullname" $ }} + containers: + - image: {{ $.Values.image | quote }} + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + securityContext: + {{- toYaml $.Values.securityContext | nindent 16 }} + imagePullPolicy: {{ $.Values.imagePullPolicy }} + command: + - /lagoon/cronjob.sh + - {{ $cronjobConfig.command }} + env: + - name: LAGOON_GIT_SHA + value: {{ $.Values.gitSha | quote }} + - name: SERVICE_NAME + value: {{ $.Release.Name | quote }} + envFrom: + - configMapRef: + name: lagoon-env + resources: + {{- toYaml $.Values.resources | nindent 16 }} + volumeMounts: + - name: {{ include "mongodb-single.fullname" $ }} + mountPath: {{ $.Values.persistentStorage.path | quote }} + restartPolicy: Never + {{- with $.Values.nodeSelector }} + nodeSelector: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.affinity }} + affinity: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.tolerations }} + tolerations: + {{- toYaml $ | nindent 12 }} + {{- end }} +{{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/deployment.yaml new file mode 100644 index 0000000000..3e29659f2d --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "mongodb-single.fullname" . }} + labels: + {{- include "mongodb-single.labels" . | nindent 4 }} + annotations: + {{- include "mongodb-single.annotations" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "mongodb-single.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "mongodb-single.labels" . | nindent 8 }} + annotations: + {{- include "mongodb-single.annotations" . | nindent 8 }} + k8up.syn.tools/backupcommand: /bin/sh -c '/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path | quote }} .' + k8up.syn.tools/file-extension: .{{ include "mongodb-single.fullname" . }}.tar + lagoon.sh/configMapSha: {{ .Values.configMapSha | quote }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: {{ include "mongodb-single.fullname" . }} + persistentVolumeClaim: + claimName: {{ include "mongodb-single.fullname" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image }}" + imagePullPolicy: {{ .Values.imagePullPolicy }} + env: + - name: CRONJOBS + value: {{ .Values.inPodCronjobs | quote }} + - name: LAGOON_GIT_SHA + value: {{ .Values.gitSha | quote }} + envFrom: + - configMapRef: + name: lagoon-env + ports: + - containerPort: 27017 + protocol: TCP + readinessProbe: + tcpSocket: + port: 27017 + initialDelaySeconds: 1 + timeoutSeconds: 1 + volumeMounts: + - name: {{ include "mongodb-single.fullname" . }} + mountPath: {{ .Values.persistentStorage.path | quote }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/pvc.yaml new file mode 100644 index 0000000000..f918b19a9e --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/pvc.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: "{{ include "mongodb-single.fullname" . }}" + labels: + {{- include "mongodb-single.labels" . | nindent 4 }} + annotations: + {{- include "mongodb-single.annotations" . | nindent 4 }} + annotations: + k8up.syn.tools/backup: "false" +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.persistentStorage.size | quote }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/service.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/service.yaml new file mode 100644 index 0000000000..e0f8d76dbc --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mongodb-single.fullname" . }} + labels: + {{- include "mongodb-single.labels" . | nindent 4 }} + annotations: + {{- include "mongodb-single.annotations" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: 27017 + protocol: TCP + name: 27017-tcp + selector: + {{- include "mongodb-single.selectorLabels" . | nindent 4 }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/values.yaml new file mode 100644 index 0000000000..f458c5dde2 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/mongodb-single/values.yaml @@ -0,0 +1,75 @@ +# Default values for mongodb-single. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: "" +environmentType: production +persistentStorage: + size: 5Gi + path: "/data/db" + +imagePullPolicy: Always + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 27017 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: mongodb-single + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +annotations: {} + +resources: + # limits: + # cpu: 100m + # memory: 128Mi + requests: + cpu: 10m + memory: 10Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +inPodCronjobs: "" + +tls_acme: false +routesAutogenerateInsecure: Allow + +configMapSha: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/_helpers.tpl index 7783be5ffc..7a247eea11 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/_helpers.tpl @@ -32,6 +32,14 @@ Create full hostname for autogenerated hosts {{ end }} {{- end -}} +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "nginx-php-persistent.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + {{/* Generate name of Persistent Storage Uses the Release Name (Lagoon Service Name) unless it's overwritten via .Values.persistentStorage.name diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/ingress.yaml index 0bbdf51538..b52ad50766 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/ingress.yaml @@ -25,6 +25,9 @@ spec: tls: - hosts: {{- $host := include "nginx-php-persistent.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "nginx-php-persistent.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} - {{ $host | quote }} {{- if $.Values.routesAutogeneratePrefixes }} {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/pvc.yaml index 286c758d02..46fef5dc39 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/pvc.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/templates/pvc.yaml @@ -7,7 +7,7 @@ metadata: annotations: {{- include "nginx-php-persistent.annotations" . | nindent 4 }} annotations: - appuio.ch/backup: "true" + k8up.syn.tools/backup: "true" spec: accessModes: - ReadWriteMany diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/values.yaml index 003caaf163..e524d379e2 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/values.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx-php-persistent/values.yaml @@ -2,7 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: +replicaCount: 1 images: nginx: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/_helpers.tpl index 7562523676..553f541623 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/_helpers.tpl @@ -32,6 +32,14 @@ Create full hostname for autogenerated hosts {{ end }} {{- end -}} +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "nginx-php.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + {{/* Common labels */}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/ingress.yaml index d993810ee6..4042a541d3 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx-php/templates/ingress.yaml @@ -25,6 +25,9 @@ spec: tls: - hosts: {{- $host := include "nginx-php.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "nginx-php.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} - {{ $host | quote }} {{- if $.Values.routesAutogeneratePrefixes }} {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/_helpers.tpl index 623d96ec7f..5925a431cf 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/_helpers.tpl @@ -32,6 +32,14 @@ Create full hostname for autogenerated hosts {{ end }} {{- end -}} +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "nginx.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + {{/* Common labels */}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/ingress.yaml index e241b8e1ed..35f0f41237 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/nginx/templates/ingress.yaml @@ -25,6 +25,9 @@ spec: tls: - hosts: {{- $host := include "nginx.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "nginx.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} - {{ $host | quote }} {{- if $.Values.routesAutogeneratePrefixes }} {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/_helpers.tpl index 738ebe437b..6f69143d58 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/_helpers.tpl @@ -32,6 +32,14 @@ Create full hostname for autogenerated hosts {{ end }} {{- end -}} +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "node-persistent.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + {{/* Generate name of Persistent Storage Uses the Release Name (Lagoon Service Name) unless it's overwritten via .Values.persistentStorage.name diff --git a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/ingress.yaml index 90d7ccbea5..8368f4e6ac 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/ingress.yaml @@ -25,6 +25,9 @@ spec: tls: - hosts: {{- $host := include "node-persistent.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "node-persistent.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} - {{ $host | quote }} {{- if $.Values.routesAutogeneratePrefixes }} {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/pvc.yaml index 97adc712a7..beea490c13 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/pvc.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/templates/pvc.yaml @@ -5,11 +5,12 @@ metadata: labels: {{- include "node-persistent.labels" . | nindent 4 }} annotations: - appuio.ch/backup: "true" + k8up.syn.tools/backup: "true" {{- include "node-persistent.annotations" . | nindent 4 }} spec: accessModes: - - ReadWriteOnce + - ReadWriteMany + storageClassName: bulk resources: requests: storage: {{ .Values.persistentStorage.size | quote }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/values.yaml index 2de3dc9f82..474ee70e55 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/node-persistent/values.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/node-persistent/values.yaml @@ -2,7 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: +replicaCount: 1 image: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/node/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/node/templates/_helpers.tpl index 13495ff66d..2dfa04cb6c 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/node/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/node/templates/_helpers.tpl @@ -32,6 +32,14 @@ Create full hostname for autogenerated hosts {{ end }} {{- end -}} +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "node.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + {{/* Common labels */}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/node/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/node/templates/ingress.yaml index 8e3e3a89ac..19b586ec0a 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/node/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/node/templates/ingress.yaml @@ -25,6 +25,9 @@ spec: tls: - hosts: {{- $host := include "node.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "node.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} - {{ $host | quote }} {{- if $.Values.routesAutogeneratePrefixes }} {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/node/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/node/values.yaml index a98c59f0cf..46c94380e2 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/node/values.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/node/values.yaml @@ -2,7 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: +replicaCount: 1 image: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/.helmignore b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/Chart.yaml new file mode 100644 index 0000000000..d14919043e --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: postgres-dbaas +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/_helpers.tpl new file mode 100644 index 0000000000..d8680f0a1b --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/_helpers.tpl @@ -0,0 +1,87 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "postgres-dbaas.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "postgres-dbaas.fullname" -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "postgres-dbaas.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create full hostname for autogenerated hosts +*/}} +{{- define "postgres-dbaas.autogeneratedHost" -}} +{{- printf "%s.%s" .Release.Name .Values.routesAutogenerateSuffix | trimSuffix "-" -}} +{{- end -}} + +{{- define "postgres-dbaas.fullnameUppercase" -}} +{{ include "postgres-dbaas.fullname" . | upper | replace "-" "_" }} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "postgres-dbaas.labels" -}} +helm.sh/chart: {{ include "postgres-dbaas.chart" . }} +{{ include "postgres-dbaas.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "postgres-dbaas.lagoonLabels" . }} +{{- end -}} + +{{/* +Add annotations +*/}} +{{- define "postgres-dbaas.annotations" -}} +{{ if .Values.annotations }} +{{- toYaml .Values.annotations }} +{{- end }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "postgres-dbaas.selectorLabels" -}} +app.kubernetes.io/name: {{ include "postgres-dbaas.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Lagoon Labels +*/}} +{{- define "postgres-dbaas.lagoonLabels" -}} +lagoon.sh/service: {{ .Release.Name }} +lagoon.sh/service-type: {{ .Chart.Name }} +lagoon.sh/project: {{ .Values.project }} +lagoon.sh/environment: {{ .Values.environment }} +lagoon.sh/environmentType: {{ .Values.environmentType }} +lagoon.sh/buildType: {{ .Values.buildType }} +{{- end -}} + +{{/* +Annotations +*/}} +{{- define "postgres-dbaas" -}} +lagoon.sh/version: {{ .Values.lagoonVersion | quote }} +{{- if .Values.branch }} +lagoon.sh/branch: {{ .Values.branch | quote }} +{{- end }} +{{- if .Values.prNumber }} +lagoon.sh/prNumber: {{ .Values.prNumber | quote }} +lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} +lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} +{{- end }} +{{- end -}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/dbaas.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/dbaas.yaml new file mode 100644 index 0000000000..231c05a628 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/dbaas.yaml @@ -0,0 +1,11 @@ +apiVersion: postgres.amazee.io/v1 +kind: PostgreSQLConsumer +metadata: + name: {{ include "postgres-dbaas.fullname" . }} + labels: + {{- include "postgres-dbaas.labels" . | nindent 4 }} + annotations: + {{- include "postgres-dbaas.annotations" . | nindent 4 }} + +spec: + environment: {{ .Values.environment}} \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/prebackuppod.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/prebackuppod.yaml new file mode 100644 index 0000000000..39f509e896 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/templates/prebackuppod.yaml @@ -0,0 +1,52 @@ +{{ if .Capabilities.APIVersions.Has "backup.appuio.ch/v1alpha1/PreBackupPod" }} +apiVersion: backup.appuio.ch/v1alpha1 +kind: PreBackupPod +metadata: + name: {{ include "postgres-dbaas.fullname" . }}-prebackuppod + labels: + {{- include "postgres-dbaas.labels" . | nindent 4 }} + annotations: + {{- include "postgres-dbaas.annotations" . | nindent 4 }} +spec: + backupCommand: /bin/sh -c "PGPASSWORD=$BACKUP_DB_PASSWORD pg_dump --host=$BACKUP_DB_HOST --port=$BACKUP_DB_PORT --dbname=$BACKUP_DB_NAME --format=t -w" + fileExtension: .{{ include "postgres-dbaas.fullname" . }}.tar + pod: + metadata: + labels: + prebackuppod: {{ include "postgres-dbaas.fullname" . }} + {{- include "postgres-dbaas.labels" . | nindent 8 }} + spec: + containers: + - args: + - sleep + - infinity + env: + - name: BACKUP_DB_HOST + valueFrom: + configMapKeyRef: + key: {{ include "postgres-dbaas.fullnameUppercase" . }}_HOST + name: lagoon-env + - name: BACKUP_DB_PORT + valueFrom: + configMapKeyRef: + key: {{ include "postgres-dbaas.fullnameUppercase" . }}_PORT + name: lagoon-env + - name: BACKUP_DB_USERNAME + valueFrom: + configMapKeyRef: + key: {{ include "postgres-dbaas.fullnameUppercase" . }}_USERNAME + name: lagoon-env + - name: BACKUP_DB_PASSWORD + valueFrom: + configMapKeyRef: + key: {{ include "postgres-dbaas.fullnameUppercase" . }}_PASSWORD + name: lagoon-env + - name: BACKUP_DB_NAME + valueFrom: + configMapKeyRef: + key: {{ include "postgres-dbaas.fullnameUppercase" . }}_NAME + name: lagoon-env + image: imagecache.amazeeio.cloud/uselagoon/php-8.0-cli + imagePullPolicy: Always + name: {{ include "postgres-dbaas.fullname" . }}-prebackuppod +{{ end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/values.yaml new file mode 100644 index 0000000000..730bcf19b9 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-dbaas/values.yaml @@ -0,0 +1,5 @@ +# Default values for postgres-dbaas. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +environment: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/.helmignore b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/Chart.yaml new file mode 100644 index 0000000000..3d92547a07 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: postgres-single +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/_helpers.tpl new file mode 100644 index 0000000000..06529fe3b5 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/_helpers.tpl @@ -0,0 +1,91 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "postgres-single.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "postgres-single.fullname" -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "postgres-single.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create full hostname for autogenerated hosts +*/}} +{{- define "postgres-single.autogeneratedHost" -}} +{{- printf "%s.%s" .Release.Name .Values.routesAutogenerateSuffix | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "postgres-single.labels" -}} +helm.sh/chart: {{ include "postgres-single.chart" . }} +{{ include "postgres-single.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "postgres-single.lagoonLabels" . }} +{{- end -}} + +{{/* +Add annotations +*/}} +{{- define "postgres-single.annotations" -}} +{{ if .Values.annotations }} +{{- toYaml .Values.annotations }} +{{- end }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "postgres-single.selectorLabels" -}} +app.kubernetes.io/name: {{ include "postgres-single.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create a PriorityClassName. +(this is based on the Lagoon Environment Type)). +*/}} +{{- define "postgres-single.lagoonPriority" -}} +{{- printf "lagoon-priority-%s" .Values.environmentType }} +{{- end -}} + +{{/* +Lagoon Labels +*/}} +{{- define "postgres-single.lagoonLabels" -}} +lagoon.sh/service: {{ .Release.Name }} +lagoon.sh/service-type: {{ .Chart.Name }} +lagoon.sh/project: {{ .Values.project }} +lagoon.sh/environment: {{ .Values.environment }} +lagoon.sh/environmentType: {{ .Values.environmentType }} +lagoon.sh/buildType: {{ .Values.buildType }} +{{- end -}} + +{{/* +Annotations +*/}} +{{- define "postgres-single" -}} +lagoon.sh/version: {{ .Values.lagoonVersion | quote }} +{{- if .Values.branch }} +lagoon.sh/branch: {{ .Values.branch | quote }} +{{- end }} +{{- if .Values.prNumber }} +lagoon.sh/prNumber: {{ .Values.prNumber | quote }} +lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} +lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} +{{- end }} +{{- end -}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/cronjob.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/cronjob.yaml new file mode 100644 index 0000000000..2baf28c650 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/cronjob.yaml @@ -0,0 +1,78 @@ +{{- range $cronjobName, $cronjobConfig := .Values.nativeCronjobs }} +--- +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + labels: + {{- include "postgres-single.labels" $ | nindent 4 }} + annotations: + {{- include "postgres-single.annotations" $ | nindent 4 }} +spec: + schedule: {{ $cronjobConfig.schedule | quote }} + concurrencyPolicy: Forbid + successfulJobsHistoryLimit: 0 + failedJobsHistoryLimit: 1 + jobTemplate: + metadata: + labels: + {{- include "postgres-single.labels" $ | nindent 8 }} + annotations: + {{- include "postgres-single.annotations" $ | nindent 8 }} + spec: + backoffLimit: 0 + template: + metadata: + labels: + {{- include "postgres-single.labels" $ | nindent 12 }} + annotations: + {{- include "postgres-single.annotations" $ | nindent 12 }} + spec: + {{- with $.Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 12 }} + {{- end }} + priorityClassName: {{ include "postgres-single.lagoonPriority" $ }} + enableServiceLinks: false + securityContext: + {{- toYaml $.Values.podSecurityContext | nindent 12 }} + volumes: + - name: {{ include "postgres-single.fullname" $ }} + persistentVolumeClaim: + claimName: {{ include "postgres-single.fullname" $ }} + containers: + - image: {{ $.Values.image | quote }} + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + securityContext: + {{- toYaml $.Values.securityContext | nindent 16 }} + imagePullPolicy: {{ $.Values.imagePullPolicy }} + command: + - /lagoon/cronjob.sh + - {{ $cronjobConfig.command }} + env: + - name: LAGOON_GIT_SHA + value: {{ $.Values.gitSha | quote }} + - name: SERVICE_NAME + value: {{ $.Release.Name | quote }} + envFrom: + - configMapRef: + name: lagoon-env + resources: + {{- toYaml $.Values.resources | nindent 16 }} + volumeMounts: + - name: {{ include "postgres-single.fullname" $ }} + mountPath: {{ $.Values.persistentStorage.path | quote }} + restartPolicy: Never + {{- with $.Values.nodeSelector }} + nodeSelector: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.affinity }} + affinity: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.tolerations }} + tolerations: + {{- toYaml $ | nindent 12 }} + {{- end }} +{{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/deployment.yaml new file mode 100644 index 0000000000..d767b23e71 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/deployment.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "postgres-single.fullname" . }} + labels: + {{- include "postgres-single.labels" . | nindent 4 }} + annotations: + {{- include "postgres-single.annotations" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "postgres-single.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "postgres-single.labels" . | nindent 8 }} + annotations: + {{- include "postgres-single.annotations" . | nindent 8 }} + k8up.syn.tools/backupcommand: /bin/sh -c '/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path | quote }} .' + k8up.syn.tools/file-extension: .{{ include "postgres-single.fullname" . }}.tar + lagoon.sh/configMapSha: {{ .Values.configMapSha | quote }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: {{ include "postgres-single.fullname" . }} + persistentVolumeClaim: + claimName: {{ include "postgres-single.fullname" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image }}" + imagePullPolicy: {{ .Values.imagePullPolicy }} + env: + - name: CRONJOBS + value: {{ .Values.inPodCronjobs | quote }} + - name: LAGOON_GIT_SHA + value: {{ .Values.gitSha | quote }} + envFrom: + - configMapRef: + name: lagoon-env + ports: + - containerPort: 5432 + protocol: TCP + readinessProbe: + tcpSocket: + port: 5432 + initialDelaySeconds: 1 + timeoutSeconds: 1 + livenessProbe: + tcpSocket: + port: 5432 + initialDelaySeconds: 120 + periodSeconds: 5 + volumeMounts: + - name: {{ include "postgres-single.fullname" . }} + mountPath: {{ .Values.persistentStorage.path | quote }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/pvc.yaml new file mode 100644 index 0000000000..020ad75883 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/pvc.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: "{{ include "postgres-single.fullname" . }}" + labels: + {{- include "postgres-single.labels" . | nindent 4 }} + annotations: + {{- include "postgres-single.annotations" . | nindent 4 }} + annotations: + k8up.syn.tools/backup: "false" +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.persistentStorage.size | quote }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/service.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/service.yaml new file mode 100644 index 0000000000..55d5e22bf4 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "postgres-single.fullname" . }} + labels: + {{- include "postgres-single.labels" . | nindent 4 }} + annotations: + {{- include "postgres-single.annotations" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: 5432 + protocol: TCP + name: 5432-tcp + selector: + {{- include "postgres-single.selectorLabels" . | nindent 4 }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/postgres-single/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/values.yaml new file mode 100644 index 0000000000..b24ad7e506 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/postgres-single/values.yaml @@ -0,0 +1,75 @@ +# Default values for postgres-single. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: "" +environmentType: production +persistentStorage: + size: 5Gi + path: "/var/lib/postgresql/data" + +imagePullPolicy: Always + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 5432 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: postgres-single + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +annotations: {} + +resources: + # limits: + # cpu: 100m + # memory: 128Mi + requests: + cpu: 10m + memory: 10Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +inPodCronjobs: "" + +tls_acme: false +routesAutogenerateInsecure: Allow + +configMapSha: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/.helmignore b/images/kubectl-build-deploy-dind/helmcharts/python/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/Chart.yaml b/images/kubectl-build-deploy-dind/helmcharts/python/Chart.yaml new file mode 100644 index 0000000000..f444d94772 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: python +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/python/templates/_helpers.tpl new file mode 100644 index 0000000000..c2bfa3ce5f --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/templates/_helpers.tpl @@ -0,0 +1,94 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "python.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "python.fullname" -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "python.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create full hostname for autogenerated hosts +*/}} +{{- define "python.autogeneratedHost" -}} +{{ if not .prefix }} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateSuffix | trimSuffix "-" -}} +{{ else }} +{{- printf "%s.%s.%s" .prefix .root.Release.Name .root.Values.routesAutogenerateSuffix | trimSuffix "-" -}} +{{ end }} +{{- end -}} + +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "python.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "python.labels" -}} +helm.sh/chart: {{ include "python.chart" . }} +{{ include "python.selectorLabels" . }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "python.lagoonLabels" . }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "python.selectorLabels" -}} +app.kubernetes.io/name: {{ include "python.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create a PriorityClassName. +(this is based on the Lagoon Environment Type)). +*/}} +{{- define "python.lagoonPriority" -}} +{{- printf "lagoon-priority-%s" .Values.environmentType }} +{{- end -}} + +{{/* +Lagoon Labels +*/}} +{{- define "python.lagoonLabels" -}} +lagoon.sh/service: {{ .Release.Name }} +lagoon.sh/service-type: {{ .Chart.Name }} +lagoon.sh/project: {{ .Values.project }} +lagoon.sh/environment: {{ .Values.environment }} +lagoon.sh/environmentType: {{ .Values.environmentType }} +lagoon.sh/buildType: {{ .Values.buildType }} +{{- end -}} + +{{/* +Annotations +*/}} +{{- define "python.annotations" -}} +lagoon.sh/version: {{ .Values.lagoonVersion | quote }} +{{- if .Values.branch }} +lagoon.sh/branch: {{ .Values.branch | quote }} +{{- end }} +{{- if .Values.prNumber }} +lagoon.sh/prNumber: {{ .Values.prNumber | quote }} +lagoon.sh/prHeadBranch: {{ .Values.prHeadBranch | quote }} +lagoon.sh/prBaseBranch: {{ .Values.prBaseBranch | quote }} +{{- end }} +{{- end -}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/templates/cronjob.yaml b/images/kubectl-build-deploy-dind/helmcharts/python/templates/cronjob.yaml new file mode 100644 index 0000000000..019eac8d8c --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/templates/cronjob.yaml @@ -0,0 +1,71 @@ +{{- range $cronjobName, $cronjobConfig := .Values.nativeCronjobs }} +--- +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + labels: + {{- include "python.labels" $ | nindent 4 }} + annotations: + {{- include "python.annotations" . | nindent 4 }} +spec: + schedule: {{ $cronjobConfig.schedule | quote }} + concurrencyPolicy: Forbid + successfulJobsHistoryLimit: 0 + failedJobsHistoryLimit: 1 + jobTemplate: + metadata: + labels: + {{- include "python.labels" $ | nindent 8 }} + annotations: + {{- include "python.annotations" $ | nindent 8 }} + spec: + backoffLimit: 0 + template: + metadata: + labels: + {{- include "python.labels" $ | nindent 12 }} + annotations: + {{- include "python.annotations" $ | nindent 12 }} + spec: + {{- with $.Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 12 }} + {{- end }} + priorityClassName: {{ include "python.lagoonPriority" . }} + enableServiceLinks: false + securityContext: + {{- toYaml $.Values.podSecurityContext | nindent 12 }} + containers: + - image: {{ $.Values.image | quote }} + name: cronjob-{{ $.Release.Name }}-{{ $cronjobName }} + securityContext: + {{- toYaml $.Values.securityContext | nindent 16 }} + imagePullPolicy: {{ $.Values.imagePullPolicy }} + command: + - /lagoon/cronjob.sh + - {{ $cronjobConfig.command }} + env: + - name: LAGOON_GIT_SHA + value: {{ $.Values.gitSha | quote }} + - name: SERVICE_NAME + value: {{ $.Release.Name | quote }} + envFrom: + - configMapRef: + name: lagoon-env + resources: + {{- toYaml $.Values.resources | nindent 16 }} + restartPolicy: Never + {{- with $.Values.nodeSelector }} + nodeSelector: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.affinity }} + affinity: + {{- toYaml $ | nindent 12 }} + {{- end }} + {{- with $.Values.tolerations }} + tolerations: + {{- toYaml $ | nindent 12 }} + {{- end }} +{{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/python/templates/deployment.yaml new file mode 100644 index 0000000000..5d36f25d03 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/templates/deployment.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "python.fullname" . }} + labels: + {{- include "python.labels" . | nindent 4 }} + annotations: + {{- include "python.annotations" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "python.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "python.labels" . | nindent 8 }} + annotations: + {{- include "python.annotations" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + priorityClassName: {{ include "python.lagoonPriority" . }} + enableServiceLinks: false + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - image: {{ .Values.image | quote }} + name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + ports: + - name: http + containerPort: 8800 + protocol: TCP + readinessProbe: + tcpSocket: + port: 8800 + initialDelaySeconds: 15 + timeoutSeconds: 1 + livenessProbe: + tcpSocket: + port: 8800 + initialDelaySeconds: 60 + periodSeconds: 5 + env: + ## LAGOON_GIT_SHA is injected directly and not loaded via `lagoon-env` config + ## This will cause the pod to redeploy on every deployment, even the files have not changed + - name: LAGOON_GIT_SHA + value: {{ .Values.gitSha | quote }} + - name: CRONJOBS + value: | + {{- toYaml .Values.inPodCronjobs | nindent 16 }} + envFrom: + - configMapRef: + name: lagoon-env + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/python/templates/ingress.yaml new file mode 100644 index 0000000000..67bde8c4be --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/templates/ingress.yaml @@ -0,0 +1,60 @@ +{{- if .Values.routesAutogenerateEnabled -}} +{{- $fullName := include "python.fullname" . -}} +--- +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + lagoon.sh/autogenerated: "true" + {{- include "python.labels" . | nindent 4 }} + annotations: + {{- if eq .Values.routesAutogenerateInsecure "Allow"}} + nginx.ingress.kubernetes.io/ssl-redirect: "false" + ingress.kubernetes.io/ssl-redirect: "false" + {{- else if eq .Values.routesAutogenerateInsecure "Redirect"}} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + ingress.kubernetes.io/ssl-redirect: "true" + {{- else if eq .Values.routesAutogenerateInsecure "None"}} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + ingress.kubernetes.io/ssl-redirect: "true" + {{- end }} + kubernetes.io/tls-acme: "true" + {{- include "python.annotations" . | nindent 4 }} +spec: + tls: + - hosts: + {{- $host := include "python.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "python.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} + - {{ $host | quote }} + {{- if $.Values.routesAutogeneratePrefixes }} + {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} + {{- $host := include "python.autogeneratedHost" (dict "root" $ "prefix" $prefix) }} + - {{ $host | quote }} + {{- end }} + {{- end }} + secretName: {{ $fullName }}-tls + rules: + {{- $host := include "python.autogeneratedHost" (dict "root" $) }} + - host: {{ $host | quote }} + http: + paths: + - backend: + serviceName: {{ $fullName }} + servicePort: {{ $.Values.service.port }} + {{- if $.Values.routesAutogeneratePrefixes }} + {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} + {{- $host := include "python.autogeneratedHost" (dict "root" $ "prefix" $prefix) }} + - host: {{ $host | quote }} + http: + paths: + - backend: + serviceName: {{ $fullName }} + servicePort: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- else }} +# empty +{{- end }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/templates/service.yaml b/images/kubectl-build-deploy-dind/helmcharts/python/templates/service.yaml new file mode 100644 index 0000000000..86073d5df4 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "python.fullname" . }} + labels: + {{- include "python.labels" . | nindent 4 }} + annotations: + {{- include "python.annotations" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "python.selectorLabels" . | nindent 4 }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/python/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/python/values.yaml new file mode 100644 index 0000000000..d327798748 --- /dev/null +++ b/images/kubectl-build-deploy-dind/helmcharts/python/values.yaml @@ -0,0 +1,48 @@ +# Default values for python. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: "" + +environmentType: production + +imagePullPolicy: Always + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 8800 + +resources: + # limits: + # cpu: 100m + # memory: 128Mi + requests: + cpu: 10m + memory: 10Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +inPodCronjobs: "" + +configMapSha: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/deployment.yaml index c1fa488359..1c2d75e5de 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/deployment.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/deployment.yaml @@ -20,6 +20,8 @@ spec: {{- include "redis-persistent.datadogLabels" . | nindent 8 }} annotations: {{- include "redis-persistent.annotations" . | nindent 8 }} + k8up.syn.tools/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path }} ." + k8up.syn.tools/fileExtension: .{{ include "redis-persistent.fullname" . }}.tar lagoon.sh/configMapSha: {{ .Values.configMapSha | quote }} spec: {{- with .Values.imagePullSecrets }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/pvc.yaml index a2e665a74f..b36bb405ab 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/pvc.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/redis-persistent/templates/pvc.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "redis-persistent.labels" . | nindent 4 }} annotations: - appuio.ch/backup: "false" + k8up.syn.tools/backup: "false" {{- include "redis-persistent.annotations" . | nindent 4 }} spec: accessModes: diff --git a/images/kubectl-build-deploy-dind/helmcharts/redis/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/redis/templates/deployment.yaml index 68fb7fc5d1..25df1f78c1 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/redis/templates/deployment.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/redis/templates/deployment.yaml @@ -9,7 +9,7 @@ metadata: spec: replicas: {{ .Values.replicaCount }} strategy: - type: Recreate + type: RollingUpdate selector: matchLabels: {{- include "redis.selectorLabels" . | nindent 6 }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/solr/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/solr/templates/deployment.yaml index 3940b72a9d..0d319c0bb7 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/solr/templates/deployment.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/solr/templates/deployment.yaml @@ -20,6 +20,8 @@ spec: {{- include "solr.datadogLabels" . | nindent 8 }} annotations: {{- include "solr.annotations" . | nindent 8 }} + k8up.syn.tools/backupcommand: /bin/sh -c '/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path | quote }} .' + k8up.syn.tools/file-extension: .{{ include "solr.fullname" . }}.tar lagoon.sh/configMapSha: {{ .Values.configMapSha | quote }} spec: {{- with .Values.imagePullSecrets }} @@ -33,7 +35,7 @@ spec: priorityClassName: {{ include "solr.lagoonPriority" . }} enableServiceLinks: false securityContext: - fsGroup: 0 + {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - image: {{ .Values.image | quote }} name: {{ .Chart.Name }} @@ -52,8 +54,6 @@ spec: initialDelaySeconds: 90 timeoutSeconds: 3 failureThreshold: 5 - securityContext: - runAsGroup: 0 envFrom: - configMapRef: name: lagoon-env diff --git a/images/kubectl-build-deploy-dind/helmcharts/solr/templates/prebackuppod.yaml b/images/kubectl-build-deploy-dind/helmcharts/solr/templates/prebackuppod.yaml deleted file mode 100644 index 6d437693cc..0000000000 --- a/images/kubectl-build-deploy-dind/helmcharts/solr/templates/prebackuppod.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{ if .Capabilities.APIVersions.Has "backup.appuio.ch/v1alpha1/PreBackupPod" }} -apiVersion: backup.appuio.ch/v1alpha1 -kind: PreBackupPod -metadata: - name: {{ include "solr.fullname" . }}-prebackuppod - labels: - {{- include "solr.labels" . | nindent 4 }} - annotations: - {{- include "solr.annotations" . | nindent 4 }} -spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path }} ." - fileExtension: .{{ include "solr.fullname" . }}.tar - pod: - metadata: - labels: - prebackuppod: {{ include "solr.fullname" . }} - {{- include "solr.labels" . | nindent 8 }} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: lagoon.sh/service - operator: In - values: - - {{ include "solr.fullname" . }} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: {{ include "solr.fullname" . }}-prebackuppod - volumeMounts: - - name: {{ .Values.persistentStorage.name }} - mountPath: {{ .Values.persistentStorage.path | quote }} - volumes: - - name: {{ .Values.persistentStorage.name }} - persistentVolumeClaim: - claimName: {{ .Values.persistentStorage.name }} -{{ end }} - diff --git a/images/kubectl-build-deploy-dind/helmcharts/solr/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/solr/templates/pvc.yaml index 5c9a313b1c..78e6f13d23 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/solr/templates/pvc.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/solr/templates/pvc.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "solr.labels" . | nindent 4 }} annotations: - appuio.ch/backup: "false" + k8up.syn.tools/backup: "false" {{- include "solr.annotations" . | nindent 4 }} spec: accessModes: diff --git a/images/kubectl-build-deploy-dind/helmcharts/solr/values.yaml b/images/kubectl-build-deploy-dind/helmcharts/solr/values.yaml index 825122a659..b0b393e1bc 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/solr/values.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/solr/values.yaml @@ -2,7 +2,7 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: +replicaCount: 1 image: "" diff --git a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/_helpers.tpl index 22fc0dfa31..01f550d0c3 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/_helpers.tpl @@ -32,6 +32,14 @@ Create full hostname for autogenerated hosts {{ end }} {{- end -}} +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "varnish-persistent.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + {{/* Generate name of Persistent Storage Uses the Release Name (Lagoon Service Name) unless it's overwritten via .Values.persistentStorage.name diff --git a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/deployment.yaml b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/deployment.yaml index 4dd5f59eec..a781afeff3 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/deployment.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/deployment.yaml @@ -20,6 +20,8 @@ spec: {{- include "varnish-persistent.datadogLabels" . | nindent 8 }} annotations: {{- include "varnish-persistent.annotations" . | nindent 8 }} + k8up.syn.tools/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path }} ." + k8up.syn.tools/fileExtension: .{{ include "varnish-persistent.fullname" . }}.tar lagoon.sh/configMapSha: {{ .Values.configMapSha | quote }} spec: {{- with .Values.imagePullSecrets }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/ingress.yaml index 62a0334083..6f70ebe95a 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/ingress.yaml @@ -25,6 +25,9 @@ spec: tls: - hosts: {{- $host := include "varnish-persistent.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "varnish-persistent.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} - {{ $host | quote }} {{- if $.Values.routesAutogeneratePrefixes }} {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} diff --git a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/prebackuppod.yaml b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/prebackuppod.yaml deleted file mode 100644 index 91d4cbdabb..0000000000 --- a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/prebackuppod.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{ if .Capabilities.APIVersions.Has "backup.appuio.ch/v1alpha1/PreBackupPod" }} -apiVersion: backup.appuio.ch/v1alpha1 -kind: PreBackupPod -metadata: - name: {{ include "varnish-persistent.fullname" . }}-prebackuppod - labels: - {{- include "varnish-persistent.labels" . | nindent 4 }} - annotations: - {{- include "varnish-persistent.annotations" . | nindent 4 }} -spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path }} ." - fileExtension: .{{ include "varnish-persistent.fullname" . }}.tar - pod: - metadata: - labels: - prebackuppod: {{ include "varnish-persistent.fullname" . }} - {{- include "varnish-persistent.labels" . | nindent 8 }} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: lagoon.sh/service - operator: In - values: - - {{ include "varnish-persistent.fullname" . }} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: {{ include "varnish-persistent.fullname" . }}-prebackuppod - volumeMounts: - - name: {{ .Values.persistentStorage.name }} - mountPath: {{ .Values.persistentStorage.path | quote }} - volumes: - - name: {{ .Values.persistentStorage.name }} - persistentVolumeClaim: - claimName: {{ .Values.persistentStorage.name }} -{{ end }} - diff --git a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/pvc.yaml b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/pvc.yaml index 9e956adfa5..0c715597bc 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/pvc.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/varnish-persistent/templates/pvc.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "varnish-persistent.labels" . | nindent 4 }} annotations: - appuio.ch/backup: "false" + k8up.syn.tools/backup: "false" {{- include "varnish-persistent.annotations" . | nindent 4 }} spec: accessModes: diff --git a/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/_helpers.tpl b/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/_helpers.tpl index 1a9990e361..78456819da 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/_helpers.tpl +++ b/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/_helpers.tpl @@ -32,6 +32,14 @@ Create full hostname for autogenerated hosts {{ end }} {{- end -}} +{{/* +Create short hostname for autogenerated hosts. +This is used to work around problems with long CN fields in certificates. +*/}} +{{- define "varnish.autogeneratedShortHost" -}} +{{- printf "%s.%s" .root.Release.Name .root.Values.routesAutogenerateShortSuffix }} +{{- end }} + {{/* Common labels */}} diff --git a/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/ingress.yaml b/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/ingress.yaml index 43f310f9da..2f158d8831 100644 --- a/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/ingress.yaml +++ b/images/kubectl-build-deploy-dind/helmcharts/varnish/templates/ingress.yaml @@ -25,6 +25,9 @@ spec: tls: - hosts: {{- $host := include "varnish.autogeneratedHost" (dict "root" $) }} + {{- if and .Values.routesAutogenerateShortSuffix (gt ($host | len) 63) }} + - {{ include "varnish.autogeneratedShortHost" (dict "root" $) | quote }} + {{- end }} - {{ $host | quote }} {{- if $.Values.routesAutogeneratePrefixes }} {{- range $k, $prefix := $.Values.routesAutogeneratePrefixes }} diff --git a/images/kubectl-build-deploy-dind/scripts/exec-additional-yaml.sh b/images/kubectl-build-deploy-dind/scripts/exec-additional-yaml.sh deleted file mode 100755 index 170efa78ed..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-additional-yaml.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -x - -oc process --local -o yaml --insecure-skip-tls-verify \ - -n ${NAMESPACE} \ - -f "${ADDITIONAL_YAML_PATH}" \ - -p SAFE_BRANCH="${SAFE_BRANCH}" \ - -p SAFE_PROJECT="${SAFE_PROJECT}" \ - -p BRANCH="${BRANCH}" \ - -p PROJECT="${PROJECT}" \ - -p LAGOON_GIT_SHA="${LAGOON_GIT_SHA}" \ - -p NAMESPACE=${NAMESPACE} \ - | oc ${ADDITIONAL_YAML_COMMAND} --insecure-skip-tls-verify -n ${NAMESPACE} -f - || ${ADDITIONAL_YAML_IGNORE_ERROR} \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/scripts/exec-fastly-annotations.sh b/images/kubectl-build-deploy-dind/scripts/exec-fastly-annotations.sh new file mode 100755 index 0000000000..39343d2c50 --- /dev/null +++ b/images/kubectl-build-deploy-dind/scripts/exec-fastly-annotations.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# this script is used to work out the fastly annotation overrides that could be defined in the lagoon api + +# if no service id is provided in the `.lagoon.yml` which will be present in `ROUTE_FASTLY_SERVICE_ID` +if [ -z "$ROUTE_FASTLY_SERVICE_ID" ]; then + # then insert the one provided by lagoon in `LAGOON_FASTLY_NOCACHE_SERVICE_ID` if it is available + if [ ! -z "$LAGOON_FASTLY_NOCACHE_SERVICE_ID" ]; then + ROUTE_FASTLY_SERVICE_ID=$LAGOON_FASTLY_NOCACHE_SERVICE_ID + # if the nocache service id was injected by the lagoon builddeploy controller + # then set the watch status to true so it is set in the ingress annotations + # if the lagoon builddeploy controller has the fastly service injection disabled + # then the `LAGOON_FASTLY_NOCACHE_SERVICE_ID` will be empty + ROUTE_FASTLY_SERVICE_WATCH=true + fi +fi + +# check lagoon api variables for `LAGOON_FASTLY_SERVICE_ID` +# this is supported as `SERVICE_ID:WATCH_STATUS:SECRET_NAME(optional)` eg: "fa23rsdgsdgas:false", "fa23rsdgsdgas:true" or "fa23rsdgsdgas:true:examplecom" +# this will apply to ALL ingresses if one is not specifically defined in the `LAGOON_FASTLY_SERVICE_IDS` environment variable override +# see section `FASTLY SERVICE ID PER INGRESS OVERRIDE` in `build-deploy-docker-compose.sh` for info on `LAGOON_FASTLY_SERVICE_IDS` +if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + LAGOON_FASTLY_SERVICE_ID_DATA=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_FASTLY_SERVICE_ID") | "\(.value)"')) + echo $LAGOON_FASTLY_SERVICE_ID_DATA + if [ ! -z "$LAGOON_FASTLY_SERVICE_ID_DATA" ]; then + IFS=':' read -ra LAGOON_FASTLY_SERVICE_ID_SPLIT <<< "$LAGOON_FASTLY_SERVICE_ID_DATA" + if [ -z "${LAGOON_FASTLY_SERVICE_ID_SPLIT[0]}" ] || [ -z "${LAGOON_FASTLY_SERVICE_ID_SPLIT[1]}" ]; then + echo -e "An override was defined in the lagoon API with LAGOON_FASTLY_SERVICE_ID but one of the components was missing, the format should be FASTLY_SERVICE_ID:WATCH_STATUS" + exit 1 + fi + LAGOON_FASTLY_SERVICE_ID=${LAGOON_FASTLY_SERVICE_ID_SPLIT[0]} + LAGOON_FASTLY_SERVICE_WATCH=${LAGOON_FASTLY_SERVICE_ID_SPLIT[1]} + fi +fi +if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then + TEMP_LAGOON_FASTLY_SERVICE_ID_DATA=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_FASTLY_SERVICE_ID") | "\(.value)"')) + if [ ! -z $TEMP_LAGOON_FASTLY_SERVICE_ID_DATA ]; then + IFS=':' read -ra LAGOON_FASTLY_SERVICE_ID_SPLIT <<< "$TEMP_LAGOON_FASTLY_SERVICE_ID_DATA" + if [ -z "${LAGOON_FASTLY_SERVICE_ID_SPLIT[0]}" ] || [ -z "${LAGOON_FASTLY_SERVICE_ID_SPLIT[1]}" ]; then + echo -e "An override was defined in the lagoon API with LAGOON_FASTLY_SERVICE_ID but one of the components was missing, the format should be FASTLY_SERVICE_ID:WATCH_STATUS" + exit 1 + fi + LAGOON_FASTLY_SERVICE_ID=${LAGOON_FASTLY_SERVICE_ID_SPLIT[0]} + LAGOON_FASTLY_SERVICE_WATCH=${LAGOON_FASTLY_SERVICE_ID_SPLIT[1]} + # if the optional secret name is defined in the colon separated values configure that here + if [ ! -z ${LAGOON_FASTLY_SERVICE_ID_SPLIT[2]} ]; then + LAGOON_FASTLY_SERVICE_API_SECRET=${LAGOON_FASTLY_SERVICE_ID_SPLIT[2]} + fi + fi +fi + +# check the `LAGOON_FASTLY_SERVICE_IDS` to see if we have a domain specific override +# this is useful if all domains are using the nocache service, but you have a specific domain that should use a different service +# and you haven't defined it in the lagoon.yml file +# see section `FASTLY SERVICE ID PER INGRESS OVERRIDE` in `build-deploy-docker-compose.sh` for info on `LAGOON_FASTLY_SERVICE_IDS` +if [ ! -z "$LAGOON_FASTLY_SERVICE_IDS" ]; then + IFS=',' read -ra LAGOON_FASTLY_SERVICE_IDS_SPLIT <<< "$LAGOON_FASTLY_SERVICE_IDS" + for LAGOON_FASTLY_SERVICE_ID_DATA in "${LAGOON_FASTLY_SERVICE_IDS_SPLIT[@]}" + do + IFS=':' read -ra LAGOON_FASTLY_SERVICE_ID_SPLIT <<< "$LAGOON_FASTLY_SERVICE_ID_DATA" + if [ -z "${LAGOON_FASTLY_SERVICE_ID_SPLIT[0]}" ] || [ -z "${LAGOON_FASTLY_SERVICE_ID_SPLIT[1]}" ] || [ -z "${LAGOON_FASTLY_SERVICE_ID_SPLIT[2]}" ]; then + echo -e "An override was defined in the lagoon API with LAGOON_FASTLY_SERVICE_IDS but was not structured correctly, the format should be DOMAIN_NAME:FASTLY_SERVICE_ID:WATCH_STATUS and comma separated for multiples" + exit 1 + fi + if [ "${LAGOON_FASTLY_SERVICE_ID_SPLIT[0]}" == "$ROUTE_DOMAIN" ]; then + LAGOON_FASTLY_SERVICE_ID=${LAGOON_FASTLY_SERVICE_ID_SPLIT[1]} + LAGOON_FASTLY_SERVICE_WATCH=${LAGOON_FASTLY_SERVICE_ID_SPLIT[2]} + # if the optional secret name is defined in the colon separated values configure that here + if [ ! -z ${LAGOON_FASTLY_SERVICE_ID_SPLIT[3]} ]; then + LAGOON_FASTLY_SERVICE_API_SECRET=${LAGOON_FASTLY_SERVICE_ID_SPLIT[3]} + fi + fi + done +fi \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/scripts/exec-fastly-api-secrets.sh b/images/kubectl-build-deploy-dind/scripts/exec-fastly-api-secrets.sh new file mode 100755 index 0000000000..40d8e3fb4d --- /dev/null +++ b/images/kubectl-build-deploy-dind/scripts/exec-fastly-api-secrets.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# this script is used to create/update the fastly api secrets + +helm template ${FASTLY_API_SECRET_NAME} \ + /kubectl-build-deploy/helmcharts/fastly-api-secret \ + --set fastly.apiToken="${FASTLY_API_TOKEN}" \ + --set fastly.platformTLSConfiguration="${FASTLY_API_PLATFORMTLS_CONFIGURATION}" \ + -f /kubectl-build-deploy/values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/00-${FASTLY_API_SECRET_NAME}.yaml + ## this api secret needs to exist before the ingress is created, so try prioritise it by putting it numerically ahead of any ingresses + +# add the name to the array because it will be used during the ingress steps to ensure that the secret will exist before annotating any +# ingresses that may want to use it +FASTLY_API_SECRETS+=(${FASTLY_API_SECRET_NAME}) \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubectl-mongodb-dbaas.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubectl-mongodb-dbaas.sh new file mode 100644 index 0000000000..85b7a21335 --- /dev/null +++ b/images/kubectl-build-deploy-dind/scripts/exec-kubectl-mongodb-dbaas.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# The operator can sometimes take a bit, wait until the details are available +# We added a timeout of 10 minutes (120 retries) before exit +OPERATOR_COUNTER=1 +OPERATOR_TIMEOUT=180 +# use the secret name from the consumer to prevent credential clash +until kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.database +do +if [ $OPERATOR_COUNTER -lt $OPERATOR_TIMEOUT ]; then + let OPERATOR_COUNTER=OPERATOR_COUNTER+1 + echo "Service for ${SERVICE_NAME} not available yet, waiting for 5 secs" + sleep 5 +else + echo "Timeout of $OPERATOR_TIMEOUT for ${SERVICE_NAME} creation reached" + exit 1 +fi +done +set +x +# Grab the details from the consumer spec +DB_HOST=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.services.primary) +DB_USER=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.username) +DB_PASSWORD=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.password) +DB_NAME=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.database) +DB_PORT=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.port) +DB_AUTHSOURCE=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.auth.source) +DB_AUTHMECHANISM=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.auth.mechanism) +DB_AUTHTLS=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.auth.tls) + +# Add credentials to our configmap, prefixed with the name of the servicename of this servicebroker +kubectl patch --insecure-skip-tls-verify \ + -n ${NAMESPACE} \ + configmap lagoon-env \ + -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\", \"${SERVICE_NAME_UPPERCASE}_AUTHSOURCE\":\"${DB_AUTHSOURCE}\", \"${SERVICE_NAME_UPPERCASE}_AUTHMECHANISM\":\"${DB_AUTHMECHANISM}\", \"${SERVICE_NAME_UPPERCASE}_AUTHTLS\":\"${DB_AUTHTLS}\" }}" + +set -x diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubectl-postgres-dbaas.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubectl-postgres-dbaas.sh new file mode 100644 index 0000000000..319f6f30e1 --- /dev/null +++ b/images/kubectl-build-deploy-dind/scripts/exec-kubectl-postgres-dbaas.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# The operator can sometimes take a bit, wait until the details are available +# We added a timeout of 10 minutes (120 retries) before exit +OPERATOR_COUNTER=1 +OPERATOR_TIMEOUT=180 +# use the secret name from the consumer to prevent credential clash +until kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get postgresqlconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.database +do +if [ $OPERATOR_COUNTER -lt $OPERATOR_TIMEOUT ]; then + let SERVICE_BROKER_COUNTER=SERVICE_BROKER_COUNTER+1 + echo "Service for ${SERVICE_NAME} not available yet, waiting for 5 secs" + sleep 5 +else + echo "Timeout of $OPERATOR_TIMEOUT for ${SERVICE_NAME} creation reached" + exit 1 +fi +done +set +x +# Grab the details from the consumer spec +DB_HOST=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get postgresqlconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.services.primary) +DB_USER=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get postgresqlconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.username) +DB_PASSWORD=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get postgresqlconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.password) +DB_NAME=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get postgresqlconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.database) +DB_PORT=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get postgresqlconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.port) + +# Add credentials to our configmap, prefixed with the name of the servicename of this servicebroker +kubectl patch --insecure-skip-tls-verify \ + -n ${NAMESPACE} \ + configmap lagoon-env \ + -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\"}}" + +# only add the DB_READREPLICA_HOSTS variable if it exists in the consumer spec +# since the operator can support multiple replica hosts being defined, we should comma seperate them here +if DB_READREPLICA_HOSTS=$(kubectl --insecure-skip-tls-verify -n ${NAMESPACE} get postgresqlconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.services.replicas); then + DB_READREPLICA_HOSTS=$(echo $DB_READREPLICA_HOSTS | cut -c 3- | rev | cut -c 1- | rev | sed 's/^\|$//g' | paste -sd, -) + kubectl patch --insecure-skip-tls-verify \ + -n ${NAMESPACE} \ + configmap lagoon-env \ + -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_READREPLICA_HOSTS\":\"${DB_READREPLICA_HOSTS}\"}}" +fi + +set -x \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-copy-to-registry.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-copy-to-registry.sh new file mode 100644 index 0000000000..86d29b567f --- /dev/null +++ b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-copy-to-registry.sh @@ -0,0 +1,2 @@ +#!/bin/bash +skopeo copy --dest-tls-verify=false docker://${IMAGECACHE_REGISTRY}/${PULL_IMAGE} docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-create-pvc.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-create-pvc.sh deleted file mode 100644 index 08cb06a8c1..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-create-pvc.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# Only generate PVC if it does not exist yet -if ! oc --insecure-skip-tls-verify -n ${NAMESPACE} get pvc "$PVC_NAME" &> /dev/null; then - . /oc-build-deploy/scripts/exec-openshift-resources.sh -fi \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-create-servicebroker.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-create-servicebroker.sh deleted file mode 100755 index 9fad838182..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-create-servicebroker.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Check if the ServiceInstance exists and create if not -if svcat -n ${NAMESPACE} get instances "${SERVICE_NAME}" &> /dev/null; then - echo "ServiceInstance ${SERVICE_NAME} already existing, not attempting to update" -else - # Provision the Instance - svcat -n ${NAMESPACE} provision "${SERVICE_NAME}" --class "${SERVICEBROKER_CLASS}" --plan "${SERVICEBROKER_PLAN}" -fi - -# Check if the resulting Secret from the ServiceBinding exists and create if not. -if oc --insecure-skip-tls-verify -n ${NAMESPACE} get secret "${SERVICE_NAME}-servicebroker-credentials" &> /dev/null; then - echo "Secret '${SERVICE_NAME}-servicebroker-credentials' already existing, not attempting to update" -else - # Sometimes the secret is not existing anymore even though the binding still exists. - # Not exactly sure yet how and why that happens, but we handle it with unbinding first and then bind again. - if svcat -n ${NAMESPACE} get bindings "${SERVICE_NAME}-servicebroker-credentials" &> /dev/null; then - echo "WARNING: Binding '${SERVICE_NAME}-servicebroker-credentials' existing, but the secret not, unbinding and bind again." - svcat -n ${NAMESPACE} unbind ${SERVICE_NAME} --name "${SERVICE_NAME}-servicebroker-credentials" --wait - # wait 5 seconds as sometimes the unbinding is not fully through yet - sleep 5 - fi - # Create the binding, the secret will be named after the name of the binding. - svcat -n ${NAMESPACE} bind ${SERVICE_NAME} --name "${SERVICE_NAME}-servicebroker-credentials" -fi \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-promote.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-promote.sh new file mode 100644 index 0000000000..307fee7cb5 --- /dev/null +++ b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-promote.sh @@ -0,0 +1,2 @@ +#!/bin/bash +skopeo copy --src-tls-verify=false --dest-tls-verify=false docker://${REGISTRY}/${PROJECT}/${PROMOTION_SOURCE_ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} docker://${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-resources.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-resources.sh deleted file mode 100755 index 0806c4b9a0..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-resources.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cat /kubectl-build-deploy/values.yaml - -helm template ${SERVICE_NAME} /kubectl-build-deploy/helmcharts/${SERVICE_TYPE} -s ${HELM_TEMPLATE} -f /kubectl-build-deploy/values.yaml "${HELM_ARGUMENTS[@]}" > $YAML_FOLDER/${SERVICE_NAME}.yaml diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-tag-dockerhub.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-tag-dockerhub.sh deleted file mode 100644 index c905c0b82b..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-tag-dockerhub.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -oc --insecure-skip-tls-verify -n ${NAMESPACE} tag --reference-policy=local --source=docker ${PULL_IMAGE} ${NAMESPACE}/${IMAGE_NAME}:latest diff --git a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-tag.sh b/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-tag.sh deleted file mode 100644 index 3df9c7f9b8..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-kubernetes-tag.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -oc --insecure-skip-tls-verify -n ${NAMESPACE} tag ${PROMOTION_SOURCE_NAMESPACE}/${IMAGE_NAME}:latest ${NAMESPACE}/${IMAGE_NAME}:latest diff --git a/images/kubectl-build-deploy-dind/scripts/exec-monitor-daemonset.sh b/images/kubectl-build-deploy-dind/scripts/exec-monitor-daemonset.sh deleted file mode 100755 index 9daf28e7b1..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-monitor-daemonset.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# while the rollout of a new daemonset is running we gather the logs of the new generated pods and save them in a known location -# in case this rollout fails, we show the logs of the new containers to the user as they might contain information about why -# the rollout has failed -stream_logs_daemonset() { - set +x - # load the generation of the new pods - GENERATION=$(oc -n ${NAMESPACE} get --insecure-skip-tls-verify daemonset ${DAEMONSET} -o=go-template --template='{{.metadata.generation}}') - mkdir -p /tmp/oc-build-deploy/logs/container/${DAEMONSET} - - # this runs in a loop forever (until killed) - while [ 1 ] - do - # Gather all pods and their containers for the current rollout and stream their logs into files - oc -n ${NAMESPACE} get --insecure-skip-tls-verify pods -l "pod-template-generation=${GENERATION},service=${DAEMONSET}" -o json | jq -r '.items[] | .metadata.name + " " + .spec.containers[].name' | - { - while read -r POD CONTAINER ; do - oc -n ${NAMESPACE} logs --insecure-skip-tls-verify --timestamps -f $POD -c $CONTAINER 2> /dev/null > /tmp/oc-build-deploy/logs/container/${DAEMONSET}/$POD-$CONTAINER.log & - done - - # this will wait for all log streaming we started to finish - wait - } - - # If we are here, this means the pods have all stopped (probably because they failed), we just restart - done -} - -# start background logs streaming -stream_logs_daemonset & -STREAM_LOGS_PID=$! - -DESIRED_NUMBER=$(oc --insecure-skip-tls-verify -n ${NAMESPACE} get daemonset "${DAEMONSET}" -o=go-template --template='{{.status.desiredNumberScheduled}}') -MAX_WAIT_SECONDS=600 -END=$((SECONDS+$MAX_WAIT_SECONDS)) - -while true; do - if [[ $SECONDS -gt $END ]]; then - # stop all running stream logs - pkill -P $STREAM_LOGS_PID || true - - # shows all logs we collected for the new containers - if [ -z "$(ls -A /tmp/oc-build-deploy/logs/container/${DAEMONSET})" ]; then - echo "Daemonset '${DAEMONSET}' was not fully scaled within $MAX_WAIT_SECONDS seconds, tried to gather some startup logs of the containers, but unfortunately there were none created, sorry." - else - echo "Daemonset '${DAEMONSET}' was not fully scaled within $MAX_WAIT_SECONDS seconds, tried to gather some startup logs of the containers, hope this helps debugging:" - find /tmp/oc-build-deploy/logs/container/${DAEMONSET}/ -type f -print0 2>/dev/null | xargs -0 -I % sh -c 'echo ======== % =========; cat %; echo' - fi - - exit 1 - fi - - NUMBER_READY=$(oc --insecure-skip-tls-verify -n ${NAMESPACE} get daemonset "${DAEMONSET}" -o=go-template --template='{{.status.numberReady}}') - if [[ $NUMBER_READY == $DESIRED_NUMBER ]]; then - echo "Daemonset '${DAEMONSET}' ready: $NUMBER_READY of $DESIRED_NUMBER ready" - break - else - echo "Daemonset '${DAEMONSET}' not ready yet: $NUMBER_READY of $DESIRED_NUMBER ready, waiting..." - fi - - sleep 10 -done - -# stop all running stream logs -pkill -P $STREAM_LOGS_PID || true \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/scripts/exec-monitor-statefulset.sh b/images/kubectl-build-deploy-dind/scripts/exec-monitor-statefulset.sh deleted file mode 100755 index 3613cfef51..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-monitor-statefulset.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# while the rollout of a new statefulset is running we gather the logs of the new generated pods and save them in a known location -# in case this rollout fails, we show the logs of the new containers to the user as they might contain information about why -# the rollout has failed -stream_logs_statefulset() { - set +x - # load the version of the new pods - UPDATE_REVISION=$(oc -n ${NAMESPACE} get --insecure-skip-tls-verify statefulset ${STATEFULSET} -o=go-template --template='{{.status.updateRevision}}') - mkdir -p /tmp/oc-build-deploy/logs/container/${STATEFULSET} - - # this runs in a loop forever (until killed) - while [ 1 ] - do - # Gather all pods and their containers for the current statefulset revision and stream their logs into files - oc -n ${NAMESPACE} get --insecure-skip-tls-verify pods -l controller-revision-hash=${UPDATE_REVISION} -o json | jq -r '.items[] | .metadata.name + " " + .spec.containers[].name' | - { - while read -r POD CONTAINER ; do - oc -n ${NAMESPACE} logs --insecure-skip-tls-verify --timestamps -f $POD -c $CONTAINER 2> /dev/null > /tmp/oc-build-deploy/logs/container/${STATEFULSET}/$POD-$CONTAINER.log & - done - - # this will wait for all log streaming we started to finish - wait - } - - # If we are here, this means the pods have all stopped (probably because they failed), we just restart - done -} - -# start background logs streaming -stream_logs_statefulset & -STREAM_LOGS_PID=$! - -REPLICAS=$(oc --insecure-skip-tls-verify -n ${NAMESPACE} get statefulset "${STATEFULSET}" -o=go-template --template='{{.spec.replicas}}') -MAX_WAIT_SECONDS=600 -END=$((SECONDS+$MAX_WAIT_SECONDS)) - -while true; do - if [[ $SECONDS -gt $END ]]; then - # stop all running stream logs - pkill -P $STREAM_LOGS_PID || true - - # shows all logs we collected for the new containers - if [ -z "$(ls -A /tmp/oc-build-deploy/logs/container/${STATEFULSET})" ]; then - echo "Statefulset '${STATEFULSET}' was not fully scaled within $MAX_WAIT_SECONDS seconds, tried to gather some startup logs of the containers, but unfortunately there were none created, sorry." - else - echo "Statefulset '${STATEFULSET}' was not fully scaled within $MAX_WAIT_SECONDS seconds, tried to gather some startup logs of the containers, hope this helps debugging:" - find /tmp/oc-build-deploy/logs/container/${STATEFULSET}/ -type f -print0 2>/dev/null | xargs -0 -I % sh -c 'echo ======== % =========; cat %; echo' - fi - - exit 1 - fi - - READY_REPLICAS=$(oc --insecure-skip-tls-verify -n ${NAMESPACE} get statefulset "${STATEFULSET}" -o=go-template --template='{{.status.readyReplicas}}') - if [[ $READY_REPLICAS == $REPLICAS ]]; then - echo "Statefulset '${STATEFULSET}' ready: $READY_REPLICAS of $REPLICAS ready" - break - else - echo "Statefulset '${STATEFULSET}' not ready yet: $READY_REPLICAS of $REPLICAS ready, waiting..." - fi - - sleep 10 -done - -# stop all running stream logs -pkill -P $STREAM_LOGS_PID || true diff --git a/images/kubectl-build-deploy-dind/scripts/exec-push-parallel-tug.sh b/images/kubectl-build-deploy-dind/scripts/exec-push-parallel-tug.sh deleted file mode 100755 index 0583775833..0000000000 --- a/images/kubectl-build-deploy-dind/scripts/exec-push-parallel-tug.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -docker tag ${TEMPORARY_IMAGE_NAME} ${REGISTRY}/${TUG_REGISTRY_REPOSITORY}/${IMAGE_NAME}:${IMAGE_TAG:-latest} - -echo "docker push ${REGISTRY}/${TUG_REGISTRY_REPOSITORY}/${IMAGE_NAME}:${IMAGE_TAG:-latest}" >> /oc-build-deploy/lagoon/push - diff --git a/images/kubectl-build-deploy-dind/tug.sh b/images/kubectl-build-deploy-dind/tug.sh deleted file mode 100755 index 766a015c23..0000000000 --- a/images/kubectl-build-deploy-dind/tug.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -set -x -set -eo pipefail - -THIS_IS_TUG=true - -# Import environment variables with keeping overwritten env variables -TMPFILE=$(mktemp -t dotenv.XXXXXXXX) -export -p > $TMPFILE - -# set -a is short for `set -o allexport` which will export all variables in a file -set -a -. /oc-build-deploy/tug/env -set +a - -# now export all previously existing environments variables so they are stronger than maybe existing ones in the dotenv files -. $TMPFILE || true -# remove the tmpfile -rm $TMPFILE - - - -REGISTRY=docker-registry.default.svc:5000 -NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace) -REGISTRY_REPOSITORY=$NAMESPACE - -if [ "$CI" == "true" ]; then - CI_OVERRIDE_IMAGE_REPO=${REGISTRY}/lagoon -else - CI_OVERRIDE_IMAGE_REPO="" -fi - -if [ ! -f .lagoon.yml ]; then - echo "no .lagoon.yml file found"; exit 1; -fi - -DEPLOYER_TOKEN=$(cat /var/run/secrets/lagoon/deployer/token) - -oc login --insecure-skip-tls-verify --token="${DEPLOYER_TOKEN}" https://kubernetes.default.svc - -. /oc-build-deploy/build-deploy-docker-compose.sh diff --git a/images/kubectl-build-deploy-dind/tug/Dockerfile b/images/kubectl-build-deploy-dind/tug/Dockerfile deleted file mode 100644 index 00b47d05f4..0000000000 --- a/images/kubectl-build-deploy-dind/tug/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/oc - -ENV LAGOON=oc-build-deploy-tug - -RUN mkdir -p /oc-build-deploy - -# Copying already checked out git repo from oc-build-deploy-dind into tug -COPY . /oc-build-deploy - -WORKDIR /oc-build-deploy/git - - -CMD ["/oc-build-deploy/tug.sh"] \ No newline at end of file diff --git a/images/kubectl-build-deploy-dind/tug/tug-build-push.sh b/images/kubectl-build-deploy-dind/tug/tug-build-push.sh deleted file mode 100644 index 797411a43c..0000000000 --- a/images/kubectl-build-deploy-dind/tug/tug-build-push.sh +++ /dev/null @@ -1,66 +0,0 @@ -TUG_REGISTRY=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.tug.registry false) -TUG_REGISTRY_USERNAME=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.tug.username false) -TUG_REGISTRY_PASSWORD=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.tug.password false) -TUG_REGISTRY_REPOSITORY=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.tug.repository false) -TUG_IMAGE_PREFIX=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.tug.image-prefix '') - - -# Login into TUG registry -docker login -u="${TUG_REGISTRY_USERNAME}" -p="${TUG_REGISTRY_PASSWORD}" ${TUG_REGISTRY} -# Overwrite the registry with the tug registry, so Images are pushed to there -REGISTRY=$TUG_REGISTRY -REGISTRY_REPOSITORY=$TUG_REGISTRY_REPOSITORY - -# Make sure the images in IMAGES_PULL are available and can be tagged for pushing them to the external repository afterwards -# In order to get the Service Name and the Image we need to get the Keys `${!IMAGES_PULL[@]}` of the Array first to resolve it to the value afterwards ${IMAGES_PULL[${IMAGE_NAME}]} - -for PULL_IMAGE_NAME in "${!IMAGES_PULL[@]}" -do - PULL_IMAGE="${IMAGES_PULL[${PULL_IMAGE_NAME}]}" - TEMPORARY_IMAGE_NAME="${NAMESPACE}-${PULL_IMAGE_NAME}" - docker pull ${PULL_IMAGE} - docker tag ${PULL_IMAGE} ${TEMPORARY_IMAGE_NAME} -done - -for IMAGE_NAME in "${IMAGES[@]}" -do - # Before the push the temporary name is resolved to the future tag with the registry in the image name - TEMPORARY_IMAGE_NAME="${NAMESPACE}-${IMAGE_NAME}" - ORIGINAL_IMAGE_NAME="${IMAGE_NAME}" - IMAGE_NAME="${TUG_IMAGE_PREFIX}${IMAGE_NAME}" - IMAGE_TAG="${SAFE_BRANCH}" - . /oc-build-deploy/scripts/exec-push-parallel-tug.sh - echo "${ORIGINAL_IMAGE_NAME}" >> /oc-build-deploy/tug/images -done - -# Save the current environment variables so the tug deployment can use them -echo "TYPE=\"${TYPE}\"" >> /oc-build-deploy/tug/env -echo "SAFE_BRANCH=\"${SAFE_BRANCH}\"" >> /oc-build-deploy/tug/env -echo "BRANCH=\"${BRANCH}\"" >> /oc-build-deploy/tug/env -echo "SAFE_PROJECT=\"${SAFE_PROJECT}\"" >> /oc-build-deploy/tug/env -echo "PROJECT=\"${PROJECT}\"" >> /oc-build-deploy/tug/env -echo "ROUTER_URL=\"${ROUTER_URL}\"" >> /oc-build-deploy/tug/env -echo "ENVIRONMENT_TYPE=\"${ENVIRONMENT_TYPE}\"" >> /oc-build-deploy/tug/env -echo "CI=\"${CI}\"" >> /oc-build-deploy/tug/env -echo "LAGOON_GIT_SHA=\"${LAGOON_GIT_SHA}\"" >> /oc-build-deploy/tug/env -echo "TUG_REGISTRY=\"${TUG_REGISTRY}\"" >> /oc-build-deploy/tug/env -echo "TUG_REGISTRY_USERNAME=\"${TUG_REGISTRY_USERNAME}\"" >> /oc-build-deploy/tug/env -echo "TUG_REGISTRY_PASSWORD=\"${TUG_REGISTRY_PASSWORD}\"" >> /oc-build-deploy/tug/env -echo "TUG_REGISTRY_REPOSITORY=\"${TUG_REGISTRY_REPOSITORY}\"" >> /oc-build-deploy/tug/env -echo "TUG_IMAGE_PREFIX=\"${TUG_IMAGE_PREFIX}\"" >> /oc-build-deploy/tug/env - -# build the tug docker image -IMAGE_NAME="${TUG_IMAGE_PREFIX}lagoon-tug" -BUILD_CONTEXT="/oc-build-deploy/" -DOCKERFILE="tug/Dockerfile" -BUILD_ARGS=() -BUILD_ARGS+=(--build-arg IMAGE_REPO="${CI_OVERRIDE_IMAGE_REPO}") -TEMPORARY_IMAGE_NAME="${NAMESPACE}-${IMAGE_NAME}" -. /oc-build-deploy/scripts/exec-build.sh -IMAGE_TAG="${SAFE_BRANCH}" -. /oc-build-deploy/scripts/exec-push-parallel-tug.sh - -# If we have Images to Push to the Registry, let's do so -if [ -f /oc-build-deploy/lagoon/push ]; then - parallel --retries 4 < /oc-build-deploy/lagoon/push -fi diff --git a/images/kubectl/Dockerfile b/images/kubectl/Dockerfile index 99bc279f48..1cfbb0fdd1 100644 --- a/images/kubectl/Dockerfile +++ b/images/kubectl/Dockerfile @@ -1,12 +1,12 @@ -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM golang:1.13-alpine${ALPINE_VERSION} as golang +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons +FROM golang:1.13-alpine3.12 as golang RUN apk add --no-cache git RUN go get github.com/a8m/envsubst/cmd/envsubst -FROM docker:19.03.10 +FROM docker:19.03.14 LABEL maintainer="amazee.io" ENV LAGOON=oc @@ -34,9 +34,9 @@ ENV TMPDIR=/tmp \ BASH_ENV=/home/.bashrc # Defining Versions -ENV KUBECTL_VERSION=v1.16.2 \ - HELM_VERSION=v3.0.0-rc.2 \ - HELM_SHA256=b6fff8e01aa6cd9a4541bd48172bb53b9a0ae38d7e7783a8e0fcc1db63802aaa +ENV KUBECTL_VERSION=v1.20.4 \ + HELM_VERSION=v3.5.2 \ + HELM_SHA256=01b317c506f8b6ad60b11b1dc3f093276bb703281cb1ae01132752253ec706a2 RUN apk add -U --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing aufs-util \ && apk add --update openssl curl jq parallel \ diff --git a/images/logstash/Dockerfile6 b/images/logstash/Dockerfile6 deleted file mode 100644 index 7963ee0d63..0000000000 --- a/images/logstash/Dockerfile6 +++ /dev/null @@ -1,41 +0,0 @@ - - -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/logstash/logstash:6.8.2 - -LABEL maintainer="amazee.io" -ENV LAGOON=logstash - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/logstash/data \ - && fix-permissions /usr/share/logstash/config - -ENV LS_JAVA_OPTS "-Xms400m -Xmx400m" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash", "/usr/local/bin/docker-entrypoint"] \ No newline at end of file diff --git a/images/logstash/Dockerfile7 b/images/logstash/Dockerfile7 deleted file mode 100644 index b2c6c6d4ec..0000000000 --- a/images/logstash/Dockerfile7 +++ /dev/null @@ -1,39 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM docker.elastic.co/logstash/logstash:7.3.0 - -LABEL maintainer="amazee.io" -ENV LAGOON=logstash - -USER root - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /home /home - -RUN curl -sL https://github.com/krallin/tini/releases/download/v0.18.0/tini -o /sbin/tini && chmod a+x /sbin/tini - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -# Reproduce behavior of Alpine: Run Bash as sh -RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN fix-permissions /usr/share/logstash/data \ - && fix-permissions /usr/share/logstash/config - -ENV LS_JAVA_OPTS "-Xms400m -Xmx400m" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash", "/usr/local/bin/docker-entrypoint"] \ No newline at end of file diff --git a/images/mariadb-drupal/Dockerfile b/images/mariadb-drupal/Dockerfile deleted file mode 100644 index cdce5d1b35..0000000000 --- a/images/mariadb-drupal/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/mariadb - -ENV MARIADB_DATABASE=drupal \ - MARIADB_USER=drupal \ - MARIADB_PASSWORD=drupal diff --git a/images/mariadb/Dockerfile b/images/mariadb/Dockerfile deleted file mode 100644 index bb400b8b70..0000000000 --- a/images/mariadb/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM alpine:${ALPINE_VERSION} - -LABEL maintainer="amazee.io" - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -ENV BACKUPS_DIR="/var/lib/mysql/backup" - -ENV MARIADB_DATABASE=lagoon \ - MARIADB_USER=lagoon \ - MARIADB_PASSWORD=lagoon \ - MARIADB_ROOT_PASSWORD=Lag00n - -RUN \ - apk add --no-cache --virtual .common-run-deps \ - bash \ - curl \ - mariadb \ - mariadb-client \ - mariadb-common \ - mariadb-server-utils \ - net-tools \ - pwgen \ - tzdata \ - wget \ - gettext; \ - rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*; \ - rm -rf /var/lib/mysql/* /etc/mysql/ /etc/my.cnf*; \ - curl -sSL http://mysqltuner.pl/ -o mysqltuner.pl - -COPY entrypoints/ /lagoon/entrypoints/ -COPY mysql-backup.sh /lagoon/ -COPY my.cnf /etc/mysql/my.cnf - -RUN for i in /var/run/mysqld /var/lib/mysql /etc/mysql/conf.d /docker-entrypoint-initdb.d/ "${BACKUPS_DIR}" /home; \ - do mkdir -p $i; chown mysql $i; /bin/fix-permissions $i; \ - done - -COPY root/usr/share/container-scripts/mysql/readiness-probe.sh /usr/share/container-scripts/mysql/readiness-probe.sh -RUN /bin/fix-permissions /usr/share/container-scripts/mysql/ \ - && /bin/fix-permissions /etc/mysql - -RUN touch /var/log/mariadb-slow.log && /bin/fix-permissions /var/log/mariadb-slow.log \ - && touch /var/log/mariadb-queries.log && /bin/fix-permissions /var/log/mariadb-queries.log - -# We cannot start mysql as root, we add the user mysql to the group root and -# change the user of the Docker Image to this user. -RUN addgroup mysql root -USER mysql -ENV USER_NAME mysql - -WORKDIR /var/lib/mysql -VOLUME /var/lib/mysql -EXPOSE 3306 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["mysqld"] diff --git a/images/mariadb/entrypoints/100-mariadb-logging.bash b/images/mariadb/entrypoints/100-mariadb-logging.bash deleted file mode 100755 index 976d9218a0..0000000000 --- a/images/mariadb/entrypoints/100-mariadb-logging.bash +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -if [ -n "$MARIADB_LOG_SLOW" ]; then - echo "MARIADB_LOG_SLOW set, logging to /etc/mysql/conf.d/log-slow.cnf" - cat < /etc/mysql/conf.d/log-slow.cnf -[mysqld] -slow_query_log = 1 -slow_query_log_file = /var/log/mariadb-slow.log -EOF -fi - - -if [ -n "$MARIADB_LOG_QUERIES" ]; then - echo "MARIADB_LOG_QUERIES set, logging to /etc/mysql/conf.d/log-queries.cnf" - cat < /etc/mysql/conf.d/log-queries.cnf - -[mysqld] -general-log -log-output=file -general-log-file=/var/log/mariadb-queries.log -EOF -fi diff --git a/images/mariadb/entrypoints/150-mariadb-performance.bash b/images/mariadb/entrypoints/150-mariadb-performance.bash deleted file mode 100755 index c8b73b2d45..0000000000 --- a/images/mariadb/entrypoints/150-mariadb-performance.bash +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -if [ "$LAGOON_ENVIRONMENT_TYPE" == "production" ]; then - # only set if not already defined - if [ -z ${MARIADB_INNODB_BUFFER_POOL_SIZE+x} ]; then - export MARIADB_INNODB_BUFFER_POOL_SIZE=1024M - fi - if [ -z ${MARIADB_INNODB_LOG_FILE_SIZE+x} ]; then - export MARIADB_INNODB_LOG_FILE_SIZE=256M - fi -fi \ No newline at end of file diff --git a/images/mariadb/entrypoints/200-mariadb-envplate.bash b/images/mariadb/entrypoints/200-mariadb-envplate.bash deleted file mode 100755 index b5a659cc07..0000000000 --- a/images/mariadb/entrypoints/200-mariadb-envplate.bash +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -/bin/ep /etc/mysql/* \ No newline at end of file diff --git a/images/mariadb/entrypoints/9999-mariadb-init.bash b/images/mariadb/entrypoints/9999-mariadb-init.bash deleted file mode 100755 index 72dc40ad22..0000000000 --- a/images/mariadb/entrypoints/9999-mariadb-init.bash +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -# Locations -CONTAINER_SCRIPTS_DIR="/usr/share/container-scripts/mysql" - -if [ "$(ls -A /etc/mysql/conf.d/)" ]; then - ep /etc/mysql/conf.d/* -fi - -if [ "${1:0:1}" = '-' ]; then - set -- mysqld "$@" -fi - -wantHelp= -for arg; do - case "$arg" in - -'?'|--help|--print-defaults|-V|--version) - wantHelp=1 - break - ;; - esac -done - -# check if MARIADB_COPY_DATA_DIR_SOURCE is set, if yes we're coping the contents of the given folder into the data dir folder -# this allows to prefill the datadir with a provided datadir (either added in a Dockerfile build, or mounted into the running container). -# This is different than just setting $MARIADB_DATA_DIR to the source folder, as only /var/lib/mysql is a persistent folder, so setting -# $MARIADB_DATA_DIR to another folder will make mariadb to not store the datadir across container restarts, while with this copy system -# the data will be prefilled and persistent across container restarts. -if [ -n "$MARIADB_COPY_DATA_DIR_SOURCE" ]; then - if [ -d ${MARIADB_DATA_DIR:-/var/lib/mysql}/mysql ]; then - echo "MARIADB_COPY_DATA_DIR_SOURCE is set, but MySQL directory already present in '${MARIADB_DATA_DIR:-/var/lib/mysql}/mysql' skipping copying" - else - echo "MARIADB_COPY_DATA_DIR_SOURCE is set, copying datadir contents from '$MARIADB_COPY_DATA_DIR_SOURCE' to '${MARIADB_DATA_DIR:-/var/lib/mysql}'" - CUR_DIR=${PWD} - cd ${MARIADB_COPY_DATA_DIR_SOURCE}/; tar cf - . | (cd ${MARIADB_DATA_DIR:-/var/lib/mysql}; tar xvf -) - cd $CUR_DIR - fi -fi - -ln -sf ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf /home/.my.cnf - -if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then - if [ ! -d "/run/mysqld" ]; then - mkdir -p /run/mysqld - chown -R mysql:mysql /run/mysqld - fi - - if [ -d ${MARIADB_DATA_DIR:-/var/lib/mysql}/mysql ]; then - echo "MySQL directory already present, skipping creation" - - echo "starting mysql for mysql upgrade." - /usr/bin/mysqld --skip-networking --wsrep_on=OFF & - pid="$!" - echo "pid is $pid" - - for i in {30..0}; do - if echo 'SELECT 1' | mysql -u root; then - break - fi - echo 'MySQL init process in progress...' - sleep 1 - done - - mysql_upgrade --force - - if ! kill -s TERM "$pid" || ! wait "$pid"; then - echo >&2 'MySQL init process failed.' - exit 1 - fi - else - echo "MySQL data directory not found, creating initial DBs" - - mysql_install_db --skip-name-resolve --skip-test-db --auth-root-authentication-method=normal --datadir=${MARIADB_DATA_DIR:-/var/lib/mysql} --basedir=/usr - - echo "starting mysql for initdb.d import." - /usr/bin/mysqld --skip-networking --wsrep_on=OFF & - pid="$!" - echo "pid is $pid" - - for i in {30..0}; do - if echo 'SELECT 1' | mysql -u root; then - break - fi - echo 'MySQL init process in progress...' - sleep 1 - done - - if [ "$MARIADB_ROOT_PASSWORD" = "" ]; then - MARIADB_ROOT_PASSWORD=`pwgen 16 1` - echo "[i] MySQL root Password: $MARIADB_ROOT_PASSWORD" - fi - - MARIADB_DATABASE=${MARIADB_DATABASE:-""} - MARIADB_USER=${MARIADB_USER:-""} - MARIADB_PASSWORD=${MARIADB_PASSWORD:-""} - - tfile=`mktemp` - if [ ! -f "$tfile" ]; then - return 1 - fi - - cat << EOF > $tfile -DROP DATABASE IF EXISTS test; -USE mysql; -ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD("$MARIADB_ROOT_PASSWORD"); -FLUSH PRIVILEGES; - -EOF - - if [ "$MARIADB_DATABASE" != "" ]; then - echo "[i] Creating database: $MARIADB_DATABASE" - echo "CREATE DATABASE IF NOT EXISTS \`$MARIADB_DATABASE\` ;" >> $tfile - if [ "$MARIADB_USER" != "" ]; then - echo "[i] Creating user: $MARIADB_USER with password $MARIADB_PASSWORD" - echo "GRANT ALL ON \`$MARIADB_DATABASE\`.* to '$MARIADB_USER'@'%' IDENTIFIED BY '$MARIADB_PASSWORD';" >> $tfile - fi - fi - - - cat $tfile - cat $tfile | mysql -v -u root - rm -v -f $tfile - - echo "[client]" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "user=root" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "password=${MARIADB_ROOT_PASSWORD}" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "[mysql]" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - echo "database=${MARIADB_DATABASE}" >> ${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf - - for f in `ls /docker-entrypoint-initdb.d/*`; do - case "$f" in - *.sh) echo "$0: running $f"; . "$f" ;; - *.sql) echo "$0: running $f"; cat $f| envsubst | tee | mysql -u root -p${MARIADB_ROOT_PASSWORD}; echo ;; - *) echo "$0: ignoring $f" ;; - esac - echo - done - - if ! kill -s TERM "$pid" || ! wait "$pid"; then - echo >&2 'MySQL init process failed.' - exit 1 - fi - - fi - - echo "done, now starting daemon" - -fi diff --git a/images/mariadb/my.cnf b/images/mariadb/my.cnf deleted file mode 100644 index 2a727bb2d0..0000000000 --- a/images/mariadb/my.cnf +++ /dev/null @@ -1,42 +0,0 @@ -# The following options will be passed to all MariaDB clients -[client] -port = 3306 -socket = /run/mysqld/mysqld.sock - -# Here follows entries for some specific programs - -# The MariaDB server -[mysqld] -port = 3306 -socket = /run/mysqld/mysqld.sock -datadir = ${MARIADB_DATA_DIR:-/var/lib/mysql} -character_set_server = ${MARIADB_CHARSET:-utf8mb4} -collation_server = ${MARIADB_COLLATION:-utf8mb4_bin} -expire_logs_days = 10 -ignore_db_dirs=backup -innodb_buffer_pool_size = ${MARIADB_INNODB_BUFFER_POOL_SIZE:-256M} -innodb_buffer_pool_instances = ${MARIADB_INNODB_BUFFER_POOL_INSTANCES:-1} -innodb_log_buffer_size = 32M -innodb_log_file_size = ${MARIADB_INNODB_LOG_FILE_SIZE:-64M} -join_buffer_size = 2M -key_buffer_size = 16M -max_allowed_packet = ${MARIADB_MAX_ALLOWED_PACKET:-64M} -max_binlog_size = 100M -max_connections = 400 -max_heap_table_size = 512M -myisam-recover-options = BACKUP -query_cache_size = 0 -query_cache_type = 0 -skip-external-locking -skip_name_resolve = 1 -table_open_cache = 200000 -thread_cache_size = 8 -thread_stack = 256K -tmp_table_size = 512M -tmpdir = /tmp -transaction-isolation = READ-COMMITTED -skip-name-resolve -optimizer_search_depth = 0 -innodb_flush_log_at_trx_commit = 0 - -!includedir /etc/mysql/conf.d diff --git a/images/mariadb/mysql-backup.sh b/images/mariadb/mysql-backup.sh deleted file mode 100755 index bea76622ef..0000000000 --- a/images/mariadb/mysql-backup.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -#============================================================================== -#TITLE: mysql_backup.sh -#DESCRIPTION: script for automating the daily mysql backups on development computer -#AUTHOR: tleish -#DATE: 2013-12-20 -#VERSION: 0.4 -#USAGE: ./mysql_backup.sh -#CRON: - # example cron for daily db backup @ 9:15 am - # min hr mday month wday command - # 15 9 * * * /Users/[your user name]/scripts/mysql_backup.sh - -#RESTORE FROM BACKUP - #$ gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname] - -#============================================================================== -# CUSTOM SETTINGS -#============================================================================== - -set -eu -o pipefail - -# directory to put the backup files -BACKUP_DIR=${MARIADB_DATA_DIR:-/var/lib/mysql}/backup - -# MYSQL Parameters -MARIADB_USER=${MARIADB_USER:-lagoon} -MARIADB_PASSWORD=${MARIADB_PASSWORD:-lagoon} - -MARIADB_HOST=$1 - -# Don't backup databases with these names -# Example: starts with mysql (^mysql) or ends with _schema (_schema$) -IGNORE_DB="(^mysql|_schema$)" - -# Number of days to keep backups -KEEP_BACKUPS_FOR=4 #days - -#============================================================================== -# METHODS -#============================================================================== - -# YYYY-MM-DD_HHMMSS -TIMESTAMP=$(date +%F_%H%M%S) - -function prepare() -{ - mkdir -p $BACKUP_DIR -} - -function delete_old_backups() -{ - echo "Deleting $BACKUP_DIR/*.sql.gz older than $KEEP_BACKUPS_FOR days" - find $BACKUP_DIR -type f -name "*.sql.gz" -mtime +$KEEP_BACKUPS_FOR -exec rm {} \; -} - -function mysql_login() { - cmd="-u $MARIADB_USER -h $MARIADB_HOST" - if [ -n "$MARIADB_PASSWORD" ]; then - cmd="$cmd -p$MARIADB_PASSWORD" - fi - echo $cmd -} - -function database_list() { - local show_databases_sql="SHOW DATABASES WHERE \`Database\` NOT REGEXP '$IGNORE_DB'" - echo $(mysql $(mysql_login) -e "$show_databases_sql"|awk -F " " '{if (NR!=1) print $1}') -} - -function echo_status(){ - printf '\r'; - printf ' %0.s' {0..100} - printf '\r'; - printf "$1"'\r' -} - -function backup_database(){ - backup_file="$BACKUP_DIR/$TIMESTAMP.$database.sql.gz" - output="${output}${database} => $backup_file\n" - echo_status "...backing up $count of $total databases: $database" - $(mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction $(mysql_login) $database | gzip -9 > $backup_file) -} - -function backup_databases(){ - local databases=$(database_list) - local total=$(echo $databases | wc -w | xargs) - local output="" - local count=1 - for database in $databases; do - backup_database - local count=$((count+1)) - done - echo -ne $output -} - -function hr(){ - printf '=%.0s' {1..100} - printf "\n" -} - -#============================================================================== -# RUN SCRIPT -#============================================================================== -prepare -delete_old_backups -hr -backup_databases -hr -printf "All backed up!\n\n" diff --git a/images/mariadb/root/usr/share/container-scripts/mysql/readiness-probe.sh b/images/mariadb/root/usr/share/container-scripts/mysql/readiness-probe.sh deleted file mode 100755 index 368be4374b..0000000000 --- a/images/mariadb/root/usr/share/container-scripts/mysql/readiness-probe.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# openshift-mariadb: mysqld readinessProbe -# - -mysql --defaults-file=${MARIADB_DATA_DIR:-/var/lib/mysql}/.my.cnf -e"SHOW DATABASES;" - -if [ $? -ne 0 ]; then - exit 1 -else - exit 0 -fi diff --git a/images/mongo/Dockerfile b/images/mongo/Dockerfile deleted file mode 100644 index 0c433eb0dc..0000000000 --- a/images/mongo/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM alpine:3.8 - -LABEL maintainer="amazee.io" -ENV LAGOON=mongo - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk --no-cache add mongodb - -RUN mkdir -p /data/db /data/configdb && \ - fix-permissions /data/db && \ - fix-permissions /data/configdb - -VOLUME /data/db -EXPOSE 27017 28017 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD [ "mongod", "--bind_ip", "0.0.0.0" ] diff --git a/images/nginx-drupal/Dockerfile b/images/nginx-drupal/Dockerfile deleted file mode 100644 index 20f043040c..0000000000 --- a/images/nginx-drupal/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/nginx - -LABEL maintainer="amazee.io" -ENV LAGOON=nginx - -RUN mkdir -p /etc/nginx/conf.d/drupal - -COPY drupal /etc/nginx/conf.d/drupal/ -COPY drupal.conf /etc/nginx/conf.d/app.conf - -RUN fix-permissions /etc/nginx diff --git a/images/nginx-drupal/drupal.conf b/images/nginx-drupal/drupal.conf deleted file mode 100644 index de97c2b71c..0000000000 --- a/images/nginx-drupal/drupal.conf +++ /dev/null @@ -1,145 +0,0 @@ -### Nginx configuration for Drupal 7 and 8. -server { - include /etc/nginx/conf.d/drupal/server_prepend*.conf; - - listen ${NGINX_LISTEN:-8080} default_server; - - include /etc/nginx/helpers/*.conf; - - root /app/${WEBROOT:-}; - index index.php; - - ## rewriting /index.php to / because after https://www.drupal.org/node/2599326 - ## autocomplete URLs are forced to go to index.php - rewrite ^/index.php / last; - - ## The 'default' location. - location / { - include /etc/nginx/conf.d/drupal/location_prepend*.conf; - - ## Do not allow access to .txt and .md unless inside sites/*/files/ - location ~* ^(?!.+sites\/.+\/files\/).+\.(txt|md)$ { - deny all; - access_log off; - log_not_found off; - } - - ## Replicate the Apache directive of Drupal standard - ## .htaccess. Disable access to any code files. Return a 404 to curtail - ## information disclosure. - location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^\/(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^\/#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ { - deny all; - access_log off; - log_not_found off; - } - - ## Expiring per default for four weeks and one second, Drupal will overwrite that if necessary - expires ${NGINX_DEFAULT_EXPIRES:-2628001s}; - - ## Disallow access to any dot files, but send the request to Drupal - location ~* /\. { - try_files /dev/null @drupal; - } - - ### Directives for installing drupal. - location ~* ^(/install.php|/core/install.php) { - try_files /dev/null @php; - } - - ## Direct Access to .php files is not alled and is sent to Drupal instead - location ~* ^.+\.php$ { - try_files /dev/null @drupal; - } - - ## Try to find a file with given URL, if not pass to Drupal - try_files $uri @drupal; - - include /etc/nginx/conf.d/drupal/location_append*.conf; - } - - ## Main Drupal Location - location @drupal { - include /etc/nginx/conf.d/drupal/location_drupal_prepend*.conf; - - include /etc/nginx/fastcgi.conf; - fastcgi_param SCRIPT_NAME /index.php; - fastcgi_param SCRIPT_FILENAME $realpath_root/index.php; - fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; - - include /etc/nginx/conf.d/drupal/location_drupal_append*.conf; - } - - ## PHP Location. - ## Warning: This allows to execute any PHP files, use with care! - location @php { - include /etc/nginx/conf.d/drupal/location_php_prepend*.conf; - - include /etc/nginx/fastcgi.conf; - fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; - - include /etc/nginx/conf.d/drupal/location_php_append*.conf; - } - - ## Trying to access private files directly returns a 404. - location /sites/default/files/private/ { - internal; - } - - ## Disallow access to patches directory. - location ^~ /patches/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to backup directory. - location ^~ /backup/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to vagrant directory. - location ^~ /vagrant/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to vendor directory. - location ^~ /core/vendor/ { - deny all; - access_log off; - log_not_found off; - } - - ## Disallow access to vendor directory. - location ^~ /vendor/ { - deny all; - access_log off; - log_not_found off; - } - - ## Support for the robotstxt module - ## http://drupal.org/project/robotstxt. - location = /robots.txt { - access_log off; - try_files $uri @drupal; - } - - ## Add support for the humanstxt module - ## http://drupal.org/project/humanstxt. - location = /humans.txt { - access_log off; - try_files $uri @drupal; - } - - ## Return an in memory 1x1 transparent GIF. - location @empty { - expires 30d; - empty_gif; - } - - include /etc/nginx/conf.d/drupal/favicon.conf; - include /etc/nginx/conf.d/drupal/server_append*.conf; -} diff --git a/images/nginx-drupal/drupal/favicon.conf b/images/nginx-drupal/drupal/favicon.conf deleted file mode 100644 index bbe0d8427b..0000000000 --- a/images/nginx-drupal/drupal/favicon.conf +++ /dev/null @@ -1,6 +0,0 @@ -## Support for favicon. Return an 1x1 transparent GIF if it doesn't -## exist. -location = /favicon.ico { - expires 30d; - try_files /favicon.ico @empty; -} diff --git a/images/nginx/Dockerfile b/images/nginx/Dockerfile deleted file mode 100644 index 5f9cc78ccc..0000000000 --- a/images/nginx/Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# Alpine 3.11 per https://github.com/openresty/docker-openresty/blob/master/alpine/Dockerfile#L5 -FROM openresty/openresty:1.17.8.2-alpine - -LABEL maintainer="amazee.io" -ENV LAGOON=nginx - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk add --no-cache openssl - -RUN rm -Rf /etc/nginx && ln -s /usr/local/openresty/nginx/conf /etc/nginx - -COPY nginx.conf /etc/nginx/nginx.conf -COPY fastcgi.conf /etc/nginx/fastcgi.conf -COPY fastcgi.conf /etc/nginx/fastcgi_params -COPY helpers/ /etc/nginx/helpers/ -COPY static-files.conf /etc/nginx/conf.d/app.conf -COPY redirects-map.conf /etc/nginx/redirects-map.conf -COPY healthcheck/healthz.locations healthcheck/healthz.locations.php.disable /etc/nginx/conf.d/ - -RUN mkdir -p /app \ - && rm -f /etc/nginx/conf.d/default.conf \ - && fix-permissions /usr/local/openresty/nginx \ - && fix-permissions /var/run/ - -COPY docker-entrypoint /lagoon/entrypoints/70-nginx-entrypoint - -WORKDIR /app - -EXPOSE 8080 - -# tells the local development environment on which port we are running -ENV LAGOON_LOCALDEV_HTTP_PORT=8080 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["nginx", "-g", "daemon off;"] diff --git a/images/nginx/docker-entrypoint b/images/nginx/docker-entrypoint deleted file mode 100755 index 2f8458ec4a..0000000000 --- a/images/nginx/docker-entrypoint +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# If `BASIC_AUTH` is not already set to 'off'. -if [[ ! "${BASIC_AUTH}" == "off" ]]; then - # And if a username and password is set. - if [ ! -z ${BASIC_AUTH_USERNAME+x} ] && [ ! -z ${BASIC_AUTH_PASSWORD+x} ]; then - # Generate a basic authentication config file for Nginx. - printf "${BASIC_AUTH_USERNAME}:$(openssl passwd -crypt ${BASIC_AUTH_PASSWORD})\n" >> /etc/nginx/.htpasswd - # Set `BASIC_AUTH` to restricted which will tell nginx to do basic authentication. - export BASIC_AUTH="restricted" - fi -fi - -ep /etc/nginx/* -# Find all folders within /etc/nginx/conf.d/ -find /etc/nginx/conf.d/ -type d | while read DIR; do - # envplate if found folder is not empty - if find $DIR -mindepth 1 | read; then - ep $DIR/*; - fi -done -ep /etc/nginx/helpers/* - -# If PHP is enabled, we override the Luascript /healthz check -echo "Setting up Healthz routing" -if [ ! -z "$NGINX_FASTCGI_PASS" ]; then - echo "Healthz routing - using PHP" - cp /etc/nginx/conf.d/healthz.locations.php.disable /etc/nginx/conf.d/healthz.locations -fi - -if [ "$FAST_HEALTH_CHECK" == "true" ]; then - echo "FAST HEALTH CHECK ENABLED" - cp /etc/nginx/helpers/90_healthz_fast_check.conf.disabled /etc/nginx/helpers/90_health_fast_check.conf -fi \ No newline at end of file diff --git a/images/nginx/fastcgi.conf b/images/nginx/fastcgi.conf deleted file mode 100644 index 9cbc41e668..0000000000 --- a/images/nginx/fastcgi.conf +++ /dev/null @@ -1,63 +0,0 @@ - -set $fastcgi_port "80"; -if ($http_x_forwarded_proto = 'https') { - set $fastcgi_https "on"; - set $fastcgi_port "443"; -} - -set_by_lua_block $remote_addr_clean { - if string.find(ngx.var.remote_addr, "^::ffff:") then - return string.match(ngx.var.remote_addr, "^::ffff:(.*)") - else - return ngx.var.remote_addr - end -} - -fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; -fastcgi_param QUERY_STRING $query_string; -fastcgi_param REQUEST_METHOD $request_method; -fastcgi_param CONTENT_TYPE $content_type; -fastcgi_param CONTENT_LENGTH $content_length; - -fastcgi_param SCRIPT_NAME $fastcgi_script_name; -fastcgi_param REQUEST_URI $request_uri; -fastcgi_param DOCUMENT_URI $document_uri; -fastcgi_param DOCUMENT_ROOT $document_root; -fastcgi_param SERVER_PROTOCOL $server_protocol; -fastcgi_param REQUEST_SCHEME $scheme; -fastcgi_param HTTPS $https if_not_empty; -fastcgi_param HTTPS $fastcgi_https if_not_empty; - -fastcgi_param GATEWAY_INTERFACE CGI/1.1; -fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; - -fastcgi_param REMOTE_ADDR $remote_addr_clean; -fastcgi_param REMOTE_PORT $remote_port; -fastcgi_param SERVER_ADDR $server_addr; - -# Setting to Port 80 and 443 based on if we have an upstream https or not -fastcgi_param SERVER_PORT $fastcgi_port; - -# Setting to $host as $server_name is empty all the time -fastcgi_param SERVER_NAME $host; - -# PHP only, required if PHP was built with --enable-force-cgi-redirect -fastcgi_param REDIRECT_STATUS 200; - -# Mitigate https://httpoxy.org/ vulnerabilities -fastcgi_param HTTP_PROXY ""; - -# Mitigate CVE-2018-14773: https://symfony.com/blog/cve-2018-14773-remove-support-for-legacy-and-risky-http-headers -fastcgi_param HTTP_X-ORIGINAL-URL ""; -fastcgi_param HTTP_X_ORIGINAL_URL ""; -fastcgi_param HTTP_X-REWRITE-URL ""; -fastcgi_param HTTP_X_REWRITE_URL ""; - -fastcgi_keep_conn on; -fastcgi_index index.php; -fastcgi_hide_header 'X-Generator'; - -fastcgi_buffers ${FASTCGI_BUFFERS:-256 32k}; -fastcgi_buffer_size ${FASTCGI_BUFFER_SIZE:-32k}; -fastcgi_read_timeout ${FASTCGI_READ_TIMEOUT:-3600s}; -fastcgi_temp_path /tmp/fastcgi_temp; diff --git a/images/nginx/healthcheck/README.md b/images/nginx/healthcheck/README.md deleted file mode 100644 index 43751e2e11..0000000000 --- a/images/nginx/healthcheck/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Healthcheck - -In this directory you'll find two files - -- healthz.locations.php.disable -- healthz.locations - -Both are designed to expose a `/.lagoonhealthz` location from the nginx service. The difference being that the `.php.disable` file is used to point to the [healthz-php](https://github.com/amazeeio/healthz-php) application _if_ there is a PHP service attached to this application. - -The logic for which of the two files are enabled are contained in this image's `docker-entrypoint` file - there we check for the existence of the env var `NGINX_FASTCGI_PASS`, which indicates (or should indicate) the presence of a PHP-fpm service. \ No newline at end of file diff --git a/images/nginx/healthcheck/healthz.locations b/images/nginx/healthcheck/healthz.locations deleted file mode 100644 index 95cf2ed753..0000000000 --- a/images/nginx/healthcheck/healthz.locations +++ /dev/null @@ -1,8 +0,0 @@ -location /.lagoonhealthz { - content_by_lua_block { - ngx.status = ngx.HTTP_OK; - ngx.header.content_type = 'application/json'; - ngx.say('{"check_nginx":"pass"}'); - ngx.exit(ngx.OK); - } -} diff --git a/images/nginx/healthcheck/healthz.locations.php.disable b/images/nginx/healthcheck/healthz.locations.php.disable deleted file mode 100644 index dd6be8e7ea..0000000000 --- a/images/nginx/healthcheck/healthz.locations.php.disable +++ /dev/null @@ -1,10 +0,0 @@ -location /.lagoonhealthz { - rewrite ^/.lagoonhealthz(/.*)?$ /.lagoonhealthz/index.php; - - location ~* \.php(/|$) { - include /etc/nginx/fastcgi.conf; - fastcgi_param SCRIPT_NAME /index.php; - fastcgi_param SCRIPT_FILENAME /healthz-php/index.php; - fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000; - } -} diff --git a/images/nginx/helpers/000_variables.conf b/images/nginx/helpers/000_variables.conf deleted file mode 100644 index a54bf1cdd4..0000000000 --- a/images/nginx/helpers/000_variables.conf +++ /dev/null @@ -1,2 +0,0 @@ -# sets the nginx internal variable $lagoon_environment_type to the env variable LAGOON_ENVIRONMENT_TYPE -set_by_lua_block $lagoon_environment_type { return os.getenv("LAGOON_ENVIRONMENT_TYPE") } \ No newline at end of file diff --git a/images/nginx/helpers/010_redirects.conf b/images/nginx/helpers/010_redirects.conf deleted file mode 100644 index 0431d1bba1..0000000000 --- a/images/nginx/helpers/010_redirects.conf +++ /dev/null @@ -1,4 +0,0 @@ -# $redirectdomain is set via the redirects-map.conf within nginx.conf -if ($redirectdomain) { - return 301 $redirectdomain; -} \ No newline at end of file diff --git a/images/nginx/helpers/020_basic-auth.conf b/images/nginx/helpers/020_basic-auth.conf deleted file mode 100644 index 2929b801fa..0000000000 --- a/images/nginx/helpers/020_basic-auth.conf +++ /dev/null @@ -1,3 +0,0 @@ -# BASIC_AUTH is set during docker-entrypoint if BASIC_AUTH_USERNAME and BASIC_AUTH_PASSWORD are set -auth_basic "${BASIC_AUTH:-off}"; -auth_basic_user_file "/etc/nginx/.htpasswd"; \ No newline at end of file diff --git a/images/nginx/helpers/030_rewrite_by_lua_block.conf b/images/nginx/helpers/030_rewrite_by_lua_block.conf deleted file mode 100644 index b4de6f9c22..0000000000 --- a/images/nginx/helpers/030_rewrite_by_lua_block.conf +++ /dev/null @@ -1,14 +0,0 @@ -rewrite_by_lua_block { - -- IPv6 X-Forwarded-For - local xff = {} - if ngx.var.http_x_forwarded_for then - for ip in string.gmatch(ngx.var.http_x_forwarded_for, '([^,]+)') do - if string.find(ip, "^::ffff:") then - table.insert(xff,string.match(ip, "^::ffff:(.*)")) - else - table.insert(xff,ip) - end - ngx.req.set_header("X-Forwarded-For", table.concat(xff, ",")) - end - end -} diff --git a/images/nginx/helpers/100_x-robots-header-development.conf b/images/nginx/helpers/100_x-robots-header-development.conf deleted file mode 100644 index 2d084156aa..0000000000 --- a/images/nginx/helpers/100_x-robots-header-development.conf +++ /dev/null @@ -1,15 +0,0 @@ -# Set X-Robots-Tag to 'noindex, nofollow' for development environments and Lagoon autogenerated routes -header_filter_by_lua_block { - -- escape characters in the hostname - host = string.gsub(ngx.var.host, "%p", "%%%1") - - -- check to see if we are a development environment - if (os.getenv("LAGOON_ENVIRONMENT_TYPE") and string.match(os.getenv("LAGOON_ENVIRONMENT_TYPE"), 'development')) then - ngx.header["X-Robots-Tag"] = 'noindex, nofollow'; - end - - -- check hostname against autogenerated routes - if (os.getenv("LAGOON_AUTOGENERATED_ROUTES") and string.match(os.getenv("LAGOON_AUTOGENERATED_ROUTES"), host)) then - ngx.header["X-Robots-Tag"] = 'noindex, nofollow'; - end -} diff --git a/images/nginx/helpers/90_healthz.conf b/images/nginx/helpers/90_healthz.conf deleted file mode 100644 index 33356eda06..0000000000 --- a/images/nginx/helpers/90_healthz.conf +++ /dev/null @@ -1 +0,0 @@ -include /etc/nginx/conf.d/healthz.locations; diff --git a/images/nginx/helpers/90_healthz_fast_check.conf.disabled b/images/nginx/helpers/90_healthz_fast_check.conf.disabled deleted file mode 100644 index 78cb43761e..0000000000 --- a/images/nginx/helpers/90_healthz_fast_check.conf.disabled +++ /dev/null @@ -1,13 +0,0 @@ -set $fhcc none; - -if ( $http_user_agent ~* "StatusCake|Pingdom|Site25x7|Uptime|nagios" ) { - set $fhcc "A"; -} - -if ( $request_method = 'GET' ) { - set $fhcc "$fhcc G"; -} - -if ( $fhcc = 'A G' ) { - rewrite ~* /.lagoonhealthz last; -} \ No newline at end of file diff --git a/images/nginx/nginx.conf b/images/nginx/nginx.conf deleted file mode 100755 index 5fd14bfe25..0000000000 --- a/images/nginx/nginx.conf +++ /dev/null @@ -1,125 +0,0 @@ - -error_log /dev/stdout ${NGINX_ERROR_LOG_LEVEL:-warn}; - -# Establish some environment variables for later use -env LAGOON_AUTOGENERATED_ROUTES; -env LAGOON_ENVIRONMENT_TYPE; - -events { - worker_connections 1024; - multi_accept on; - use epoll; -} - - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /dev/stdout; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - - server_tokens off; - - add_header X-LAGOON $hostname always; - - uninitialized_variable_warn off; - - map $host$uri $redirectdomain { - include /etc/nginx/redirects-map.conf; - } - - gzip on; - gzip_disable "MSIE [1-6]\.(?!.*SV1)"; - - gzip_buffers 16 8k; - gzip_comp_level 1; - gzip_http_version 1.0; - gzip_min_length 10; - gzip_types - application/atom+xml - application/javascript - application/json - application/ld+json - application/manifest+json - application/rss+xml - application/vnd.geo+json - application/vnd.ms-fontobject - application/x-font-ttf - application/x-javascript - application/x-web-app-manifest+json - application/xhtml+xml - application/xml - application/xml+rss - font/opentype - image/bmp - image/svg+xml - image/x-icon - text/cache-manifest - text/css - text/javascript - text/plain - text/vcard - text/vnd.rim.location.xloc - text/vtt - text/xml - text/x-component - text/x-cross-domain-policy; - - client_max_body_size 2048m; - client_body_timeout 10s; - client_header_timeout 10s; - client_body_buffer_size 128k; - client_body_temp_path /tmp/client_temp; - proxy_redirect off; - proxy_max_temp_file_size 4096m; - proxy_connect_timeout 90; - proxy_send_timeout 90; - proxy_read_timeout 90; - proxy_buffers 32 16k; - proxy_buffer_size 16k; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_headers_hash_bucket_size 64; - proxy_temp_path /tmp/proxy_temp; - - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - - set_real_ip_from 10.0.0.0/8; - set_real_ip_from 172.16.0.0/12; - set_real_ip_from 192.168.0.0/16; - real_ip_header X-Forwarded-For; - real_ip_recursive on; - - port_in_redirect off; - - root /app; - - server { - - listen 50000; - - location /nginx_status { - stub_status on; - access_log off; - allow 127.0.0.1; - allow 10.0.0.0/8; - allow 172.16.0.0/12; - allow 192.168.0.0/16; - deny all; - } - - } - - include /etc/nginx/conf.d/*.conf; - -} diff --git a/images/nginx/redirects-map.conf b/images/nginx/redirects-map.conf deleted file mode 100644 index 6bb3595aeb..0000000000 --- a/images/nginx/redirects-map.conf +++ /dev/null @@ -1,26 +0,0 @@ -## Nginx redirect map -## This file is expected to have two entries per line: -## 1. source, which will be matched against '$host$uri' from nginx (so the hostname and uri, while uri is always at least /) -## 2. destination of the redirect -## The file is read from top to bottom, so more specific sources need to be above more general matches -## A couple of examples: - -## Simple www to non www redirect, with preserving the URL string and arguments -# ~^www\.example\.com\/ http://example.com$request_uri; - -## Simple non-www to www redirect, with preserving the URL string and arguments -#~^example\.com\/ http://www.example.com$request_uri; - -## Redirect every request to example.com to example.net with preserving the URL string and arguments, eg: example.com/bla -> example.net/bla, example.com/bla?test -> example.net/bla?test -## -# ~^example\.com\/ http://example.net$request_uri; - -## Redirect request only to example.com/test (no regex matching) to example.net without preserving the URL string, eg: example.com/test -> example.net -## Requestes to example.com/test/bla or example.com/bla are not matched -## -# example\.com\/test http://example.net; - -## Redirect request only to example.com/test to example.net with preserving the rest of the URL string and arguments, eg: example.com/test/bla -> example.net/bla, example.com/test/bla?test -> example.net/bla?test -## Requestes to example.com/bla are not matched -## -# ~^example\.com\/test\/(.*) http://example.net/$1$is_args$args; diff --git a/images/nginx/static-files.conf b/images/nginx/static-files.conf deleted file mode 100644 index ac5fc8802c..0000000000 --- a/images/nginx/static-files.conf +++ /dev/null @@ -1,12 +0,0 @@ -server { - - listen 8080 default_server; - - include /etc/nginx/helpers/*.conf; - - location / { - index index.html index.htm; - try_files $uri $uri/ =404; - } - -} \ No newline at end of file diff --git a/images/node/Dockerfile b/images/node/Dockerfile deleted file mode 100644 index 2a749d9c24..0000000000 --- a/images/node/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -ARG NODE_VERSION -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=node - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home \ - && fix-permissions /home \ - && mkdir -p /app \ - && fix-permissions /app - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk update \ - && apk upgrade \ - && rm -rf /var/cache/apk/* - -# Make sure Bower and NPM are allowed to be running as root -RUN echo '{ "allow_root": true }' > /home/.bowerrc \ - && echo 'unsafe-perm=true' > /home/.npmrc - -WORKDIR /app - -EXPOSE 3000 - -# tells the local development environment on which port we are running -ENV LAGOON_LOCALDEV_HTTP_PORT=3000 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["yarn", "run", "start"] diff --git a/images/node/builder/Dockerfile b/images/node/builder/Dockerfile deleted file mode 100644 index c55b594b6f..0000000000 --- a/images/node/builder/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG NODE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/node:${NODE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=node - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache \ - libstdc++ \ - && apk add --no-cache \ - binutils-gold \ - curl \ - g++ \ - gcc \ - gnupg \ - libgcc \ - linux-headers \ - make \ - git \ - file \ - openssl \ - python \ - bash \ - ca-certificates \ - wget \ - libpng-dev \ - && curl -sSLo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ - && curl -sSLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk \ - && apk add glibc-2.28-r0.apk \ - && rm -rf /var/cache/apk/* - -CMD ["/bin/docker-sleep"] diff --git a/images/oc-build-deploy-dind/Dockerfile b/images/oc-build-deploy-dind/Dockerfile index bdbae58ad1..a4734707d2 100644 --- a/images/oc-build-deploy-dind/Dockerfile +++ b/images/oc-build-deploy-dind/Dockerfile @@ -21,4 +21,6 @@ COPY scripts /oc-build-deploy/scripts COPY openshift-templates /oc-build-deploy/openshift-templates +ENV IMAGECACHE_REGISTRY=imagecache.amazeeio.cloud + CMD ["/oc-build-deploy/build-deploy.sh"] diff --git a/images/oc-build-deploy-dind/README.md b/images/oc-build-deploy-dind/README.md new file mode 100644 index 0000000000..79b3492bae --- /dev/null +++ b/images/oc-build-deploy-dind/README.md @@ -0,0 +1,52 @@ +# Lagoon Build & Deploy + +This is the Image which contains the actual code that is responsible for building and deploying the Code from Git repositories. + +## Main purpose +- This is the Image which contains the actual code that is responsible for building and deploying the Code from Git repositories. + +## Upstream Image +- Based on the Lagoon `oc` image, which has the OpenShift Client Tools installed that are used heavily in this image. + +## How this works + +Everything in here is based on Bash scripts. Which in a nutshell do this: +1. Check out a given Git Repository of a given Git Reference (Branch, Branch & SHA, Tag) +2. Creates a new project in an OpenShift for the given project and branch +3. Checks yaml files (either .lagoon.yml or docker-compose.yml) to learn: + 1. Which Docker Images with which context should be built + 2. Which Services and with that which OpenShift Resources should be created +4. Builds Docker Images +5. Creates OpenShift Resources +6. Pushes Docker Images to OpenShift Registry +7. Monitors the deployment of the Resources inside OpenShift + +## Environment Variables + +As this is a Docker Image that is built once and then executed multiple times for each single deployment we use Environment Variables to define what should happen. + +| Environment Variable | Description | +|--------|---| +| `GIT_REPO` | Full URL of Git Repo to clone/checkout, should be a ssh compatible Git Repo | +| `GIT_REF` | Git reference to checkout, can be: 1. a Git Branch prefixed by `/origin`, 2. a Git Tag, 3. a Git Sha | +| `OPENSHIFT_FOLDER` | Folder where the script should be searching for files and generally be working on, can be used to put everything in a subfolder | +| `OPENSHIFT_CONSOLE` | Full URL of the OpenShift Console where OpenShift Resources should be created in | +| `OPENSHIFT_TOKEN` | API Token of an OpenShift ServiceAccount that will be used to connect to the Console | +| `APPUIO_TOKEN` | Special case for appuio.ch (needed when is `OPENSHIFT_CONSOLE` is `https://console.appuio.ch`), the API Token that should be used to create projects with | +| `OPENSHIFT_PROJECT` | Name of the OpenShift Project that should be used, will be created if not existing | +| `OPENSHIFT_PROJECT_USER` | OpenShift Username that should be given access to the project (useful if the User behind `OPENSHIFT_TOKEN` is different one that will be used to access the OpenShift UI | +| `PROJECT` | Name of the Project in which this Deployment is part of | +| `BRANCH` | Branch Name in which this Deployment is part of (even though `GIT_REF` can also be a Git Hash, we still need to know which Branch do we actually deploy) | + +## Mountable Volumes + +In order for better working of a container created from this image, there are some Volumes that can be mounted into the Host: + +| Volume Path | Description | +|--------|---| +| `/git` | Path where Git Repo will be checked out. Can be used for Caching and faster checkouts for consequent checkouts | +| `/var/run/docker.sock` | Path to the Docker Engine Socket, as we build Docker images within the Container it's good to use the Docker Engine of the Host to profit from Layer Caching etc. | + + + -v $WORKSPACE:/git \\ + -v /var/run/docker.sock:/var/run/docker.sock \\ \ No newline at end of file diff --git a/images/oc-build-deploy-dind/build-deploy-docker-compose.sh b/images/oc-build-deploy-dind/build-deploy-docker-compose.sh index a08a52fcc8..fa9982ba9e 100755 --- a/images/oc-build-deploy-dind/build-deploy-docker-compose.sh +++ b/images/oc-build-deploy-dind/build-deploy-docker-compose.sh @@ -75,7 +75,24 @@ if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then LAGOON_SERVICE_TYPES=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_SERVICE_TYPES") | "\(.value)"')) fi if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then - LAGOON_SERVICE_TYPES=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_SERVICE_TYPES") | "\(.value)"')) + TEMP_LAGOON_SERVICE_TYPES=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_SERVICE_TYPES") | "\(.value)"')) + if [ ! -z $TEMP_LAGOON_SERVICE_TYPES ]; then + LAGOON_SERVICE_TYPES=$TEMP_LAGOON_SERVICE_TYPES + fi +fi +# Allow the dbaas environment type to be overridden by the lagoon API +# This accepts colon separated values like so `SERVICE_NAME:DBAAS_ENVIRONMENT_TYPE`, and multiple overrides +# separated by commas +# Example 1: mariadb:production < tells any docker-compose services named mariadb to use the production dbaas environment type +# Example 2: mariadb:production,mariadb-test:development +if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + LAGOON_DBAAS_ENVIRONMENT_TYPES=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_DBAAS_ENVIRONMENT_TYPES") | "\(.value)"')) +fi +if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then + TEMP_LAGOON_DBAAS_ENVIRONMENT_TYPES=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_DBAAS_ENVIRONMENT_TYPES") | "\(.value)"')) + if [ ! -z $TEMP_LAGOON_DBAAS_ENVIRONMENT_TYPES ]; then + LAGOON_DBAAS_ENVIRONMENT_TYPES=$TEMP_LAGOON_DBAAS_ENVIRONMENT_TYPES + fi fi set -x @@ -121,7 +138,7 @@ do # check if we can use the dbaas operator elif oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mariadbconsumer.v1.mariadb.amazee.io &> /dev/null; then SERVICE_TYPE="mariadb-dbaas" - # heck if this cluster supports the default one, if not we assume that this cluster is not capable of shared mariadbs and we use a mariadb-single + # check if this cluster supports the default one, if not we assume that this cluster is not capable of shared mariadbs and we use a mariadb-single elif svcat --scope cluster get class $MARIADB_SHARED_DEFAULT_CLASS > /dev/null; then SERVICE_TYPE="mariadb-shared" else @@ -141,6 +158,18 @@ do DBAAS_ENVIRONMENT=$ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE fi + # If we have a dbaas environment type override in the api, consume it here + if [ ! -z "$LAGOON_DBAAS_ENVIRONMENT_TYPES" ]; then + IFS=',' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPES" + for LAGOON_DBAAS_ENVIRONMENT_TYPE in "${LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT[@]}" + do + IFS=':' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPE" + if [ "${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[0]}" == "$SERVICE_NAME" ]; then + DBAAS_ENVIRONMENT=${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[1]} + fi + done + fi + MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]="$DBAAS_ENVIRONMENT" fi @@ -181,6 +210,10 @@ do fi fi + if [ "$SERVICE_TYPE" == "mongodb-single" ]; then + SERVICE_TYPE="mongo" + fi + if [ "$SERVICE_TYPE" == "mongodb-shared" ]; then MONGODB_SHARED_CLASS=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.mongo-shared\\.class "${MONGODB_SHARED_DEFAULT_CLASS}") MONGODB_SHARED_PLAN=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.mongo-shared\\.plan "${ENVIRONMENT_TYPE}") @@ -194,6 +227,31 @@ do fi fi + if [[ "$SERVICE_TYPE" == "mongodb-dbaas" ]]; then + # Default plan is the enviroment type + DBAAS_ENVIRONMENT=$(cat $DOCKER_COMPOSE_YAML | shyaml get-value services.$COMPOSE_SERVICE.labels.lagoon\\.$SERVICE_TYPE\\.environment "${ENVIRONMENT_TYPE}") + + # Allow the dbaas shared servicebroker plan to be overriden by environment in .lagoon.yml + ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH}.overrides.$SERVICE_NAME.$SERVICE_TYPE\\.environment false) + if [ ! $DBAAS_ENVIRONMENT_OVERRIDE == "false" ]; then + DBAAS_ENVIRONMENT=$ENVIRONMENT_DBAAS_ENVIRONMENT_OVERRIDE + fi + + # If we have a dbaas environment type override in the api, consume it here + if [ ! -z "$LAGOON_DBAAS_ENVIRONMENT_TYPES" ]; then + IFS=',' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPES" + for LAGOON_DBAAS_ENVIRONMENT_TYPE in "${LAGOON_DBAAS_ENVIRONMENT_TYPES_SPLIT[@]}" + do + IFS=':' read -ra LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT <<< "$LAGOON_DBAAS_ENVIRONMENT_TYPE" + if [ "${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[0]}" == "$SERVICE_NAME" ]; then + DBAAS_ENVIRONMENT=${LAGOON_DBAAS_ENVIRONMENT_TYPE_SPLIT[1]} + fi + done + fi + + MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]="$DBAAS_ENVIRONMENT" + fi + if [ "$SERVICE_TYPE" == "none" ]; then continue fi @@ -208,8 +266,14 @@ do # The ImageName is the same as the Name of the Docker Compose ServiceName IMAGE_NAME=$COMPOSE_SERVICE - # Generate List of Images to build - IMAGES+=("${IMAGE_NAME}") + # Do not handle images for shared services + if [[ "$SERVICE_TYPE" != "mariadb-dbaas" ]] && + [[ "$SERVICE_TYPE" != "mariadb-shared" ]] && + [[ "$SERVICE_TYPE" != "mongodb-shared" ]] && + [[ "$SERVICE_TYPE" != "mongodb-dbaas" ]]; then + # Generate List of Images to build + IMAGES+=("${IMAGE_NAME}") + fi # Map Deployment ServiceType to the ImageName MAP_DEPLOYMENT_SERVICETYPE_TO_IMAGENAME["${SERVICE_NAME}:${DEPLOYMENT_SERVICETYPE}"]="${IMAGE_NAME}" @@ -264,12 +328,19 @@ do PRIVATE_REGISTRY_CREDENTIAL=($(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.scope == "container_registry" and .name == "'$PRIVATE_CONTAINER_REGISTRY_PASSWORD'") | "\(.value)"')) fi if [ ! -z "$LAGOON_ENVIRONMENT_VARIABLES" ]; then - PRIVATE_REGISTRY_CREDENTIAL=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.scope == "container_registry" and .name == "'$PRIVATE_CONTAINER_REGISTRY_PASSWORD'") | "\(.value)"')) + TEMP_PRIVATE_REGISTRY_CREDENTIAL=($(echo $LAGOON_ENVIRONMENT_VARIABLES | jq -r '.[] | select(.scope == "container_registry" and .name == "'$PRIVATE_CONTAINER_REGISTRY_PASSWORD'") | "\(.value)"')) + if [ ! -z "$TEMP_PRIVATE_REGISTRY_CREDENTIAL" ]; then + PRIVATE_REGISTRY_CREDENTIAL=$TEMP_PRIVATE_REGISTRY_CREDENTIAL + fi fi if [ -z $PRIVATE_REGISTRY_CREDENTIAL ]; then #if no password defined in the lagoon api, pass the one in `.lagoon.yml` as a password PRIVATE_REGISTRY_CREDENTIAL=$PRIVATE_CONTAINER_REGISTRY_PASSWORD fi + if [ -z "$PRIVATE_REGISTRY_CREDENTIAL" ]; then + echo -e "A private container registry was defined in the .lagoon.yml file, but no password could be found in either the .lagoon.yml or in the Lagoon API\n\nPlease check if the password has been set correctly." + exit 1 + fi if [ $PRIVATE_CONTAINER_REGISTRY_URL != "false" ]; then echo "Attempting to log in to $PRIVATE_CONTAINER_REGISTRY_URL with user $PRIVATE_CONTAINER_REGISTRY_USERNAME - $PRIVATE_CONTAINER_REGISTRY_PASSWORD" docker login --username $PRIVATE_CONTAINER_REGISTRY_USERNAME --password $PRIVATE_REGISTRY_CREDENTIAL $PRIVATE_CONTAINER_REGISTRY_URL @@ -331,6 +402,8 @@ if [[ ( "$TYPE" == "pullrequest" || "$TYPE" == "branch" ) && ! $THIS_IS_TUG == BUILD_ARGS+=(--build-arg LAGOON_GIT_BRANCH="${BRANCH}") BUILD_ARGS+=(--build-arg LAGOON_GIT_SAFE_BRANCH="${SAFE_BRANCH}") BUILD_ARGS+=(--build-arg LAGOON_PROJECT="${PROJECT}") + BUILD_ARGS+=(--build-arg LAGOON_ENVIRONMENT="${SAFE_BRANCH}") + BUILD_ARGS+=(--build-arg LAGOON_ENVIRONMENT_TYPE="${ENVIRONMENT_TYPE}") BUILD_ARGS+=(--build-arg LAGOON_SAFE_PROJECT="${SAFE_PROJECT}") BUILD_ARGS+=(--build-arg LAGOON_BUILD_TYPE="${TYPE}") BUILD_ARGS+=(--build-arg LAGOON_GIT_SOURCE_REPOSITORY="${SOURCE_REPOSITORY}") @@ -366,6 +439,12 @@ if [[ ( "$TYPE" == "pullrequest" || "$TYPE" == "branch" ) && ! $THIS_IS_TUG == PULL_IMAGE=$(echo "${OVERRIDE_IMAGE}" | envsubst) fi + # if the image just is an image name (like "alpine") we prefix it with `libary/` as the imagecache does not understand + # the magic `alpine` images + if [[ ! "$PULL_IMAGE" =~ "/" ]]; then + PULL_IMAGE="library/$PULL_IMAGE" + fi + # Add the images we should pull to the IMAGES_PULL array, they will later be tagged from dockerhub IMAGES_PULL["${IMAGE_NAME}"]="${PULL_IMAGE}" @@ -453,14 +532,14 @@ else ROUTES_AUTOGENERATE_INSECURE=$(cat .lagoon.yml | shyaml get-value routes.autogenerate.insecure Allow) fi -ROUTES_AUTOGENERATE_ENABLED=$(cat .lagoon.yml | shyaml get-value routes.autogenerate.enabled true) -ROUTES_AUTOGENERATE_ALLOW_PRS=$(cat .lagoon.yml | shyaml get-value routes.autogenerate.allowPullrequests $ROUTES_AUTOGENERATE_ENABLED) +ROUTES_AUTOGENERATE_ENABLED=$(set -o pipefail; cat .lagoon.yml | shyaml get-value routes.autogenerate.enabled true | tr '[:upper:]' '[:lower:]') +ROUTES_AUTOGENERATE_ALLOW_PRS=$(cat .lagoon.yml | shyaml get-value routes.autogenerate.allowPullrequests $ROUTES_AUTOGENERATE_ENABLED | tr '[:upper:]' '[:lower:]') if [[ "$TYPE" == "pullrequest" && "$ROUTES_AUTOGENERATE_ALLOW_PRS" == "true" ]]; then ROUTES_AUTOGENERATE_ENABLED=true fi ## fail silently if the key autogenerateRoutes doesn't exist and default to whatever ROUTES_AUTOGENERATE_ENABLED is set to -ROUTES_AUTOGENERATE_BRANCH=$(cat .lagoon.yml | shyaml -q get-value environments.${BRANCH//./\\.}.autogenerateRoutes $ROUTES_AUTOGENERATE_ENABLED) -if [[ "$ROUTES_AUTOGENERATE_BRANCH" =~ [Tt]rue ]]; then +ROUTES_AUTOGENERATE_BRANCH=$(set -o pipefail; cat .lagoon.yml | shyaml -q get-value environments.${BRANCH//./\\.}.autogenerateRoutes $ROUTES_AUTOGENERATE_ENABLED | tr '[:upper:]' '[:lower:]') +if [[ "$ROUTES_AUTOGENERATE_BRANCH" == "true" ]]; then ROUTES_AUTOGENERATE_ENABLED=true fi @@ -513,20 +592,37 @@ do SERVICEBROKERS+=("${SERVICE_NAME}:${SERVICE_TYPE}") fi - # If we have a dbaas consumer, create it OPENSHIFT_SERVICES_TEMPLATE="/oc-build-deploy/openshift-templates/${SERVICE_TYPE}/consumer.yml" if [ -f $OPENSHIFT_SERVICES_TEMPLATE ]; then - OPENSHIFT_TEMPLATE=$OPENSHIFT_SERVICES_TEMPLATE - OPERATOR_ENVIRONMENT="${MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]}" - TEMPLATE_ADDITIONAL_PARAMETERS=() - oc process --local -o yaml --insecure-skip-tls-verify \ - -n ${OPENSHIFT_PROJECT} \ - -f ${OPENSHIFT_TEMPLATE} \ - -p SERVICE_NAME="${SERVICE_NAME}" \ - -p SAFE_BRANCH="${SAFE_BRANCH}" \ - -p SAFE_PROJECT="${SAFE_PROJECT}" \ - -p ENVIRONMENT="${OPERATOR_ENVIRONMENT}" \ - | outputToYaml + EXISTING_CONSUMER_DB="" + # Check if we have a dbaas consumer already created + if [ "$SERVICE_TYPE" == "mariadb-dbaas" ]; then + if oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mariadbconsumer/${SERVICE_NAME} 2> /dev/null; then + EXISTING_CONSUMER_DB=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mariadbconsumer/${SERVICE_NAME} -o json 2> /dev/null | jq -r '.spec.consumer.database') + fi + elif [ "$SERVICE_TYPE" == "mongodb-dbaas" ]; then + if oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} 2> /dev/null; then + EXISTING_CONSUMER_DB=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o json 2> /dev/null | jq -r '.spec.consumer.database') + fi + elif [ "$SERVICE_TYPE" == "postgres-dbaas" ]; then + if oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get postgresqlconsumer/${SERVICE_NAME} 2> /dev/null; then + EXISTING_CONSUMER_DB=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get postgresqlconsumer/${SERVICE_NAME} -o json 2> /dev/null | jq -r '.spec.consumer.database') + fi + fi + # If we haven't already got an existing dbaas consumer, create one + if [ -z "$EXISTING_CONSUMER_DB" ]; then + OPENSHIFT_TEMPLATE=$OPENSHIFT_SERVICES_TEMPLATE + OPERATOR_ENVIRONMENT="${MAP_SERVICE_NAME_TO_DBAAS_ENVIRONMENT["${SERVICE_NAME}"]}" + TEMPLATE_ADDITIONAL_PARAMETERS=() + oc process --local -o yaml --insecure-skip-tls-verify \ + -n ${OPENSHIFT_PROJECT} \ + -f ${OPENSHIFT_TEMPLATE} \ + -p SERVICE_NAME="${SERVICE_NAME}" \ + -p SAFE_BRANCH="${SAFE_BRANCH}" \ + -p SAFE_PROJECT="${SAFE_PROJECT}" \ + -p ENVIRONMENT="${OPERATOR_ENVIRONMENT}" \ + | outputToYaml + fi SERVICEBROKERS+=("${SERVICE_NAME}:${SERVICE_TYPE}") fi @@ -538,11 +634,8 @@ TEMPLATE_PARAMETERS=() ### CUSTOM ROUTES FROM .lagoon.yml ############################################## -if [ "${ENVIRONMENT_TYPE}" == "production" ]; then - MONITORING_ENABLED="true" -else - MONITORING_ENABLED="false" -fi + +MONITORING_ENABLED="false" # monitoring is by default disabled, it will be enabled for the first route again MONITORING_INTERVAL=60 ROUTES_SERVICE_COUNTER=0 @@ -561,8 +654,8 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value production_routes.active.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") @@ -578,12 +671,20 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE . /oc-build-deploy/scripts/exec-openshift-create-route.sh + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -603,8 +704,8 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate true | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value production_routes.standby.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") @@ -620,12 +721,20 @@ if [ "${ENVIRONMENT_TYPE}" == "production" ]; then # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE . /oc-build-deploy/scripts/exec-openshift-create-route.sh + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -648,8 +757,8 @@ if [ -n "$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\. ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value ${PROJECT}.environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") @@ -665,12 +774,20 @@ if [ -n "$(cat .lagoon.yml | shyaml keys ${PROJECT}.environments.${BRANCH//./\\. # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE . /oc-build-deploy/scripts/exec-openshift-create-route.sh + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -687,8 +804,8 @@ else ROUTE_DOMAIN=$(cat .lagoon.yml | shyaml keys environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER) # Route Domains include dots, which need to be esacped via `\.` in order to use them within shyaml ROUTE_DOMAIN_ESCAPED=$(cat .lagoon.yml | shyaml keys environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER | sed 's/\./\\./g') - ROUTE_TLS_ACME=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true) - ROUTE_MIGRATE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false) + ROUTE_TLS_ACME=$(set -o pipefail; cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.tls-acme true | tr '[:upper:]' '[:lower:]') + ROUTE_MIGRATE=$(set -o pipefail; cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.migrate false | tr '[:upper:]' '[:lower:]') ROUTE_INSECURE=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.insecure Redirect) ROUTE_HSTS=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.hsts null) MONITORING_PATH=$(cat .lagoon.yml | shyaml get-value environments.${BRANCH//./\\.}.routes.$ROUTES_SERVICE_COUNTER.$ROUTES_SERVICE.$ROUTE_DOMAIN_COUNTER.$ROUTE_DOMAIN_ESCAPED.monitoring-path "/") @@ -704,12 +821,20 @@ else # The very first found route is set as MAIN_CUSTOM_ROUTE if [ -z "${MAIN_CUSTOM_ROUTE+x}" ]; then MAIN_CUSTOM_ROUTE=$ROUTE_DOMAIN + + # if we are in production we enabled monitoring for the main custom route + if [ "${ENVIRONMENT_TYPE}" == "production" ]; then + MONITORING_ENABLED="true" + fi + fi ROUTE_SERVICE=$ROUTES_SERVICE . /oc-build-deploy/scripts/exec-openshift-create-route.sh + MONITORING_ENABLED="false" # disabling a possible enabled monitoring again + let ROUTE_DOMAIN_COUNTER=ROUTE_DOMAIN_COUNTER+1 done @@ -729,16 +854,62 @@ if oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get schedules.backup.ap TEMPLATE_PARAMETERS=() + # Check for custom baas bucket name + if [ ! -z "$LAGOON_PROJECT_VARIABLES" ]; then + BAAS_BUCKET_NAME=$(echo $LAGOON_PROJECT_VARIABLES | jq -r '.[] | select(.name == "LAGOON_BAAS_BUCKET_NAME") | "\(.value)"') + fi + if [ -z $BAAS_BUCKET_NAME ]; then + BAAS_BUCKET_NAME=baas-${SAFE_PROJECT} + fi + TEMPLATE_PARAMETERS+=(-p BAAS_BUCKET_NAME="${BAAS_BUCKET_NAME}") + + # Pull in .lagoon.yml variables + PRODUCTION_MONTHLY_BACKUP_RETENTION=$(cat .lagoon.yml | shyaml get-value backup-retention.production.monthly "") + PRODUCTION_WEEKLY_BACKUP_RETENTION=$(cat .lagoon.yml | shyaml get-value backup-retention.production.weekly "") + PRODUCTION_DAILY_BACKUP_RETENTION=$(cat .lagoon.yml | shyaml get-value backup-retention.production.daily "") + + # Pull in environment type (development/production) + TEMPLATE_PARAMETERS+=(-p ENVIRONMENT_TYPE="${ENVIRONMENT_TYPE}") + + # Set template parameters for retention values (prefer .lagoon.yml values over supplied defaults after ensuring they are valid integers via "-eq" comparison) + if [ ! -z $PRODUCTION_MONTHLY_BACKUP_RETENTION ] && [ "$PRODUCTION_MONTHLY_BACKUP_RETENTION" -eq "$PRODUCTION_MONTHLY_BACKUP_RETENTION" ] && [ $ENVIRONMENT_TYPE = 'production' ]; then + TEMPLATE_PARAMETERS+=(-p MONTHLY_BACKUP_RETENTION="${PRODUCTION_MONTHLY_BACKUP_RETENTION}") + else + TEMPLATE_PARAMETERS+=(-p MONTHLY_BACKUP_RETENTION="${MONTHLY_BACKUP_DEFAULT_RETENTION}") + fi + if [ ! -z $PRODUCTION_WEEKLY_BACKUP_RETENTION ] && [ "$PRODUCTION_WEEKLY_BACKUP_RETENTION" -eq "$PRODUCTION_WEEKLY_BACKUP_RETENTION" ] && [ $ENVIRONMENT_TYPE = 'production' ]; then + TEMPLATE_PARAMETERS+=(-p WEEKLY_BACKUP_RETENTION="${PRODUCTION_WEEKLY_BACKUP_RETENTION}") + else + TEMPLATE_PARAMETERS+=(-p WEEKLY_BACKUP_RETENTION="${WEEKLY_BACKUP_DEFAULT_RETENTION}") + fi + if [ ! -z $PRODUCTION_DAILY_BACKUP_RETENTION ] && [ "$PRODUCTION_DAILY_BACKUP_RETENTION" -eq "$PRODUCTION_DAILY_BACKUP_RETENTION" ] && [ $ENVIRONMENT_TYPE = 'production' ]; then + TEMPLATE_PARAMETERS+=(-p DAILY_BACKUP_RETENTION="${PRODUCTION_DAILY_BACKUP_RETENTION}") + else + TEMPLATE_PARAMETERS+=(-p DAILY_BACKUP_RETENTION="${DAILY_BACKUP_DEFAULT_RETENTION}") + fi + # Run Backups every day at 2200-0200 BACKUP_SCHEDULE=$( /oc-build-deploy/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(22-2) * * *") TEMPLATE_PARAMETERS+=(-p BACKUP_SCHEDULE="${BACKUP_SCHEDULE}") - # Run Checks on Sunday at 0300-0600 - CHECK_SCHEDULE=$( /oc-build-deploy/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(3-6) * * 0") + # Checks + if [ ! -z $K8UP_WEEKLY_RANDOM_FEATURE_FLAG ] && [ $K8UP_WEEKLY_RANDOM_FEATURE_FLAG = 'enabled' ]; then + # Let the controller deduplicate checks (will run weekly at a random time throughout the week) + CHECK_SCHEDULE="@weekly-random" + else + # Run Checks on Sunday at 0300-0600 + CHECK_SCHEDULE=$( /oc-build-deploy/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(3-6) * * 0") + fi TEMPLATE_PARAMETERS+=(-p CHECK_SCHEDULE="${CHECK_SCHEDULE}") - # Run Prune on Saturday at 0300-0600 - PRUNE_SCHEDULE=$( /oc-build-deploy/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(3-6) * * 6") + # Prunes + if [ ! -z $K8UP_WEEKLY_RANDOM_FEATURE_FLAG ] && [ $K8UP_WEEKLY_RANDOM_FEATURE_FLAG = 'enabled' ]; then + # Let the controller deduplicate prunes (will run weekly at a random time throughout the week) + PRUNE_SCHEDULE="@weekly-random" + else + # Run Prune on Saturday at 0300-0600 + PRUNE_SCHEDULE=$( /oc-build-deploy/scripts/convert-crontab.sh "${OPENSHIFT_PROJECT}" "M H(3-6) * * 6") + fi TEMPLATE_PARAMETERS+=(-p PRUNE_SCHEDULE="${PRUNE_SCHEDULE}") OPENSHIFT_TEMPLATE="/oc-build-deploy/openshift-templates/backup-schedule.yml" @@ -911,6 +1082,10 @@ do set -x ;; + mongodb-dbaas) + . /oc-build-deploy/scripts/exec-openshift-mongodb-dbaas.sh + ;; + *) echo "ServiceBroker Type ${SERVICE_TYPE} not implemented"; exit 1; @@ -940,11 +1115,11 @@ if [[ $THIS_IS_TUG == "true" ]]; then elif [ "$TYPE" == "pullrequest" ] || [ "$TYPE" == "branch" ]; then - # All images that should be pulled are tagged as Images directly in OpenShift Registry + # All images that should be pulled are copied to the openshift and harbor registry for IMAGE_NAME in "${!IMAGES_PULL[@]}" do PULL_IMAGE="${IMAGES_PULL[${IMAGE_NAME}]}" - . /oc-build-deploy/scripts/exec-openshift-tag-dockerhub.sh + . /oc-build-deploy/scripts/exec-openshift-copy-to-registry.sh done for IMAGE_NAME in "${!IMAGES_BUILD[@]}" @@ -1223,6 +1398,10 @@ do echo "nothing to monitor for $SERVICE_TYPE" + elif [ $SERVICE_TYPE == "mongodb-dbaas" ]; then + + echo "nothing to monitor for $SERVICE_TYPE" + elif [ ! $SERVICE_ROLLOUT_TYPE == "false" ]; then . /oc-build-deploy/scripts/exec-monitor-deploy.sh fi @@ -1279,3 +1458,15 @@ if [ "${LAGOON_POSTROLLOUT_DISABLED}" != "true" ]; then else echo "post-rollout tasks are currently disabled LAGOON_POSTROLLOUT_DISABLED is set to true" fi + +############################################## +### PUSH the latest .lagoon.yml into lagoon-yaml configmap +############################################## + +if oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get configmap lagoon-yaml &> /dev/null; then + # replace it + oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} create configmap lagoon-yaml --from-file=.lagoon.yml -o yaml --dry-run | oc replace -f - +else + # create it + oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} create configmap lagoon-yaml --from-file=.lagoon.yml +fi diff --git a/images/oc-build-deploy-dind/build-deploy.sh b/images/oc-build-deploy-dind/build-deploy.sh index 205ce69061..69546b94ad 100755 --- a/images/oc-build-deploy-dind/build-deploy.sh +++ b/images/oc-build-deploy-dind/build-deploy.sh @@ -48,8 +48,7 @@ docker login -u=jenkins -p="${DOCKER_REGISTRY_TOKEN}" ${OPENSHIFT_REGISTRY} INTERNAL_REGISTRY_LOGGED_IN="false" if [ ! -z ${INTERNAL_REGISTRY_URL} ] && [ ! -z ${INTERNAL_REGISTRY_USERNAME} ] && [ ! -z ${INTERNAL_REGISTRY_PASSWORD} ] ; then - echo "docker login -u '${INTERNAL_REGISTRY_USERNAME}' -p '${INTERNAL_REGISTRY_PASSWORD}' ${INTERNAL_REGISTRY_URL}" | /bin/bash - if [ "$?" -eq 0 ] ; then + if echo "docker login -u '${INTERNAL_REGISTRY_USERNAME}' -p '${INTERNAL_REGISTRY_PASSWORD}' ${INTERNAL_REGISTRY_URL}" | /bin/bash; then INTERNAL_REGISTRY_LOGGED_IN="true" fi fi @@ -75,8 +74,7 @@ do fi ADDITIONAL_YAML_COMMAND=$(cat .lagoon.yml | shyaml get-value additional-yaml.$ADDITIONAL_YAML.command apply) - ADDITIONAL_YAML_IGNORE_ERROR=$(cat .lagoon.yml | shyaml get-value additional-yaml.$ADDITIONAL_YAML.ignore_error false) - ADDITIONAL_YAML_IGNORE_ERROR="${ADDITIONAL_YAML_IGNORE_ERROR,,}" # convert to lowercase, as shyaml returns "True" if the yaml is set to "true" + ADDITIONAL_YAML_IGNORE_ERROR=$(set -o pipefail; cat .lagoon.yml | shyaml get-value additional-yaml.$ADDITIONAL_YAML.ignore_error false | tr '[:upper:]' '[:lower:]') . /oc-build-deploy/scripts/exec-additional-yaml.sh done diff --git a/images/oc-build-deploy-dind/openshift-templates/backup-schedule.yml b/images/oc-build-deploy-dind/openshift-templates/backup-schedule.yml index 330595fe5f..42cabaebf6 100644 --- a/images/oc-build-deploy-dind/openshift-templates/backup-schedule.yml +++ b/images/oc-build-deploy-dind/openshift-templates/backup-schedule.yml @@ -32,13 +32,28 @@ parameters: description: Registry where Images are pushed to required: true - name: BACKUP_SCHEDULE - description: Schedule of the Backup in Cron format + description: Schedule of the Backup in Cron format or auto schedule format required: true - name: CHECK_SCHEDULE - description: Schedule of the Backup Check in Cron format + description: Schedule of the Backup Check in Cron format or auto schedule format required: true - name: PRUNE_SCHEDULE - description: Schedule of the Backup Prune in Cron format + description: Schedule of the Backup Prune in Cron format or auto schedule format + required: true + - name: BAAS_BUCKET_NAME + description: Which bucket the backups for this project should go to + required: true + - name: MONTHLY_BACKUP_RETENTION + description: How many monthly backups should be retained after pruning + value: '1' + - name: WEEKLY_BACKUP_RETENTION + description: How many weekly backups should be retained after pruning + value: '4' + - name: DAILY_BACKUP_RETENTION + description: How many daily backups should be retained after pruning + value: '7' + - name: ENVIRONMENT_TYPE + description: What type of environment this is (production/development) required: true objects: - apiVersion: backup.appuio.ch/v1alpha1 @@ -55,13 +70,14 @@ objects: key: repo-pw name: baas-repo-pw s3: - bucket: 'baas-${SAFE_PROJECT}' + bucket: '${BAAS_BUCKET_NAME}' backup: schedule: '${BACKUP_SCHEDULE}' check: schedule: '${CHECK_SCHEDULE}' prune: retention: - keepDaily: 7 - keepWeekly: 6 + keepDaily: ${{DAILY_BACKUP_RETENTION}} + keepWeekly: ${{WEEKLY_BACKUP_RETENTION}} + keepMonthly: ${{MONTHLY_BACKUP_RETENTION}} schedule: '${PRUNE_SCHEDULE}' diff --git a/images/oc-build-deploy-dind/openshift-templates/configmap.yml b/images/oc-build-deploy-dind/openshift-templates/configmap.yml index b7c060e664..ba591d01c5 100644 --- a/images/oc-build-deploy-dind/openshift-templates/configmap.yml +++ b/images/oc-build-deploy-dind/openshift-templates/configmap.yml @@ -52,6 +52,7 @@ objects: LAGOON_GIT_BRANCH: ${BRANCH} LAGOON_SAFE_PROJECT: ${SAFE_PROJECT} LAGOON_PROJECT: ${PROJECT} + LAGOON_ENVIRONMENT: ${SAFE_BRANCH} LAGOON_ENVIRONMENT_TYPE: ${ENVIRONMENT_TYPE} LAGOON_ROUTE: ${ROUTE} LAGOON_ROUTES: ${ROUTES} diff --git a/images/oc-build-deploy-dind/openshift-templates/elasticsearch-cluster/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/elasticsearch-cluster/prebackuppod.yml index a62cb11699..6c1ae3770c 100644 --- a/images/oc-build-deploy-dind/openshift-templates/elasticsearch-cluster/prebackuppod.yml +++ b/images/oc-build-deploy-dind/openshift-templates/elasticsearch-cluster/prebackuppod.yml @@ -78,7 +78,7 @@ objects: containers: - args: - sleep - - '3600' + - infinity envFrom: - configMapRef: name: lagoon-env @@ -126,7 +126,7 @@ objects: containers: - args: - sleep - - '3600' + - infinity envFrom: - configMapRef: name: lagoon-env @@ -174,11 +174,11 @@ objects: containers: - args: - sleep - - '3600' + - infinity envFrom: - configMapRef: name: lagoon-env - image: alpine + image: imagecache.amazeeio.cloud/library/alpine imagePullPolicy: Always name: ${SERVICE_NAME}-2-prebackuppod volumeMounts: diff --git a/images/oc-build-deploy-dind/openshift-templates/elasticsearch/deployment.yml b/images/oc-build-deploy-dind/openshift-templates/elasticsearch/deployment.yml index 09ccf0602b..48ce969aea 100644 --- a/images/oc-build-deploy-dind/openshift-templates/elasticsearch/deployment.yml +++ b/images/oc-build-deploy-dind/openshift-templates/elasticsearch/deployment.yml @@ -73,6 +73,8 @@ objects: branch: ${SAFE_BRANCH} project: ${SAFE_PROJECT} annotations: + appuio.ch/backupCommand: /bin/sh -c "tar -cf - -C /usr/share/elasticsearch/data ." + backup.appuio.ch/fileExtension: .${SERVICE_NAME}.tar lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} spec: priorityClassName: lagoon-priority-${ENVIRONMENT_TYPE} diff --git a/images/oc-build-deploy-dind/openshift-templates/elasticsearch/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/elasticsearch/prebackuppod.yml deleted file mode 100644 index 04373a49b2..0000000000 --- a/images/oc-build-deploy-dind/openshift-templates/elasticsearch/prebackuppod.yml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-prebackuppod-elasticsearch -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SERVICE_NAME_UPPERCASE - description: Name of this service in uppercase - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: backup.appuio.ch/v1alpha1 - kind: PreBackupPod - metadata: - name: ${SERVICE_NAME}-prebackuppod - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - backupCommand: /bin/sh -c "tar -cf - -C /usr/share/elasticsearch/data ." - fileExtension: .${SERVICE_NAME}.tar - pod: - metadata: - labels: - prebackuppod: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - parent: ${SERVICE_NAME} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: ${SERVICE_NAME}-prebackuppod - volumeMounts: - - mountPath: /usr/share/elasticsearch/data - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} diff --git a/images/oc-build-deploy-dind/openshift-templates/mariadb-dbaas/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/mariadb-dbaas/prebackuppod.yml index a9eaaac3c7..a055536791 100644 --- a/images/oc-build-deploy-dind/openshift-templates/mariadb-dbaas/prebackuppod.yml +++ b/images/oc-build-deploy-dind/openshift-templates/mariadb-dbaas/prebackuppod.yml @@ -39,7 +39,6 @@ parameters: value: "Recreate" - name: SERVICE_IMAGE description: Pullable image of service - required: true - name: CRONJOBS description: Oneliner of Cronjobs value: "" @@ -85,7 +84,7 @@ objects: containers: - args: - sleep - - '3600' + - infinity env: - name: BACKUP_DB_HOST valueFrom: @@ -107,6 +106,6 @@ objects: configMapKeyRef: key: ${SERVICE_NAME_UPPERCASE}_DATABASE name: lagoon-env - image: amazeeio/alpine-mysql-client + image: imagecache.amazeeio.cloud/amazeeio/alpine-mysql-client imagePullPolicy: Always name: ${SERVICE_NAME}-prebackuppod diff --git a/images/oc-build-deploy-dind/openshift-templates/mariadb-shared/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/mariadb-shared/prebackuppod.yml index a9eaaac3c7..a055536791 100644 --- a/images/oc-build-deploy-dind/openshift-templates/mariadb-shared/prebackuppod.yml +++ b/images/oc-build-deploy-dind/openshift-templates/mariadb-shared/prebackuppod.yml @@ -39,7 +39,6 @@ parameters: value: "Recreate" - name: SERVICE_IMAGE description: Pullable image of service - required: true - name: CRONJOBS description: Oneliner of Cronjobs value: "" @@ -85,7 +84,7 @@ objects: containers: - args: - sleep - - '3600' + - infinity env: - name: BACKUP_DB_HOST valueFrom: @@ -107,6 +106,6 @@ objects: configMapKeyRef: key: ${SERVICE_NAME_UPPERCASE}_DATABASE name: lagoon-env - image: amazeeio/alpine-mysql-client + image: imagecache.amazeeio.cloud/amazeeio/alpine-mysql-client imagePullPolicy: Always name: ${SERVICE_NAME}-prebackuppod diff --git a/images/oc-build-deploy-dind/openshift-templates/mongo/deployment.yml b/images/oc-build-deploy-dind/openshift-templates/mongo/deployment.yml index eca9728e79..11039e32c0 100644 --- a/images/oc-build-deploy-dind/openshift-templates/mongo/deployment.yml +++ b/images/oc-build-deploy-dind/openshift-templates/mongo/deployment.yml @@ -71,6 +71,8 @@ objects: branch: ${SAFE_BRANCH} project: ${SAFE_PROJECT} annotations: + appuio.ch/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /data/db ." + backup.appuio.ch/fileExtension: .${SERVICE_NAME}.tar lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} spec: volumes: diff --git a/images/oc-build-deploy-dind/openshift-templates/mongo/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/mongo/prebackuppod.yml deleted file mode 100644 index 54098f132a..0000000000 --- a/images/oc-build-deploy-dind/openshift-templates/mongo/prebackuppod.yml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-prebackuppod-mongo -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SERVICE_NAME_UPPERCASE - description: Name of this service in uppercase - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: backup.appuio.ch/v1alpha1 - kind: PreBackupPod - metadata: - name: ${SERVICE_NAME}-prebackuppod - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /data/db ." - fileExtension: .${SERVICE_NAME}.tar - pod: - metadata: - labels: - prebackuppod: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - parent: ${SERVICE_NAME} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: ${SERVICE_NAME}-prebackuppod - volumeMounts: - - mountPath: /data/db - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} diff --git a/images/oc-build-deploy-dind/openshift-templates/mongodb-dbaas/consumer.yml b/images/oc-build-deploy-dind/openshift-templates/mongodb-dbaas/consumer.yml new file mode 100644 index 0000000000..81412ca7b6 --- /dev/null +++ b/images/oc-build-deploy-dind/openshift-templates/mongodb-dbaas/consumer.yml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Template +metadata: + creationTimestamp: null + name: lagoon-openshift-template-mongodb-dbaas-crd +parameters: + - name: SERVICE_NAME + description: Name of this service + required: true + - name: SAFE_BRANCH + description: Which branch this belongs to, special chars replaced with dashes + required: true + - name: SAFE_PROJECT + description: Which project this belongs to, special chars replaced with dashes + required: true + - name: ENVIRONMENT + description: Environment or type of dbaas to choose + required: true +objects: +- apiVersion: mongodb.amazee.io/v1 + kind: MongoDBConsumer + metadata: + name: ${SERVICE_NAME} + labels: + service: ${SERVICE_NAME} + branch: ${SAFE_BRANCH} + project: ${SAFE_PROJECT} + spec: + environment: ${ENVIRONMENT} \ No newline at end of file diff --git a/images/oc-build-deploy-dind/openshift-templates/postgres/deployment.yml b/images/oc-build-deploy-dind/openshift-templates/postgres/deployment.yml index 32956a5f38..1cf12877f8 100644 --- a/images/oc-build-deploy-dind/openshift-templates/postgres/deployment.yml +++ b/images/oc-build-deploy-dind/openshift-templates/postgres/deployment.yml @@ -70,6 +70,8 @@ objects: branch: ${SAFE_BRANCH} project: ${SAFE_PROJECT} annotations: + appuio.ch/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/lib/postgresql/data ." + backup.appuio.ch/fileExtension: .${SERVICE_NAME}.tar lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} spec: volumes: diff --git a/images/oc-build-deploy-dind/openshift-templates/postgres/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/postgres/prebackuppod.yml deleted file mode 100644 index dd24383002..0000000000 --- a/images/oc-build-deploy-dind/openshift-templates/postgres/prebackuppod.yml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-prebackuppod-postgres -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SERVICE_NAME_UPPERCASE - description: Name of this service in uppercase - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: backup.appuio.ch/v1alpha1 - kind: PreBackupPod - metadata: - name: ${SERVICE_NAME}-prebackuppod - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/lib/postgresql/data ." - fileExtension: .${SERVICE_NAME}.tar - pod: - metadata: - labels: - prebackuppod: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - parent: ${SERVICE_NAME} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: ${SERVICE_NAME}-prebackuppod - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} diff --git a/images/oc-build-deploy-dind/openshift-templates/rabbitmq-cluster/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/rabbitmq-cluster/prebackuppod.yml index 097007ea16..847f750c99 100644 --- a/images/oc-build-deploy-dind/openshift-templates/rabbitmq-cluster/prebackuppod.yml +++ b/images/oc-build-deploy-dind/openshift-templates/rabbitmq-cluster/prebackuppod.yml @@ -78,7 +78,7 @@ objects: containers: - args: - sleep - - '3600' + - infinity envFrom: - configMapRef: name: lagoon-env @@ -126,7 +126,7 @@ objects: containers: - args: - sleep - - '3600' + - infinity envFrom: - configMapRef: name: lagoon-env @@ -174,11 +174,11 @@ objects: containers: - args: - sleep - - '3600' + - infinity envFrom: - configMapRef: name: lagoon-env - image: alpine + image: imagecache.amazeeio.cloud/library/alpine imagePullPolicy: Always name: ${SERVICE_NAME}-2-prebackuppod volumeMounts: diff --git a/images/oc-build-deploy-dind/openshift-templates/rabbitmq/deployment.yml b/images/oc-build-deploy-dind/openshift-templates/rabbitmq/deployment.yml index 58e8ea4b4e..3799ea8605 100644 --- a/images/oc-build-deploy-dind/openshift-templates/rabbitmq/deployment.yml +++ b/images/oc-build-deploy-dind/openshift-templates/rabbitmq/deployment.yml @@ -69,6 +69,8 @@ objects: branch: ${SAFE_BRANCH} project: ${SAFE_PROJECT} annotations: + appuio.ch/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/lib/rabbitmq ." + backup.appuio.ch/fileExtension: .${SERVICE_NAME}.tar lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} spec: priorityClassName: lagoon-priority-${ENVIRONMENT_TYPE} diff --git a/images/oc-build-deploy-dind/openshift-templates/rabbitmq/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/rabbitmq/prebackuppod.yml deleted file mode 100644 index 316befd9d8..0000000000 --- a/images/oc-build-deploy-dind/openshift-templates/rabbitmq/prebackuppod.yml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-prebackuppod-rabbitmq -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SERVICE_NAME_UPPERCASE - description: Name of this service in uppercase - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: backup.appuio.ch/v1alpha1 - kind: PreBackupPod - metadata: - name: ${SERVICE_NAME}-prebackuppod - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/lib/rabbitmq ." - fileExtension: .${SERVICE_NAME}.tar - pod: - metadata: - labels: - prebackuppod: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - parent: ${SERVICE_NAME} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: ${SERVICE_NAME}-prebackuppod - volumeMounts: - - mountPath: /var/lib/rabbitmq - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} diff --git a/images/oc-build-deploy-dind/openshift-templates/redis-persistent/deployment.yml b/images/oc-build-deploy-dind/openshift-templates/redis-persistent/deployment.yml index 35aca8c5d1..86c322ab10 100644 --- a/images/oc-build-deploy-dind/openshift-templates/redis-persistent/deployment.yml +++ b/images/oc-build-deploy-dind/openshift-templates/redis-persistent/deployment.yml @@ -79,6 +79,8 @@ objects: branch: ${SAFE_BRANCH} project: ${SAFE_PROJECT} annotations: + appuio.ch/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /data ." + backup.appuio.ch/fileExtension: .${SERVICE_NAME}.tar lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} spec: volumes: diff --git a/images/oc-build-deploy-dind/openshift-templates/redis-persistent/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/redis-persistent/prebackuppod.yml deleted file mode 100644 index f00bcb283a..0000000000 --- a/images/oc-build-deploy-dind/openshift-templates/redis-persistent/prebackuppod.yml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-prebackuppod-redis-persistent -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SERVICE_NAME_UPPERCASE - description: Name of this service in uppercase - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: backup.appuio.ch/v1alpha1 - kind: PreBackupPod - metadata: - name: ${SERVICE_NAME}-prebackuppod - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /data ." - fileExtension: .${SERVICE_NAME}.tar - pod: - metadata: - labels: - prebackuppod: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - parent: ${SERVICE_NAME} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: ${SERVICE_NAME}-prebackuppod - volumeMounts: - - mountPath: /data - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} diff --git a/images/oc-build-deploy-dind/openshift-templates/solr/deployment.yml b/images/oc-build-deploy-dind/openshift-templates/solr/deployment.yml index 13829e7541..8380632646 100644 --- a/images/oc-build-deploy-dind/openshift-templates/solr/deployment.yml +++ b/images/oc-build-deploy-dind/openshift-templates/solr/deployment.yml @@ -73,6 +73,8 @@ objects: branch: ${SAFE_BRANCH} project: ${SAFE_PROJECT} annotations: + appuio.ch/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/solr ." + backup.appuio.ch/fileExtension: .${SERVICE_NAME}.tar lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} spec: volumes: diff --git a/images/oc-build-deploy-dind/openshift-templates/solr/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/solr/prebackuppod.yml deleted file mode 100644 index 83530208f6..0000000000 --- a/images/oc-build-deploy-dind/openshift-templates/solr/prebackuppod.yml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-prebackuppod-solr -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SERVICE_NAME_UPPERCASE - description: Name of this service in uppercase - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: backup.appuio.ch/v1alpha1 - kind: PreBackupPod - metadata: - name: ${SERVICE_NAME}-prebackuppod - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/solr ." - fileExtension: .${SERVICE_NAME}.tar - pod: - metadata: - labels: - prebackuppod: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - parent: ${SERVICE_NAME} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: ${SERVICE_NAME}-prebackuppod - volumeMounts: - - mountPath: /var/solr - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} diff --git a/images/oc-build-deploy-dind/openshift-templates/varnish-persistent/deployment.yml b/images/oc-build-deploy-dind/openshift-templates/varnish-persistent/deployment.yml index addfee86bc..b025911eec 100644 --- a/images/oc-build-deploy-dind/openshift-templates/varnish-persistent/deployment.yml +++ b/images/oc-build-deploy-dind/openshift-templates/varnish-persistent/deployment.yml @@ -70,6 +70,8 @@ objects: branch: ${SAFE_BRANCH} project: ${SAFE_PROJECT} annotations: + appuio.ch/backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/cache/varnish ." + appuio.ch/fileExtension: .${SERVICE_NAME}.tar lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} spec: tolerations: diff --git a/images/oc-build-deploy-dind/openshift-templates/varnish-persistent/prebackuppod.yml b/images/oc-build-deploy-dind/openshift-templates/varnish-persistent/prebackuppod.yml deleted file mode 100644 index f24059bc59..0000000000 --- a/images/oc-build-deploy-dind/openshift-templates/varnish-persistent/prebackuppod.yml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-prebackuppod-varnish-persistent -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SERVICE_NAME_UPPERCASE - description: Name of this service in uppercase - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: backup.appuio.ch/v1alpha1 - kind: PreBackupPod - metadata: - name: ${SERVICE_NAME}-prebackuppod - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - backupCommand: /bin/sh -c "/bin/busybox tar -cf - -C /var/cache/varnish ." - fileExtension: .${SERVICE_NAME}.tar - pod: - metadata: - labels: - prebackuppod: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - parent: ${SERVICE_NAME} - spec: - affinity: - podAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - weight: 100 - containers: - - args: - - sleep - - '3600' - envFrom: - - configMapRef: - name: lagoon-env - image: alpine - imagePullPolicy: Always - name: ${SERVICE_NAME}-prebackuppod - volumeMounts: - - mountPath: /var/cache/varnish - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} diff --git a/images/oc-build-deploy-dind/scripts/exec-openshift-copy-to-registry.sh b/images/oc-build-deploy-dind/scripts/exec-openshift-copy-to-registry.sh new file mode 100644 index 0000000000..a04bb22596 --- /dev/null +++ b/images/oc-build-deploy-dind/scripts/exec-openshift-copy-to-registry.sh @@ -0,0 +1,6 @@ +#!/bin/bash +skopeo copy --dest-tls-verify=false docker://${IMAGECACHE_REGISTRY}/${PULL_IMAGE} docker://${OPENSHIFT_REGISTRY}/${OPENSHIFT_PROJECT}/${IMAGE_NAME}:${IMAGE_TAG:-latest} + +if [ "${INTERNAL_REGISTRY_LOGGED_IN}" = "true" ] ; then + skopeo copy --dest-tls-verify=false docker://${IMAGECACHE_REGISTRY}/${PULL_IMAGE} docker://${INTERNAL_REGISTRY_URL}/${PROJECT}/${SAFE_BRANCH}/${IMAGE_NAME}:${IMAGE_TAG:-latest} || true +fi diff --git a/images/oc-build-deploy-dind/scripts/exec-openshift-mongodb-dbaas.sh b/images/oc-build-deploy-dind/scripts/exec-openshift-mongodb-dbaas.sh new file mode 100644 index 0000000000..5a36a4c12e --- /dev/null +++ b/images/oc-build-deploy-dind/scripts/exec-openshift-mongodb-dbaas.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# The operator can sometimes take a bit, wait until the details are available +# We added a timeout of 10 minutes (120 retries) before exit +OPERATOR_COUNTER=1 +OPERATOR_TIMEOUT=180 +# use the secret name from the consumer to prevent credential clash +until oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.database +do +if [ $OPERATOR_COUNTER -lt $OPERATOR_TIMEOUT ]; then + let SERVICE_BROKER_COUNTER=SERVICE_BROKER_COUNTER+1 + echo "Service for ${SERVICE_NAME} not available yet, waiting for 5 secs" + sleep 5 +else + echo "Timeout of $OPERATOR_TIMEOUT for ${SERVICE_NAME} creation reached" + exit 1 +fi +done +set +x +# Grab the details from the consumer spec +DB_HOST=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.services.primary) +DB_USER=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.username) +DB_PASSWORD=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.password) +DB_NAME=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.consumer.database) +DB_PORT=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.port) +DB_AUTHSOURCE=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.auth.source) +DB_AUTHMECHANISM=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.auth.mechanism) +DB_AUTHTLS=$(oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get mongodbconsumer/${SERVICE_NAME} -o yaml | shyaml get-value spec.provider.auth.tls) + +# Add credentials to our configmap, prefixed with the name of the servicename of this servicebroker +oc patch --insecure-skip-tls-verify \ + -n ${OPENSHIFT_PROJECT} \ + configmap lagoon-env \ + -p "{\"data\":{\"${SERVICE_NAME_UPPERCASE}_HOST\":\"${DB_HOST}\", \"${SERVICE_NAME_UPPERCASE}_USERNAME\":\"${DB_USER}\", \"${SERVICE_NAME_UPPERCASE}_PASSWORD\":\"${DB_PASSWORD}\", \"${SERVICE_NAME_UPPERCASE}_DATABASE\":\"${DB_NAME}\", \"${SERVICE_NAME_UPPERCASE}_PORT\":\"${DB_PORT}\", \"${SERVICE_NAME_UPPERCASE}_AUTHSOURCE\":\"${DB_AUTHSOURCE}\", \"${SERVICE_NAME_UPPERCASE}_AUTHMECHANISM\":\"${DB_AUTHMECHANISM}\", \"${SERVICE_NAME_UPPERCASE}_AUTHTLS\":\"${DB_AUTHTLS}\" }}" + +set -x \ No newline at end of file diff --git a/images/oc-build-deploy-dind/scripts/exec-openshift-tag-dockerhub.sh b/images/oc-build-deploy-dind/scripts/exec-openshift-tag-dockerhub.sh deleted file mode 100644 index 62abcd80ac..0000000000 --- a/images/oc-build-deploy-dind/scripts/exec-openshift-tag-dockerhub.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} tag --reference-policy=local --source=docker ${PULL_IMAGE} ${OPENSHIFT_PROJECT}/${IMAGE_NAME}:latest diff --git a/images/oc/Dockerfile b/images/oc/Dockerfile index a7c5e72b5a..169d13b549 100644 --- a/images/oc/Dockerfile +++ b/images/oc/Dockerfile @@ -1,12 +1,12 @@ -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM golang:1.13-alpine${ALPINE_VERSION} as golang +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons +FROM golang:1.13-alpine3.12 as golang RUN apk add --no-cache git RUN go get github.com/a8m/envsubst/cmd/envsubst -FROM docker:19.03.10 +FROM docker:19.03.14 LABEL maintainer="amazee.io" ENV LAGOON=oc @@ -41,7 +41,7 @@ ENV OC_VERSION=v3.11.0 \ # To run the openshift client library `oc` we need glibc, install that first. Copied from https://github.com/jeanblanchard/docker-alpine-glibc/blob/master/Dockerfile RUN apk add -U --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing aufs-util && \ - apk add --update openssl curl jq parallel && \ + apk add --update openssl curl jq parallel skopeo && \ curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" && \ curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" && \ diff --git a/images/php/cli-drupal/Dockerfile b/images/php/cli-drupal/Dockerfile deleted file mode 100644 index a228a40adb..0000000000 --- a/images/php/cli-drupal/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -ARG PHP_VERSION -ARG PHP_IMAGE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/php:${PHP_VERSION}-cli - -LABEL maintainer="amazee.io" -ENV LAGOON=cli-drupal - -# Defining Versions - https://github.com/hechoendrupal/drupal-console-launcher/releases -ENV DRUPAL_CONSOLE_LAUNCHER_VERSION=1.9.4 \ - DRUPAL_CONSOLE_LAUNCHER_SHA=b7759279668caf915b8e9f3352e88f18e4f20659 \ - DRUSH_VERSION=8.3.5 \ - DRUSH_LAUNCHER_VERSION=0.6.0 \ - DRUSH_LAUNCHER_FALLBACK=/opt/drush8/vendor/bin/drush - -RUN curl -sSLo /usr/local/bin/drupal "https://github.com/hechoendrupal/drupal-console-launcher/releases/download/${DRUPAL_CONSOLE_LAUNCHER_VERSION}/drupal.phar" \ - && echo "${DRUPAL_CONSOLE_LAUNCHER_SHA} /usr/local/bin/drupal" | sha1sum \ - && chmod +x /usr/local/bin/drupal \ - && mkdir -p /opt/drush8 \ - && php /usr/local/bin/composer init -n -d /opt/drush8 --require=drush/drush:${DRUSH_VERSION} \ - && php -d memory_limit=-1 /usr/local/bin/composer update -n -d /opt/drush8 \ - && curl -sSLo /usr/local/bin/drush "https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VERSION}/drush.phar" \ - && chmod +x /usr/local/bin/drush \ - && mkdir -p /home/.drush - -COPY drushrc.php drush.yml /home/.drush/ - -RUN fix-permissions /home/.drush diff --git a/images/php/cli-drupal/drush.yml b/images/php/cli-drupal/drush.yml deleted file mode 100644 index 4bab95e5ef..0000000000 --- a/images/php/cli-drupal/drush.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Lagoon global drush.yml file -# This file tells Drush 9 about the lagoon environment - -options: - root: '/app/${env.WEBROOT}' - uri: '${env.LAGOON_ROUTE}' \ No newline at end of file diff --git a/images/php/cli-drupal/drushrc.php b/images/php/cli-drupal/drushrc.php deleted file mode 100644 index ee9aad89e4..0000000000 --- a/images/php/cli-drupal/drushrc.php +++ /dev/null @@ -1,23 +0,0 @@ - TRUE, 'no-perms' => TRUE, 'no-group' => TRUE, 'no-owner' => TRUE, 'chmod' => 'ugo=rwX'); \ No newline at end of file diff --git a/images/php/cli/05-ssh-key.sh b/images/php/cli/05-ssh-key.sh deleted file mode 100755 index cfab3b42f3..0000000000 --- a/images/php/cli/05-ssh-key.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e - -# If we there is an ssh key injected via lagoon and kubernetes, we use that -if [ -f /var/run/secrets/lagoon/sshkey/ssh-privatekey ]; then - cp -f /var/run/secrets/lagoon/sshkey/ssh-privatekey /home/.ssh/key -# If there is an env variable SSH_PRIVATE_KEY we use that -elif [ ! -z "$SSH_PRIVATE_KEY" ]; then - echo -e "$SSH_PRIVATE_KEY" > /home/.ssh/key -# If there is an env variable LAGOON_SSH_PRIVATE_KEY we use that -elif [ ! -z "$LAGOON_SSH_PRIVATE_KEY" ]; then - echo -e "$LAGOON_SSH_PRIVATE_KEY" > /home/.ssh/key -fi - -if [ -f /home/.ssh/key ]; then - # add a new line to the key. OpenSSH is very picky that keys are always end with a newline - echo >> /home/.ssh/key - # Fix permissions of SSH key - chmod 600 /home/.ssh/key -fi diff --git a/images/php/cli/10-ssh-agent.sh b/images/php/cli/10-ssh-agent.sh deleted file mode 100644 index e75f44581e..0000000000 --- a/images/php/cli/10-ssh-agent.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -e - -# Test if pygmy or cachalot ssh-agents are mounted and symlink them as our known ssh-auth-sock file. -# This will only be used in local development -if [ -S /tmp/amazeeio_ssh-agent/socket ]; then - ln -sf /tmp/amazeeio_ssh-agent/socket $SSH_AUTH_SOCK -# Use the existing key instead (which was generated from 05-ssh-key.sh) -elif [ -f /home/.ssh/key ]; then - rm -f $SSH_AUTH_SOCK - eval $(ssh-agent -a $SSH_AUTH_SOCK) - ssh-add /home/.ssh/key -fi diff --git a/images/php/cli/55-cli-helpers.sh b/images/php/cli/55-cli-helpers.sh deleted file mode 100644 index ea7133ce41..0000000000 --- a/images/php/cli/55-cli-helpers.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -dsql () { - drush sql-sync $1 @self -} - -dfiles () { - drush rsync $1:%files @self:%files -} diff --git a/images/php/cli/61-php-xdebug-cli-env.sh b/images/php/cli/61-php-xdebug-cli-env.sh deleted file mode 100755 index 3db4afa3f4..0000000000 --- a/images/php/cli/61-php-xdebug-cli-env.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# Only if XDEBUG_ENABLE is not empty -if [ ! -z ${XDEBUG_ENABLE} ]; then - # XDEBUG_CONFIG is used by xdebug to decide if an xdebug session should be started in the CLI or not. - # The content doesn't really matter it just needs to be set, the actual connection details are loaded from /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - export XDEBUG_CONFIG="idekey=lagoon" - - # PHP_IDE_CONFIG is used by PhpStorm and should be the URL of the project, we use the `LAGOON_ROUTE` for it (if it exists) - if [ ${LAGOON_ROUTE+x} ]; then - SERVERNAME=$(echo $LAGOON_ROUTE | sed 's/https\?:\/\///') - else - SERVERNAME="lagoon" - fi - export PHP_IDE_CONFIG="serverName=${SERVERNAME}" -fi - diff --git a/images/php/cli/80-shell-timeout.sh b/images/php/cli/80-shell-timeout.sh deleted file mode 100644 index fdc02f389e..0000000000 --- a/images/php/cli/80-shell-timeout.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# If we are running within kubernetes, set a shell timeout of 10mins. -# We do that so old shells are closed and we can idle the cli container -if [ $KUBERNETES_PORT ]; then - TMOUT=600 -fi \ No newline at end of file diff --git a/images/php/cli/90-composer-path.sh b/images/php/cli/90-composer-path.sh deleted file mode 100644 index f18e7d1bf5..0000000000 --- a/images/php/cli/90-composer-path.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -add_to_PATH () { - for d; do - case ":$PATH:" in - *":$d:"*) :;; - *) PATH=$d:$PATH;; - esac - done -} - -add_to_PATH /home/.composer/vendor/bin diff --git a/images/php/cli/90-mariadb-envplate.sh b/images/php/cli/90-mariadb-envplate.sh deleted file mode 100644 index 5f8dbe0a45..0000000000 --- a/images/php/cli/90-mariadb-envplate.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -/bin/ep /etc/my.cnf.d/* diff --git a/images/php/cli/Dockerfile b/images/php/cli/Dockerfile deleted file mode 100644 index cc6aa703f9..0000000000 --- a/images/php/cli/Dockerfile +++ /dev/null @@ -1,82 +0,0 @@ -ARG PHP_VERSION -ARG IMAGE_REPO -ARG PHP_IMAGE_VERSION -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM ${IMAGE_REPO:-lagoon}/php:${PHP_VERSION}-fpm - -LABEL maintainer="amazee.io" -ENV LAGOON=cli - -# Defining Versions - Composer -# @see https://getcomposer.org/download/ -ENV COMPOSER_VERSION=1.10.9 \ - COMPOSER_HASH_SHA256=70d6b9c3e0774b398a372dcb7f89dfe22fc25884e6e09ebf277286dd64cfaf35 - -COPY --from=commons /bin/entrypoint-readiness /bin/ - -RUN apk add --no-cache git \ - unzip \ - gzip \ - bash \ - tini \ - openssh-client \ - rsync \ - patch \ - procps \ - coreutils \ - mariadb-client \ - postgresql-client \ - mongodb-tools \ - openssh-sftp-server \ - findutils \ - nodejs-current \ - nodejs-npm \ - yarn \ - && ln -s /usr/lib/ssh/sftp-server /usr/local/bin/sftp-server \ - && rm -rf /var/cache/apk/* \ - && curl -sSLo /usr/local/bin/composer https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar \ - && echo "$COMPOSER_HASH_SHA256 /usr/local/bin/composer" | sha256sum \ - && chmod +x /usr/local/bin/composer \ - && php -d memory_limit=-1 /usr/local/bin/composer global require hirak/prestissimo \ - && mkdir -p /home/.ssh \ - && fix-permissions /home/ - -# Adding Composer vendor bin path to $PATH. -ENV PATH="/home/.composer/vendor/bin:${PATH}" -# We not only use "export $PATH" as this could be overwritten again -# like it happens in /etc/profile of alpine Images. -COPY 90-composer-path.sh /lagoon/entrypoints/ - -# Remove warning about running as root in composer -ENV COMPOSER_ALLOW_SUPERUSER=1 - -# Making sure the path is not only added during entrypoint, but also when creating a new shell -RUN echo "source /lagoon/entrypoints/90-composer-path.sh" >> /home/.bashrc - -# Make sure shells are not running forever -COPY 80-shell-timeout.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc - -# Make sure xdebug is automatically enabled also for cli scripts -COPY 61-php-xdebug-cli-env.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/61-php-xdebug-cli-env.sh" >> /home/.bashrc - -# Copy mariadb-client configuration. -COPY 90-mariadb-envplate.sh /lagoon/entrypoints/ -COPY mariadb-client.cnf /etc/my.cnf.d/ -RUN fix-permissions /etc/my.cnf.d/ - -# helper functions -COPY 55-cli-helpers.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/55-cli-helpers.sh" >> /home/.bashrc - -# SSH Key and Agent Setup -COPY 05-ssh-key.sh /lagoon/entrypoints/ -COPY 10-ssh-agent.sh /lagoon/entrypoints/ -COPY ssh_config /etc/ssh/ssh_config -COPY id_ed25519_lagoon_cli.key /home/.ssh/lagoon_cli.key -RUN chmod 400 /home/.ssh/lagoon_cli.key -ENV SSH_AUTH_SOCK=/tmp/ssh-agent - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/bin/docker-sleep"] diff --git a/images/php/cli/README.md b/images/php/cli/README.md deleted file mode 100644 index 105a752f06..0000000000 --- a/images/php/cli/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Alpine PHP CLI Image - -## Use another Node.js Version - -By default this Image ships with the current Node.js Version (v9 at time of writing this). If you need another Version you can remove the current version and install the one of your choice. - -Add these commands as parts of your customized Dockerfile within `RUN` commands. - -#### Remove current version (needed for installing any other Version) - - RUN apk del --no-cache nodejs-current yarn --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ - -#### Install Node.js Version 6 - - RUN apk add --no-cache nodejs yarn --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ - -#### Install Node.js Version 8 - - RUN apk add --no-cache nodejs yarn --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ diff --git a/images/php/cli/id_ed25519_lagoon_cli.key b/images/php/cli/id_ed25519_lagoon_cli.key deleted file mode 100644 index 3e4a43f9e5..0000000000 --- a/images/php/cli/id_ed25519_lagoon_cli.key +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN OPENSSH PRIVATE KEY----- -b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW -QyNTUxOQAAACCFGJJXzBNtfjlGlt7lsXsiM0WDSGVcRSkcF22WS0ErMgAAAJB8dgK3fHYC -twAAAAtzc2gtZWQyNTUxOQAAACCFGJJXzBNtfjlGlt7lsXsiM0WDSGVcRSkcF22WS0ErMg -AAAEC0XD5LwsT4v+f/DsslBBOZT3kW17Br+jdXvfoReRfjN4UYklfME21+OUaW3uWxeyIz -RYNIZVxFKRwXbZZLQSsyAAAACmxhZ29vbi1jbGkBAgM= ------END OPENSSH PRIVATE KEY----- diff --git a/images/php/cli/mariadb-client.cnf b/images/php/cli/mariadb-client.cnf deleted file mode 100644 index ddae2ddd2e..0000000000 --- a/images/php/cli/mariadb-client.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[client] -max_allowed_packet = ${MARIADB_MAX_ALLOWED_PACKET:-64M} diff --git a/images/php/cli/ssh_config b/images/php/cli/ssh_config deleted file mode 100644 index 0927994629..0000000000 --- a/images/php/cli/ssh_config +++ /dev/null @@ -1,7 +0,0 @@ -Host * - StrictHostKeyChecking no - UserKnownHostsFile /dev/null - IdentityFile /home/.ssh/lagoon_cli.key - IdentityFile /home/.ssh/key - ServerAliveInterval 60 - ServerAliveCountMax 1440 diff --git a/images/php/fpm/00-lagoon-php.ini.tpl b/images/php/fpm/00-lagoon-php.ini.tpl deleted file mode 100644 index ba428eaf3c..0000000000 --- a/images/php/fpm/00-lagoon-php.ini.tpl +++ /dev/null @@ -1,17 +0,0 @@ -[PHP] -max_execution_time = ${PHP_MAX_EXECUTION_TIME:-900} -max_input_vars = ${PHP_MAX_INPUT_VARS:-2000} -max_file_uploads = ${PHP_MAX_FILE_UPLOADS:-20} -memory_limit = ${PHP_MEMORY_LIMIT:-400M} -display_errors = ${PHP_DISPLAY_ERRORS:-Off} -display_startup_errors = ${PHP_DISPLAY_STARTUP_ERRORS:-Off} -auto_prepend_file = ${PHP_AUTO_PREPEND_FILE:-none} -auto_append_file = ${PHP_AUTO_APPEND_FILE:-none} -error_reporting = ${PHP_ERROR_REPORTING:-E_ALL & ~E_DEPRECATED & ~E_STRICT} - -[APC] -apc.shm_size = ${PHP_APC_SHM_SIZE:-32m} -apc.enabled = ${PHP_APC_ENABLED:-1} - -[xdebug] -xdebug.remote_enable = on diff --git a/images/php/fpm/Dockerfile b/images/php/fpm/Dockerfile deleted file mode 100644 index f2a3d3b1a7..0000000000 --- a/images/php/fpm/Dockerfile +++ /dev/null @@ -1,136 +0,0 @@ -ARG PHP_VERSION -ARG PHP_IMAGE_VERSION -ARG ALPINE_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons - -FROM composer:latest as healthcheckbuilder - -RUN composer create-project --no-dev amazeeio/healthz-php /healthz-php v0.0.6 - -FROM php:${PHP_IMAGE_VERSION}-fpm-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=php - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -# Copy healthcheck files - -COPY --from=healthcheckbuilder /healthz-php /healthz-php - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -COPY check_fcgi /usr/sbin/ -COPY entrypoints/70-php-config.sh entrypoints/60-php-xdebug.sh entrypoints/50-ssmtp.sh entrypoints/71-php-newrelic.sh /lagoon/entrypoints/ - -COPY php.ini /usr/local/etc/php/ -COPY 00-lagoon-php.ini.tpl /usr/local/etc/php/conf.d/ -COPY php-fpm.d/www.conf /usr/local/etc/php-fpm.d/www.conf -COPY ssmtp.conf /etc/ssmtp/ssmtp.conf - -# New Relic PHP Agent. -# @see https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes/ -# @see https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements -ENV NEWRELIC_VERSION=9.12.0.268 - -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.12/main/ 'curl>7.68' 'libcurl>7.68' - -RUN apk add --no-cache fcgi \ - ssmtp \ - libzip libzip-dev \ - # for gd - libpng-dev \ - libjpeg-turbo-dev \ - # for gettext - gettext-dev \ - # for mcrypt - libmcrypt-dev \ - # for soap - libxml2-dev \ - # for xsl - libxslt-dev \ - libgcrypt-dev \ - # for webp - libwebp-dev \ - postgresql-dev \ - # for yaml - yaml-dev \ - # for imagemagick - imagemagick \ - imagemagick-libs \ - imagemagick-dev \ - && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \ - && yes '' | pecl install -f apcu \ - && yes '' | pecl install -f xdebug \ - && yes '' | pecl install -f yaml \ - && yes '' | pecl install -f redis-4.3.0 \ - && yes '' | pecl install -f imagick \ - && docker-php-ext-enable apcu redis xdebug imagick \ - && case ${PHP_VERSION} in \ - 7.4*) \ - docker-php-ext-configure gd --with-webp --with-jpeg \ - ;; \ - *) \ - docker-php-ext-configure gd --with-webp-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ - ;; \ - esac \ - && docker-php-ext-install -j4 bcmath gd gettext pdo_mysql mysqli pdo_pgsql pgsql shmop soap sockets opcache xsl zip \ - && sed -i '1s/^/;Intentionally disabled. Enable via setting env variable XDEBUG_ENABLE to true\n;/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ - && rm -rf /var/cache/apk/* /tmp/pear/ \ - && apk del .phpize-deps \ - && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/yaml.ini \ - && mkdir -p /tmp/newrelic && cd /tmp/newrelic \ - && curl -sSLO https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz \ - && gzip -dc newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz | tar --strip-components=1 -xf - \ - && NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 ./newrelic-install install \ - && sed -i -e "s/newrelic.appname = .*/newrelic.appname = \"\${LAGOON_PROJECT:-noproject}-\${LAGOON_GIT_SAFE_BRANCH:-nobranch}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.enabled = .*/newrelic.enabled = \${NEWRELIC_ENABLED:-false}/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.browser_monitoring.auto_instrument = .*/newrelic.browser_monitoring.auto_instrument = \${NEWRELIC_BROWSER_MONITORING_ENABLED:-true}/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/newrelic.license = .*/newrelic.license = \"\${NEWRELIC_LICENSE:-}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.loglevel = .*/newrelic.loglevel = \"\${NEWRELIC_LOG_LEVEL:-warning}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/;newrelic.daemon.loglevel = .*/newrelic.daemon.loglevel = \"\${NEWRELIC_DAEMON_LOG_LEVEL:-warning}\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/newrelic.logfile = .*/newrelic.logfile = \"\/dev\/stdout\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && sed -i -e "s/newrelic.daemon.logfile = .*/newrelic.daemon.logfile = \"\/dev\/stdout\"/" /usr/local/etc/php/conf.d/newrelic.ini \ - && mv /usr/local/etc/php/conf.d/newrelic.ini /usr/local/etc/php/conf.d/newrelic.disable \ - && cd / && rm -rf /tmp/newrelic \ - && mkdir -p /app \ - && fix-permissions /usr/local/etc/ \ - && fix-permissions /app \ - && fix-permissions /etc/ssmtp/ssmtp.conf - -EXPOSE 9000 - -ENV AMAZEEIO_DB_HOST=mariadb \ - AMAZEEIO_DB_PORT=3306 \ - AMAZEEIO_DB_USERNAME=drupal \ - AMAZEEIO_DB_PASSWORD=drupal \ - AMAZEEIO_SITENAME=drupal \ - AMAZEEIO_SITE_NAME=drupal \ - AMAZEEIO_SITE_ENVIRONMENT=development \ - AMAZEEIO_HASH_SALT=0000000000000000000000000 \ - AMAZEEIO_TMP_PATH=/tmp \ - AMAZEEIO_LOCATION=docker - -ENV LAGOON_ENVIRONMENT_TYPE=development - -WORKDIR /app - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/usr/local/sbin/php-fpm", "-F", "-R"] diff --git a/images/php/fpm/check_fcgi b/images/php/fpm/check_fcgi deleted file mode 100755 index 8af1d53ba6..0000000000 --- a/images/php/fpm/check_fcgi +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# cgi-fcgi has issues with non-standard environment variables, so this script -# is called with "env -i" to clean the environment -# This script calls the /ping endpoing of the php-fpm, if the return code is 0, the php-fpm has correctly started -env -i SCRIPT_NAME=/${1:-ping} SCRIPT_FILENAME=/${1:-ping} REQUEST_METHOD=GET /usr/bin/cgi-fcgi -bind -connect 127.0.0.1:9000 diff --git a/images/php/fpm/entrypoints/50-ssmtp.sh b/images/php/fpm/entrypoints/50-ssmtp.sh deleted file mode 100755 index c5a51f7ea1..0000000000 --- a/images/php/fpm/entrypoints/50-ssmtp.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - - -if [ ${SSMTP_REWRITEDOMAIN+x} ]; then - echo -e "\nrewriteDomain=${SSMTP_REWRITEDOMAIN}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_AUTHUSER+x} ]; then - echo -e "\nAuthUser=${SSMTP_AUTHUSER}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_AUTHPASS+x} ]; then - echo -e "\nAuthPass=${SSMTP_AUTHPASS}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_USETLS+x} ]; then - echo -e "\nUseTLS=${SSMTP_USETLS}" >> /etc/ssmtp/ssmtp.conf -fi -if [ ${SSMTP_USESTARTTLS+x} ]; then - echo -e "\nUseSTARTTLS=${SSMTP_USESTARTTLS}" >> /etc/ssmtp/ssmtp.conf -fi - -if [ ${SSMTP_MAILHUB+x} ]; then - echo -e "\nmailhub=${SSMTP_MAILHUB}" >> /etc/ssmtp/ssmtp.conf -else - # check if we find a mailhog on 172.17.0.1:1025 - if nc -z -w 1 172.17.0.1 1025 &> /dev/null; then - echo -e "\nmailhub=172.17.0.1:1025" >> /etc/ssmtp/ssmtp.conf - return - fi - # check if mxout.lagoon.svc can do smtp TLS - if nc -z -w 1 mxout.lagoon.svc 465 &> /dev/null; then - echo -e "UseTLS=Yes\nmailhub=mxout.lagoon.svc:465" >> /etc/ssmtp/ssmtp.conf - return - fi - # Fallback: check if mxout.lagoon.svc can do regular 25 smtp - if nc -z -w 1 mxout.lagoon.svc 25 &> /dev/null; then - echo -e "\nmailhub=mxout.lagoon.svc:25" >> /etc/ssmtp/ssmtp.conf - return - fi - # check if mxout.default.svc can do smtp TLS - if nc -z -w 1 mxout.default.svc 465 &> /dev/null; then - echo -e "UseTLS=Yes\nmailhub=mxout.default.svc:465" >> /etc/ssmtp/ssmtp.conf - return - fi - # Fallback: check if mxout.default.svc can do regular 25 smtp - if nc -z -w 1 mxout.default.svc 25 &> /dev/null; then - echo -e "\nmailhub=mxout.default.svc:25" >> /etc/ssmtp/ssmtp.conf - return - fi -fi diff --git a/images/php/fpm/entrypoints/51-production-detection.sh b/images/php/fpm/entrypoints/51-production-detection.sh deleted file mode 100644 index ce5b12eee3..0000000000 --- a/images/php/fpm/entrypoints/51-production-detection.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [[ -z "${PHP_ERROR_REPORTING}" ]]; then - if [[ ${LAGOON_ENVIRONMENT_TYPE} == "production" ]]; then - export PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE" - fi -fi diff --git a/images/php/fpm/entrypoints/60-php-xdebug.sh b/images/php/fpm/entrypoints/60-php-xdebug.sh deleted file mode 100755 index 1d05a274f1..0000000000 --- a/images/php/fpm/entrypoints/60-php-xdebug.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# Tries to find the Dockerhost -get_dockerhost() { - # https://docs.docker.com/docker-for-mac/networking/#known-limitations-use-cases-and-workarounds - if busybox timeout 1 busybox nslookup -query=A host.docker.internal &> /dev/null; then - echo "host.docker.internal" - return - fi - - # Fallback to default gateway (should work on Linux) see https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach - echo $(route -n | awk '/UG[ \t]/{print $2}') - return -} - -# Only if XDEBUG_ENABLE is not empty -if [ ! -z ${XDEBUG_ENABLE} ]; then - # remove first line and all comments - sed -i '1d; s/;//' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - # add comment that explains how we have xdebug enabled - sed -i '1s/^/;xdebug enabled as XDEBUG_ENABLE is not empty, see \/lagoon\/entrypoints\/60-php-xdebug.sh \n/' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - - # Only if DOCKERHOST is not already set, allows to set a DOCKERHOST via environment variables - if [[ -z ${DOCKERHOST+x} ]]; then - DOCKERHOST=$(get_dockerhost) - fi - - # Add the found remote_host to xdebug.ini - echo -e "\n\nxdebug.remote_host=${DOCKERHOST}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - - if [ ${XDEBUG_LOG+x} ]; then - echo -e "\n\nxdebug.remote_log=/tmp/xdebug.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - fi -fi diff --git a/images/php/fpm/entrypoints/70-php-config.sh b/images/php/fpm/entrypoints/70-php-config.sh deleted file mode 100755 index 257c9ac8c5..0000000000 --- a/images/php/fpm/entrypoints/70-php-config.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cp /usr/local/etc/php/conf.d/00-lagoon-php.ini.tpl /usr/local/etc/php/conf.d/00-lagoon-php.ini && ep /usr/local/etc/php/conf.d/00-lagoon-php.ini -ep /usr/local/etc/php-fpm.conf -ep /usr/local/etc/php-fpm.d/* \ No newline at end of file diff --git a/images/php/fpm/entrypoints/71-php-newrelic.sh b/images/php/fpm/entrypoints/71-php-newrelic.sh deleted file mode 100755 index e1b1bb0d54..0000000000 --- a/images/php/fpm/entrypoints/71-php-newrelic.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# enable newrelic only if NEWRELIC_ENABLED is set -if [ ${NEWRELIC_ENABLED+x} ]; then - # envplate the newrelic ini file - ep /usr/local/etc/php/conf.d/newrelic.disable - - cp /usr/local/etc/php/conf.d/newrelic.disable /usr/local/etc/php/conf.d/newrelic.ini - - # check if newrelic is running before trying to do tasks as it can cause them to fail, can delay container start by a few seconds - # https://discuss.newrelic.com/t/php-agents-tries-to-connect-before-daemon-is-ready/48160/9 - php -r '$count=0;while(!newrelic_set_appname(ini_get("newrelic.appname")) && $count < 10){ $count++; echo "Waiting for NewRelic Agent to be responsive. ($count)" . PHP_EOL; sleep(1); }' -fi diff --git a/images/php/fpm/php-fpm.d/www.conf b/images/php/fpm/php-fpm.d/www.conf deleted file mode 100644 index 3aa6fcd85c..0000000000 --- a/images/php/fpm/php-fpm.d/www.conf +++ /dev/null @@ -1,119 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -listen = [::]:9000 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN:-50} - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = ${PHP_FPM_PM_START_SERVERS:-2} - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS:-2} - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS:-2} - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -pm.process_idle_timeout = ${PHP_FPM_PM_PROCESS_IDLE_TIMEOUT:-60s} - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS:-500} - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -ping.response = pong - -; PHP FPM Status Page -pm.status_path = /status - -; The access log file -; Default: not set -access.log = ${PHP_FPM_ACCESS_LOG:-/dev/null} - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -clear_env = no diff --git a/images/php/fpm/php.ini b/images/php/fpm/php.ini deleted file mode 100644 index 55009fc640..0000000000 --- a/images/php/fpm/php.ini +++ /dev/null @@ -1,1587 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;;;;;;; -; Language Options ; -;;;;;;;;;;;;;;;;;;;; - -; Enable the PHP scripting language engine under Apache. -; http://php.net/engine -engine = On - -; This directive determines whether or not PHP will recognize code between -; tags as PHP source which should be processed as such. It is -; generally recommended that should be used and that this feature -; should be disabled, as enabling it may result in issues when generating XML -; documents, however this remains supported for backward compatibility reasons. -; Note that this directive does not control the would work. -; http://php.net/syntax-highlighting -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.default = #0000BB -;highlight.html = #000000 - -; If enabled, the request will be allowed to complete even if the user aborts -; the request. Consider enabling it if executing long requests, which may end up -; being interrupted by the user or a browser timing out. PHP's default behavior -; is to disable this feature. -; http://php.net/ignore-user-abort -;ignore_user_abort = On - -; Determines the size of the realpath cache to be used by PHP. This value should -; be increased on systems where PHP opens many files to reflect the quantity of -; the file operations performed. -; http://php.net/realpath-cache-size -;realpath_cache_size = 16k -realpath_cache_size = 256k - -; Duration of time, in seconds for which to cache realpath information for a given -; file or directory. For systems with rarely changing files, consider increasing this -; value. -; http://php.net/realpath-cache-ttl -;realpath_cache_ttl = 120 -realpath_cache_ttl = 3600 - -; Enables or disables the circular reference collector. -; http://php.net/zend.enable-gc -zend.enable_gc = On - -; If enabled, scripts may be written in encodings that are incompatible with -; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such -; encodings. To use this feature, mbstring extension must be enabled. -; Default: Off -;zend.multibyte = Off - -; Allows to set the default encoding for the scripts. This value will be used -; unless "declare(encoding=...)" directive appears at the top of the script. -; Only affects if zend.multibyte is set. -; Default: "" -;zend.script_encoding = - -;;;;;;;;;;;;;;;;; -; Miscellaneous ; -;;;;;;;;;;;;;;;;; - -; Decides whether PHP may expose the fact that it is installed on the server -; (e.g. by adding its signature to the Web server header). It is no security -; threat in any way, but it makes it possible to determine whether you use PHP -; on your server or not. -; http://php.net/expose-php -expose_php = 0 - -;;;;;;;;;;;;;;;;;;; -; Resource Limits ; -;;;;;;;;;;;;;;;;;;; - -; Maximum execution time of each script, in seconds -; http://php.net/max-execution-time -; Note: This directive is hardcoded to 0 for the CLI SAPI -max_execution_time = 900 - -; Maximum amount of time each script may spend parsing request data. It's a good -; idea to limit this time on productions servers in order to eliminate unexpectedly -; long running scripts. -; Note: This directive is hardcoded to -1 for the CLI SAPI -; Default Value: -1 (Unlimited) -; Development Value: 60 (60 seconds) -; Production Value: 60 (60 seconds) -; http://php.net/max-input-time -max_input_time = 900 - -; Maximum input variable nesting level -; http://php.net/max-input-nesting-level -;max_input_nesting_level = 64 - -; How many GET/POST/COOKIE input variables may be accepted -max_input_vars = 1000 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 400M - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Error handling and logging ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -; This directive informs PHP of which errors, warnings and notices you would like -; it to take action for. The recommended way of setting values for this -; directive is through the use of the error level constants and bitwise -; operators. The error level constants are below here for convenience as well as -; some common settings and their meanings. -; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and -; recommended coding standards in PHP. For performance reasons, this is the -; recommend error reporting setting. Your production server shouldn't be wasting -; resources complaining about best practices and coding standards. That's what -; development servers and development settings are for. -; Note: The php.ini-development file has this setting as E_ALL. This -; means it pretty much reports everything which is exactly what you want during -; development and early testing. -; -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it is automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL (Show all errors, warnings and notices including coding standards.) -; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED -; Development Value: E_ALL & ~E_DEPRECATED & ~E_STRICT -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE -; http://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT - -; This directive controls whether or not and where PHP will output errors, -; notices and warnings too. Error output is very useful during development, but -; it could be very dangerous in production environments. Depending on the code -; which is triggering the error, sensitive information could potentially leak -; out of your application such as database usernames and passwords or worse. -; For production environments, we recommend logging errors rather than -; sending them to STDOUT. -; Possible Values: -; Off = Do not display any errors -; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) -; On or stdout = Display errors to STDOUT -; Default Value: On -; Development Value: On -; Production Value: Off -; http://php.net/display-errors -display_errors = Off - -; The display of errors which occur during PHP's startup sequence are handled -; separately from display_errors. PHP's default behavior is to suppress those -; errors from clients. Turning the display of startup errors on can be useful in -; debugging configuration problems. We strongly recommend you -; set this to 'off' for production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/display-startup-errors -display_startup_errors = Off - -; Besides displaying errors, PHP can also log errors to locations such as a -; server-specific log, STDERR, or a location specified by the error_log -; directive found below. While errors should not be displayed on productions -; servers they should still be monitored and logging is a great way to do that. -; Default Value: Off -; Development Value: On -; Production Value: On -; http://php.net/log-errors -log_errors = On - -; Set maximum length of log_errors. In error_log information about the source is -; added. The default is 1024 and 0 allows to not apply any maximum length at all. -; http://php.net/log-errors-max-len -log_errors_max_len = 1024 - -; Do not log repeated messages. Repeated errors must occur in same file on same -; line unless ignore_repeated_source is set true. -; http://php.net/ignore-repeated-errors -ignore_repeated_errors = Off - -; Ignore source of message when ignoring repeated messages. When this setting -; is On you will not log errors with repeated messages from different files or -; source lines. -; http://php.net/ignore-repeated-source -ignore_repeated_source = Off - -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This has only effect in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; http://php.net/report-memleaks -report_memleaks = On - -; This setting is on by default. -;report_zend_debug = 0 - -; Store the last error/warning message in $php_errormsg (boolean). Setting this value -; to On can assist in debugging and is appropriate for development servers. It should -; however be disabled on production servers. -; Default Value: Off -; Development Value: On -; Production Value: Off -; http://php.net/track-errors -track_errors = Off - -; Turn off normal error reporting and emit XML-RPC error XML -; http://php.net/xmlrpc-errors -;xmlrpc_errors = 0 - -; An XML-RPC faultCode -;xmlrpc_error_number = 0 - -; When PHP displays or logs an error, it has the capability of formatting the -; error message as HTML for easier reading. This directive controls whether -; the error message is formatted as HTML or not. -; Note: This directive is hardcoded to Off for the CLI SAPI -; Default Value: On -; Development Value: On -; Production value: On -; http://php.net/html-errors -html_errors = On - -; If html_errors is set to On *and* docref_root is not empty, then PHP -; produces clickable error messages that direct to a page describing the error -; or function causing the error in detail. -; You can download a copy of the PHP manual from http://php.net/docs -; and change docref_root to the base URL of your local copy including the -; leading '/'. You must also specify the file extension being used including -; the dot. PHP's default behavior is to leave these settings empty, in which -; case no links to documentation are generated. -; Note: Never use this feature for production boxes. -; http://php.net/docref-root -; Examples -;docref_root = "/phpmanual/" - -; http://php.net/docref-ext -;docref_ext = .html - -; String to output before an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-prepend-string -; Example: -;error_prepend_string = "" - -; String to output after an error message. PHP's default behavior is to leave -; this setting blank. -; http://php.net/error-append-string -; Example: -;error_append_string = "" - -; Log errors to specified file. PHP's default behavior is to leave this value -; empty. -; http://php.net/error-log -; Example: -;error_log = php_errors.log -; Log errors to syslog. -;error_log = syslog - -;windows.show_crt_warning -; Default value: 0 -; Development value: 0 -; Production value: 0 - -;;;;;;;;;;;;;;;;; -; Data Handling ; -;;;;;;;;;;;;;;;;; - -; The separator used in PHP generated URLs to separate arguments. -; PHP's default setting is "&". -; http://php.net/arg-separator.output -; Example: -;arg_separator.output = "&" - -; List of separator(s) used by PHP to parse input URLs into variables. -; PHP's default setting is "&". -; NOTE: Every character in this directive is considered as separator! -; http://php.net/arg-separator.input -; Example: -;arg_separator.input = ";&" - -; This directive determines which super global arrays are registered when PHP -; starts up. G,P,C,E & S are abbreviations for the following respective super -; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty -; paid for the registration of these arrays and because ENV is not as commonly -; used as the others, ENV is not recommended on productions servers. You -; can still get access to the environment variables through getenv() should you -; need to. -; Default Value: "EGPCS" -; Development Value: "GPCS" -; Production Value: "GPCS"; -; http://php.net/variables-order -variables_order = "GPCS" - -; This directive determines which super global data (G,P & C) should be -; registered into the super global array REQUEST. If so, it also determines -; the order in which that data is registered. The values for this directive -; are specified in the same manner as the variables_order directive, -; EXCEPT one. Leaving this value empty will cause PHP to use the value set -; in the variables_order directive. It does not mean it will leave the super -; globals array REQUEST empty. -; Default Value: None -; Development Value: "GP" -; Production Value: "GP" -; http://php.net/request-order -request_order = "GP" - -; This directive determines whether PHP registers $argv & $argc each time it -; runs. $argv contains an array of all the arguments passed to PHP when a script -; is invoked. $argc contains an integer representing the number of arguments -; that were passed when the script was invoked. These arrays are extremely -; useful when running scripts from the command line. When this directive is -; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off -; http://php.net/register-argc-argv -register_argc_argv = Off - -; When enabled, the ENV, REQUEST and SERVER variables are created when they're -; first used (Just In Time) instead of when the script starts. If these -; variables are not used within a script, having this directive on will result -; in a performance gain. The PHP directive register_argc_argv must be disabled -; for this directive to have any affect. -; http://php.net/auto-globals-jit -auto_globals_jit = On - -; Whether PHP will read the POST data. -; This option is enabled by default. -; Most likely, you won't want to disable this option globally. It causes $_POST -; and $_FILES to always be empty; the only way you will be able to read the -; POST data will be through the php://input stream wrapper. This can be useful -; to proxy requests or to process the POST data in a memory efficient fashion. -; http://php.net/enable-post-data-reading -;enable_post_data_reading = Off - -; Maximum size of POST data that PHP will accept. -; Its value may be 0 to disable the limit. It is ignored if POST data reading -; is disabled through enable_post_data_reading. -; http://php.net/post-max-size -post_max_size = 2048M - -; Automatically add files before PHP document. -; http://php.net/auto-prepend-file -auto_prepend_file = none - -; Automatically add files after PHP document. -; http://php.net/auto-append-file -auto_append_file = none - -; By default, PHP will output a character encoding using -; the Content-type: header. To disable sending of the charset, simply -; set it to be empty. -; -; PHP's built-in default is text/html -; http://php.net/default-mimetype -default_mimetype = "text/html" - -; PHP's default character set is set to UTF-8. -; http://php.net/default-charset -default_charset = "UTF-8" - -; PHP internal character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/internal-encoding -;internal_encoding = - -; PHP input character encoding is set to empty. -; If empty, default_charset is used. -; http://php.net/input-encoding -;input_encoding = - -; PHP output character encoding is set to empty. -; If empty, default_charset is used. -; mbstring or iconv output handler is used. -; See also output_buffer. -; http://php.net/output-encoding -;output_encoding = - -;;;;;;;;;;;;;;;;;;;;;;;;; -; Paths and Directories ; -;;;;;;;;;;;;;;;;;;;;;;;;; - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -; -; Windows: "\path1;\path2" -;include_path = ".;c:\php\includes" -; -; PHP's default setting for include_path is ".;/path/to/php/pear" -; http://php.net/include-path - -; The root of the PHP pages, used only if nonempty. -; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root -; if you are running php as a CGI under any web server (other than IIS) -; see documentation for security issues. The alternate is to use the -; cgi.force_redirect configuration below -; http://php.net/doc-root -doc_root = - -; The directory under which PHP opens the script using /~username used only -; if nonempty. -; http://php.net/user-dir -user_dir = - -; Directory in which the loadable extensions (modules) reside. -; http://php.net/extension-dir -; extension_dir = "./" -; On windows: -; extension_dir = "ext" - -; Directory where the temporary files should be placed. -; Defaults to the system default (see sys_get_temp_dir) -; sys_temp_dir = "/tmp" - -; Whether or not to enable the dl() function. The dl() function does NOT work -; properly in multithreaded servers, such as IIS or Zeus, and is automatically -; disabled on them. -; http://php.net/enable-dl -enable_dl = Off - -; cgi.force_redirect is necessary to provide security running PHP as a CGI under -; most web servers. Left undefined, PHP turns this on by default. You can -; turn it off here AT YOUR OWN RISK -; **You CAN safely turn this off for IIS, in fact, you MUST.** -; http://php.net/cgi.force-redirect -;cgi.force_redirect = 1 - -; if cgi.nph is enabled it will force cgi to always sent Status: 200 with -; every request. PHP's default behavior is to disable this feature. -;cgi.nph = 1 - -; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape -; (iPlanet) web servers, you MAY need to set an environment variable name that PHP -; will look for to know it is OK to continue execution. Setting this variable MAY -; cause security issues, KNOW WHAT YOU ARE DOING FIRST. -; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = - -; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's -; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok -; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting -; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting -; of zero causes PHP to behave as before. Default is 1. You should fix your scripts -; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. -; http://php.net/cgi.fix-pathinfo -cgi.fix_pathinfo=0 - -; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate -; security tokens of the calling client. This allows IIS to define the -; security context that the request runs under. mod_fastcgi under Apache -; does not currently support this feature (03/17/2002) -; Set to 1 if running under IIS. Default is zero. -; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 - -; cgi.rfc2616_headers configuration option tells PHP what type of headers to -; use when sending HTTP response code. If set to 0, PHP sends Status: header that -; is supported by Apache. When this option is set to 1, PHP will send -; RFC2616 compliant header. -; Default is zero. -; http://php.net/cgi.rfc2616-headers -;cgi.rfc2616_headers = 0 - -;;;;;;;;;;;;;;;; -; File Uploads ; -;;;;;;;;;;;;;;;; - -; Whether to allow HTTP file uploads. -; http://php.net/file-uploads -file_uploads = On - -; Temporary directory for HTTP uploaded files (will use system default if not -; specified). -; http://php.net/upload-tmp-dir -;upload_tmp_dir = - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 2048M - -; Maximum number of files that can be uploaded via a single request -max_file_uploads = 20 - -;;;;;;;;;;;;;;;;;; -; Fopen wrappers ; -;;;;;;;;;;;;;;;;;; - -; Whether to allow the treatment of URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-fopen -allow_url_fopen = On - -; Whether to allow include/require to open URLs (like http:// or ftp://) as files. -; http://php.net/allow-url-include -allow_url_include = Off - -; Define the anonymous ftp password (your email address). PHP's default setting -; for this is empty. -; http://php.net/from -;from="john@doe.com" - -; Define the User-Agent string. PHP's default setting for this is empty. -; http://php.net/user-agent -;user_agent="PHP" - -; Default timeout for socket based streams (seconds) -; http://php.net/default-socket-timeout -default_socket_timeout = 60 - -; If your scripts have to deal with files from Macintosh systems, -; or you are running on a Mac and need to deal with files from -; unix or win32 systems, setting this flag will cause PHP to -; automatically detect the EOL character in those files so that -; fgets() and file() will work regardless of the source of the file. -; http://php.net/auto-detect-line-endings -;auto_detect_line_endings = Off - -;;;;;;;;;;;;;;;;;;;;;; -; Dynamic Extensions ; -;;;;;;;;;;;;;;;;;;;;;; - -; If you wish to have an extension loaded automatically, use the following -; syntax: -; -; extension=modulename.extension -; -; For example, on Windows: -; -; extension=msql.dll -; -; ... or under UNIX: -; -; extension=msql.so -; -; ... or with a path: -; -; extension=/path/to/extension/msql.so -; -; If you only provide the name of the extension, PHP will look for it in its -; default extension directory. - -;;;; -; Note: packaged extension modules are now loaded via the .ini files -; found in the directory /etc/php.d; these are loaded by default. -;;;; - -;;;;;;;;;;;;;;;;;;; -; Module Settings ; -;;;;;;;;;;;;;;;;;;; - -[CLI Server] -; Whether the CLI web server uses ANSI color coding in its terminal output. -cli_server.color = On - -[Date] -; Defines the default timezone used by the date functions -; http://php.net/date.timezone -date.timezone = UTC - -; http://php.net/date.default-latitude -;date.default_latitude = 31.7667 - -; http://php.net/date.default-longitude -;date.default_longitude = 35.2333 - -; http://php.net/date.sunrise-zenith -;date.sunrise_zenith = 90.583333 - -; http://php.net/date.sunset-zenith -;date.sunset_zenith = 90.583333 - -[filter] -; http://php.net/filter.default -;filter.default = unsafe_raw - -; http://php.net/filter.default-flags -;filter.default_flags = - -[iconv] -; Use of this INI entry is deprecated, use global input_encoding instead. -; If empty, default_charset or input_encoding or iconv.input_encoding is used. -; The precedence is: default_charset < intput_encoding < iconv.input_encoding -;iconv.input_encoding = - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;iconv.internal_encoding = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; If empty, default_charset or output_encoding or iconv.output_encoding is used. -; The precedence is: default_charset < output_encoding < iconv.output_encoding -; To use an output encoding conversion, iconv's output handler must be set -; otherwise output encoding conversion cannot be performed. -;iconv.output_encoding = - -[intl] -;intl.default_locale = -; This directive allows you to produce PHP errors when some error -; happens within intl functions. The value is the level of the error produced. -; Default is 0, which does not produce any errors. -;intl.error_level = E_WARNING - -[sqlite] -; http://php.net/sqlite.assoc-case -;sqlite.assoc_case = 0 - -[sqlite3] -;sqlite3.extension_dir = - -[Pcre] -;PCRE library backtracking limit. -; http://php.net/pcre.backtrack-limit -;pcre.backtrack_limit=100000 - -;PCRE library recursion limit. -;Please note that if you set this value to a high number you may consume all -;the available process stack and eventually crash PHP (due to reaching the -;stack size limit imposed by the Operating System). -; http://php.net/pcre.recursion-limit -;pcre.recursion_limit=100000 - -;Enables or disables JIT compilation of patterns. This requires the PCRE -;library to be compiled with JIT support. -pcre.jit=0 - -[Pdo] -; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off" -; http://php.net/pdo-odbc.connection-pooling -;pdo_odbc.connection_pooling=strict - -;pdo_odbc.db2_instance_name - -[Pdo_mysql] -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/pdo_mysql.cache_size -pdo_mysql.cache_size = 2000 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/pdo_mysql.default-socket -pdo_mysql.default_socket= - -[Phar] -; http://php.net/phar.readonly -;phar.readonly = On - -; http://php.net/phar.require-hash -;phar.require_hash = On - -;phar.cache_list = - -[mail function] -; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). -; http://php.net/sendmail-path -sendmail_path = /usr/sbin/sendmail -t -i - -; Force the addition of the specified parameters to be passed as extra parameters -; to the sendmail binary. These parameters will always replace the value of -; the 5th parameter to mail(). -;mail.force_extra_parameters = - -; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename -mail.add_x_header = On - -; The path to a log file that will log all mail() calls. Log entries include -; the full path of the script, line number, To address and headers. -;mail.log = -; Log mail to syslog; -;mail.log = syslog - -[SQL] -; http://php.net/sql.safe-mode -sql.safe_mode = Off - -[ODBC] -; http://php.net/odbc.default-db -;odbc.default_db = Not yet implemented - -; http://php.net/odbc.default-user -;odbc.default_user = Not yet implemented - -; http://php.net/odbc.default-pw -;odbc.default_pw = Not yet implemented - -; Controls the ODBC cursor model. -; Default: SQL_CURSOR_STATIC (default). -;odbc.default_cursortype - -; Allow or prevent persistent links. -; http://php.net/odbc.allow-persistent -odbc.allow_persistent = On - -; Check that a connection is still valid before reuse. -; http://php.net/odbc.check-persistent -odbc.check_persistent = On - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/odbc.max-persistent -odbc.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -; http://php.net/odbc.max-links -odbc.max_links = -1 - -; Handling of LONG fields. Returns number of bytes to variables. 0 means -; passthru. -; http://php.net/odbc.defaultlrl -odbc.defaultlrl = 4096 - -; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. -; See the documentation on odbc_binmode and odbc_longreadlen for an explanation -; of odbc.defaultlrl and odbc.defaultbinmode -; http://php.net/odbc.defaultbinmode -odbc.defaultbinmode = 1 - -;birdstep.max_links = -1 - -[Interbase] -; Allow or prevent persistent links. -ibase.allow_persistent = 1 - -; Maximum number of persistent links. -1 means no limit. -ibase.max_persistent = -1 - -; Maximum number of links (persistent + non-persistent). -1 means no limit. -ibase.max_links = -1 - -; Default database name for ibase_connect(). -;ibase.default_db = - -; Default username for ibase_connect(). -;ibase.default_user = - -; Default password for ibase_connect(). -;ibase.default_password = - -; Default charset for ibase_connect(). -;ibase.default_charset = - -; Default timestamp format. -ibase.timestampformat = "%Y-%m-%d %H:%M:%S" - -; Default date format. -ibase.dateformat = "%Y-%m-%d" - -; Default time format. -ibase.timeformat = "%H:%M:%S" - -[MySQLi] - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/mysqli.max-persistent -mysqli.max_persistent = -1 - -; Allow accessing, from PHP's perspective, local files with LOAD DATA statements -; http://php.net/mysqli.allow_local_infile -;mysqli.allow_local_infile = On - -; Allow or prevent persistent links. -; http://php.net/mysqli.allow-persistent -mysqli.allow_persistent = On - -; Maximum number of links. -1 means no limit. -; http://php.net/mysqli.max-links -mysqli.max_links = -1 - -; If mysqlnd is used: Number of cache slots for the internal result set cache -; http://php.net/mysqli.cache_size -mysqli.cache_size = 2000 - -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. -; http://php.net/mysqli.default-port -mysqli.default_port = 3306 - -; Default socket name for local MySQL connects. If empty, uses the built-in -; MySQL defaults. -; http://php.net/mysqli.default-socket -mysqli.default_socket = - -; Default host for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-host -mysqli.default_host = - -; Default user for mysql_connect() (doesn't apply in safe mode). -; http://php.net/mysqli.default-user -mysqli.default_user = - -; Default password for mysqli_connect() (doesn't apply in safe mode). -; Note that this is generally a *bad* idea to store passwords in this file. -; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") -; and reveal this password! And of course, any users with read access to this -; file will be able to reveal the password as well. -; http://php.net/mysqli.default-pw -mysqli.default_pw = - -; Allow or prevent reconnect -mysqli.reconnect = Off - -[mysqlnd] -; Enable / Disable collection of general statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_statistics -mysqlnd.collect_statistics = On - -; Enable / Disable collection of memory usage statistics by mysqlnd which can be -; used to tune and monitor MySQL operations. -; http://php.net/mysqlnd.collect_memory_statistics -mysqlnd.collect_memory_statistics = Off - -; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. -; http://php.net/mysqlnd.net_cmd_buffer_size -;mysqlnd.net_cmd_buffer_size = 2048 - -; Size of a pre-allocated buffer used for reading data sent by the server in -; bytes. -; http://php.net/mysqlnd.net_read_buffer_size -;mysqlnd.net_read_buffer_size = 32768 - -[PostgreSQL] -; Allow or prevent persistent links. -; http://php.net/pgsql.allow-persistent -pgsql.allow_persistent = On - -; Detect broken persistent links always with pg_pconnect(). -; Auto reset feature requires a little overheads. -; http://php.net/pgsql.auto-reset-persistent -pgsql.auto_reset_persistent = Off - -; Maximum number of persistent links. -1 means no limit. -; http://php.net/pgsql.max-persistent -pgsql.max_persistent = -1 - -; Maximum number of links (persistent+non persistent). -1 means no limit. -; http://php.net/pgsql.max-links -pgsql.max_links = -1 - -; Ignore PostgreSQL backends Notice message or not. -; Notice message logging require a little overheads. -; http://php.net/pgsql.ignore-notice -pgsql.ignore_notice = 0 - -; Log PostgreSQL backends Notice message or not. -; Unless pgsql.ignore_notice=0, module cannot log notice message. -; http://php.net/pgsql.log-notice -pgsql.log_notice = 0 - -[bcmath] -; Number of decimal digits for all bcmath functions. -; http://php.net/bcmath.scale -bcmath.scale = 0 - -[browscap] -; http://php.net/browscap -;browscap = extra/browscap.ini - -[Session] -; Handler used to store/retrieve data. -; http://php.net/session.save-handler -session.save_handler = files - -; Argument passed to save_handler. In the case of files, this is the path -; where data files are stored. Note: Windows users have to change this -; variable in order to use PHP's session functions. -; -; The path can be defined as: -; -; session.save_path = "N;/path" -; -; where N is an integer. Instead of storing all the session files in -; /path, what this will do is use subdirectories N-levels deep, and -; store the session data in those directories. This is useful if -; your OS has problems with many files in one directory, and is -; a more efficient layout for servers that handle many sessions. -; -; NOTE 1: PHP will not create this directory structure automatically. -; You can use the script in the ext/session dir for that purpose. -; NOTE 2: See the section on garbage collection below if you choose to -; use subdirectories for session storage -; -; The file storage module creates files using mode 600 by default. -; You can change that by using -; -; session.save_path = "N;MODE;/path" -; -; where MODE is the octal representation of the mode. Note that this -; does not overwrite the process's umask. -; http://php.net/session.save-path - -; RPM note : session directory must be owned by process owner -; for mod_php, see /etc/httpd/conf.d/php.conf -; for php-fpm, see /etc/php-fpm.d/*conf -;session.save_path = "/tmp" - -; Whether to use strict session mode. -; Strict session mode does not accept uninitialized session ID and regenerate -; session ID if browser sends uninitialized session ID. Strict mode protects -; applications from session fixation via session adoption vulnerability. It is -; disabled by default for maximum compatibility, but enabling it is encouraged. -; https://wiki.php.net/rfc/strict_sessions -session.use_strict_mode = 0 - -; Whether to use cookies. -; http://php.net/session.use-cookies -session.use_cookies = 1 - -; http://php.net/session.cookie-secure -;session.cookie_secure = - -; This option forces PHP to fetch and use a cookie for storing and maintaining -; the session id. We encourage this operation as it's very helpful in combating -; session hijacking when not specifying and managing your own session id. It is -; not the be-all and end-all of session hijacking defense, but it's a good start. -; http://php.net/session.use-only-cookies -session.use_only_cookies = 1 - -; Name of the session (used as cookie name). -; http://php.net/session.name -session.name = PHPSESSID - -; Initialize session on request startup. -; http://php.net/session.auto-start -session.auto_start = 0 - -; Lifetime in seconds of cookie or, if 0, until browser is restarted. -; http://php.net/session.cookie-lifetime -session.cookie_lifetime = 2000000 - -; The path for which the cookie is valid. -; http://php.net/session.cookie-path -session.cookie_path = / - -; The domain for which the cookie is valid. -; http://php.net/session.cookie-domain -session.cookie_domain = - -; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript. -; http://php.net/session.cookie-httponly -session.cookie_httponly = - -; Handler used to serialize data. php is the standard serializer of PHP. -; http://php.net/session.serialize-handler -session.serialize_handler = php - -; Defines the probability that the 'garbage collection' process is started -; on every session initialization. The probability is calculated by using -; gc_probability/gc_divisor. Where session.gc_probability is the numerator -; and gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.gc-probability -session.gc_probability = 1 - -; Defines the probability that the 'garbage collection' process is started on every -; session initialization. The probability is calculated by using the following equation: -; gc_probability/gc_divisor. Where session.gc_probability is the numerator and -; session.gc_divisor is the denominator in the equation. Setting this value to 1 -; when the session.gc_divisor value is 100 will give you approximately a 1% chance -; the gc will run on any give request. Increasing this value to 1000 will give you -; a 0.1% chance the gc will run on any give request. For high volume production servers, -; this is a more efficient approach. -; Default Value: 100 -; Development Value: 1000 -; Production Value: 1000 -; http://php.net/session.gc-divisor -session.gc_divisor = 1000 - -; After this number of seconds, stored data will be seen as 'garbage' and -; cleaned up by the garbage collection process. -; http://php.net/session.gc-maxlifetime -session.gc_maxlifetime = 200000 - -; NOTE: If you are using the subdirectory option for storing session files -; (see session.save_path above), then garbage collection does *not* -; happen automatically. You will need to do your own garbage -; collection through a shell script, cron entry, or some other method. -; For example, the following script would is the equivalent of -; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): -; find /path/to/sessions -cmin +24 -type f | xargs rm - -; Check HTTP Referer to invalidate externally stored URLs containing ids. -; HTTP_REFERER has to contain this substring for the session to be -; considered as valid. -; http://php.net/session.referer-check -session.referer_check = - -; How many bytes to read from the file. -; http://php.net/session.entropy-length -;session.entropy_length = 32 - -; Specified here to create the session id. -; http://php.net/session.entropy-file -; Defaults to /dev/urandom -; On systems that don't have /dev/urandom but do have /dev/arandom, this will default to /dev/arandom -; If neither are found at compile time, the default is no entropy file. -; On windows, setting the entropy_length setting will activate the -; Windows random source (using the CryptoAPI) -;session.entropy_file = /dev/urandom - -; Set to {nocache,private,public,} to determine HTTP caching aspects -; or leave this empty to avoid sending anti-caching headers. -; http://php.net/session.cache-limiter -session.cache_limiter = nocache - -; Document expires after n minutes. -; http://php.net/session.cache-expire -session.cache_expire = 180 - -; trans sid support is disabled by default. -; Use of trans sid may risk your users' security. -; Use this option with caution. -; - User may send URL contains active session ID -; to other person via. email/irc/etc. -; - URL that contains active session ID may be stored -; in publicly accessible computer. -; - User may access your site with the same session ID -; always using URL stored in browser's history or bookmarks. -; http://php.net/session.use-trans-sid -session.use_trans_sid = 0 - -; Select a hash function for use in generating session ids. -; Possible Values -; 0 (MD5 128 bits) -; 1 (SHA-1 160 bits) -; This option may also be set to the name of any hash function supported by -; the hash extension. A list of available hashes is returned by the hash_algos() -; function. -; http://php.net/session.hash-function -session.hash_function = 0 - -; Define how many bits are stored in each character when converting -; the binary hash data to something readable. -; Possible values: -; 4 (4 bits: 0-9, a-f) -; 5 (5 bits: 0-9, a-v) -; 6 (6 bits: 0-9, a-z, A-Z, "-", ",") -; Default Value: 4 -; Development Value: 5 -; Production Value: 5 -; http://php.net/session.hash-bits-per-character -session.hash_bits_per_character = 5 - -; The URL rewriter will look for URLs in a defined set of HTML tags. -; form/fieldset are special; if you include them here, the rewriter will -; add a hidden field with the info which is otherwise appended -; to URLs. If you want XHTML conformity, remove the form entry. -; Note that all valid entries require a "=", even if no value follows. -; Default Value: "a=href,area=href,frame=src,form=,fieldset=" -; Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry" -; http://php.net/url-rewriter.tags -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" - -; Enable upload progress tracking in $_SESSION -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.enabled -;session.upload_progress.enabled = On - -; Cleanup the progress information as soon as all POST data has been read -; (i.e. upload completed). -; Default Value: On -; Development Value: On -; Production Value: On -; http://php.net/session.upload-progress.cleanup -;session.upload_progress.cleanup = On - -; A prefix used for the upload progress key in $_SESSION -; Default Value: "upload_progress_" -; Development Value: "upload_progress_" -; Production Value: "upload_progress_" -; http://php.net/session.upload-progress.prefix -;session.upload_progress.prefix = "upload_progress_" - -; The index name (concatenated with the prefix) in $_SESSION -; containing the upload progress information -; Default Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Development Value: "PHP_SESSION_UPLOAD_PROGRESS" -; Production Value: "PHP_SESSION_UPLOAD_PROGRESS" -; http://php.net/session.upload-progress.name -;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" - -; How frequently the upload progress should be updated. -; Given either in percentages (per-file), or in bytes -; Default Value: "1%" -; Development Value: "1%" -; Production Value: "1%" -; http://php.net/session.upload-progress.freq -;session.upload_progress.freq = "1%" - -; The minimum delay between updates, in seconds -; Default Value: 1 -; Development Value: 1 -; Production Value: 1 -; http://php.net/session.upload-progress.min-freq -;session.upload_progress.min_freq = "1" - -[Assertion] -; Switch whether to compile assertions at all (to have no overhead at run-time) -; -1: Do not compile at all -; 0: Jump over assertion at run-time -; 1: Execute assertions -; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) -; Default Value: 1 -; Development Value: 1 -; Production Value: -1 -; http://php.net/zend.assertions -zend.assertions = -1 - -; Assert(expr); active by default. -; http://php.net/assert.active -;assert.active = On - -; Throw an AssertationException on failed assertions -; http://php.net/assert.exception -;assert.exception = On - -; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active) -; http://php.net/assert.warning -;assert.warning = On - -; Don't bail out by default. -; http://php.net/assert.bail -;assert.bail = Off - -; User-function to be called if an assertion fails. -; http://php.net/assert.callback -;assert.callback = 0 - -; Eval the expression with current error_reporting(). Set to true if you want -; error_reporting(0) around the eval(). -; http://php.net/assert.quiet-eval -;assert.quiet_eval = 0 - -[mbstring] -; language for internal character representation. -; This affects mb_send_mail() and mbstring.detect_order. -; http://php.net/mbstring.language -;mbstring.language = Japanese - -; Use of this INI entry is deprecated, use global internal_encoding instead. -; internal/script encoding. -; Some encoding cannot work as internal encoding. (e.g. SJIS, BIG5, ISO-2022-*) -; If empty, default_charset or internal_encoding or iconv.internal_encoding is used. -; The precedence is: default_charset < internal_encoding < iconv.internal_encoding -;mbstring.internal_encoding = - -; Use of this INI entry is deprecated, use global input_encoding instead. -; http input encoding. -; mbstring.encoding_traslation = On is needed to use this setting. -; If empty, default_charset or input_encoding or mbstring.input is used. -; The precedence is: default_charset < intput_encoding < mbsting.http_input -; http://php.net/mbstring.http-input -;mbstring.http_input = - -; Use of this INI entry is deprecated, use global output_encoding instead. -; http output encoding. -; mb_output_handler must be registered as output buffer to function. -; If empty, default_charset or output_encoding or mbstring.http_output is used. -; The precedence is: default_charset < output_encoding < mbstring.http_output -; To use an output encoding conversion, mbstring's output handler must be set -; otherwise output encoding conversion cannot be performed. -; http://php.net/mbstring.http-output -;mbstring.http_output = - -; enable automatic encoding translation according to -; mbstring.internal_encoding setting. Input chars are -; converted to internal encoding by setting this to On. -; Note: Do _not_ use automatic encoding translation for -; portable libs/applications. -; http://php.net/mbstring.encoding-translation -;mbstring.encoding_translation = Off - -; automatic encoding detection order. -; "auto" detect order is changed according to mbstring.language -; http://php.net/mbstring.detect-order -;mbstring.detect_order = auto - -; substitute_character used when character cannot be converted -; one from another -; http://php.net/mbstring.substitute-character -;mbstring.substitute_character = none - -; overload(replace) single byte functions by mbstring functions. -; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(), -; etc. Possible values are 0,1,2,4 or combination of them. -; For example, 7 for overload everything. -; 0: No overload -; 1: Overload mail() function -; 2: Overload str*() functions -; 4: Overload ereg*() functions -; http://php.net/mbstring.func-overload -;mbstring.func_overload = 0 - -; enable strict encoding detection. -; Default: Off -;mbstring.strict_detection = On - -; This directive specifies the regex pattern of content types for which mb_output_handler() -; is activated. -; Default: mbstring.http_output_conv_mimetype=^(text/|application/xhtml\+xml) -;mbstring.http_output_conv_mimetype= - -[gd] -; Tell the jpeg decode to ignore warnings and try to create -; a gd image. The warning will then be displayed as notices -; disabled by default -; http://php.net/gd.jpeg-ignore-warning -;gd.jpeg_ignore_warning = 0 - -[exif] -; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. -; With mbstring support this will automatically be converted into the encoding -; given by corresponding encode setting. When empty mbstring.internal_encoding -; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. -; http://php.net/exif.encode-unicode -;exif.encode_unicode = ISO-8859-15 - -; http://php.net/exif.decode-unicode-motorola -;exif.decode_unicode_motorola = UCS-2BE - -; http://php.net/exif.decode-unicode-intel -;exif.decode_unicode_intel = UCS-2LE - -; http://php.net/exif.encode-jis -;exif.encode_jis = - -; http://php.net/exif.decode-jis-motorola -;exif.decode_jis_motorola = JIS - -; http://php.net/exif.decode-jis-intel -;exif.decode_jis_intel = JIS - -[Tidy] -; The path to a default tidy configuration file to use when using tidy -; http://php.net/tidy.default-config -;tidy.default_config = /usr/local/lib/php/default.tcfg - -; Should tidy clean and repair output automatically? -; WARNING: Do not use this option if you are generating non-html content -; such as dynamic images -; http://php.net/tidy.clean-output -tidy.clean_output = Off - -[soap] -; Enables or disables WSDL caching feature. -; http://php.net/soap.wsdl-cache-enabled -soap.wsdl_cache_enabled=1 - -; Sets the directory name where SOAP extension will put cache files. -; http://php.net/soap.wsdl-cache-dir - -; RPM note : cache directory must be owned by process owner -; for mod_php, see /etc/httpd/conf.d/php.conf -; for php-fpm, see /etc/php-fpm.d/*conf -soap.wsdl_cache_dir="/tmp" - -; (time to live) Sets the number of second while cached file will be used -; instead of original one. -; http://php.net/soap.wsdl-cache-ttl -soap.wsdl_cache_ttl=86400 - -; Sets the size of the cache limit. (Max. number of WSDL files to cache) -soap.wsdl_cache_limit = 5 - -[sysvshm] -; A default size of the shared memory segment -;sysvshm.init_mem = 10000 - -[ldap] -; Sets the maximum number of open links or -1 for unlimited. -ldap.max_links = -1 - -[mcrypt] -; For more information about mcrypt settings see http://php.net/mcrypt-module-open - -; Directory where to load mcrypt algorithms -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.algorithms_dir= - -; Directory where to load mcrypt modes -; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) -;mcrypt.modes_dir= - -[dba] -;dba.default_handler= - -[opcache] -; Determines if Zend OPCache is enabled -;opcache.enable=0 - -; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 - -; The OPcache shared memory storage size. -;opcache.memory_consumption=64 -opcache.memory_consumption=256 - -; The amount of memory for interned strings in Mbytes. -;opcache.interned_strings_buffer=4 - -; The maximum number of keys (scripts) in the OPcache hash table. -; Only numbers between 200 and 100000 are allowed. -;opcache.max_accelerated_files=2000 - -; The maximum percentage of "wasted" memory until a restart is scheduled. -;opcache.max_wasted_percentage=5 - -; When this directive is enabled, the OPcache appends the current working -; directory to the script key, thus eliminating possible collisions between -; files with the same name (basename). Disabling the directive improves -; performance, but may break existing applications. -;opcache.use_cwd=1 - -; When disabled, you must reset the OPcache manually or restart the -; webserver for changes to the filesystem to take effect. -;opcache.validate_timestamps=1 - -; How often (in seconds) to check file timestamps for changes to the shared -; memory storage allocation. ("1" means validate once per second, but only -; once per request. "0" means always validate) -;opcache.revalidate_freq=2 - -; Enables or disables file search in include_path optimization -;opcache.revalidate_path=0 - -; If disabled, all PHPDoc comments are dropped from the code to reduce the -; size of the optimized code. -;opcache.save_comments=1 - -; If enabled, a fast shutdown sequence is used for the accelerated code -;opcache.fast_shutdown=0 - -; Allow file existence override (file_exists, etc.) performance feature. -;opcache.enable_file_override=0 -opcache.enable_file_override=1 - -; A bitmask, where each bit enables or disables the appropriate OPcache -; passes -;opcache.optimization_level=0xffffffff - -;opcache.inherited_hack=1 -;opcache.dups_fix=0 - -; The location of the OPcache blacklist file (wildcards allowed). -; Each OPcache blacklist file is a text file that holds the names of files -; that should not be accelerated. The file format is to add each filename -; to a new line. The filename may be a full path or just a file prefix -; (i.e., /var/www/x blacklists all the files and directories in /var/www -; that start with 'x'). Line starting with a ; are ignored (comments). -;opcache.blacklist_filename= - -; Allows exclusion of large files from being cached. By default all files -; are cached. -;opcache.max_file_size=0 - -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - -; How long to wait (in seconds) for a scheduled restart to begin if the cache -; is not being accessed. -;opcache.force_restart_timeout=180 - -; OPcache error_log file name. Empty string assumes "stderr". -;opcache.error_log= - -; All OPcache errors go to the Web server log. -; By default, only fatal errors (level 0) or errors (level 1) are logged. -; You can also enable warnings (level 2), info messages (level 3) or -; debug messages (level 4). -;opcache.log_verbosity_level=1 - -; Preferred Shared Memory back-end. Leave empty and let the system decide. -;opcache.preferred_memory_model= - -; Protect the shared memory from unexpected writing during script execution. -; Useful for internal debugging only. -;opcache.protect_memory=0 - -; Allows calling OPcache API functions only from PHP scripts which path is -; started from specified string. The default "" means no restriction -;opcache.restrict_api= - -; Mapping base of shared memory segments (for Windows only). All the PHP -; processes have to map shared memory into the same address space. This -; directive allows to manually fix the "Unable to reattach to base address" -; errors. -;opcache.mmap_base= - -; Enables and sets the second level cache directory. -; It should improve performance when SHM memory is full, at server restart or -; SHM reset. The default "" disables file based caching. -;opcache.file_cache= - -; Enables or disables opcode caching in shared memory. -;opcache.file_cache_only=0 - -; Enables or disables checksum validation when script loaded from file cache. -;opcache.file_cache_consistency_checks=1 - -; Enables or disables copying of PHP code (text segment) into HUGE PAGES. -; This should improve performance, but requires appropriate OS configuration. -opcache.huge_code_pages=1 - -[curl] -; A default value for the CURLOPT_CAINFO option. This is required to be an -; absolute path. -;curl.cainfo = - -[openssl] -; The location of a Certificate Authority (CA) file on the local filesystem -; to use when verifying the identity of SSL/TLS peers. Most users should -; not specify a value for this directive as PHP will attempt to use the -; OS-managed cert stores in its absence. If specified, this value may still -; be overridden on a per-stream basis via the "cafile" SSL stream context -; option. -;openssl.cafile= - -; If openssl.cafile is not specified or if the CA file is not found, the -; directory pointed to by openssl.capath is searched for a suitable -; certificate. This value must be a correctly hashed certificate directory. -; Most users should not specify a value for this directive as PHP will -; attempt to use the OS-managed cert stores in its absence. If specified, -; this value may still be overridden on a per-stream basis via the "capath" -; SSL stream context option. -;openssl.capath= - -; Local Variables: -; tab-width: 4 -; End: - -[APC] -apc.shm_size = 32m -apc.enabled = 1 - -[xdebug] -xdebug.remote_enable = on diff --git a/images/php/fpm/ssmtp.conf b/images/php/fpm/ssmtp.conf deleted file mode 100644 index 1659e71b49..0000000000 --- a/images/php/fpm/ssmtp.conf +++ /dev/null @@ -1,4 +0,0 @@ -# ssmtp config (will be filled during entrypoint 50-ssmtp.sh) - -# Email 'From header's can override the default domain -FromLineOverride=yes diff --git a/images/postgres-ckan/90-datastore-user.sh b/images/postgres-ckan/90-datastore-user.sh deleted file mode 100755 index d12ea97269..0000000000 --- a/images/postgres-ckan/90-datastore-user.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e - -psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL - CREATE USER ckan_datastore with encrypted password 'ckan'; - GRANT ALL PRIVILEGES ON DATABASE ckan TO ckan_datastore; -EOSQL diff --git a/images/postgres-ckan/Dockerfile b/images/postgres-ckan/Dockerfile deleted file mode 100644 index a20a80827b..0000000000 --- a/images/postgres-ckan/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/postgres - -# change log_min_error_statement and log_min_messages from `error` to `log` as drupal is prone to cause some errors which are all logged (yes `log` is a less verbose mode than `error`) -RUN sed -i "s/#log_min_error_statement = error/log_min_error_statement = log/" /usr/local/share/postgresql/postgresql.conf.sample \ - && sed -i "s/#log_min_messages = warning/log_min_messages = log/" /usr/local/share/postgresql/postgresql.conf.sample - -ENV POSTGRES_PASSWORD=ckan \ - POSTGRES_USER=ckan \ - POSTGRES_DB=ckan - -COPY 90-datastore-user.sh /docker-entrypoint-initdb.d/ diff --git a/images/postgres-drupal/Dockerfile b/images/postgres-drupal/Dockerfile deleted file mode 100644 index 2a01b4b630..0000000000 --- a/images/postgres-drupal/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/postgres - -# change log_min_error_statement and log_min_messages from `error` to `log` as drupal is prone to cause some errors which are all logged (yes `log` is a less verbose mode than `error`) -RUN sed -i "s/#log_min_error_statement = error/log_min_error_statement = log/" /usr/local/share/postgresql/postgresql.conf.sample \ - && sed -i "s/#log_min_messages = warning/log_min_messages = log/" /usr/local/share/postgresql/postgresql.conf.sample - -ENV POSTGRES_PASSWORD=drupal \ - POSTGRES_USER=drupal \ - POSTGRES_DB=drupal diff --git a/images/postgres/Dockerfile b/images/postgres/Dockerfile deleted file mode 100644 index 5601f06b8a..0000000000 --- a/images/postgres/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# alpine 3.11 from https://github.com/docker-library/postgres/blob/master/11/alpine/Dockerfile -FROM postgres:11.6-alpine - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV LAGOON=postgres - -COPY postgres-backup.sh /lagoon/ - -RUN echo -e "local all all md5\nhost all all 0.0.0.0/0 md5" >> /usr/local/share/postgresql/pg_hba.conf - -ENV PGUSER=postgres \ - POSTGRES_PASSWORD=lagoon \ - POSTGRES_USER=lagoon \ - POSTGRES_DB=lagoon \ - PGDATA=/var/lib/postgresql/data/pgdata - -# Postgresql entrypoint file needs bash, so start the entrypoints with bash -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"] -CMD ["/usr/local/bin/docker-entrypoint.sh", "postgres"] \ No newline at end of file diff --git a/images/postgres/postgres-backup.sh b/images/postgres/postgres-backup.sh deleted file mode 100644 index f760fbcf3d..0000000000 --- a/images/postgres/postgres-backup.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -set -eu -o pipefail - -# directory to put the backup files -BACKUP_DIR=/var/lib/postgresql/data/backup - -# MYSQL Parameters -PGUSER=${POSTGRES_USER:-lagoon} -PGPASSWORD=${POSTGRES_PASSWORD:-lagoon} - -PGHOST=$1 - -# Number of days to keep backups -KEEP_BACKUPS_FOR=4 #days - -#============================================================================== -# METHODS -#============================================================================== - -# YYYY-MM-DD_HHMMSS -TIMESTAMP=$(date +%F_%H%M%S) - -function prepare() -{ - mkdir -p $BACKUP_DIR -} - -function delete_old_backups() -{ - echo "Deleting $BACKUP_DIR/*.sql.gz older than $KEEP_BACKUPS_FOR days" - find $BACKUP_DIR -type f -name "*.sql.gz" -mtime +$KEEP_BACKUPS_FOR -exec rm {} \; -} - - -function database_list() { - echo $(psql -At -c "select datname from pg_database where not datistemplate and datallowconn and datname != 'postgres';" postgres) -} - -function echo_status(){ - printf '\r'; - printf ' %0.s' {0..100} - printf '\r'; - printf "$1"'\r' -} - -function backup_database(){ - backup_file="$BACKUP_DIR/$TIMESTAMP.$database.sql.gz" - output="${output}${database} => $backup_file\n" - echo_status "...backing up $count of $total databases: $database" - $(pg_dump $database | gzip -9 > $backup_file) -} - -function backup_databases(){ - local databases=$(database_list) - local total=$(echo $databases | wc -w | xargs) - local output="" - local count=1 - for database in $databases; do - backup_database - local count=$((count+1)) - done - echo -ne $output -} - -function hr(){ - printf '=%.0s' {1..100} - printf "\n" -} - -#============================================================================== -# RUN SCRIPT -#============================================================================== -prepare -delete_old_backups -hr -backup_databases -hr -printf "All backed up!\n\n" diff --git a/images/python-ckan/Dockerfile b/images/python-ckan/Dockerfile deleted file mode 100644 index 74565bf25f..0000000000 --- a/images/python-ckan/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -ARG PYTHON_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/python:${PYTHON_VERSION} - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache git \ - libpq \ - postgresql-dev \ - gcc \ - musl-dev \ - file-dev \ - libxslt-dev \ - libxml2-dev \ - libffi-dev - -RUN mkdir -p /app/ckan/default \ - && fix-permissions /app/ckan/default - -RUN virtualenv --no-site-packages /app/ckan/default \ - && . /app/ckan/default/bin/activate \ - && pip install setuptools==20.4 diff --git a/images/python-ckandatapusher/Dockerfile b/images/python-ckandatapusher/Dockerfile deleted file mode 100644 index fe7f2a451d..0000000000 --- a/images/python-ckandatapusher/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -ARG PYTHON_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/python:${PYTHON_VERSION} - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache git \ - libpq \ - postgresql-dev \ - gcc \ - musl-dev \ - file-dev \ - libxslt-dev \ - libxml2-dev \ - libffi-dev \ - pcre-dev - -RUN virtualenv /app/ckan/datapusher - -RUN mkdir -p /app/ckan/datapusher/src \ - && mkdir -p /etc/ckan \ - && fix-permissions /app/ckan \ - && ln -s /app/ckan /usr/lib/ckan \ - && . /app/ckan/datapusher/bin/activate \ - && pip install uwsgi \ - && cd /app/ckan/datapusher/src \ - && git clone -b 0.0.14 https://github.com/ckan/datapusher.git \ - && cd datapusher \ - && /app/ckan/datapusher/bin/pip install -r requirements.txt \ - && /app/ckan/datapusher/bin/python setup.py develop \ - && cp deployment/datapusher.wsgi /etc/ckan/ \ - && cp deployment/datapusher_settings.py /etc/ckan/ - -ENV LISTEN_PORT=8800 - -CMD ["sh", "-c", ". /app/ckan/datapusher/bin/activate && uwsgi --http :${LISTEN_PORT} --wsgi-file /etc/ckan/datapusher.wsgi"] diff --git a/images/python/80-shell-timeout.sh b/images/python/80-shell-timeout.sh deleted file mode 100644 index fdc02f389e..0000000000 --- a/images/python/80-shell-timeout.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# If we are running within kubernetes, set a shell timeout of 10mins. -# We do that so old shells are closed and we can idle the cli container -if [ $KUBERNETES_PORT ]; then - TMOUT=600 -fi \ No newline at end of file diff --git a/images/python/Dockerfile b/images/python/Dockerfile deleted file mode 100644 index 1ee8d863f5..0000000000 --- a/images/python/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -ARG PYTHON_VERSION -ARG IMAGE_REPO -ARG ALPINE_VERSION -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=python - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk add --no-cache --virtual .build-deps \ - build-base \ - && pip install --upgrade pip \ - && pip install virtualenv==16.7.10 \ - && apk del .build-deps - -# Make sure shells are not running forever -COPY 80-shell-timeout.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["python"] diff --git a/images/rabbitmq-cluster/enabled_plugins b/images/rabbitmq-cluster/enabled_plugins index 607ac7474e..4ef8337a78 100644 --- a/images/rabbitmq-cluster/enabled_plugins +++ b/images/rabbitmq-cluster/enabled_plugins @@ -1 +1 @@ -[rabbitmq_management,rabbitmq_delayed_message_exchange,rabbitmq_peer_discovery_k8s]. +[rabbitmq_management,rabbitmq_delayed_message_exchange,rabbitmq_peer_discovery_k8s,rabbitmq_prometheus]. diff --git a/images/rabbitmq/Dockerfile b/images/rabbitmq/Dockerfile index e936178fb5..b1338aa795 100644 --- a/images/rabbitmq/Dockerfile +++ b/images/rabbitmq/Dockerfile @@ -1,7 +1,8 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# alpine 3.11 as per https://github.com/docker-library/rabbitmq/blob/master/3.8/alpine/Dockerfile -FROM rabbitmq:3.8-management-alpine +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons +# alpine 3.12 as per https://github.com/docker-library/rabbitmq/blob/master/3.8/alpine/Dockerfile +FROM rabbitmq:3.8.9-management-alpine ARG LAGOON_VERSION ENV LAGOON_VERSION=$LAGOON_VERSION @@ -13,8 +14,8 @@ ENV RABBITMQ_DEFAULT_USER='guest' \ COPY --from=commons /bin/ep /bin/fix-permissions /bin/ -COPY rabbitmq_delayed_message_exchange-3.8.0.ez /plugins -RUN rabbitmq-plugins enable --offline rabbitmq_delayed_message_exchange; +COPY rabbitmq_delayed_message_exchange-3.8.9.ez /plugins +RUN rabbitmq-plugins enable --offline rabbitmq_delayed_message_exchange rabbitmq_prometheus; # Copy startup schema with vhost, users, permissions and policies COPY definitions.json /etc/rabbitmq/definitions.json diff --git a/images/rabbitmq/rabbitmq_delayed_message_exchange-3.8.0.ez b/images/rabbitmq/rabbitmq_delayed_message_exchange-3.8.0.ez deleted file mode 100644 index 6332f5ff21..0000000000 Binary files a/images/rabbitmq/rabbitmq_delayed_message_exchange-3.8.0.ez and /dev/null differ diff --git a/images/rabbitmq/rabbitmq_delayed_message_exchange-3.8.9.ez b/images/rabbitmq/rabbitmq_delayed_message_exchange-3.8.9.ez new file mode 100644 index 0000000000..2ba64115db Binary files /dev/null and b/images/rabbitmq/rabbitmq_delayed_message_exchange-3.8.9.ez differ diff --git a/images/redis-persistent/Dockerfile b/images/redis-persistent/Dockerfile deleted file mode 100644 index f83a77aee3..0000000000 --- a/images/redis-persistent/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/redis - -ENV FLAVOR=persistent diff --git a/images/redis/Dockerfile b/images/redis/Dockerfile deleted file mode 100644 index a6990f656c..0000000000 --- a/images/redis/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -ARG IMAGE_REPO -ARG ALPINE_VERSION -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM redis:5.0-alpine${ALPINE_VERSION} - -LABEL maintainer="amazee.io" -ENV LAGOON=redis -ENV FLAVOR=ephemeral - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN chmod g+w /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -COPY conf /etc/redis/ -COPY docker-entrypoint /lagoon/entrypoints/70-redis-entrypoint - -RUN fix-permissions /etc/redis \ - fix-permissions /data - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["redis-server", "/etc/redis/redis.conf"] diff --git a/images/redis/conf/ephemeral.conf b/images/redis/conf/ephemeral.conf deleted file mode 100644 index 4840b8259f..0000000000 --- a/images/redis/conf/ephemeral.conf +++ /dev/null @@ -1,4 +0,0 @@ - -# this disabled the persistent cache -save "" -appendonly no diff --git a/images/redis/conf/persistent.conf b/images/redis/conf/persistent.conf deleted file mode 100644 index d3976a05f4..0000000000 --- a/images/redis/conf/persistent.conf +++ /dev/null @@ -1,17 +0,0 @@ -save 300 1 -save 60 100 - -appendonly yes -appendfsync everysec - -auto-aof-rewrite-percentage 100 -auto-aof-rewrite-min-size 64mb - -# RDB files created with checksum disabled have a checksum of zero that will -# tell the loading code to skip the check. -rdbchecksum yes - -# The filename where to dump the DB -dbfilename redis.rdb - -dir /data diff --git a/images/redis/conf/redis.conf b/images/redis/conf/redis.conf deleted file mode 100644 index 06425ea1c6..0000000000 --- a/images/redis/conf/redis.conf +++ /dev/null @@ -1,16 +0,0 @@ -# Redis 4.0 configuration file for non-persistent cache -# see https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf for all possible configs. - -loglevel ${LOGLEVEL:-notice} -databases ${DATABASES:-1} - -maxmemory ${MAXMEMORY:-100mb} -maxmemory-policy allkeys-lru - -# allow other hosts to connect to us -protected-mode no -bind 0.0.0.0 - -${REQUIREPASS_CONF:-} - -include /etc/redis/${FLAVOR:-ephemeral}.conf diff --git a/images/redis/docker-entrypoint b/images/redis/docker-entrypoint deleted file mode 100755 index fafbb758ef..0000000000 --- a/images/redis/docker-entrypoint +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -if [[ -n "${REDIS_PASSWORD}" ]]; then - export REQUIREPASS_CONF="# Enable basic/simple authentication -# Warning: since Redis is pretty fast an outside user can try up to -# 150k passwords per second against a good box. This means that you should -# use a very strong password otherwise it will be very easy to break. -requirepass ${REDIS_PASSWORD}" -fi - -ep /etc/redis/* - -exec "$@" diff --git a/images/solr-ckan/Dockerfile b/images/solr-ckan/Dockerfile deleted file mode 100644 index be3563bcd4..0000000000 --- a/images/solr-ckan/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG SOLR_MAJ_MIN_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/solr:${SOLR_MAJ_MIN_VERSION} -ARG SOLR_MAJ_MIN_VERSION - -COPY solr${SOLR_MAJ_MIN_VERSION} /solr-conf - -RUN precreate-core ckan /solr-conf - -CMD ["solr-foreground"] diff --git a/images/solr-ckan/solr5.5/conf/elevate.xml b/images/solr-ckan/solr5.5/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-ckan/solr5.5/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/mapping-ISOLatin1Accent.txt b/images/solr-ckan/solr5.5/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-ckan/solr5.5/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-ckan/solr5.5/conf/protwords.txt b/images/solr-ckan/solr5.5/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-ckan/solr5.5/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-ckan/solr5.5/conf/schema.xml b/images/solr-ckan/solr5.5/conf/schema.xml deleted file mode 100644 index 8e5018a2e2..0000000000 --- a/images/solr-ckan/solr5.5/conf/schema.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -index_id -text - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/solrconfig.xml b/images/solr-ckan/solr5.5/conf/solrconfig.xml deleted file mode 100644 index a0549e1146..0000000000 --- a/images/solr-ckan/solr5.5/conf/solrconfig.xml +++ /dev/null @@ -1,1800 +0,0 @@ - - - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_50} - - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - - - - - - - - - - - - - - - - 32 - - - - - - - - - - 4 - - - ${solr.lock.type:none} - - - - - - false - - - true - - - - - 1 - - 0 - - - - - - true - - - - - - - - - - - - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - 1024 - - - -1 - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - solr rocks010 - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - json - true - text - - - - - - - - {!xport} - xsort - false - - - - query - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.pinkPony.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - - - text - - - - - - - _src_ - - true - - - - - - - - - - - - - - - text - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - - - default - wordbreak - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - terms - - - - - - - string - elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - text/plain; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - *:* - - - - - - - - - - - - textSpell - - - - default - spell - spellchecker - true - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/solrconfig_extra.xml b/images/solr-ckan/solr5.5/conf/solrconfig_extra.xml deleted file mode 100644 index c5bc3acfb5..0000000000 --- a/images/solr-ckan/solr5.5/conf/solrconfig_extra.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - -textSpell - - - - - - default - spell - spellchecker - true - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr5.5/conf/solrcore.properties b/images/solr-ckan/solr5.5/conf/solrcore.properties deleted file mode 100644 index 3a2433f676..0000000000 --- a/images/solr-ckan/solr5.5/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=5.0 -solr.pinkPony.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-ckan/solr5.5/conf/stopwords.txt b/images/solr-ckan/solr5.5/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-ckan/solr5.5/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-ckan/solr5.5/conf/synonyms.txt b/images/solr-ckan/solr5.5/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-ckan/solr5.5/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-ckan/solr6.6/conf/elevate.xml b/images/solr-ckan/solr6.6/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-ckan/solr6.6/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/mapping-ISOLatin1Accent.txt b/images/solr-ckan/solr6.6/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-ckan/solr6.6/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-ckan/solr6.6/conf/protwords.txt b/images/solr-ckan/solr6.6/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-ckan/solr6.6/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-ckan/solr6.6/conf/schema.xml b/images/solr-ckan/solr6.6/conf/schema.xml deleted file mode 100644 index 8e5018a2e2..0000000000 --- a/images/solr-ckan/solr6.6/conf/schema.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -index_id -text - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/solrconfig.xml b/images/solr-ckan/solr6.6/conf/solrconfig.xml deleted file mode 100644 index 12f7fb9966..0000000000 --- a/images/solr-ckan/solr6.6/conf/solrconfig.xml +++ /dev/null @@ -1,1494 +0,0 @@ - - - -]> - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_60} - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - ${solr.hdfs.home:} - - ${solr.hdfs.confdir:} - - ${solr.hdfs.blockcache.enabled:true} - - ${solr.hdfs.blockcache.global:true} - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - ${solr.lock.type:none} - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - false - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - - - - - - - - 1024 - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - static firstSearcher warming in solrconfig.xml - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.selectSearchHandler.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - explicit - json - true - text - - - - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - text - - - - - - - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - &spellcheck; - - - - - spell - - default - wordbreak - on - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - text - true - - - tvComponent - - - - - - - - - - true - false - - - terms - - - - - - - false - false - - false - - true - false - - 1 - - - terms - spellcheck - - - - - - - string - elevate.xml - - - - - - explicit - text - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - - - - application/json; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/solrconfig_spellcheck.xml b/images/solr-ckan/solr6.6/conf/solrconfig_spellcheck.xml deleted file mode 100644 index 5c9d7ad79e..0000000000 --- a/images/solr-ckan/solr6.6/conf/solrconfig_spellcheck.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - textSpell - - - - - - - default - spell - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - wordbreak - solr.WordBreakSolrSpellChecker - name - true - true - 10 - - - - - - - - - - - diff --git a/images/solr-ckan/solr6.6/conf/solrcore.properties b/images/solr-ckan/solr6.6/conf/solrcore.properties deleted file mode 100644 index d7d045b0fd..0000000000 --- a/images/solr-ckan/solr6.6/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=6.0 -solr.selectSearchHandler.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-ckan/solr6.6/conf/stopwords.txt b/images/solr-ckan/solr6.6/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-ckan/solr6.6/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-ckan/solr6.6/conf/synonyms.txt b/images/solr-ckan/solr6.6/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-ckan/solr6.6/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/Dockerfile b/images/solr-drupal/Dockerfile deleted file mode 100644 index 0de192e938..0000000000 --- a/images/solr-drupal/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -ARG SOLR_MAJ_MIN_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/solr:${SOLR_MAJ_MIN_VERSION} -ARG SOLR_MAJ_MIN_VERSION - -COPY solr${SOLR_MAJ_MIN_VERSION} /solr-conf - -RUN precreate-core drupal /solr-conf - -CMD ["solr-foreground"] diff --git a/images/solr-drupal/solr5.5/conf/elevate.xml b/images/solr-drupal/solr5.5/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-drupal/solr5.5/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/mapping-ISOLatin1Accent.txt b/images/solr-drupal/solr5.5/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-drupal/solr5.5/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-drupal/solr5.5/conf/protwords.txt b/images/solr-drupal/solr5.5/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-drupal/solr5.5/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-drupal/solr5.5/conf/schema.xml b/images/solr-drupal/solr5.5/conf/schema.xml deleted file mode 100644 index 692e3be1ad..0000000000 --- a/images/solr-drupal/solr5.5/conf/schema.xml +++ /dev/null @@ -1,744 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - - - - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/schema_extra_fields.xml b/images/solr-drupal/solr5.5/conf/schema_extra_fields.xml deleted file mode 100644 index 02b365551c..0000000000 --- a/images/solr-drupal/solr5.5/conf/schema_extra_fields.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - diff --git a/images/solr-drupal/solr5.5/conf/schema_extra_types.xml b/images/solr-drupal/solr5.5/conf/schema_extra_types.xml deleted file mode 100644 index bd716b82ac..0000000000 --- a/images/solr-drupal/solr5.5/conf/schema_extra_types.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - diff --git a/images/solr-drupal/solr5.5/conf/solrconfig.xml b/images/solr-drupal/solr5.5/conf/solrconfig.xml deleted file mode 100644 index 2ccb268e43..0000000000 --- a/images/solr-drupal/solr5.5/conf/solrconfig.xml +++ /dev/null @@ -1,1800 +0,0 @@ - - - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_50} - - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - - - - - - - - - - - - - - - - 32 - - - - - - - - - - 4 - - - ${solr.lock.type:none} - - - - - - false - - - true - - - - - 1 - - 0 - - - - - - true - - - - - - - - - - - - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - 1024 - - - -1 - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - solr rocks010 - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - json - true - text - - - - - - - - {!xport} - xsort - false - - - - query - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.pinkPony.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - - - text - - - - - - - _src_ - - true - - - - - - - - - - - - - - - text - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - - - default - wordbreak - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - terms - - - - - - - string - elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - text/plain; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - *:* - - - - - - - - - - - - textSpell - - - - default - spell - spellchecker - true - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/solrconfig_extra.xml b/images/solr-drupal/solr5.5/conf/solrconfig_extra.xml deleted file mode 100644 index c5bc3acfb5..0000000000 --- a/images/solr-drupal/solr5.5/conf/solrconfig_extra.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - -textSpell - - - - - - default - spell - spellchecker - true - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr5.5/conf/solrcore.properties b/images/solr-drupal/solr5.5/conf/solrcore.properties deleted file mode 100644 index 3a2433f676..0000000000 --- a/images/solr-drupal/solr5.5/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=5.0 -solr.pinkPony.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-drupal/solr5.5/conf/stopwords.txt b/images/solr-drupal/solr5.5/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-drupal/solr5.5/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr5.5/conf/synonyms.txt b/images/solr-drupal/solr5.5/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-drupal/solr5.5/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr6.6/conf/elevate.xml b/images/solr-drupal/solr6.6/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-drupal/solr6.6/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/mapping-ISOLatin1Accent.txt b/images/solr-drupal/solr6.6/conf/mapping-ISOLatin1Accent.txt deleted file mode 100644 index b92d03c550..0000000000 --- a/images/solr-drupal/solr6.6/conf/mapping-ISOLatin1Accent.txt +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains character mappings for the default fulltext field type. -# The source characters (on the left) will be replaced by the respective target -# characters before any other processing takes place. -# Lines starting with a pound character # are ignored. -# -# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed -# with the example application of your Solr version. -# -# Examples: -# "À" => "A" -# "\u00c4" => "A" -# "\u00c4" => "\u0041" -# "æ" => "ae" -# "\n" => " " diff --git a/images/solr-drupal/solr6.6/conf/protwords.txt b/images/solr-drupal/solr6.6/conf/protwords.txt deleted file mode 100644 index cda8581497..0000000000 --- a/images/solr-drupal/solr6.6/conf/protwords.txt +++ /dev/null @@ -1,7 +0,0 @@ -#----------------------------------------------------------------------- -# This file blocks words from being operated on by the stemmer and word delimiter. -& -< -> -' -" diff --git a/images/solr-drupal/solr6.6/conf/schema.xml b/images/solr-drupal/solr6.6/conf/schema.xml deleted file mode 100644 index 7374d6d8b6..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema.xml +++ /dev/null @@ -1,843 +0,0 @@ - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &extrafields; - - - - - - &extratypes; - - - - - - id - - - - - diff --git a/images/solr-drupal/solr6.6/conf/schema_extra_fields.xml b/images/solr-drupal/solr6.6/conf/schema_extra_fields.xml deleted file mode 100644 index 8933702d26..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_extra_fields.xml +++ /dev/null @@ -1,21 +0,0 @@ - - diff --git a/images/solr-drupal/solr6.6/conf/schema_extra_types.xml b/images/solr-drupal/solr6.6/conf/schema_extra_types.xml deleted file mode 100644 index ce2ce0cb35..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_extra_types.xml +++ /dev/null @@ -1,32 +0,0 @@ - - diff --git a/images/solr-drupal/solr6.6/conf/schema_legacy_fields.xml b/images/solr-drupal/solr6.6/conf/schema_legacy_fields.xml deleted file mode 100644 index 902bb28e75..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_legacy_fields.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/schema_legacy_types.xml b/images/solr-drupal/solr6.6/conf/schema_legacy_types.xml deleted file mode 100644 index b46da0485e..0000000000 --- a/images/solr-drupal/solr6.6/conf/schema_legacy_types.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/images/solr-drupal/solr6.6/conf/solrconfig.xml b/images/solr-drupal/solr6.6/conf/solrconfig.xml deleted file mode 100644 index 0ed1eb55e1..0000000000 --- a/images/solr-drupal/solr6.6/conf/solrconfig.xml +++ /dev/null @@ -1,1494 +0,0 @@ - - - -]> - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_60} - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - ${solr.hdfs.home:} - - ${solr.hdfs.confdir:} - - ${solr.hdfs.blockcache.enabled:true} - - ${solr.hdfs.blockcache.global:true} - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - ${solr.lock.type:none} - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - - - - - ${solr.autoCommit.MaxDocs:10000} - ${solr.autoCommit.MaxTime:120000} - false - - - - - ${solr.autoSoftCommit.MaxDocs:2000} - ${solr.autoSoftCommit.MaxTime:10000} - - - - - - - - - - - - - - - - 1024 - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - 20 - - - 200 - - - - - - - - - - - - static firstSearcher warming in solrconfig.xml - - - - - - false - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - edismax - content - explicit - true - 0.01 - - ${solr.selectSearchHandler.timeAllowed:-1} - *:* - - - false - - true - false - - 1 - - - spellcheck - elevator - - - - - - - explicit - json - true - text - - - - - - - - - - content - 1 - 1 - 3 - 15 - 20 - false - - ${solr.mlt.timeAllowed:2000} - - - - - - - content - explicit - true - - - - - - text - - - - - - - true - ignored_ - - - true - links - ignored_ - - - - - - - - - - - - - - - explicit - true - - - - - - - ${solr.replication.master:false} - commit - startup - ${solr.replication.confFiles:schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml} - - - ${solr.replication.slave:false} - ${solr.replication.masterUrl:http://localhost:8983/solr}/replication - ${solr.replication.pollInterval:00:00:60} - - - - - - - true - json - true - - - - - - - - &spellcheck; - - - - - spell - - default - wordbreak - on - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - mySuggester - FuzzyLookupFactory - DocumentDictionaryFactory - cat - price - string - - - - - - true - 10 - - - suggest - - - - - - - - - text - true - - - tvComponent - - - - - - - - - - true - false - - - terms - - - - - - - false - false - - false - - true - false - - 1 - - - terms - spellcheck - - - - - - - string - elevate.xml - - - - - - explicit - text - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - - - - application/json; charset=UTF-8 - - - - - - - - - 5 - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/solrconfig_spellcheck.xml b/images/solr-drupal/solr6.6/conf/solrconfig_spellcheck.xml deleted file mode 100644 index 5c9d7ad79e..0000000000 --- a/images/solr-drupal/solr6.6/conf/solrconfig_spellcheck.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - textSpell - - - - - - - default - spell - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - wordbreak - solr.WordBreakSolrSpellChecker - name - true - true - 10 - - - - - - - - - - - diff --git a/images/solr-drupal/solr6.6/conf/solrcore.properties b/images/solr-drupal/solr6.6/conf/solrcore.properties deleted file mode 100644 index d7d045b0fd..0000000000 --- a/images/solr-drupal/solr6.6/conf/solrcore.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Defines Solr properties for this specific core. -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://localhost:8983/solr -solr.replication.confFiles=schema.xml,mapping-ISOLatin1Accent.txt,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml -solr.mlt.timeAllowed=2000 -# You should not set your luceneMatchVersion to anything lower than your Solr -# Version. -solr.luceneMatchVersion=6.0 -solr.selectSearchHandler.timeAllowed=-1 -# autoCommit after 10000 docs -solr.autoCommit.MaxDocs=10000 -# autoCommit after 2 minutes -solr.autoCommit.MaxTime=120000 -# autoSoftCommit after 2000 docs -solr.autoSoftCommit.MaxDocs=2000 -# autoSoftCommit after 10 seconds -solr.autoSoftCommit.MaxTime=10000 -solr.install.dir=../../.. diff --git a/images/solr-drupal/solr6.6/conf/stopwords.txt b/images/solr-drupal/solr6.6/conf/stopwords.txt deleted file mode 100644 index d7f243e48a..0000000000 --- a/images/solr-drupal/solr6.6/conf/stopwords.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Contains words which shouldn't be indexed for fulltext fields, e.g., because -# they're too common. For documentation of the format, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.StopFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr6.6/conf/synonyms.txt b/images/solr-drupal/solr6.6/conf/synonyms.txt deleted file mode 100644 index 7d22eea6d6..0000000000 --- a/images/solr-drupal/solr6.6/conf/synonyms.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Contains synonyms to use for your index. For the format used, see -# http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory -# (Lines starting with a pound character # are ignored.) diff --git a/images/solr-drupal/solr7.7/conf/accents_en.txt b/images/solr-drupal/solr7.7/conf/accents_en.txt deleted file mode 100644 index bed051477b..0000000000 --- a/images/solr-drupal/solr7.7/conf/accents_en.txt +++ /dev/null @@ -1,164 +0,0 @@ -# À => A -"\u00C0" => "A" -# Á => A -"\u00C1" => "A" -#  => A -"\u00C2" => "A" -# à => A -"\u00C3" => "A" -# Ä => A -"\u00C4" => "A" -# Å => A -"\u00C5" => "A" -# Ą => A -"\u0104" => "A" -# Æ => AE -"\u00C6" => "AE" -# Ç => C -"\u00C7" => "C" -# Ć => C -"\U0106" => "C" -# È => E -"\u00C8" => "E" -# É => E -"\u00C9" => "E" -# Ê => E -"\u00CA" => "E" -# Ë => E -"\u00CB" => "E" -# Ę => E -"\u0118" => "E" -# Ì => I -"\u00CC" => "I" -# Í => I -"\u00CD" => "I" -# Î => I -"\u00CE" => "I" -# Ï => I -"\u00CF" => "I" -# IJ => IJ -"\u0132" => "IJ" -# Ð => D -"\u00D0" => "D" -# Ł => L -"\u0141" => "L" -# Ñ => N -"\u00D1" => "N" -# Ń => N -"\u0143" => "N" -# Ò => O -"\u00D2" => "O" -# Ó => O -"\u00D3" => "O" -# Ô => O -"\u00D4" => "O" -# Õ => O -"\u00D5" => "O" -# Ö => O -"\u00D6" => "O" -# Ø => O -"\u00D8" => "O" -# Œ => OE -"\u0152" => "OE" -# Þ -"\u00DE" => "TH" -# Ù => U -"\u00D9" => "U" -# Ú => U -"\u00DA" => "U" -# Û => U -"\u00DB" => "U" -# Ü => U -"\u00DC" => "U" -# Ý => Y -"\u00DD" => "Y" -# Ÿ => Y -"\u0178" => "Y" -# à => a -"\u00E0" => "a" -# á => a -"\u00E1" => "a" -# â => a -"\u00E2" => "a" -# ã => a -"\u00E3" => "a" -# ä => a -"\u00E4" => "a" -# å => a -"\u00E5" => "a" -# æ => ae -"\u00E6" => "ae" -# ç => c -"\u00E7" => "c" -# è => e -"\u00E8" => "e" -# é => e -"\u00E9" => "e" -# ê => e -"\u00EA" => "e" -# ë => e -"\u00EB" => "e" -# ì => i -"\u00EC" => "i" -# í => i -"\u00ED" => "i" -# î => i -"\u00EE" => "i" -# ï => i -"\u00EF" => "i" -# ij => ij -"\u0133" => "ij" -# ð => d -"\u00F0" => "d" -# ñ => n -"\u00F1" => "n" -# ò => o -"\u00F2" => "o" -# ó => o -"\u00F3" => "o" -# ô => o -"\u00F4" => "o" -# õ => o -"\u00F5" => "o" -# ö => o -"\u00F6" => "o" -# ø => o -"\u00F8" => "o" -# œ => oe -"\u0153" => "oe" -# ß => ss -"\u00DF" => "ss" -# Ś => S -"\u015a" => "S" -# þ => th -"\u00FE" => "th" -# ù => u -"\u00F9" => "u" -# ú => u -"\u00FA" => "u" -# û => u -"\u00FB" => "u" -# ü => u -"\u00FC" => "u" -# ý => y -"\u00FD" => "y" -# ÿ => y -"\u00FF" => "y" -# Ź => Z -"\u0179" => "Z" -# Ż => Z -"\u017b" => "Z" -# ff => ff -"\uFB00" => "ff" -# fi => fi -"\uFB01" => "fi" -# fl => fl -"\uFB02" => "fl" -# ffi => ffi -"\uFB03" => "ffi" -# ffl => ffl -"\uFB04" => "ffl" -# ſt => st -"\uFB05" => "st" -# st => st -"\uFB06" => "st" diff --git a/images/solr-drupal/solr7.7/conf/accents_und.txt b/images/solr-drupal/solr7.7/conf/accents_und.txt deleted file mode 100644 index 7c883f87a3..0000000000 --- a/images/solr-drupal/solr7.7/conf/accents_und.txt +++ /dev/null @@ -1,148 +0,0 @@ -# À => A -"\u00C0" => "A" -# Á => A -"\u00C1" => "A" -#  => A -"\u00C2" => "A" -# à => A -"\u00C3" => "A" -# Ä => A -"\u00C4" => "A" -# Å => A -"\u00C5" => "A" -# Æ => AE -"\u00C6" => "AE" -# Ç => C -"\u00C7" => "C" -# È => E -"\u00C8" => "E" -# É => E -"\u00C9" => "E" -# Ê => E -"\u00CA" => "E" -# Ë => E -"\u00CB" => "E" -# Ì => I -"\u00CC" => "I" -# Í => I -"\u00CD" => "I" -# Î => I -"\u00CE" => "I" -# Ï => I -"\u00CF" => "I" -# IJ => IJ -"\u0132" => "IJ" -# Ð => D -"\u00D0" => "D" -# Ñ => N -"\u00D1" => "N" -# Ò => O -"\u00D2" => "O" -# Ó => O -"\u00D3" => "O" -# Ô => O -"\u00D4" => "O" -# Õ => O -"\u00D5" => "O" -# Ö => O -"\u00D6" => "O" -# Ø => O -"\u00D8" => "O" -# Œ => OE -"\u0152" => "OE" -# Þ -"\u00DE" => "TH" -# Ù => U -"\u00D9" => "U" -# Ú => U -"\u00DA" => "U" -# Û => U -"\u00DB" => "U" -# Ü => U -"\u00DC" => "U" -# Ý => Y -"\u00DD" => "Y" -# Ÿ => Y -"\u0178" => "Y" -# à => a -"\u00E0" => "a" -# á => a -"\u00E1" => "a" -# â => a -"\u00E2" => "a" -# ã => a -"\u00E3" => "a" -# ä => a -"\u00E4" => "a" -# å => a -"\u00E5" => "a" -# æ => ae -"\u00E6" => "ae" -# ç => c -"\u00E7" => "c" -# è => e -"\u00E8" => "e" -# é => e -"\u00E9" => "e" -# ê => e -"\u00EA" => "e" -# ë => e -"\u00EB" => "e" -# ì => i -"\u00EC" => "i" -# í => i -"\u00ED" => "i" -# î => i -"\u00EE" => "i" -# ï => i -"\u00EF" => "i" -# ij => ij -"\u0133" => "ij" -# ð => d -"\u00F0" => "d" -# ñ => n -"\u00F1" => "n" -# ò => o -"\u00F2" => "o" -# ó => o -"\u00F3" => "o" -# ô => o -"\u00F4" => "o" -# õ => o -"\u00F5" => "o" -# ö => o -"\u00F6" => "o" -# ø => o -"\u00F8" => "o" -# œ => oe -"\u0153" => "oe" -# ß => ss -"\u00DF" => "ss" -# þ => th -"\u00FE" => "th" -# ù => u -"\u00F9" => "u" -# ú => u -"\u00FA" => "u" -# û => u -"\u00FB" => "u" -# ü => u -"\u00FC" => "u" -# ý => y -"\u00FD" => "y" -# ÿ => y -"\u00FF" => "y" -# ff => ff -"\uFB00" => "ff" -# fi => fi -"\uFB01" => "fi" -# fl => fl -"\uFB02" => "fl" -# ffi => ffi -"\uFB03" => "ffi" -# ffl => ffl -"\uFB04" => "ffl" -# ſt => st -"\uFB05" => "st" -# st => st -"\uFB06" => "st" diff --git a/images/solr-drupal/solr7.7/conf/elevate.xml b/images/solr-drupal/solr7.7/conf/elevate.xml deleted file mode 100644 index 193a0e727a..0000000000 --- a/images/solr-drupal/solr7.7/conf/elevate.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/protwords_en.txt b/images/solr-drupal/solr7.7/conf/protwords_en.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/images/solr-drupal/solr7.7/conf/protwords_en.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/solr-drupal/solr7.7/conf/protwords_und.txt b/images/solr-drupal/solr7.7/conf/protwords_und.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/images/solr-drupal/solr7.7/conf/protwords_und.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/solr-drupal/solr7.7/conf/schema.xml b/images/solr-drupal/solr7.7/conf/schema.xml deleted file mode 100644 index b643a91ee7..0000000000 --- a/images/solr-drupal/solr7.7/conf/schema.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &extrafields; - - - &extratypes; - - - id - - - - - diff --git a/images/solr-drupal/solr7.7/conf/schema_extra_fields.xml b/images/solr-drupal/solr7.7/conf/schema_extra_fields.xml deleted file mode 100644 index f5d74188a5..0000000000 --- a/images/solr-drupal/solr7.7/conf/schema_extra_fields.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/schema_extra_types.xml b/images/solr-drupal/solr7.7/conf/schema_extra_types.xml deleted file mode 100644 index 8b5e82f035..0000000000 --- a/images/solr-drupal/solr7.7/conf/schema_extra_types.xml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/solrconfig.xml b/images/solr-drupal/solr7.7/conf/solrconfig.xml deleted file mode 100644 index 38ff72e62d..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig.xml +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - -]> - - - - - - - ${solr.abortOnConfigurationError:true} - - - ${solr.luceneMatchVersion:LUCENE_70} - - - - - - - - - - - - - - - - - - - - - - /var/solr/${solr.core.name} - - - - - - - - - ${solr.hdfs.home:} - - ${solr.hdfs.confdir:} - - ${solr.hdfs.blockcache.enabled:true} - - ${solr.hdfs.blockcache.global:true} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${solr.lock.type:none} - - - - - - - - - - - - - true - - - &index; - - - - - - - - - ${solr.ulog.dir:} - - - - - ${solr.autoCommit.MaxDocs:-1} - ${solr.autoCommit.MaxTime:15000} - false - - - - - - ${solr.autoSoftCommit.MaxDocs:-1} - ${solr.autoSoftCommit.MaxTime:-1} - - - - - - - - - - - - - - - - &query; - - - - - - - - - - - - static firstSearcher warming in solrconfig.xml - - - - - - false - - - - - - - - - &requestdispatcher; - - - - - - - &extra; - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - - diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_extra.xml b/images/solr-drupal/solr7.7/conf/solrconfig_extra.xml deleted file mode 100644 index 1a59c45938..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig_extra.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - en - spellcheck_en - solr.DirectSolrSpellChecker - internal - 0.5 - 2 - 1 - 5 - 4 - 0.01 - .01 - true - - - - und - spellcheck_und - solr.DirectSolrSpellChecker - internal - 0.5 - 2 - 1 - 5 - 4 - 0.01 - .01 - true - - - - - en - AnalyzingInfixLookupFactory - DocumentDictionaryFactory - twm_suggest - text_en - sm_context_tags - true - false - - - - und - AnalyzingInfixLookupFactory - DocumentDictionaryFactory - twm_suggest - text_und - sm_context_tags - true - false - - - - - - false - false - false - true - false - 1 - false - 10 - - - terms - spellcheck - suggest - - - - - - - true - ignored_ - true - links - ignored_ - - - - - - - 1 - 1 - false - ${solr.mlt.timeAllowed:2000} - - - - - - - lucene - id - explicit - true - ${solr.selectSearchHandler.timeAllowed:-1} - false - - - spellcheck - elevator - - - - - - - id - und - on - false - false - 1 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - true - und - 10 - - - suggest - - - - - - - id - true - - - tvComponent - - - - - - string - elevate.xml - - - diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_query.xml b/images/solr-drupal/solr7.7/conf/solrconfig_query.xml deleted file mode 100644 index 5bdd696902..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig_query.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - true - - false - - 20 - 200 - 1024 diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_requestdispatcher.xml b/images/solr-drupal/solr7.7/conf/solrconfig_requestdispatcher.xml deleted file mode 100644 index 3a3f17d1c9..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrconfig_requestdispatcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/images/solr-drupal/solr7.7/conf/solrcore.properties b/images/solr-drupal/solr7.7/conf/solrcore.properties deleted file mode 100644 index c75ec4d7ff..0000000000 --- a/images/solr-drupal/solr7.7/conf/solrcore.properties +++ /dev/null @@ -1,13 +0,0 @@ -solr.replication.master=false -solr.replication.slave=false -solr.replication.pollInterval=00:00:60 -solr.replication.masterUrl=http://solr:8983/solr -solr.replication.confFiles=schema.xml,schema_extra_types.xml,schema_extra_fields.xml,elevate.xml,stopwords_en.txt,synonyms_en.txt,protwords_en.txt,accents_en.txt,stopwords_und.txt,synonyms_und.txt,protwords_und.txt,accents_und.txt -solr.mlt.timeAllowed=2000 -solr.luceneMatchVersion=7.7 -solr.selectSearchHandler.timeAllowed=-1 -solr.autoCommit.MaxDocs=-1 -solr.autoCommit.MaxTime=15000 -solr.autoSoftCommit.MaxDocs=-1 -solr.autoSoftCommit.MaxTime=-1 -solr.install.dir=/opt/solr diff --git a/images/solr-drupal/solr7.7/conf/stopwords_en.txt b/images/solr-drupal/solr7.7/conf/stopwords_en.txt deleted file mode 100644 index 6981050710..0000000000 --- a/images/solr-drupal/solr7.7/conf/stopwords_en.txt +++ /dev/null @@ -1,35 +0,0 @@ -a -an -and -are -as -at -be -but -by -for -if -in -into -is -it -no -not -of -on -or -s -such -t -that -the -their -then -there -these -they -this -to -was -will -with diff --git a/images/solr-drupal/solr7.7/conf/stopwords_und.txt b/images/solr-drupal/solr7.7/conf/stopwords_und.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/images/solr-drupal/solr7.7/conf/stopwords_und.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/solr-drupal/solr7.7/conf/synonyms_en.txt b/images/solr-drupal/solr7.7/conf/synonyms_en.txt deleted file mode 100644 index 91689ff92f..0000000000 --- a/images/solr-drupal/solr7.7/conf/synonyms_en.txt +++ /dev/null @@ -1 +0,0 @@ -drupal, durpal diff --git a/images/solr-drupal/solr7.7/conf/synonyms_und.txt b/images/solr-drupal/solr7.7/conf/synonyms_und.txt deleted file mode 100644 index 91689ff92f..0000000000 --- a/images/solr-drupal/solr7.7/conf/synonyms_und.txt +++ /dev/null @@ -1 +0,0 @@ -drupal, durpal diff --git a/images/solr/10-solr-port.sh b/images/solr/10-solr-port.sh deleted file mode 100755 index a7c8ef3feb..0000000000 --- a/images/solr/10-solr-port.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# SOLR is capable of having it's own port overwritten via SOLR_PORT, but on kubernetes this env variable is filled with -# SOLR_PORT=tcp://172.30.32.255:8983, so we check if the env variable is an actual port only and if not we use the default port -# Inspired from: https://github.com/docker-solr/docker-solr/blob/6d7fa219c3b3407e0dd29fb17b15ec9e6df85058/6.6/alpine/scripts/docker-entrypoint.sh#L11-L13 -if [[ -n "$SOLR_PORT" ]] && ! /bin/bash -c "grep -E -q '^[0-9]+$' <<<\"${SOLR_PORT:-}\""; then - SOLR_PORT=8983 - export SOLR_PORT -fi \ No newline at end of file diff --git a/images/solr/20-solr-datadir.sh b/images/solr/20-solr-datadir.sh deleted file mode 100755 index d7c1f486cc..0000000000 --- a/images/solr/20-solr-datadir.sh +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/sh -set -eo pipefail - -# check if SOLR_COPY_DATA_DIR_SOURCE is set, if yes we're coping the contents of the given folder into the data dir folder -# this allows to prefill the datadir with a provided datadir (either added in a Dockerfile build, or mounted into the running container). -# This is different than just setting $SOLR_DATA_DIR to the source folder, as only /var/solr is a persistent folder, so setting -# $SOLR_DATA_DIR to another folder will make solr to not store the datadir across container restarts, while with this copy system -# the data will be prefilled and persistent across container restarts. -if [ -n "$SOLR_COPY_DATA_DIR_SOURCE" ]; then - echo "MARIADB_COPY_DATA_DIR_SOURCE is set, start copying from source location" - for solrcorepath in $(ls -d $SOLR_COPY_DATA_DIR_SOURCE/*/ | grep -v lost+found) ; do - corename=$(basename $solrcorepath) - if [ -d ${SOLR_DATA_DIR:-/var/solr}/$corename ]; then - echo "core $corename already present in destination, skipping copying" - else - echo "copying datadir contents from '$SOLR_COPY_DATA_DIR_SOURCE/$corename to '${SOLR_DATA_DIR:-/var/solr}/$corename'" - CUR_DIR=${PWD} - mkdir ${SOLR_DATA_DIR:-/var/solr}/$corename - cd $SOLR_COPY_DATA_DIR_SOURCE/$corename; tar cf - . | (cd ${SOLR_DATA_DIR:-/var/solr}/$corename; tar xvf -) - cd $CUR_DIR - fi - done -fi - -# Previously the Solr Config and Solr Data Dir was both kept in the persistent volume: -# - Solr data: /opt/solr/server/solr/mycores/${corename}/data -# - Solr config: /opt/solr/server/solr/mycores/${corename}/config -# - Persistent Volume: /opt/solr/server/solr/mycores/ -# The Solr Config was copied from the Docker Image into the Solr Config directory on the very first time solr started. -# This had the problem that if a new Solr Config was shipped in a new Docker Iamage the config was not copied again. -# Therefore there was no possibility to ship with updated configs and also the system does not follow any other -# services like nginx or php which have their configs not existing in persistent volumes and insted in Docker Images. -# The following script migrates from to the new directory structure: -# - Solr data: /var/solr/${corename} -# - Solr config: /opt/solr/server/solr/mycores/${corename}/config -# - Persistent Volume: /var/solr/ -# It does: -# 1. Move folders from /var/solr/${corename}/data to /var/solr/${corename} - this is needed if the existing persistent volume is -# mounted now to /var/solr/ but the data is still within data/ -# 2. Create the folder /opt/solr/server/solr/mycores/${corename} if not existing (because there is no persistent volume mounted anymore) -# and copy the config from the persistent storage to that folder. - -# It then also tries to update existing non-compatible configs inside solrconfig.xml: -# - dataDir now needs to be `/var/solr/${solr.core.name}` to point to the new persistent Volume -# - lockType needs to be `${solr.lock.type:none}` to prevent issues with the default file based Lock system which -# can cause issues if the solr is not stopped correctly -# The script does that for existing configs in `/opt/solr/server/solr/mycores/${corename}/config` if that folder exists which can be on two cases: -# 1. During a docker build the solr core has already been created via `precreate-core` (which should be used now all the time) -# 2. The first part of the script has copied the config from the previous persistent volume into these folders -# If `/opt/solr/server/solr/mycores` is empty, this means the container has never been started, had no previous persistent volume and also did not -# run `precreate-core` yet, it checks if the common used folder `/solr-conf/conf/` has a config in it and tries to adapt it. -# This probably fails because of permissions issues, it will throw an error and exit. - -if [ ! -n "$(ls /opt/solr/server/solr/mycores)" ]; then - echo 'No pre-created Solr Cores found in `/opt/solr/server/solr/mycores` this probably means that your Dockerfile does not run' - echo ' RUN precreate-core corename /solr-conf' - echo 'within Dockerfile and instead uses' - echo ' CMD ["solr-precreate", "corename", "/solr-conf"]' - echo 'Please update your Dockerfile to:' - echo ' RUN precreate-core corename /solr-conf' - echo ' CMD ["solr-foreground"]' - printf "\n\n" -fi - -if [ -n "$(ls ${SOLR_DATA_DIR:-/var/solr})" ]; then - # Iterate through all existing solr cores - for solrcorepath in $(ls -d ${SOLR_DATA_DIR:-/var/solr}/*/ | grep -v lost+found) ; do - corename=$(basename $solrcorepath) - if [ -d ${solrcorepath}data ]; then - echo "${solrcorepath} has it's data in deprecated location ${solrcorepath}data, moving to ${solrcorepath}." - # moving the contents of /var/solr/${corename}/data to /var/solr/${corename} - # the datadir now has the layout that a newly created core would. - mv ${solrcorepath}data/* ${solrcorepath} - # remove empty directory - rm -Rf ${solrcorepath}data || mv ${solrcorepath}data ${solrcorepath}data-delete - fi - - # If the core has no files in /opt/solr/server/solr/mycores/${corename} this means: - # The Docker Image did not run `precreate-core corename /solr-conf` during the Dockerfile - # and instead is running `solr-precreate corname solr-conf` as CMD of the container. - # But we already have an existing solr config from the persistent storage, we copy that over - if [ ! -d /opt/solr/server/solr/mycores/${corename} ]; then - mkdir -p /opt/solr/server/solr/mycores/${corename} - # Copy the solr config from the persistent volume in the solr home config directory - cp -R ${solrcorepath}conf /opt/solr/server/solr/mycores/${corename}/ - echo "copied pre-existing solr config from '${solrcorepath}conf' to '/opt/solr/server/solr/mycores/${corename}/conf'" - printf "\n\n" - # there must be a core.properties to be recognized as a core - touch /opt/solr/server/solr/mycores/${corename}/core.properties - fi - done -fi - -function fixConfig { - fail=0 - if cat $1/solrconfig.xml | grep dataDir | grep -qv "${SOLR_DATA_DIR:-/var/solr}/\${solr.core.name}"; then - echo "Found old non lagoon compatible dataDir config in solrconfig.xml:" - cat $1/solrconfig.xml | grep dataDir - SOLR_DATA_DIR=${SOLR_DATA_DIR:-/var/solr} - SOLR_DATA_DIR_ESCAPED=${SOLR_DATA_DIR//\//\\/} # escapig the forward slashes with backslahes - if [ -w $1/ ]; then - sed -ibak "s/.*/$SOLR_DATA_DIR_ESCAPED\/\${solr.core.name}<\/dataDir>/" $1/solrconfig.xml - echo "automagically updated to compatible config: " - echo " ${SOLR_DATA_DIR:-/var/solr}/\${solr.core.name}" - echo "Please update your solrconfig.xml to make this persistent." - else - echo "but no write permission to automagically change to compatible config: " - echo " ${SOLR_DATA_DIR:-/var/solr}/\${solr.core.name}" - echo "Please update your solrconfig.xml and commit again." - fail=1 - fi - printf "\n\n" - fi - # change lockType to none - if cat $1/solrconfig.xml | grep lockType | grep -qv '${solr.lock.type:none}'; then - echo "Found old non lagoon compatible lockType config in solrconfig.xml:" - cat $1/solrconfig.xml | grep lockType - if [ -w $1/ ]; then - sed -ibak 's/\${solr\.lock\.type:native}<\/lockType>/${solr.lock.type:none}<\/lockType>/' $1/solrconfig.xml - echo "automagically updated to compatible config: " - echo ' ${solr.lock.type:none}' - echo "Please update your solrconfig.xml to make this persistent." - else - echo "but no write permission to automagically change to compatible config: " - echo ' ${solr.lock.type:none}' - echo "Please update your solrconfig.xml and commit again." - fail=1 - fi - printf "\n\n" - fi - if [ "$fail" == "1" ]; then - exit 1; - fi -} - -# check if `/opt/solr/server/solr/mycores` has cores, which means that `precreate-core` has already be called so we check the configs there -if [ -n "$(ls /opt/solr/server/solr/mycores)" ]; then - # Iterate through all solr cores - for solrcorepath in $(ls -d /opt/solr/server/solr/mycores/*/) ; do - corename=$(basename $solrcorepath) - # Check and Update the solr config with lagoon compatible config - if [ -f /opt/solr/server/solr/mycores/${corename}/conf/solrconfig.xml ]; then - fixConfig /opt/solr/server/solr/mycores/${corename}/conf - fi - done -else - # `/opt/solr/server/solr/mycores` is empty, meaning that no `precreate-core` has been called and probably this container is started via `solr-precreate - # We try to update the solr configs within `/solr-conf/conf` to the new lagoon default config as this one will most probably be used to create a new core - if [ -f /solr-conf/conf/solrconfig.xml ]; then - fixConfig /solr-conf/conf - else - echo "No config found in '/solr-conf/conf' and was not able to automatically update solr config to newest lagoon compatible version." - echo "Cannot guarantee if this Solr config will work!" - fi -fi - diff --git a/images/solr/Dockerfile b/images/solr/Dockerfile deleted file mode 100644 index 2ad030949d..0000000000 --- a/images/solr/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -ARG SOLR_MAJ_MIN_VERSION -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM solr:${SOLR_MAJ_MIN_VERSION}-alpine - -LABEL maintainer="amazee.io" -ENV LAGOON=solr - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home/.bashrc /home/.bashrc - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -# we need root for the fix-permissions to work -USER root - -RUN mkdir -p /var/solr -RUN fix-permissions /var/solr \ - && chown solr:solr /var/solr \ - && fix-permissions /opt/solr/server/logs \ - && fix-permissions /opt/solr/server/solr - - -# solr really doesn't like to be run as root, so we define the default user agin -USER solr - -COPY 10-solr-port.sh /lagoon/entrypoints/ -COPY 20-solr-datadir.sh /lagoon/entrypoints/ - - -# Define Volume so locally we get persistent cores -VOLUME /var/solr - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] - -CMD ["solr-precreate", "mycore"] diff --git a/images/toolbox/Dockerfile b/images/toolbox/Dockerfile deleted file mode 100644 index 40c59f9400..0000000000 --- a/images/toolbox/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG IMAGE_REPO - -FROM ${IMAGE_REPO:-lagoon}/mariadb as mariadb - -FROM ${IMAGE_REPO:-lagoon}/commons as commons - -LABEL maintainer="amazee.io" - -RUN apk update \ - && apk upgrade \ - && apk add --no-cache curl ncdu socat ca-certificates openssl perl perl-doc mysql-client rsync mariadb-mytop \ - && update-ca-certificates \ - && rm -rf /var/cache/apk/* \ - && wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl -O mysqltuner.pl \ - && chmod +x mysqltuner.pl - -COPY --from=mariadb /usr/bin/my_print_defaults /usr/bin/my_print_defaults diff --git a/images/varnish-drupal/Dockerfile b/images/varnish-drupal/Dockerfile deleted file mode 100644 index 100ebedad0..0000000000 --- a/images/varnish-drupal/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/varnish - -COPY drupal.vcl /etc/varnish/default.vcl - -RUN fix-permissions /etc/varnish/default.vcl diff --git a/images/varnish-drupal/drupal.vcl b/images/varnish-drupal/drupal.vcl deleted file mode 100644 index c1e2ba2103..0000000000 --- a/images/varnish-drupal/drupal.vcl +++ /dev/null @@ -1,477 +0,0 @@ -vcl 4.0; - -import std; -import dynamic; - -# set backend default -backend default { - .host = "${VARNISH_BACKEND_HOST:-nginx}"; - .port = "${VARNISH_BACKEND_PORT:-8080}"; - .first_byte_timeout = 35m; - .between_bytes_timeout = 10m; -} - -# Allow purging from localhost -# @TODO allow from openshift network -acl purge { - "127.0.0.1"; - "10.0.0.0"/8; - "172.16.0.0"/12; - "192.168.0.0"/16; -} - -sub vcl_init { - new www_dir = dynamic.director( - port = "${VARNISH_BACKEND_PORT:-8080}", - first_byte_timeout = 90s, - between_bytes_timeout = 90s, - ttl = 60s); -} - -# This configuration is optimized for Drupal hosting: -# Respond to incoming requests. -sub vcl_recv { - if (req.url ~ "^/varnish_status$") { - return (synth(200,"OK")); - } - # set the backend, which should be used: - set req.backend_hint = www_dir.backend("${VARNISH_BACKEND_HOST:-nginx}"); - - # Always set the forward ip. - if (req.restarts == 0) { - if (req.http.x-forwarded-for) { - set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; - } - else { - set req.http.X-Forwarded-For = client.ip; - } - } - - if (req.http.X-LAGOON-VARNISH ) { - # Pass all Requests which are handled via an upstream Varnish - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, " + req.http.X-LAGOON-VARNISH; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - } - else if (req.http.Fastly-FF) { - # Pass all Requests which are handled via Fastly - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, fastly"; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - set req.http.X-Forwarded-For = req.http.Fastly-Client-IP; - } - else if (req.http.CF-RAY) { - # Pass all Requests which are handled via CloudFlare - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, cloudflare"; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - set req.http.X-Forwarded-For = req.http.CF-Connecting-IP; - } - else if (req.http.X-Pull) { - # Pass all Requests which are handled via KeyCDN - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}, keycdn"; - set req.http.X-LAGOON-VARNISH-BYPASS = "true"; - } - else { - # We set a header to let a Varnish chain know that it already has been varnishcached - set req.http.X-LAGOON-VARNISH = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}"; - - # Allow to bypass based on env variable `VARNISH_BYPASS` - set req.http.X-LAGOON-VARNISH-BYPASS = "${VARNISH_BYPASS:-false}"; - } - - # Websockets are piped - if (req.http.Upgrade ~ "(?i)websocket") { - return (pipe); - } - - if (req.http.X-LAGOON-VARNISH-BYPASS == "true" || req.http.X-LAGOON-VARNISH-BYPASS == "TRUE") { - return (pass); - } - - # SA-CORE-2014-004 preventing access to /xmlrpc.php - if (req.url ~ "^/xmlrpc.php$") { - return (synth(701, "Unauthorized")); - } - - # Strip out Google Analytics campaign variables. They are only needed - # by the javascript running on the page - # utm_source, utm_medium, utm_campaign, gclid - if(req.url ~ "(\?|&)(gclid|utm_[a-z]+)=") { - set req.url = regsuball(req.url, "(gclid|utm_[a-z]+)=[^\&]+&?", ""); - set req.url = regsub(req.url, "(\?|&)$", ""); - } - - # Bypass a cache hit (the request is still sent to the backend) - if (req.method == "REFRESH") { - if (!client.ip ~ purge) { - return (synth(405, "Not allowed")); - } - set req.method = "GET"; - set req.hash_always_miss = true; - } - - # Only allow BAN requests from IP addresses in the 'purge' ACL. - if (req.method == "BAN" || req.method == "URIBAN" || req.method == "PURGE") { - # Only allow BAN from defined ACL - if (!client.ip ~ purge) { - return (synth(403, "Your IP is not allowed.")); - } - - # Only allows BAN if the Host Header has the style of with "${SERVICE_NAME:-varnish}:8080" or "${SERVICE_NAME:-varnish}". - # Such a request is only possible from within the Docker network, as a request from external goes trough the Kubernetes Router and for that needs a proper Host Header - if (!req.http.host ~ "^${SERVICE_NAME:-varnish}(:\d+)?$") { - return (synth(403, "Only allowed from within own network.")); - } - - if (req.method == "BAN") { - # Logic for the ban, using the Cache-Tags header. - if (req.http.Cache-Tags) { - ban("obj.http.Cache-Tags ~ " + req.http.Cache-Tags); - # Throw a synthetic page so the request won't go to the backend. - return (synth(200, "Ban added.")); - } - else { - return (synth(403, "Cache-Tags header missing.")); - } - } - - if (req.method == "URIBAN" || req.method == "PURGE") { - ban("req.url ~ " + req.url); - # Throw a synthetic page so the request won't go to the backend. - return (synth(200, "Ban added.")); - } - } - - # Non-RFC2616 or CONNECT which is weird, we pipe that - if (req.method != "GET" && - req.method != "HEAD" && - req.method != "PUT" && - req.method != "POST" && - req.method != "TRACE" && - req.method != "OPTIONS" && - req.method != "DELETE") { - return (pipe); - } - - # Large binary files are passed. - if (req.url ~ "\.(msi|exe|dmg|zip|tgz|gz|pkg)$") { - return(pass); - } - - # We only try to cache GET and HEAD, other things are passed. - if (req.method != "GET" && req.method != "HEAD") { - return (pass); - } - - # Any requests with Basic Authentication are passed. - if (req.http.Authorization || req.http.Authenticate) { - return (pass); - } - - # Blackfire requests are passed. - if (req.http.X-Blackfire-Query) { - return (pass); - } - - # Some URLs should never be cached. - if (req.url ~ "^/status\.php$" || - req.url ~ "^/update\.php$" || - req.url ~ "^/admin([/?]|$).*$" || - req.url ~ "^/info([/?]|$).*$" || - req.url ~ "^/flag([/?]|$).*$" || - req.url ~ "^.*/system/files([/?]|$).*$" || - req.url ~ "^/cgi" || - req.url ~ "^/cgi-bin" - ) { - return (pass); - } - - # Plupload likes to get piped. - if (req.url ~ "^.*/plupload-handle-uploads.*$") { - return (pipe); - } - - # Handle compression correctly. Different browsers send different - # "Accept-Encoding" headers, even though they mostly all support the same - # compression mechanisms. By consolidating these compression headers into - # a consistent format, we can reduce the size of the cache and get more hits.= - # @see: http:// varnish.projects.linpro.no/wiki/FAQ/Compression - if (req.http.Accept-Encoding) { - if (req.http.Accept-Encoding ~ "gzip") { - # If the browser supports it, we'll use gzip. - set req.http.Accept-Encoding = "gzip"; - } - else if (req.http.Accept-Encoding ~ "deflate") { - # Next, try deflate if it is supported. - set req.http.Accept-Encoding = "deflate"; - } - else { - # Unknown algorithm. Remove it and send unencoded. - unset req.http.Accept-Encoding; - } - } - - # Always cache the following file types for all users. - if (req.url ~ "(?i)\.(css|js|jpg|jpeg|gif|ico|png|tiff|tif|img|tga|wmf|swf|html|htm|woff|woff2|mp4|ttf|eot|svg)(\?.*)?$") { - unset req.http.Cookie; - } - - # Remove all cookies that Drupal doesn't need to know about. ANY remaining - # cookie will cause the request to pass-through to a backend. For the most part - # we always set the NO_CACHE cookie after any POST request, disabling the - # Varnish cache temporarily. The session cookie allows all authenticated users - # to pass through as long as they're logged in. - # - # 1. Append a semi-colon to the front of the cookie string. - # 2. Remove all spaces that appear after semi-colons. - # 3. Match the cookies we want to keep, adding the space we removed - # previously, back. (\1) is first matching group in the regsuball. - # 4. Remove all other cookies, identifying them by the fact that they have - # no space after the preceding semi-colon. - # 5. Remove all spaces and semi-colons from the beginning and end of the - # cookie string. - if (req.http.Cookie) { - set req.http.CookieCheck = ";" + req.http.Cookie; - set req.http.CookieCheck = regsuball(req.http.CookieCheck, "; +", ";"); - set req.http.CookieCheck = regsuball(req.http.CookieCheck, ";(${VARNISH_COOKIECHECK:-SESS[a-z0-9]+|SSESS[a-z0-9]+|NO_CACHE})=", "; \1="); - set req.http.CookieCheck = regsuball(req.http.CookieCheck, ";[^ ][^;]*", ""); - set req.http.CookieCheck = regsuball(req.http.CookieCheck, "^[; ]+|[; ]+$", ""); - - set req.http.Cookie = req.http.Cookie + ";"; - - if (req.http.CookieCheck == "") { - # If there are no remaining cookies, remove the cookie header. If there - # aren't any cookie headers, Varnish's default behavior will be to cache - # the page. - - unset req.http.CookieCheck; - unset req.http.Cookie; - } - else { - # If there is any cookies left (a session or NO_CACHE cookie), do not - # cache the page. Pass it on to Apache directly. - unset req.http.CookieCheck; - return (pass); - } - } - - # Cacheable, lookup in cache. - return (hash); -} - -sub vcl_pipe { - # Support for Websockets - if (req.http.upgrade) { - set bereq.http.upgrade = req.http.upgrade; - set bereq.http.connection = req.http.connection; - } -} - -sub vcl_hit { - if (obj.ttl >= 0s) { - # normal hit - return (deliver); - } - # We have no fresh fish. Lets look at the stale ones. - if (std.healthy(req.backend_hint)) { - # Backend is healthy. If the object is not older then 30secs, deliver it to the client - # and automatically create a separate backend request to warm the cache for this request. - if (obj.ttl + 30s > 0s) { - set req.http.grace = "normal(limited)"; - return (deliver); - } else { - # No candidate for grace. Fetch a fresh object. - return (miss); - } - } - else { - # backend is sick - use full grace - if (obj.ttl + obj.grace > 0s) { - set req.http.grace = "full"; - return (deliver); - } else { - # no graced object. - return (miss); - } - } -} - -sub vcl_backend_response { - # Allow items to be stale if needed. - set beresp.grace = 6h; - - # Set ban-lurker friendly custom headers. - set beresp.http.X-Url = bereq.url; - set beresp.http.X-Host = bereq.http.host; - - # If the backend sends a X-LAGOON-VARNISH-BACKEND-BYPASS header we directly deliver - if (beresp.http.X-LAGOON-VARNISH-BACKEND-BYPASS == "TRUE") { - return (deliver); - } - - # Cache 404 and 403 for 10 seconds - if (beresp.status == 404 || beresp.status == 403) { - set beresp.ttl = 10s; - return (deliver); - } - - # Don't allow static files to set cookies. - if (bereq.url ~ "(?i)\.(css|js|jpg|jpeg|gif|ico|png|tiff|tif|img|tga|wmf|swf|html|htm|woff|woff2|mp4|ttf|eot|svg)(\?.*)?$") { - unset beresp.http.set-cookie; - unset beresp.http.Cache-Control; - - # If an asset would come back with statuscode 500 we only cache it for 10 seconds instead of the usual static file cache - if (beresp.status == 500) { - set beresp.ttl = 10s; - return (deliver); - } - - set beresp.ttl = ${VARNISH_ASSETS_TTL:-2628001}s; - set beresp.http.Cache-Control = "public, max-age=${VARNISH_ASSETS_TTL:-2628001}"; - set beresp.http.Expires = "" + (now + beresp.ttl); - } - - # Files larger than 10 MB get streamed. - if (beresp.http.Content-Length ~ "[0-9]{8,}") { - set beresp.do_stream = true; - set beresp.uncacheable = true; - set beresp.ttl = 120s; - } - - # Disable buffering only for BigPipe responses - if (beresp.http.Surrogate-Control ~ "BigPipe/1.0") { - set beresp.do_stream = true; - set beresp.ttl = 0s; - } - - # The following is taken from https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishd/builtin.vcl#L149 - if (bereq.uncacheable) { - return (deliver); - } else if (beresp.ttl <= 0s || - beresp.http.Set-Cookie || - beresp.http.Surrogate-control ~ "(?i)no-store" || - (!beresp.http.Surrogate-Control && - beresp.http.Cache-Control ~ "(?i:no-cache|no-store|private)") || - beresp.http.Vary == "*") { - # Mark as "Hit-For-Miss" for the next 2 minutes - set beresp.ttl = 120s; - set beresp.uncacheable = true; - } - return (deliver); -} - -# Set a header to track a cache HIT/MISS. -sub vcl_deliver { - if (obj.hits > 0) { - set resp.http.X-Varnish-Cache = "HIT"; - } - else { - set resp.http.X-Varnish-Cache = "MISS"; - } - - # Remove ban-lurker friendly custom headers when delivering to client. - unset resp.http.X-Url; - unset resp.http.X-Host; - - # unset Cache-Tags Header by default, can be disabled with VARNISH_SET_HEADER_CACHE_TAGS=true - if (!${VARNISH_SET_HEADER_CACHE_TAGS:-false}) { - unset resp.http.Cache-Tags; - } - - unset resp.http.X-Generator; - unset resp.http.Server; - # Inject information about grace - if (req.http.grace) { - set resp.http.X-Varnish-Grace = req.http.grace; - } - set resp.http.X-LAGOON = "${HOSTNAME}-${LAGOON_GIT_BRANCH:-undef}-${LAGOON_PROJECT}>" + resp.http.X-LAGOON; - return (deliver); -} - -sub vcl_hash { - hash_data(req.url); - if (req.http.host) { - hash_data(req.http.host); - } - else { - hash_data(server.ip); - } - if (req.http.X-Forwarded-Proto) { - hash_data(req.http.X-Forwarded-Proto); - } - if (req.http.HTTPS) { - hash_data(req.http.HTTPS); - } - return (lookup); -} - -sub vcl_synth { - if (resp.status == 701) { - set resp.status = 401; - set resp.http.Content-Type = "text/plain; charset=utf-8"; - synthetic({"XMLRPC Interface is blocked due to SA-CORE-2014-004 - mail support@amazee.io if you need it."}); - return (deliver); - } - if (resp.status == 700) { - # Set a status the client will understand - set resp.status = 200; - # Create our synthetic response - synthetic(""); - return(deliver); - } - return (deliver); -} - -sub vcl_backend_error { - # Restart the request, when we have a backend server error, to try another backend. - # Restart max twice. - if (bereq.retries < 2) { - return(retry); - } - - set beresp.http.Content-Type = "text/html; charset=utf-8"; - set beresp.http.Retry-After = "5"; - synthetic({" - - - - - Server Error - - - -
-

We are sorry...

-

We encountered a server-side error. This means that the problem is not with your computer or Internet connection, but rather with the website's server.

-

We are currently working on solving this problem and apologise for the inconvenience.

- - Technical Information
- Error "} + beresp.status + " " + beresp.reason + {"
- XID: "} + bereq.xid + {"
-
-
- - - -"}); - return (deliver); -} diff --git a/images/varnish-persistent-drupal/Dockerfile b/images/varnish-persistent-drupal/Dockerfile deleted file mode 100644 index d7b9b8632a..0000000000 --- a/images/varnish-persistent-drupal/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/varnish-drupal - -VOLUME /var/cache/varnish - -ENV CACHE_TYPE=file,/var/cache/varnish/file \ - CACHE_SIZE=950M diff --git a/images/varnish-persistent/Dockerfile b/images/varnish-persistent/Dockerfile deleted file mode 100644 index 6e6c6566c3..0000000000 --- a/images/varnish-persistent/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/varnish - -VOLUME /var/cache/varnish - -ENV CACHE_TYPE=file,/var/cache/varnish/file \ - CACHE_SIZE=950M diff --git a/images/varnish/Dockerfile b/images/varnish/Dockerfile deleted file mode 100644 index 6cd9c7e89c..0000000000 --- a/images/varnish/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons - - -FROM alpine:3.7 as vmod -ENV LIBVMOD_DYNAMIC_VERSION=5.2 -ENV LIBVMOD_BODYACCESS_VERSION=5.0 -RUN apk --no-cache add varnish varnish-dev automake autoconf libtool python py-docutils make curl - -RUN cd /tmp && curl -sSLO https://github.com/nigoroll/libvmod-dynamic/archive/${LIBVMOD_DYNAMIC_VERSION}.zip && \ - unzip ${LIBVMOD_DYNAMIC_VERSION}.zip && cd libvmod-dynamic-${LIBVMOD_DYNAMIC_VERSION} && \ - ./autogen.sh && ./configure && make && make install - -RUN cd /tmp && curl -sSLO https://github.com/aondio/libvmod-bodyaccess/archive/${LIBVMOD_BODYACCESS_VERSION}.zip && \ - unzip ${LIBVMOD_BODYACCESS_VERSION}.zip && cd libvmod-bodyaccess-${LIBVMOD_BODYACCESS_VERSION} && \ - ./autogen.sh && ./configure && make && make install - -FROM alpine:3.7 -LABEL maintainer="amazee.io" -ENV LAGOON=varnish - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk --no-cache add varnish - -# Add varnish mod after the varnish package creates the directory. -COPY --from=vmod /usr/lib/varnish/vmods/libvmod_dynamic.* /usr/lib/varnish/vmods/ -COPY --from=vmod /usr/lib/varnish/vmods/libvmod_bodyaccess.* /usr/lib/varnish/vmods/ - -RUN echo "${VARNISH_SECRET:-lagoon_default_secret}" >> /etc/varnish/secret - -COPY default.vcl /etc/varnish/default.vcl -COPY varnish-start.sh /varnish-start.sh - -RUN fix-permissions /etc/varnish/ \ - && fix-permissions /var/run/ \ - && fix-permissions /var/lib/varnish - -COPY docker-entrypoint /lagoon/entrypoints/70-varnish-entrypoint - -EXPOSE 8080 - -# tells the local development environment on which port we are running -ENV LAGOON_LOCALDEV_HTTP_PORT=8080 - -ENV HTTP_RESP_HDR_LEN=8k \ - HTTP_RESP_SIZE=32k \ - NUKE_LIMIT=150 \ - CACHE_TYPE=malloc \ - CACHE_SIZE=500M \ - LISTEN=":8080" \ - MANAGEMENT_LISTEN=":6082" - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/varnish-start.sh"] diff --git a/images/varnish/default.vcl b/images/varnish/default.vcl deleted file mode 100644 index 6dcd0a8118..0000000000 --- a/images/varnish/default.vcl +++ /dev/null @@ -1,73 +0,0 @@ -# -# This is an example VCL file for Varnish. -# -# It does not do anything by default, delegating control to the -# builtin VCL. The builtin VCL is called when there is no explicit -# return statement. -# -# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/ -# and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples. - -vcl 4.0; - -import std; -import dynamic; - -# set backend default -backend default { - .host = "${VARNISH_BACKEND_HOST:-nginx}"; - .port = "${VARNISH_BACKEND_PORT:-8080}"; - .first_byte_timeout = 35m; - .between_bytes_timeout = 10m; -} - -sub vcl_init { - new www_dir = dynamic.director( - port = "${VARNISH_BACKEND_PORT:-8080}", - first_byte_timeout = 90s, - between_bytes_timeout = 90s, - ttl = 60s); - } - -sub vcl_recv { - # Happens before we check if we have this in cache already. - # - # Typically you clean up the request here, removing cookies you don't need, - # rewriting the request, etc. - - # set the backend, which should be used: - set req.backend_hint = www_dir.backend("${VARNISH_BACKEND_HOST:-nginx}"); - - # Needed for Readyness and Liveness checks - do not remove - if (req.url ~ "^/varnish_status$") { - return (synth(200,"OK")); - } - - # Large binary files are passed. - if (req.url ~ "\.(msi|exe|dmg|zip|tgz|gz|pkg)$") { - return(pass); - } -} - -sub vcl_backend_response { - # Happens after we have read the response headers from the backend. - # - # Here you clean the response headers, removing silly Set-Cookie headers - # and other mistakes your backend does. - - # Files larger than 10 MB get streamed. - if (beresp.http.Content-Length ~ "[0-9]{8,}") { - set beresp.do_stream = true; - set beresp.uncacheable = true; - set beresp.ttl = 120s; - } - - return (deliver); -} - -sub vcl_deliver { - # Happens when we have all the pieces we need, and are about to send the - # response to the client. - # - # You can do accounting or modifying the final object here. -} diff --git a/images/varnish/docker-entrypoint b/images/varnish/docker-entrypoint deleted file mode 100644 index 5d0aee6097..0000000000 --- a/images/varnish/docker-entrypoint +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -ep /etc/varnish/* diff --git a/images/varnish/varnish-start.sh b/images/varnish/varnish-start.sh deleted file mode 100755 index 7388710e6d..0000000000 --- a/images/varnish/varnish-start.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/sbin/varnishd -a $LISTEN -T $MANAGEMENT_LISTEN -F -f /etc/varnish/default.vcl -S /etc/varnish/secret -p http_resp_hdr_len=$HTTP_RESP_HDR_LEN -p http_resp_size=$HTTP_RESP_SIZE -p nuke_limit=$NUKE_LIMIT -s ${CACHE_TYPE},$CACHE_SIZE -j none diff --git a/images/yarn-workspace-builder/Dockerfile b/images/yarn-workspace-builder/Dockerfile index 40096857a9..191f76f5f9 100644 --- a/images/yarn-workspace-builder/Dockerfile +++ b/images/yarn-workspace-builder/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/node:10-builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/node-10-builder:${UPSTREAM_TAG:-latest} RUN apk add --no-cache \ libexecinfo-dev \ diff --git a/lagoon-remote/.lagoon.yml b/lagoon-remote/.lagoon.yml deleted file mode 100644 index f6242b170d..0000000000 --- a/lagoon-remote/.lagoon.yml +++ /dev/null @@ -1,7 +0,0 @@ -docker-compose-yaml: docker-compose.yaml - -additional-yaml: - harbor-secrets: - path: ../.lagoon.harbor-secrets.yaml - command: create - ignore_error: true \ No newline at end of file diff --git a/lagoon-remote/docker-compose.yaml b/lagoon-remote/docker-compose.yaml deleted file mode 100644 index 047862340b..0000000000 --- a/lagoon-remote/docker-compose.yaml +++ /dev/null @@ -1,95 +0,0 @@ -version: '2.3' - -x-lagoon-project: - &lagoon-project lagoon-remote - -services: - logs-forwarder-logstash: - build: - context: logs-forwarder-logstash - dockerfile: Dockerfile - labels: - lagoon.type: custom - lagoon.template: logs-forwarder-logstash/.lagoon.yml - logs-forwarder: - build: - context: logs-forwarder - dockerfile: Dockerfile - labels: - lagoon.type: custom - lagoon.template: logs-forwarder.remote.yml # logs-forwarder in a remote openshift needs a special config - logs-collector: - image: openshift/origin-logging-fluentd:v3.6.1 - labels: - lagoon.type: custom - lagoon.rollout: daemonset - lagoon.template: logs-collector/.lagoon.yml - docker-host: - image: amazeeio/docker-host:latest - labels: - lagoon.type: custom - lagoon.template: docker-host/docker-host.yaml - harborclair: - image: ${IMAGE_REPO:-lagoon}/harborclair - labels: - lagoon.type: custom - lagoon.template: harborclair/harborclair.yml - lagoon.name: harborclair - lagoon.image: amazeeiolagoon/harborclair:v1-9-1 - harborclairadapter: - image: ${IMAGE_REPO:-lagoon}/harborclairadapter - labels: - lagoon.type: custom - lagoon.template: harborclairadapter/harborclair.yml - lagoon.name: harborclair - lagoon.image: amazeeiolagoon/harborclairadapter:v1-9-1 - harbor-core: - image: ${IMAGE_REPO:-lagoon}/harbor-core - labels: - lagoon.type: custom - lagoon.template: harbor-core/harbor-core.yml - lagoon.image: amazeeiolagoon/harbor-core:v1-9-1 - harbor-database: - image: ${IMAGE_REPO:-lagoon}/harbor-database - labels: - lagoon.type: custom - lagoon.template: harbor-database/harbor-database.yml - lagoon.image: amazeeiolagoon/harbor-database:v1-9-1 - harbor-jobservice: - image: ${IMAGE_REPO:-lagoon}/harbor-jobservice - labels: - lagoon.type: custom - lagoon.template: harbor-jobservice/harbor-jobservice.yml - lagoon.image: amazeeiolagoon/harbor-jobservice:v1-9-1 - harbor-nginx: - image: ${IMAGE_REPO:-lagoon}/harbor-nginx - labels: - lagoon.type: custom - lagoon.template: harbor-nginx/harbor-nginx.yml - lagoon.image: amazeeiolagoon/harbor-nginx:v1-9-1 - harbor-portal: - image: ${IMAGE_REPO:-lagoon}/harbor-portal - labels: - lagoon.type: custom - lagoon.template: harbor-portal/harbor-portal.yml - lagoon.image: amazeeiolagoon/harbor-portal:v1-9-1 - harbor-redis: - image: ${IMAGE_REPO:-lagoon}/harbor-redis - labels: - lagoon.type: custom - lagoon.template: harbor-redis/harbor-redis.yml - lagoon.image: amazeeiolagoon/harbor-redis:v1-9-1 - harborregistry: - image: ${IMAGE_REPO:-lagoon}/harborregistry - labels: - lagoon.type: custom - lagoon.template: harborregistry/harborregistry.yml - lagoon.name: harborregistry - lagoon.image: amazeeiolagoon/harborregistry:v1-9-1 - harborregistryctl: - image: ${IMAGE_REPO:-lagoon}/harborregistryctl - labels: - lagoon.type: custom - lagoon.template: harborregistryctl/harborregistry.yml - lagoon.name: harborregistry - lagoon.image: amazeeiolagoon/harborregistryctl:v1-9-1 diff --git a/lagoon-remote/docker-host b/lagoon-remote/docker-host deleted file mode 120000 index 759a167bb4..0000000000 --- a/lagoon-remote/docker-host +++ /dev/null @@ -1 +0,0 @@ -../services/docker-host \ No newline at end of file diff --git a/lagoon-remote/harbor-core b/lagoon-remote/harbor-core deleted file mode 120000 index 71d56cd1cb..0000000000 --- a/lagoon-remote/harbor-core +++ /dev/null @@ -1 +0,0 @@ -../services/harbor-core \ No newline at end of file diff --git a/lagoon-remote/harbor-database b/lagoon-remote/harbor-database deleted file mode 120000 index 5891291918..0000000000 --- a/lagoon-remote/harbor-database +++ /dev/null @@ -1 +0,0 @@ -../services/harbor-database \ No newline at end of file diff --git a/lagoon-remote/harbor-jobservice b/lagoon-remote/harbor-jobservice deleted file mode 120000 index 4f7876692a..0000000000 --- a/lagoon-remote/harbor-jobservice +++ /dev/null @@ -1 +0,0 @@ -../services/harbor-jobservice \ No newline at end of file diff --git a/lagoon-remote/harbor-nginx b/lagoon-remote/harbor-nginx deleted file mode 120000 index b7f95acbe1..0000000000 --- a/lagoon-remote/harbor-nginx +++ /dev/null @@ -1 +0,0 @@ -../services/harbor-nginx \ No newline at end of file diff --git a/lagoon-remote/harbor-portal b/lagoon-remote/harbor-portal deleted file mode 120000 index 9546389be0..0000000000 --- a/lagoon-remote/harbor-portal +++ /dev/null @@ -1 +0,0 @@ -../services/harbor-portal \ No newline at end of file diff --git a/lagoon-remote/harbor-redis b/lagoon-remote/harbor-redis deleted file mode 120000 index 234a105fa0..0000000000 --- a/lagoon-remote/harbor-redis +++ /dev/null @@ -1 +0,0 @@ -../services/harbor-redis \ No newline at end of file diff --git a/lagoon-remote/harborclair b/lagoon-remote/harborclair deleted file mode 120000 index 8e52321ed5..0000000000 --- a/lagoon-remote/harborclair +++ /dev/null @@ -1 +0,0 @@ -../services/harborclair \ No newline at end of file diff --git a/lagoon-remote/harborclairadapter b/lagoon-remote/harborclairadapter deleted file mode 120000 index 650773dfac..0000000000 --- a/lagoon-remote/harborclairadapter +++ /dev/null @@ -1 +0,0 @@ -../services/harborclairadapter \ No newline at end of file diff --git a/lagoon-remote/harborregistry b/lagoon-remote/harborregistry deleted file mode 120000 index c2eb5ba0d3..0000000000 --- a/lagoon-remote/harborregistry +++ /dev/null @@ -1 +0,0 @@ -../services/harborregistry \ No newline at end of file diff --git a/lagoon-remote/harborregistryctl b/lagoon-remote/harborregistryctl deleted file mode 120000 index 3723bbc97f..0000000000 --- a/lagoon-remote/harborregistryctl +++ /dev/null @@ -1 +0,0 @@ -../services/harborregistryctl \ No newline at end of file diff --git a/lagoon-remote/logs-collector b/lagoon-remote/logs-collector deleted file mode 120000 index 1ae11ed6b0..0000000000 --- a/lagoon-remote/logs-collector +++ /dev/null @@ -1 +0,0 @@ -../services/logs-collector/ \ No newline at end of file diff --git a/lagoon-remote/logs-forwarder b/lagoon-remote/logs-forwarder deleted file mode 120000 index a468efdde9..0000000000 --- a/lagoon-remote/logs-forwarder +++ /dev/null @@ -1 +0,0 @@ -../services/logs-forwarder \ No newline at end of file diff --git a/lagoon-remote/logs-forwarder-logstash/.lagoon.yml b/lagoon-remote/logs-forwarder-logstash/.lagoon.yml deleted file mode 100644 index 8c0cedb9af..0000000000 --- a/lagoon-remote/logs-forwarder-logstash/.lagoon.yml +++ /dev/null @@ -1,128 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-remote-openshift-template-logstash -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of logstash service - required: true -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 9600 - protocol: TCP - readinessProbe: - httpGet: - port: 9600 - initialDelaySeconds: 20 - livenessProbe: - httpGet: - port: 9600 - initialDelaySeconds: 120 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - resources: - requests: - cpu: 100m - memory: 100Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 9600-tcp - port: 9600 - protocol: TCP - targetPort: 9600 - - name: syslog - port: 5140 - protocol: UDP - targetPort: 5140 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: Service - metadata: - name: router-logs - spec: - externalName: ${SERVICE_NAME}.${OPENSHIFT_PROJECT}.svc.cluster.local - sessionAffinity: None - type: ExternalName -- apiVersion: v1 - kind: Service - metadata: - name: application-logs - spec: - externalName: ${SERVICE_NAME}.${OPENSHIFT_PROJECT}.svc.cluster.local - sessionAffinity: None - type: ExternalName diff --git a/lagoon-remote/logs-forwarder-logstash/Dockerfile b/lagoon-remote/logs-forwarder-logstash/Dockerfile deleted file mode 100644 index 89123441bd..0000000000 --- a/lagoon-remote/logs-forwarder-logstash/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM amazeeio/logstash - -RUN sed -ibak s/^xpack.*//g /usr/share/logstash/config/logstash.yml - -ENV XPACK_MONITORING_ENABLED=false - -ENV LOGS_FORWARDER_LOGSTASH_TARGET_HOST=url.of.logs-forwader-logstash.target \ - LOGS_FORWARDER_LOGSTASH_TARGET_PORT=30703 - -# Remove default shipped pipeline -RUN rm -f pipeline/logstash.conf - -COPY logstash.conf /usr/share/logstash/pipeline/logstash.conf - -COPY certs/ certs/ - - diff --git a/lagoon-remote/logs-forwarder-logstash/certs/lumberjack.cert b/lagoon-remote/logs-forwarder-logstash/certs/lumberjack.cert deleted file mode 100644 index 36187e0e2c..0000000000 --- a/lagoon-remote/logs-forwarder-logstash/certs/lumberjack.cert +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICpDCCAYwCCQDrhUaboMuRdjANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAls -b2NhbGhvc3QwHhcNMTgwNjI3MjMzMTQ3WhcNMjgwNjI0MjMzMTQ3WjAUMRIwEAYD -VQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDD -xQB0cmt3pstQVWkbpyd8AEtsRtt+f4GLMwVdsG37hRXw+xknMGQWKsIKtxpwShfY -hC6YCaS3ZEkkqctyHZgVJDORe9XmSp+IuFP04Ak8qF/ZfHAaseEysaTRHXJP4YeB -jy7q3ehUGy4DGJimuzkFxc1P02Nk4p0I6lx3+WRi+DwK6jtTOAPEMqQHJZqlQj07 -ZnCfY+Cw0xGy+g8JM+N+l2WRD4Dlhqtm7LdRhlKBG2okSec7s5FojjSkBTAS6wfs -tmhBuhvpS72RWIuUHAExwDjCs4/llRGGWCCUqyn6z6stFD6aF7YNsMy3Gy8UtJ0m -iB6zSxWX6flYKevT+rPhAgMBAAEwDQYJKoZIhvcNAQELBQADggEBACzjllluordk -u0+RJklTJzkJRXTstHnp3R7rNVv8GOqO9eTM0N0TeXHjp+LqMYHoA9ehvz+Pk1Z7 -7JlLyK4/OT7aysNVg/QgZCYOHqj6nGWmwKWjRz9r56DV/0vtdiiwKB7GqvhD7ZLn -W3qseIAzvKlzfwuocLKtBYVLD2llKv3iHiB6C2lRLnzRkYvZP2OgVUSoSNkagLiE -h4tTU1eAulpohjzgUFgv4nDvt6Sp+pa4IjY6Av2MssHoL/UN7X00Spgl6pcBVPc3 -JdoikJA2OWI/JgNtFvFsajHOI4+blcauN2C6E8VGWyCKSODSW8zUgq+TQoNJod20 -79ImYvZ2k1M= ------END CERTIFICATE----- diff --git a/lagoon-remote/logs-forwarder-logstash/logstash.conf b/lagoon-remote/logs-forwarder-logstash/logstash.conf deleted file mode 100644 index e4a6a72e8e..0000000000 --- a/lagoon-remote/logs-forwarder-logstash/logstash.conf +++ /dev/null @@ -1,18 +0,0 @@ -input { - udp { - port => 5140 - type => syslog - queue_size => 5000 - receive_buffer_bytes => 26214400 - } -} - -output { - # stdout { codec => rubydebug } - lumberjack { - codec => json - hosts => "${LOGS_FORWARDER_LOGSTASH_TARGET_HOST}" - ssl_certificate => "certs/lumberjack.cert" - port => "${LOGS_FORWARDER_LOGSTASH_TARGET_PORT}" - } -} diff --git a/lagoon-remote/logs-forwarder.remote.yml b/lagoon-remote/logs-forwarder.remote.yml deleted file mode 100644 index 1b38b8a6ae..0000000000 --- a/lagoon-remote/logs-forwarder.remote.yml +++ /dev/null @@ -1,141 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-remote-openshift-template-fluentd -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - containers: - - image: ${SERVICE_IMAGE} - envFrom: - - configMapRef: - name: lagoon-env - name: ${SERVICE_NAME} - ports: - - containerPort: 24284 - protocol: TCP - resources: - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /fluentd/etc/ - name: config - volumes: - - configMap: - items: - - key: FLUENT_CONF - path: fluent.conf - name: ${SERVICE_NAME}-config - name: config - triggers: - - type: ConfigChange -- apiVersion: v1 - kind: Service - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: secure-forward - port: 24284 - protocol: TCP - targetPort: 24284 - selector: - service: ${SERVICE_NAME} -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME}-config - data: - FLUENT_CONF: |- - - log_level info - - - @type secure_forward - @label @FORWARD - shared_key "#{ENV['LOGS_FORWARDER_SHARED_KEY']}" - self_hostname "#{ENV['HOSTNAME']}" - secure true - port 24284 - ca_cert_path "/fluentd/ssl/ca_cert.pem" - ca_private_key_path /fluentd/ssl/ca_key.pem - ca_private_key_passphrase "#{ENV['LOGS_FORWARDER_PRIVATE_KEY_PASSPHRASE']}" - - diff --git a/local-dev/api-data-watcher-pusher/Dockerfile b/local-dev/api-data-watcher-pusher/Dockerfile index 3441fcc7ba..00a9ce4f44 100644 --- a/local-dev/api-data-watcher-pusher/Dockerfile +++ b/local-dev/api-data-watcher-pusher/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.11 +FROM alpine:3.12 RUN apk add --no-cache \ bash \ diff --git a/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-openshift.gql b/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-openshift.gql index 627f8e9a94..d1f7211cc3 100644 --- a/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-openshift.gql +++ b/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-openshift.gql @@ -1085,4 +1085,50 @@ mutation PopulateApi { ) { id } + + CiNodeMongoDB: addProject( + input: { + id: 31 + name: "ci-node-mongodb-openshift" + openshift: 2 + gitUrl: "ssh://git@172.17.0.1:2222/git/node-mongodb.git" + productionEnvironment:"main" + branches: "true" + privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" + } + ) { + id + } + CiNodeMongoDBGroup3: addGroupsToProject( + input: { + project: { + name: "ci-node-mongodb-openshift" + } + groups: [ + { + name: "ci-group" + } + ] + } + ) { + id + } + CiNodeMongoDBRocketChat: addNotificationToProject( + input: { + project: "ci-node-mongodb-openshift" + notificationType: ROCKETCHAT + notificationName: "amazeeio--lagoon-local-ci" + } + ) { + id + } + CiNodeMongoDBEmail: addNotificationToProject( + input: { + project: "ci-node-mongodb-openshift" + notificationType: EMAIL + notificationName: "local-email-testing" + } + ) { + id + } } diff --git a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql index eda49821ce..9bcd86ab79 100644 --- a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql +++ b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql @@ -23,10 +23,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/project1.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" } ) { id @@ -52,10 +48,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/project2.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" } ) { id @@ -81,10 +73,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/project2.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" } ) { id @@ -112,10 +100,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/github.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -174,10 +158,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/gitlab.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -223,10 +203,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/bitbucket.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -273,10 +249,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/rest.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -322,10 +294,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/node.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -371,10 +339,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/multiproject.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -420,10 +384,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/multiproject.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -469,10 +429,6 @@ mutation PopulateApi { openshift: 2001 developmentEnvironmentsLimit: 10 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/drupal.git" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" productionEnvironment:"master" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } @@ -521,10 +477,6 @@ mutation PopulateApi { gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/nginx.git" productionEnvironment:"master" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" } ) { id @@ -570,10 +522,6 @@ mutation PopulateApi { gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/features.git" productionEnvironment: "master" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" } ) { id @@ -713,10 +661,6 @@ mutation PopulateApi { gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/features-subfolder.git" productionEnvironment: "master" subfolder: "subfolder1/subfolder2" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -764,10 +708,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/elasticsearch.git" productionEnvironment: "master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -813,10 +753,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/drupal-postgres.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -862,10 +798,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/solr.git" productionEnvironment:"master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -911,10 +843,6 @@ mutation PopulateApi { openshift: 2001 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/api.git" productionEnvironment: "master" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -963,10 +891,6 @@ mutation PopulateApi { openshift: 2001 developmentEnvironmentsLimit: 2 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/node.git" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -1039,10 +963,6 @@ mutation PopulateApi { branches: "^feature/|^(dev|test|develop|master)$" developmentEnvironmentsLimit: 5 gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/node.git" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -1128,10 +1048,6 @@ mutation PopulateApi { gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/active-standby.git" productionEnvironment:"master-a" standbyProductionEnvironment:"master-b" - activeSystemsTask: "lagoon_controllerJob" - activeSystemsMisc: "lagoon_controllerMisc" - activeSystemsDeploy: "lagoon_controllerBuildDeploy" - activeSystemsRemove: "lagoon_controllerRemove" privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" } ) { @@ -1170,4 +1086,95 @@ mutation PopulateApi { id } + CiPython: addProject( + input: { + id: 2030 + name: "ci-python-control-k8s" + openshift: 2001 + gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/python.git" + productionEnvironment:"master" + privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" + } + ) { + id + } + CiPythonGroup3: addGroupsToProject( + input: { + project: { + name: "ci-python-control-k8s" + } + groups: [ + { + name: "ci-group" + } + ] + } + ) { + id + } + CiPythonRocketChat: addNotificationToProject( + input: { + project: "ci-python-control-k8s" + notificationType: ROCKETCHAT + notificationName: "amazeeio--lagoon-local-ci" + } + ) { + id + } + CiPythonEmail: addNotificationToProject( + input: { + project: "ci-python-control-k8s" + notificationType: EMAIL + notificationName: "local-email-testing" + } + ) { + id + } + + CiNodeMongoDB: addProject( + input: { + id: 2031 + name: "ci-node-mongodb-control-k8s" + openshift: 2001 + gitUrl: "ssh://git@${GIT_HOST}:${GIT_PORT}/git/node-mongodb.git" + productionEnvironment:"master" + privateKey: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAxGZZrOV7Islo5p51Moabfd1YB8qbHvQZfJDZJmSU4jNxMf8G\nQH8KIM6ndi60xIiDlkh9R50Gs0fgnPaBwpjMjcUay5EvzBJdMmd/EPhg359+4f5Z\nQiGTVaB5UoGJKg9DEK4Xxi+QLpQ1CiJXvd3QOqnQlJZ2WYwz4kdLxF0d+sRrl+0G\nAISt9Gg9kq6wa7k7RRr4/OyD/9DhDr1GXvHXFPRv6QqKq084CqiUaarP7OcbZKi5\nEyMkf0s86ZTttQPqQijWsenLAw6t7J0vM38eojPDMFX4fJ7wVvbHmsdcwb2YxwD0\nk7I85mV5uM99v7owJ/0YSJGcN2YESq8c68rbRp1iSfDhchd9SUyYMFlrj3R+dxte\nTwvN2W5hIEld8Ip+dUWUVaaTeLkFLmqmVhvcMJNmuj+Wnp9USwki6U5HdpgBJPT5\nYJia3/LyE5IlPaRfZ+vBDQqKOeeqkncVtqcZ468ylT0qpqjtV4OSuCzl+P/TeJ+K\npCxDoqp88yQpYRYn9ztvEVvOkT8RERnT0/NVCNKAwHFOXrkK/BJs/h3fj2NddeVC\nJXdwiB4m+T2C/RHtGxVColqUf2nEntXxweuJgqBz+4YxXqRrKu4p5L4NuudcFAyg\nbIRpbaTZDI+vmmXnTXNP6ymMo5fNJ0/IPEBAoDkkc6ZmKdM5Yth6RaCzolsCAwEA\nAQKCAgBRL4n0SaxcFevyISCLMU+HeP8RwXPcGMWMU4ggMcXFt8QcCbK46Ir0QtjA\nps/8yf2zGuYGu2dwps63s8KyAV3VYNwRuEOM1S6HTncdOb850YGuw+h7yMtRwxND\nwt5Db6mmdIDJYRH13zgJp2ajytRv25CoS4ZCwA0WhahRVLi214kudUFc53vNI2YI\ng4PUE+7nQx4X12E9V0ghQqabStdBB0ZXjA8Ef6vH5CXthDmNUX9mXcSbn5RPtndI\ni1Kz2Bl3HdCaHO3ZprDItbU0UWEFZeZSzcb5JO5u1HZwiebTA5/q638uqqg4CUyG\n0+bEYZ/Ud/AY13A/CkHN6ZNH+UQotCH3GLyaTQq6OhyXlgMBojn3xs9iMUclFcuy\nkbZ1jAxqci25pxCIeNDHBDKRyxgSkDPna8ZZ4eKGXjIZzsds4+IDkYJLMg0OCtd2\nKm+ZPM2CFU2YCqt11dlr0higGK/9gdpajJMVgEYAmigQ670LdcBc4XIOpPMrR70a\nPjbF9ze/UqtKDWtz8KMIUcvr0CjhHa3XRgMJiM34hIOZU6xf6rjEgkN2Geq24u1b\nhUW8URb+5dcasQ9iIfkNn3R+zK5PzyvQNf6+XrbVjpLqPHXJYrD85EKlXkPqiE6y\n3ehYMrIaZIY6gMuIVcg8AEtsm5EwQY7ETw4YnMQLKfyweLsHEQKCAQEA5vavDyQj\nn6PqfF1Ntr3N/FfwRr/167HB+/3wHT+FwRpCw62ACeBC0iFXmzG2wfQfot60fUGa\nQEJiUDGZFvBM0tiTpzmgGG7QpRbPe1919Sl5LZeLA9bngRnmqn5zAkmVTeBCO/4F\nMSk9hnBZ0v0W3DqNmjuIH298g3gl4VJeKpILd62LbhjvhjT/LXlekYDEj3p9Xob8\n1OQxFJgftFyg4P07RRaUzsNLhqEdY3VxDcUMb9459fEYeb7sYig+zVPaZQ31aMVK\nj6K+XiH5M5uKJWkPdMDUG84jreFAdBY9kGCuSulTWgmTLlMKSI85q5hkckY2EQQL\n5u456xfyuFcnEwKCAQEA2bCCcqcGIAiMwk/6z7XIJeUsSUg+ObvkEdogk5n6Y1Ea\nt5LxMpQzhG6SHJ2f38VyKgv9e/jnwXI8eiejper6OeQEBG4+AedcLYi0V5SUMIgD\nX4bxT9+qCwYrwt9YHkJySk237WZUWJPVfxHg0vqNYyD/CXBowx0nm8jEuZ8iT+CW\nO2uZq+0DO2WqoYT54lZux6aEzm+oAkzwJJVXJcUVPg7bJXK1ObOzvHpkZJxHL8+S\nKufzew/CXALKWHoCkEP/P8b7oxjcjQI3KK0EM2fABNvN28+qscqTqQjfAsNw24Ob\nP8rL8amgd/x7iddIbEpOSoLAH1gVoxJXA0oqkC6YmQKCAQEAiIeoomW1nUgTdCLf\nrrfyzUnaoqgVIpf42RKa319OnQD+GJg2iSAFwBuvovE3XN4H2YqW3Thri7LyVP+M\nxM+WSkl2tzLMXcUcF4staXvbyeoTVQ0xQzrFrT53aa/IIsEGvntkC/y0awQ6937w\nylWMLvF6BYNNi2+nBjx+//xl5/pfRwbS1mltJkOr2ODXM2IQT9STyc44JU0jak4m\n58Kd44IuiD+6BaPSwKn7KnEhPIeQO4z9bFJyKn3fVIL/5Pa9smEXAjEmS1Rj/ldM\n7eHzPvwlA9p9SFaKJt5x8G25ROCyB1x4RlBEreyutofcCoDSV+8DRPnEY2XN3RhS\nBgCW+wKCAQAyHrqaDSyS2YUXA/UaN59CYlZk9PYmssTa+16+vRfyH+1H0NQpsgd+\neTq4ze3ORpZ3adVN4svxNQ0JjvDVtZkxFPd70aoDJDKL5UqoU3QfDGHCb75FhpiO\n+ze+IVAXf3Ly+pvbU9Edp8PjAsnBqaA9743orXHhYmgJLRtmJWZv/6R3P9ncxLAW\nz9yOXaBu5TmSTBuNsBV9mhs8QQoUjyDJ7f+0yolBJMfAIGnW5EhbkK31pPvhHIrC\nRn4yCr1mW9F77KNpNMMq0BTFD7jE4SFLvRPThSem0Z5Xr8wwxbDJSa7H7DgyhryE\ng6Qp42AwVpdZ/mqfjNdGeWWBQ2UzVxcZAoIBAHNXgjD3umcKciYRAbltNJrXx9xk\ndAv8I69oEMCy4hCmvKUjy/UI9NqXFjBb/G6VGgh6NUE9o9o27t1Y5Plm0izyCA1M\nDFruaRfjyJ8qjbEifcqRtcF3rzsBiXIwdmbN6qT4PUipN2elpUAd7J1OIwGIIe3u\nCWNyOTNL+2+oQ/Eg1Y99mg3yrsVyOwhynVE80/X5cy07bXXR5rv1x4NKSVbPhlnt\nL6J5iAoqoDKICzjcgF5x3mj9YFWZrC3aRxRrN5RoEgeVdcXeK56UJqXHjmKN++m3\nc8OPEIBZiD8UJuhSNSOLiBFrGz6toy6rpHavqqknGhVWotXsAs1h8LNkBe8=\n-----END RSA PRIVATE KEY-----" + } + ) { + id + } + CiNodeMongoDBGroup3: addGroupsToProject( + input: { + project: { + name: "ci-node-mongodb-control-k8s" + } + groups: [ + { + name: "ci-group" + } + + ] + } + ) { + id + } + CiNodeMongoDBRocketChat: addNotificationToProject( + input: { + project: "ci-node-mongodb-control-k8s" + notificationType: ROCKETCHAT + notificationName: "amazeeio--lagoon-local-ci" + } + ) { + id + } + CiNodeMongoDBEmail: addNotificationToProject( + input: { + project: "ci-node-mongodb-control-k8s" + notificationType: EMAIL + notificationName: "local-email-testing" + } + ) { + id + } + } diff --git a/local-dev/git/Dockerfile b/local-dev/git/Dockerfile index ac79bf2e7d..0425366b1d 100644 --- a/local-dev/git/Dockerfile +++ b/local-dev/git/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.11 +FROM alpine:3.12 RUN apk add --no-cache \ bash \ @@ -36,9 +36,11 @@ RUN mkdir -m 700 /git/.ssh && \ git --bare init /git/nginx.git && \ git --bare init /git/features.git && \ git --bare init /git/features-subfolder.git && \ - git --bare init /git/elasticsearch.git && \ - git --bare init /git/solr.git && \ - git --bare init /git/active-standby.git + git --bare init /git/elasticsearch.git && \ + git --bare init /git/solr.git && \ + git --bare init /git/active-standby.git && \ + git --bare init /git/python.git && \ + git --bare init /git/node-mongodb.git USER root diff --git a/local-dev/helm-values-harbor.yml b/local-dev/helm-values-harbor.yml new file mode 100644 index 0000000000..dbd891313e --- /dev/null +++ b/local-dev/helm-values-harbor.yml @@ -0,0 +1,25 @@ +expose: + tls: + enabled: false + ingress: + hosts: + core: harbor.172.17.0.1.nip.io + annotations: + ingress.kubernetes.io/ssl-redirect: "false" + ingress.kubernetes.io/proxy-body-size: "0" + nginx.ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/proxy-body-size: "0" +harborAdminPassword: Harbor12345 +secretKey: "not-a-secure-key" +externalURL: http://harbor.172.17.0.1.nip.io:18080 +persistence: + enabled: false + +chartmuseum: + enabled: false +clair: + enabled: false +trivy: + enabled: true +notary: + enabled: false \ No newline at end of file diff --git a/local-dev/helm-values-mongodbprovider.yml b/local-dev/helm-values-mongodbprovider.yml new file mode 100644 index 0000000000..ff86cfe99d --- /dev/null +++ b/local-dev/helm-values-mongodbprovider.yml @@ -0,0 +1,21 @@ +providers: + production: + environment: production + hostname: mongodb.172.17.0.1.nip.io + password: password + port: '27017' + user: root + auth: + mechanism: SCRAM-SHA-1 + source: admin + tls: true + development: + environment: development + hostname: mongodb.172.17.0.1.nip.io + password: password + port: '27017' + user: root + auth: + mechanism: SCRAM-SHA-1 + source: admin + tls: true \ No newline at end of file diff --git a/local-dev/k3d-nginx-ingress.yaml b/local-dev/k3d-nginx-ingress.yaml deleted file mode 100644 index d07b1f9cd4..0000000000 --- a/local-dev/k3d-nginx-ingress.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: helm.cattle.io/v1 -kind: HelmChart -metadata: - name: nginx - namespace: kube-system -spec: - chart: stable/nginx-ingress - set: - rbac.enabled: "true" diff --git a/local-dev/k3d-registries.yaml b/local-dev/k3d-registries.yaml index 604d006395..1aa4051d83 100644 --- a/local-dev/k3d-registries.yaml +++ b/local-dev/k3d-registries.yaml @@ -2,6 +2,9 @@ mirrors: 172.17.0.1:5000: endpoint: - http://172.17.0.1:5000 - 172.17.0.1:8084: + harbor.172.17.0.1.nip.io:18080: endpoint: - - http://172.17.0.1:8084 + - http://harbor.172.17.0.1.nip.io:18080 + docker.io: + endpoint: + - https://imagecache.amazeeio.cloud diff --git a/local-dev/kubectl-patches/api.yaml b/local-dev/kubectl-patches/api.yaml new file mode 100644 index 0000000000..61c15d6a5a --- /dev/null +++ b/local-dev/kubectl-patches/api.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: api + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/api/src" + name: api-src + - mountPath: "/app/services/api/dist" + name: api-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: api-src + hostPath: + path: "/lagoon/services/api/src" + type: Directory + - name: api-dist + hostPath: + path: "/lagoon/services/api/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/auth-server.yaml b/local-dev/kubectl-patches/auth-server.yaml new file mode 100644 index 0000000000..80b4f69ba7 --- /dev/null +++ b/local-dev/kubectl-patches/auth-server.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: auth-server + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/auth-server/src" + name: auth-server-src + - mountPath: "/app/services/auth-server/dist" + name: auth-server-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: auth-server-src + hostPath: + path: "/lagoon/services/auth-server/src" + type: Directory + - name: auth-server-dist + hostPath: + path: "/lagoon/services/auth-server/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/controllerhandler.yaml b/local-dev/kubectl-patches/controllerhandler.yaml new file mode 100644 index 0000000000..b6d00f6fb5 --- /dev/null +++ b/local-dev/kubectl-patches/controllerhandler.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: controllerhandler + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/controllerhandler/src" + name: controllerhandler-src + - mountPath: "/app/services/controllerhandler/dist" + name: controllerhandler-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: controllerhandler-src + hostPath: + path: "/lagoon/services/controllerhandler/src" + type: Directory + - name: controllerhandler-dist + hostPath: + path: "/lagoon/services/controllerhandler/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/logs2email.yaml b/local-dev/kubectl-patches/logs2email.yaml new file mode 100644 index 0000000000..28ba4350b9 --- /dev/null +++ b/local-dev/kubectl-patches/logs2email.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: logs2email + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/logs2email/src" + name: logs2email-src + - mountPath: "/app/services/logs2email/dist" + name: logs2email-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: logs2email-src + hostPath: + path: "/lagoon/services/logs2email/src" + type: Directory + - name: logs2email-dist + hostPath: + path: "/lagoon/services/logs2email/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/logs2microsoftteams.yaml b/local-dev/kubectl-patches/logs2microsoftteams.yaml new file mode 100644 index 0000000000..54d2264c1e --- /dev/null +++ b/local-dev/kubectl-patches/logs2microsoftteams.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: logs2microsoftteams + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/logs2microsoftteams/src" + name: logs2microsoftteams-src + - mountPath: "/app/services/logs2microsoftteams/dist" + name: logs2microsoftteams-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: logs2microsoftteams-src + hostPath: + path: "/lagoon/services/logs2microsoftteams/src" + type: Directory + - name: logs2microsoftteams-dist + hostPath: + path: "/lagoon/services/logs2microsoftteams/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/logs2rocketchat.yaml b/local-dev/kubectl-patches/logs2rocketchat.yaml new file mode 100644 index 0000000000..d925c9da8f --- /dev/null +++ b/local-dev/kubectl-patches/logs2rocketchat.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: logs2rocketchat + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/logs2rocketchat/src" + name: logs2rocketchat-src + - mountPath: "/app/services/logs2rocketchat/dist" + name: logs2rocketchat-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: logs2rocketchat-src + hostPath: + path: "/lagoon/services/logs2rocketchat/src" + type: Directory + - name: logs2rocketchat-dist + hostPath: + path: "/lagoon/services/logs2rocketchat/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/logs2slack.yaml b/local-dev/kubectl-patches/logs2slack.yaml new file mode 100644 index 0000000000..f475cce6e6 --- /dev/null +++ b/local-dev/kubectl-patches/logs2slack.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: logs2slack + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/logs2slack/src" + name: logs2slack-src + - mountPath: "/app/services/logs2slack/dist" + name: logs2slack-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: logs2slack-src + hostPath: + path: "/lagoon/services/logs2slack/src" + type: Directory + - name: logs2slack-dist + hostPath: + path: "/lagoon/services/logs2slack/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/ui.yaml b/local-dev/kubectl-patches/ui.yaml new file mode 100644 index 0000000000..3ba1181f78 --- /dev/null +++ b/local-dev/kubectl-patches/ui.yaml @@ -0,0 +1,21 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: ui + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - name: services-ui + mountPath: /app/services/ui + volumes: + - name: services-ui + hostPath: + path: /lagoon/services/ui + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/webhook-handler.yaml b/local-dev/kubectl-patches/webhook-handler.yaml new file mode 100644 index 0000000000..b6d48b9996 --- /dev/null +++ b/local-dev/kubectl-patches/webhook-handler.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: webhook-handler + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/webhook-handler/src" + name: webhook-handler-src + - mountPath: "/app/services/webhook-handler/dist" + name: webhook-handler-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: webhook-handler-src + hostPath: + path: "/lagoon/services/webhook-handler/src" + type: Directory + - name: webhook-handler-dist + hostPath: + path: "/lagoon/services/webhook-handler/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/kubectl-patches/webhooks2tasks.yaml b/local-dev/kubectl-patches/webhooks2tasks.yaml new file mode 100644 index 0000000000..ed1e7ba709 --- /dev/null +++ b/local-dev/kubectl-patches/webhooks2tasks.yaml @@ -0,0 +1,33 @@ +--- +metadata: + annotations: + kubernetes.io/change-cause: "Add local-dev volume mounts" +spec: + template: + spec: + securityContext: + runAsUser: 1000 + containers: + - name: webhooks2tasks + command: ["yarn"] + args: ["run", "dev"] + volumeMounts: + - mountPath: "/app/services/webhooks2tasks/src" + name: webhooks2tasks-src + - mountPath: "/app/services/webhooks2tasks/dist" + name: webhooks2tasks-dist + - mountPath: "/app/node-packages" + name: node-packages + volumes: + - name: webhooks2tasks-src + hostPath: + path: "/lagoon/services/webhooks2tasks/src" + type: Directory + - name: webhooks2tasks-dist + hostPath: + path: "/lagoon/services/webhooks2tasks/dist" + type: Directory + - name: node-packages + hostPath: + path: "/lagoon/node-packages" + type: Directory \ No newline at end of file diff --git a/local-dev/mongodb-dbaas-provider/Dockerfile b/local-dev/mongodb-dbaas-provider/Dockerfile new file mode 100644 index 0000000000..97d1bf87cc --- /dev/null +++ b/local-dev/mongodb-dbaas-provider/Dockerfile @@ -0,0 +1,21 @@ +FROM mongo:4.2.3 +# generate a self signed mongodb with tls support +COPY openssl-test-ca.cnf openssl-test-ca.cnf + +RUN openssl genrsa -out mongodb-test-ca.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -x509 -days 1826 -key mongodb-test-ca.key -out mongodb-test-ca.crt -config openssl-test-ca.cnf && \ + openssl genrsa -out mongodb-test-ia.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -key mongodb-test-ia.key -out mongodb-test-ia.csr -config openssl-test-ca.cnf && \ + openssl x509 -sha256 -req -days 730 -in mongodb-test-ia.csr -CA mongodb-test-ca.crt -CAkey mongodb-test-ca.key -set_serial 01 -out mongodb-test-ia.crt -extfile openssl-test-ca.cnf -extensions v3_ca && \ + cat mongodb-test-ca.crt mongodb-test-ia.crt > test-ca.pem + +COPY openssl-test-server.cnf openssl-test-server.cnf + +RUN openssl genrsa -out mongodb-test-server1.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -key mongodb-test-server1.key -out mongodb-test-server1.csr -config openssl-test-server.cnf && \ + openssl x509 -sha256 -req -days 365 -in mongodb-test-server1.csr -CA mongodb-test-ia.crt -CAkey mongodb-test-ia.key -CAcreateserial -out mongodb-test-server1.crt -extfile openssl-test-server.cnf -extensions v3_req && \ + cat mongodb-test-server1.crt mongodb-test-server1.key > test-server1.pem + +COPY mongo-init.js ./docker-entrypoint-initdb.d + +CMD ["mongod","--tlsMode","requireTLS","--tlsAllowConnectionsWithoutCertificates","--tlsCertificateKeyFile","test-server1.pem","--tlsCAFile","test-ca.pem"] \ No newline at end of file diff --git a/local-dev/mongodb-dbaas-provider/mongo-init.js b/local-dev/mongodb-dbaas-provider/mongo-init.js new file mode 100644 index 0000000000..3b58cd2846 --- /dev/null +++ b/local-dev/mongodb-dbaas-provider/mongo-init.js @@ -0,0 +1,11 @@ +// connect to admin database to create users +db = new Mongo().getDB("admin"); +// create admin user +db.createUser({ + user: "root", + pwd: "password", + roles: [{ + role: "clusterAdmin", + db: "admin" + }] +}); \ No newline at end of file diff --git a/local-dev/mongodb-dbaas-provider/openssl-test-ca.cnf b/local-dev/mongodb-dbaas-provider/openssl-test-ca.cnf new file mode 100644 index 0000000000..db9062eda2 --- /dev/null +++ b/local-dev/mongodb-dbaas-provider/openssl-test-ca.cnf @@ -0,0 +1,57 @@ +# NOT FOR PRODUCTION USE. OpenSSL configuration file for testing. + +# For the CA policy +[ policy_match ] +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ req ] +default_bits = 4096 +default_keyfile = myTestCertificateKey.pem ## The default private key file name. +default_md = sha256 ## Use SHA-256 for Signatures +distinguished_name = req_dn +req_extensions = v3_req +x509_extensions = v3_ca # The extentions to add to the self signed cert + +[ v3_req ] +subjectKeyIdentifier = hash +basicConstraints = CA:FALSE +keyUsage = critical, digitalSignature, keyEncipherment +nsComment = "OpenSSL Generated Certificate for TESTING only. NOT FOR PRODUCTION USE." +extendedKeyUsage = serverAuth, clientAuth + +[ req_dn ] +countryName = AU +countryName_default = . +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name +stateOrProvinceName_default = TestCertificateStateName +stateOrProvinceName_max = 64 + +localityName = Locality Name +localityName_default = TestCertificateLocalityName +localityName_max = 64 + +organizationName = Organization Name +organizationName_default = TestCertificateOrgName +organizationName_max = 64 + +organizationalUnitName = Organizational Unit Name +organizationalUnitName_default = TestCertificateOrgUnitName +organizationalUnitName_max = 64 + +commonName = Common Name (eg, YOUR name) +commonName_max = 64 + +[ v3_ca ] +# Extensions for a typical CA + +subjectKeyIdentifier=hash +basicConstraints = critical,CA:true +authorityKeyIdentifier=keyid:always,issuer:always \ No newline at end of file diff --git a/local-dev/mongodb-dbaas-provider/openssl-test-server.cnf b/local-dev/mongodb-dbaas-provider/openssl-test-server.cnf new file mode 100644 index 0000000000..7a3857af5e --- /dev/null +++ b/local-dev/mongodb-dbaas-provider/openssl-test-server.cnf @@ -0,0 +1,45 @@ +# NOT FOR PRODUCTION USE. OpenSSL configuration file for testing. + + +[ req ] +default_bits = 4096 +default_keyfile = myTestServerCertificateKey.pem ## The default private key file name. +default_md = sha256 +distinguished_name = req_dn +req_extensions = v3_req + +[ v3_req ] +subjectKeyIdentifier = hash +basicConstraints = CA:FALSE +keyUsage = critical, digitalSignature, keyEncipherment +nsComment = "OpenSSL Generated Certificate for TESTING only. NOT FOR PRODUCTION USE." +extendedKeyUsage = serverAuth, clientAuth +subjectAltName = @alt_names + +[ alt_names ] +DNS.1 = www.acme.com ##TODO: Enter the DNS names. The DNS names should match the server names. + +[ req_dn ] +countryName = Country Name (2 letter code) +countryName_default = TestServerCertificateCountry +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = TestServerCertificateState +stateOrProvinceName_max = 64 + +localityName = Locality Name (eg, city) +localityName_default = TestServerCertificateLocality +localityName_max = 64 + +organizationName = Organization Name (eg, company) +organizationName_default = TestServerCertificateOrg +organizationName_max = 64 + +organizationalUnitName = Organizational Unit Name (eg, section) +organizationalUnitName_default = TestServerCertificateOrgUnit +organizationalUnitName_max = 64 + +commonName = Common Name (eg, YOUR name) +commonName_max = 64 \ No newline at end of file diff --git a/node-packages/commons/.gitignore b/node-packages/commons/.gitignore index f06235c460..5ed153f646 100644 --- a/node-packages/commons/.gitignore +++ b/node-packages/commons/.gitignore @@ -1,2 +1,3 @@ node_modules -dist +dist/* +!dist/.gitkeep diff --git a/images/solr-drupal/solr7.7/conf/solrconfig_index.xml b/node-packages/commons/dist/.gitkeep similarity index 100% rename from images/solr-drupal/solr7.7/conf/solrconfig_index.xml rename to node-packages/commons/dist/.gitkeep diff --git a/node-packages/commons/src/api.ts b/node-packages/commons/src/api.ts index 06f9936327..c0e3e1ac1c 100644 --- a/node-packages/commons/src/api.ts +++ b/node-packages/commons/src/api.ts @@ -634,6 +634,23 @@ export async function getProjectByName(project: string): Promise { return result.project; } +export const allProjectsInGroup = (groupInput: { + id?: string; + name?: string; +}): Promise => + graphqlapi.query( + ` + query($groupInput: GroupInput!) { + allProjectsInGroup(input: $groupInput) { + ...${projectFragment} + } + } + `, + { + groupInput + } + ); + export async function getMicrosoftTeamsInfoForProject( project: string, contentType = 'DEPLOYMENT' ): Promise { @@ -830,6 +847,36 @@ export async function getEnvironmentByName( return result; } + +export async function getEnvironmentById( + id: number +): Promise { + const result = await graphqlapi.query(` + { + environmentById(id: ${id}) { + id, + name, + route, + routes, + deployType, + environmentType, + openshiftProjectName, + updated, + created, + deleted, + } + } + `); + + if (!result || !result.environmentById) { + throw new EnvironmentNotFound( + `Cannot find environment for id ${id}\n${result.environmentById}` + ); + } + + return result; +} + export async function getDeploymentByName( openshiftProjectName: string, deploymentName: string, diff --git a/node-packages/commons/src/bitbucketApi.ts b/node-packages/commons/src/bitbucketApi.ts index 6bce79b80e..384df5738b 100644 --- a/node-packages/commons/src/bitbucketApi.ts +++ b/node-packages/commons/src/bitbucketApi.ts @@ -1,6 +1,34 @@ import axios from 'axios'; import { find, pathOr, propEq, propOr } from 'ramda'; +interface ApiResourceLink { + href: string; + name: string; +} + +// https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8296923984 +interface ApiProject { + key: string; + id: number; + name: string; + description: string; + public: boolean + links: { + [key: string]: ApiResourceLink[] + }; +} + +// https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8296923984 +interface ApiRepo { + slug: string; + id: number; + name: string; + project: ApiProject; + links: { + [key: string]: ApiResourceLink[] + }; +} + const API_HOST = propOr( 'https://bitbucket.org', 'BITBUCKET_API_HOST', @@ -107,7 +135,7 @@ const getAllPagesRequest = async url => { return results; }; -export const searchReposByName = async name => { +export const searchReposByName = async (name: string): Promise => { try { const repos = await getAllPagesRequest( `repos?name=${name}&permission=REPO_READ` diff --git a/node-packages/commons/src/gitlabApi.ts b/node-packages/commons/src/gitlabApi.ts index 9633db1d7c..b9cde73a38 100644 --- a/node-packages/commons/src/gitlabApi.ts +++ b/node-packages/commons/src/gitlabApi.ts @@ -18,6 +18,26 @@ const options = { const gitlabapi = axios.create(options); +export const secureGitlabSystemHooks = [ + 'group_create', + 'group_rename', + 'group_destroy', + 'project_create', + 'project_transfer', + 'project_rename', + 'project_update', + 'project_destroy', + 'user_create', + 'user_rename', + 'user_destroy', + 'user_add_to_group', + 'user_remove_from_group', + 'user_add_to_team', + 'user_remove_from_team', + 'key_create', + 'key_destroy', +]; + class NetworkError extends Error { constructor(message: string) { super(message); diff --git a/node-packages/commons/src/tasks.ts b/node-packages/commons/src/tasks.ts index a141e56cb9..cd56e3d488 100644 --- a/node-packages/commons/src/tasks.ts +++ b/node-packages/commons/src/tasks.ts @@ -87,6 +87,14 @@ const taskPrefetch = process.env.TASK_PREFETCH_COUNT ? Number(process.env.TASK_P const taskMonitorPrefetch = process.env.TASKMONITOR_PREFETCH_COUNT ? Number(process.env.TASKMONITOR_PREFETCH_COUNT) : 1; // these are required for the builddeploydata creation +// they match what are used in the kubernetesbuilddeploy service +// @TODO: INFO +// some of these variables will need to be added to webhooks2tasks in the event that overwriting is required +// deploys received by that webhooks2tasks will use functions exported by tasks, where previously they would be passed to a seperate service +// this is because there is no single service handling deploy tasks when the controller is used +// currently the services that may need to use these variables are: +// * `api` +// * `webhooks2tasks` const CI = process.env.CI || "false" const registry = process.env.REGISTRY || "registry.lagoon.svc:5000" const lagoonGitSafeBranch = process.env.LAGOON_GIT_SAFE_BRANCH || "master" @@ -245,10 +253,8 @@ export const createTaskMonitor = async function(task: string, payload: any) { // makes strings "safe" if it is to be used in something dns related const makeSafe = string => string.toLocaleLowerCase().replace(/[^0-9a-z-]/g,'-') -// This is used to send the required information directly to the message queue -// for the controllers to consume // @TODO: make sure if it fails, it does so properly -const getOperatorBuildData = async function(deployData: any) { +const getControllerBuildData = async function(deployData: any) { const { projectName, branchName, @@ -294,7 +300,7 @@ const getOperatorBuildData = async function(deployData: any) { var projectProductionEnvironment = projectOpenShift.productionEnvironment var projectStandbyEnvironment = projectOpenShift.standbyProductionEnvironment var subfolder = projectOpenShift.subfolder || "" - var routerPattern = projectOpenShift.openshift.routerPattern ? projectOpenShift.openshift.routerPattern.replace('${environment}',environmentName).replace('${project}', projectName) : "" + var routerPattern = projectOpenShift.openshift.routerPattern var prHeadBranch = headBranch || "" var prHeadSha = headSha || "" var prBaseBranch = baseBranch || "" @@ -308,10 +314,20 @@ const getOperatorBuildData = async function(deployData: any) { var projectSecret = crypto.createHash('sha256').update(`${projectName}-${jwtSecret}`).digest('hex'); var alertContactHA = "" var alertContactSA = "" - var monitoringConfig = JSON.parse(projectOpenShift.openshift.monitoringConfig) || "invalid" + var uptimeRobotStatusPageIds = [] + var monitoringConfig: any = {}; + try { + monitoringConfig = JSON.parse(projectOpenShift.openshift.monitoringConfig) || "invalid" + } catch (e) { + logger.error('Error parsing openshift.monitoringConfig from openshift: %s, continuing with "invalid"', projectOpenShift.openshift.name, { error: e }) + monitoringConfig = "invalid" + } if (monitoringConfig != "invalid"){ alertContactHA = monitoringConfig.uptimerobot.alertContactHA || "" alertContactSA = monitoringConfig.uptimerobot.alertContactSA || "" + if (monitoringConfig.uptimerobot.statusPageId) { + uptimeRobotStatusPageIds.push(monitoringConfig.uptimerobot.statusPageId) + } } var availability = projectOpenShift.availability || "STANDARD" @@ -325,13 +341,18 @@ const getOperatorBuildData = async function(deployData: any) { } else { alertContact = "unconfigured" } + const billingGroup = projectBillingGroup.groups.find(i => i.type == "billing" ) || "" - var uptimeRobotStatusPageId = billingGroup.uptimeRobotStatusPageId || "" + if (billingGroup.uptimeRobotStatusPageId && billingGroup.uptimeRobotStatusPageId != "null" && !R.isEmpty(billingGroup.uptimeRobotStatusPageId)){ + uptimeRobotStatusPageIds.push(billingGroup.uptimeRobotStatusPageId) + } + var uptimeRobotStatusPageId = uptimeRobotStatusPageIds.join('-') - var branchData: any = {}; var pullrequestData: any = {}; var promoteData: any = {}; + var gitRef = gitSha ? gitSha : `origin/${branchName}` + switch (type) { case "branch": // if we have a sha given, we use that, if not we fall back to the branch (which needs be prefixed by `origin/` @@ -339,11 +360,6 @@ const getOperatorBuildData = async function(deployData: any) { var deployBaseRef = branchName var deployHeadRef = null var deployTitle = null - branchData = { - branch: { - name: branchName, - }, - }; break; case "pullrequest": var gitRef = gitSha @@ -390,68 +406,16 @@ const getOperatorBuildData = async function(deployData: any) { const buildName = `lagoon-build-${randBuildId}`; let deployment; + let environmentId; try { const now = moment.utc(); const apiEnvironment = await getEnvironmentByName(branchName, projectOpenShift.id); + environmentId = apiEnvironment.environmentByName.id deployment = await addDeployment(buildName, "NEW", now.format('YYYY-MM-DDTHH:mm:ss'), apiEnvironment.environmentByName.id); } catch (error) { logger.error(`Could not save deployment for project ${projectOpenShift.id}. Message: ${error}`); } - let buildImage = {} - // During CI we want to use the OpenShift Registry for our build Image and use the OpenShift registry for the base Images - // Since the Operator could eventually support openshift, we can handle which image to supply here - if (CI == "true") { - switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - buildImage = "172.17.0.1:5000/lagoon/oc-build-deploy-dind:latest" - break; - default: - // default to the kubectl builddeploy dind since the controllers and kubernetes use the same underlying process - buildImage = "172.17.0.1:5000/lagoon/kubectl-build-deploy-dind:latest" - } - } else if (overwriteOCBuildDeployDindImage) { - // allow to overwrite the image we use via OVERWRITE_OC_BUILD_DEPLOY_DIND_IMAGE env variable - // this needs to be added to the `api` deployment/pods to be used - switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - buildImage = overwriteOCBuildDeployDindImage - break; - } - } else if (overwriteKubectlBuildDeployDindImage) { - // allow to overwrite the image we use via OVERWRITE_KUBECTL_BUILD_DEPLOY_DIND_IMAGE env variable - // this needs to be added to the `api` deployment/pods to be used - switch (project.activeSystemsDeploy) { - case 'lagoon_controllerBuildDeploy': - case 'lagoon_kubernetesBuildDeploy': - buildImage = overwriteKubectlBuildDeployDindImage - break; - } - } else if (lagoonEnvironmentType == 'production') { - // we are a production environment, use the amazeeio/ image with our current lagoon version - switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - buildImage = `amazeeio/oc-build-deploy-dind:${lagoonVersion}` - break; - default: - // default to the kubectl builddeploy dind since the controllers and kubernetes use the same underlying process - buildImage = `amazeeio/kubectl-build-deploy-dind:${lagoonVersion}` - } - } else { - // we are a development enviornment, use the amazeeiolagoon image with the same branch name - buildImage = `amazeeiolagoon/kubectl-build-deploy-dind:${lagoonGitSafeBranch}` - switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - buildImage = `amazeeiolagoon/oc-build-deploy-dind:${lagoonGitSafeBranch}` - break; - default: - // default to the kubectl builddeploy dind since the controllers and kubernetes use the same underlying process - buildImage = `amazeeiolagoon/kubectl-build-deploy-dind:${lagoonGitSafeBranch}` - } - } - - var gitRef = gitSha ? gitSha : `origin/${branchName}` - // encode some values so they get sent to the controllers nicely const sshKeyBase64 = new Buffer(deployPrivateKey.replace(/\\n/g, "\n")).toString('base64') const envVars = new Buffer(JSON.stringify(environment.addOrUpdateEnvironment.envVariables)).toString('base64') @@ -466,19 +430,23 @@ const getOperatorBuildData = async function(deployData: any) { spec: { build: { type: type, - image: buildImage, + image: {}, // the controller will know which image to use ci: CI, }, - ...branchData, + branch: { + name: branchName, + }, ...pullrequestData, ...promoteData, gitReference: gitRef, project: { + id: projectOpenShift.id, name: projectName, gitUrl: gitUrl, uiLink: deployment.addDeployment.uiLink, environment: environmentName, environmentType: environmentType, + environmentId: environmentId, productionEnvironment: projectProductionEnvironment, standbyEnvironment: projectStandbyEnvironment, subfolder: subfolder, @@ -526,8 +494,6 @@ export const createDeployTask = async function(deployData: any) { } switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - case 'lagoon_kubernetesBuildDeploy': case 'lagoon_controllerBuildDeploy': // we want to limit production environments, without making it configurable currently var productionEnvironmentsLimit = 2; @@ -592,13 +558,9 @@ export const createDeployTask = async function(deployData: any) { `projectName: ${projectName}, branchName: ${branchName}, no branches defined in active system, assuming we want all of them` ); switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - return sendToLagoonTasks('builddeploy-openshift', deployData); - case 'lagoon_kubernetesBuildDeploy': - return sendToLagoonTasks('builddeploy-kubernetes', deployData); case 'lagoon_controllerBuildDeploy': // controllers uses a different message than the other services, so we need to source it here - const buildDeployData = await getOperatorBuildData(deployData); + const buildDeployData = await getControllerBuildData(deployData); return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); default: throw new UnknownActiveSystem( @@ -610,14 +572,10 @@ export const createDeployTask = async function(deployData: any) { `projectName: ${projectName}, branchName: ${branchName}, all branches active, therefore deploying` ); switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - return sendToLagoonTasks('builddeploy-openshift', deployData); - case 'lagoon_kubernetesBuildDeploy': - return sendToLagoonTasks('builddeploy-kubernetes', deployData); case 'lagoon_controllerBuildDeploy': - // controllers uses a different message than the other services, so we need to source it here - const buildDeployData = await getOperatorBuildData(deployData); - return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); + // controllers uses a different message than the other services, so we need to source it here + const buildDeployData = await getControllerBuildData(deployData); + return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); default: throw new UnknownActiveSystem( `Unknown active system '${project.activeSystemsDeploy}' for task 'deploy' in for project ${projectName}` @@ -638,17 +596,10 @@ export const createDeployTask = async function(deployData: any) { `projectName: ${projectName}, branchName: ${branchName}, regex ${project.branches} matched branchname, starting deploy` ); switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - return sendToLagoonTasks('builddeploy-openshift', deployData); - case 'lagoon_kubernetesBuildDeploy': - return sendToLagoonTasks( - 'builddeploy-kubernetes', - deployData - ); case 'lagoon_controllerBuildDeploy': - // controllers uses a different message than the other services, so we need to source it here - const buildDeployData = await getOperatorBuildData(deployData); - return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); + // controllers uses a different message than the other services, so we need to source it here + const buildDeployData = await getControllerBuildData(deployData); + return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); default: throw new UnknownActiveSystem( `Unknown active system '${project.activeSystemsDeploy}' for task 'deploy' in for project ${projectName}` @@ -671,14 +622,10 @@ export const createDeployTask = async function(deployData: any) { `projectName: ${projectName}, pullrequest: ${branchName}, no pullrequest defined in active system, assuming we want all of them` ); switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - return sendToLagoonTasks('builddeploy-openshift', deployData); - case 'lagoon_kubernetesBuildDeploy': - return sendToLagoonTasks('builddeploy-kubernetes', deployData); case 'lagoon_controllerBuildDeploy': - // controllers uses a different message than the other services, so we need to source it here - const buildDeployData = await getOperatorBuildData(deployData); - return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); + // controllers uses a different message than the other services, so we need to source it here + const buildDeployData = await getControllerBuildData(deployData); + return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); default: throw new UnknownActiveSystem( `Unknown active system '${ @@ -691,14 +638,10 @@ export const createDeployTask = async function(deployData: any) { `projectName: ${projectName}, pullrequest: ${branchName}, all pullrequest active, therefore deploying` ); switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - return sendToLagoonTasks('builddeploy-openshift', deployData); - case 'lagoon_kubernetesBuildDeploy': - return sendToLagoonTasks('builddeploy-kubernetes', deployData); case 'lagoon_controllerBuildDeploy': - // controllers uses a different message than the other services, so we need to source it here - const buildDeployData = await getOperatorBuildData(deployData); - return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); + // controllers uses a different message than the other services, so we need to source it here + const buildDeployData = await getControllerBuildData(deployData); + return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); default: throw new UnknownActiveSystem( `Unknown active system '${ @@ -722,14 +665,10 @@ export const createDeployTask = async function(deployData: any) { `projectName: ${projectName}, pullrequest: ${branchName}, regex ${project.pullrequests} matched PR Title '${pullrequestTitle}', starting deploy` ); switch (project.activeSystemsDeploy) { - case 'lagoon_openshiftBuildDeploy': - return sendToLagoonTasks('builddeploy-openshift', deployData); - case 'lagoon_kubernetesBuildDeploy': - return sendToLagoonTasks('builddeploy-kubernetes', deployData); case 'lagoon_controllerBuildDeploy': - // controllers uses a different message than the other services, so we need to source it here - const buildDeployData = await getOperatorBuildData(deployData); - return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); + // controllers uses a different message than the other services, so we need to source it here + const buildDeployData = await getControllerBuildData(deployData); + return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); default: throw new UnknownActiveSystem( `Unknown active system '${ @@ -772,9 +711,9 @@ export const createPromoteTask = async function(promoteData: any) { } switch (project.activeSystemsPromote) { - case 'lagoon_openshiftBuildDeploy': - return sendToLagoonTasks('builddeploy-openshift', promoteData); - + case 'lagoon_controllerBuildDeploy': + const buildDeployData = await getControllerBuildData(promoteData); + return sendToLagoonTasks(buildDeployData.spec.project.deployTarget+':builddeploy', buildDeployData); default: throw new UnknownActiveSystem( `Unknown active system '${project.activeSystemsPromote}' for task 'deploy' in for project ${projectName}` @@ -1011,7 +950,7 @@ export const createRemoveTask = async function(removeData: any) { } // creates the restore job configuration for use in the misc task -const restoreConfig = (name, backupId, safeProjectName) => { +const restoreConfig = (name, backupId, safeProjectName, baasBucketName) => { let config = { apiVersion: 'backup.appuio.ch/v1alpha1', kind: 'Restore', @@ -1025,7 +964,7 @@ const restoreConfig = (name, backupId, safeProjectName) => { }, backend: { s3: { - bucket: `baas-${safeProjectName}` + bucket: baasBucketName ? baasBucketName : `baas-${safeProjectName}` }, repoPasswordSecretRef: { key: 'repo-pw', @@ -1039,12 +978,12 @@ const restoreConfig = (name, backupId, safeProjectName) => { }; // creates the route/ingress migration config -const migrateIngress = (destinationNamespace, sourceNamespace) => { +const migrateHosts = (destinationNamespace, sourceNamespace) => { const randId = Math.random().toString(36).substring(7); - const migrateName = `ingress-migrate-${randId}`; + const migrateName = `host-migration-${randId}`; let config = { apiVersion: 'dioscuri.amazee.io/v1', - kind: 'IngressMigrate', + kind: 'HostMigration', metadata: { name: migrateName, annotations: { @@ -1072,12 +1011,6 @@ export const createTaskTask = async function(taskData: any) { } switch (projectSystem.activeSystemsTask) { - case 'lagoon_openshiftJob': - return sendToLagoonTasks('job-openshift', taskData); - - case 'lagoon_kubernetesJob': - return sendToLagoonTasks('job-kubernetes', taskData); - case 'lagoon_controllerJob': // since controllers queues are named, we have to send it to the right tasks queue // do that here @@ -1103,14 +1036,6 @@ export const createMiscTask = async function(taskData: any) { let updatedKey = key; let taskId = ''; switch (data.activeSystemsMisc) { - case 'lagoon_openshiftMisc': - updatedKey = `openshift:${key}`; - taskId = 'misc-openshift'; - break; - case 'lagoon_kubernetesMisc': - updatedKey = `kubernetes:${key}`; - taskId = 'misc-kubernetes'; - break; case 'lagoon_controllerMisc': // handle any controller based misc tasks updatedKey = `kubernetes:${key}`; @@ -1138,8 +1063,15 @@ export const createMiscTask = async function(taskData: any) { case 'kubernetes:restic:backup:restore': // Handle setting up the configuration for a restic restoration task const restoreName = `restore-${R.slice(0, 7, taskData.data.backup.backupId)}`; + // Parse out the baasBucketName for any migrated projects + let baasBucketName = result.project.envVariables.find(obj => { + return obj.name === "LAGOON_BAAS_BUCKET_NAME" + }) + if (baasBucketName) { + baasBucketName = baasBucketName.value + } // generate the restore CRD - const restoreConf = restoreConfig(restoreName, taskData.data.backup.backupId, makeSafe(taskData.data.project.name)) + const restoreConf = restoreConfig(restoreName, taskData.data.backup.backupId, makeSafe(taskData.data.project.name), baasBucketName) // base64 encode it const restoreBytes = new Buffer(JSON.stringify(restoreConf).replace(/\\n/g, "\n")).toString('base64') miscTaskData.misc.miscResource = restoreBytes @@ -1148,7 +1080,7 @@ export const createMiscTask = async function(taskData: any) { // handle setting up the task configuration for running the active/standby switch // this uses the `advanced task` system in the controllers // first generate the migration CRD - const migrateConf = migrateIngress( + const migrateConf = migrateHosts( makeSafe(taskData.data.productionEnvironment.openshiftProjectName), makeSafe(taskData.data.environment.openshiftProjectName)) // generate out custom json payload to send to the advanced task diff --git a/openshift-setup/dbaas-operator.yaml b/openshift-setup/dbaas-operator.yaml index dc1db042bd..44e05d96e4 100644 --- a/openshift-setup/dbaas-operator.yaml +++ b/openshift-setup/dbaas-operator.yaml @@ -164,6 +164,349 @@ status: conditions: [] storedVersions: [] --- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: mongodbproviders.mongodb.amazee.io +spec: + group: mongodb.amazee.io + names: + kind: MongoDBProvider + listKind: MongoDBProviderList + plural: mongodbproviders + singular: mongodbprovider + scope: Namespaced + validation: + openAPIV3Schema: + description: MongoDBProvider is the Schema for the mongodbproviders API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MongoDBProviderSpec defines the desired state of MongoDBProvider + properties: + auth: + description: MongoDBAuth defines the authorisation mechanisms that mongo + can use + properties: + mechanism: + type: string + source: + type: string + tls: + type: boolean + required: + - tls + type: object + environment: + description: These are the spec options for providers + type: string + hostname: + type: string + password: + type: string + port: + type: string + type: + type: string + user: + type: string + type: object + status: + description: MongoDBProviderStatus defines the observed state of MongoDBProvider + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: mongodbconsumers.mongodb.amazee.io +spec: + group: mongodb.amazee.io + names: + kind: MongoDBConsumer + listKind: MongoDBConsumerList + plural: mongodbconsumers + singular: mongodbconsumer + scope: Namespaced + validation: + openAPIV3Schema: + description: MongoDBConsumer is the Schema for the mongodbconsumers API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MongoDBConsumerSpec defines the desired state of MongoDBConsumer + properties: + consumer: + description: MongoDBConsumerData defines the provider link for this + consumer + properties: + auth: + description: MongoDBAuth defines the authorisation mechanisms that + mongo can use + properties: + mechanism: + type: string + source: + type: string + tls: + type: boolean + required: + - tls + type: object + database: + type: string + password: + type: string + services: + description: MongoDBConsumerServices defines the provider link for + this consumer + properties: + primary: + type: string + type: object + username: + type: string + type: object + environment: + description: These are the spec options for consumers + type: string + provider: + description: MongoDBConsumerProvider defines the provider link for this + consumer + properties: + auth: + description: MongoDBAuth defines the authorisation mechanisms that + mongo can use + properties: + mechanism: + type: string + source: + type: string + tls: + type: boolean + required: + - tls + type: object + hostname: + type: string + name: + type: string + namespace: + type: string + port: + type: string + type: object + type: object + status: + description: MongoDBConsumerStatus defines the observed state of MongoDBConsumer + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: postgresqlproviders.postgres.amazee.io +spec: + group: postgres.amazee.io + names: + kind: PostgreSQLProvider + listKind: PostgreSQLProviderList + plural: postgresqlproviders + singular: postgresqlprovider + scope: Namespaced + validation: + openAPIV3Schema: + description: PostgreSQLProvider is the Schema for the postgresqlproviders API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: PostgreSQLProviderSpec defines the desired state of PostgreSQLProvider + properties: + environment: + description: These are the spec options for providers + type: string + hostname: + type: string + name: + type: string + namespace: + type: string + password: + type: string + port: + type: string + type: + type: string + user: + type: string + type: object + status: + description: PostgreSQLProviderStatus defines the observed state of PostgreSQLProvider + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: postgresqlconsumers.postgres.amazee.io +spec: + group: postgres.amazee.io + names: + kind: PostgreSQLConsumer + listKind: PostgreSQLConsumerList + plural: postgresqlconsumers + singular: postgresqlconsumer + scope: Namespaced + validation: + openAPIV3Schema: + description: PostgreSQLConsumer is the Schema for the postgresqlconsumers API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: PostgreSQLConsumerSpec defines the desired state of PostgreSQLConsumer + properties: + consumer: + description: PostgreSQLConsumerData defines the provider link for this + consumer + properties: + database: + type: string + password: + type: string + services: + description: PostgreSQLConsumerServices defines the provider link + for this consumer + properties: + primary: + type: string + type: object + username: + type: string + type: object + environment: + description: These are the spec options for consumers + type: string + provider: + description: PostgreSQLConsumerProvider defines the provider link for + this consumer + properties: + hostname: + type: string + name: + type: string + namespace: + type: string + port: + type: string + type: + type: string + type: object + type: object + status: + description: PostgreSQLConsumerStatus defines the observed state of PostgreSQLConsumer + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -273,6 +616,86 @@ rules: - subjectaccessreviews verbs: - create +- apiGroups: + - mongodb.amazee.io + resources: + - mongodbconsumers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - mongodb.amazee.io + resources: + - mongodbconsumers/status + verbs: + - get + - patch + - update +- apiGroups: + - mongodb.amazee.io + resources: + - mongodbproviders + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - mongodb.amazee.io + resources: + - mongodbproviders/status + verbs: + - get + - patch + - update +- apiGroups: + - postgres.amazee.io + resources: + - postgresqlconsumers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - postgres.amazee.io + resources: + - postgresqlconsumers/status + verbs: + - get + - patch + - update +- apiGroups: + - postgres.amazee.io + resources: + - postgresqlproviders + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - postgres.amazee.io + resources: + - postgresqlproviders/status + verbs: + - get + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -362,13 +785,13 @@ spec: - --enable-leader-election command: - /manager - image: amazeeio/dbaas-operator:testingv1 + image: amazeeio/dbaas-operator:v0.1.6 name: manager resources: limits: cpu: 100m - memory: 30Mi + memory: 300Mi requests: cpu: 100m memory: 20Mi - terminationGracePeriodSeconds: 10 \ No newline at end of file + terminationGracePeriodSeconds: 10 diff --git a/openshift-setup/dbaas-providers.yaml b/openshift-setup/dbaas-providers.yaml index edeb87bbaa..8b8b1d8ae0 100644 --- a/openshift-setup/dbaas-providers.yaml +++ b/openshift-setup/dbaas-providers.yaml @@ -22,4 +22,34 @@ spec: - 172.17.0.1.nip.io password: password port: '3306' - user: root \ No newline at end of file + user: root +--- +apiVersion: mongodb.amazee.io/v1 +kind: MongoDBProvider +metadata: + name: mongodbprovider-development +spec: + environment: development + hostname: mongodb.172.17.0.1.nip.io + password: password + port: '27017' + user: root + auth: + mechanism: SCRAM-SHA-1 + source: admin + tls: true +--- +apiVersion: mongodb.amazee.io/v1 +kind: MongoDBProvider +metadata: + name: mongodbprovider-production +spec: + environment: production + hostname: mongodb.172.17.0.1.nip.io + password: password + port: '27017' + user: root + auth: + mechanism: SCRAM-SHA-1 + source: admin + tls: true diff --git a/openshift-setup/dbaas-roles.yaml b/openshift-setup/dbaas-roles.yaml index 25f7b44b50..6181434471 100644 --- a/openshift-setup/dbaas-roles.yaml +++ b/openshift-setup/dbaas-roles.yaml @@ -23,4 +23,56 @@ metadata: rules: - apiGroups: ["mariadb.amazee.io"] resources: ["mariadbproviders"] - verbs: ["*"] \ No newline at end of file + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: mongodbconsumer-role + labels: + # Add these permissions to the "admin" and "edit" default roles. + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" +rules: +- apiGroups: ["mongodb.amazee.io"] + resources: ["mongodbconsumers"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: mongodbprovider-role + labels: + # Add these permissions to the "admin" and "edit" default roles. + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" +rules: +- apiGroups: ["mongodb.amazee.io"] + resources: ["mongodbproviders"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: postgresqlconsumer-role + labels: + # Add these permissions to the "admin" and "edit" default roles. + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" +rules: +- apiGroups: ["postgres.amazee.io"] + resources: ["postgresqlconsumers"] + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: postgresqlprovider-role + labels: + # Add these permissions to the "admin" and "edit" default roles. + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" +rules: +- apiGroups: ["postgres.amazee.io"] + resources: ["postgresqlproviders"] + verbs: ["*"] diff --git a/openshift-setup/dioscuri-operator.yaml b/openshift-setup/dioscuri-operator.yaml index e615808f56..7b8928729a 100644 --- a/openshift-setup/dioscuri-operator.yaml +++ b/openshift-setup/dioscuri-operator.yaml @@ -94,6 +94,186 @@ status: conditions: [] storedVersions: [] --- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: ingressmigrates.dioscuri.amazee.io +spec: + group: dioscuri.amazee.io + names: + kind: IngressMigrate + listKind: IngressMigrateList + plural: ingressmigrates + singular: ingressmigrate + scope: Namespaced + validation: + openAPIV3Schema: + description: IngressMigrate is the Schema for the ingressmigrates API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: IngressMigrateSpec defines the desired state of IngressMigrate + properties: + destinationNamespace: + description: Migrate is an example field of Migrate. Edit Migrate_types.go + to remove/update + type: string + ingress: + description: MigrateIngress . + properties: + activeIngress: + type: string + standbyIngress: + type: string + required: + - activeIngress + - standbyIngress + type: object + type: object + status: + description: IngressMigrateStatus defines the observed state of IngressMigrate + properties: + conditions: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + items: + description: IngressMigrateConditions defines the observed conditions + of the migrations + properties: + condition: + type: string + lastTransitionTime: + type: string + status: + type: string + type: + type: string + required: + - condition + - lastTransitionTime + - status + - type + type: object + type: array + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: hostmigrations.dioscuri.amazee.io +spec: + group: dioscuri.amazee.io + names: + kind: HostMigration + listKind: HostMigrationList + plural: hostmigrations + singular: hostmigration + scope: Namespaced + validation: + openAPIV3Schema: + description: HostMigration is the Schema for the hostmigrations API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: HostMigrationSpec defines the desired state of HostMigration + properties: + destinationNamespace: + description: Migrate is an example field of RouteMigrate. Edit RouteMigrate_types.go + to remove/update + type: string + hosts: + description: HostMigrationHosts . + properties: + activeHosts: + type: string + standbyHosts: + type: string + required: + - activeHosts + - standbyHosts + type: object + type: object + status: + description: HostMigrationStatus defines the observed state of RouteMigrate + properties: + conditions: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + items: + description: HostMigrationConditions defines the observed conditions + of the migrations + properties: + condition: + type: string + lastTransitionTime: + type: string + status: + type: string + type: + type: string + required: + - condition + - lastTransitionTime + - status + - type + type: object + type: array + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -141,6 +321,86 @@ rules: - get - list - watch +- apiGroups: + - '*' + resources: + - ingress/status + verbs: + - get + - patch + - update +- apiGroups: + - '*' + resources: + - ingresses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - '*' + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - '*' + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - '*' + resources: + - services + verbs: + - get + - list + - watch +- apiGroups: + - cert-manager.io + resources: + - certificates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dioscuri.amazee.io + resources: + - ingressmigrates + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dioscuri.amazee.io + resources: + - ingressmigrates/status + verbs: + - get + - patch + - update - apiGroups: - dioscuri.amazee.io resources: @@ -179,6 +439,26 @@ rules: - routes/custom-host verbs: - create +- apiGroups: + - dioscuri.amazee.io + resources: + - hostmigrations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - dioscuri.amazee.io + resources: + - hostmigrations/status + verbs: + - get + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -284,14 +564,15 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election + - --openshift command: - /manager - image: amazeeio/dioscuri:v0.1.4 + image: amazeeio/dioscuri:v0.1.8 name: manager resources: limits: cpu: 100m - memory: 30Mi + memory: 300Mi requests: cpu: 100m memory: 20Mi diff --git a/openshift-setup/dioscuri-roles.yaml b/openshift-setup/dioscuri-roles.yaml index 30cf9c7999..fb9b69cb70 100644 --- a/openshift-setup/dioscuri-roles.yaml +++ b/openshift-setup/dioscuri-roles.yaml @@ -10,4 +10,10 @@ metadata: rules: - apiGroups: ["dioscuri.amazee.io"] resources: ["routemigrates"] - verbs: ["*"] \ No newline at end of file + verbs: ["*"] +- apiGroups: ["dioscuri.amazee.io"] + resources: ["ingressmigrates"] + verbs: ["*"] +- apiGroups: ["dioscuri.amazee.io"] + resources: ["hostmigrations"] + verbs: ["*"] diff --git a/services/docker-host/docker-host.yaml b/openshift-setup/docker-host.yaml similarity index 100% rename from services/docker-host/docker-host.yaml rename to openshift-setup/docker-host.yaml diff --git a/openshift-setup/force-one-pod.yaml b/openshift-setup/force-one-pod.yaml index efb0063b4c..4385e8011b 100644 --- a/openshift-setup/force-one-pod.yaml +++ b/openshift-setup/force-one-pod.yaml @@ -128,6 +128,104 @@ spec: name: logs2microsoftteams targetCPUUtilizationPercentage: 80 +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: openshiftbuilddeploy +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: openshiftbuilddeploy + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: openshiftbuilddeploymonitor +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: openshiftbuilddeploymonitor + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: openshiftjobs +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: openshiftjobs + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: openshiftjobsmonitor +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: openshiftjobsmonitor + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: openshiftmisc +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: openshiftmisc + targetCPUUtilizationPercentage: 80 + +--- + apiVersion: autoscaling/v1 + kind: HorizontalPodAutoscaler + metadata: + name: kubernetesmisc + spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: kubernetesmisc + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: openshiftremove +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: openshiftremove + targetCPUUtilizationPercentage: 80 + --- apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler @@ -183,3 +281,87 @@ spec: kind: DeploymentConfig name: webhooks2tasks targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: kubernetesbuilddeploy +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: kubernetesbuilddeploy + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: kubernetesbuilddeploymonitor +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: kubernetesbuilddeploymonitor + targetCPUUtilizationPercentage: 80 + +--- + apiVersion: autoscaling/v1 + kind: HorizontalPodAutoscaler + metadata: + name: kubernetesjobs + spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: kubernetesjobs + targetCPUUtilizationPercentage: 80 + +--- + apiVersion: autoscaling/v1 + kind: HorizontalPodAutoscaler + metadata: + name: kubernetesjobsmonitor + spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: kubernetesjobsmonitor + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: kubernetesdeployqueue +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: kubernetesdeployqueue + targetCPUUtilizationPercentage: 80 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: kubernetesremove +spec: + maxReplicas: 1 + minReplicas: 1 + scaleTargetRef: + apiVersion: v1 + kind: DeploymentConfig + name: kubernetesremove + targetCPUUtilizationPercentage: 80 diff --git a/openshift-setup/lagoon-builddeploy-controller.yml b/openshift-setup/lagoon-builddeploy-controller.yml new file mode 100644 index 0000000000..8adc1a603c --- /dev/null +++ b/openshift-setup/lagoon-builddeploy-controller.yml @@ -0,0 +1,225 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: lagoon-build-deploy +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: lagoon-kbd-leader-election-role + namespace: lagoon-build-deploy +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: lagoon-kbd-manager-role +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - '*' +- apiGroups: + - lagoon.amazee.io + resources: + - lagoonbuilds + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lagoon.amazee.io + resources: + - lagoonbuilds/status + verbs: + - get + - patch + - update +- apiGroups: + - lagoon.amazee.io + resources: + - lagoontasks + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lagoon.amazee.io + resources: + - lagoontasks/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: lagoon-kbd-proxy-role +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: lagoon-kbd-leader-election-rolebinding + namespace: lagoon-build-deploy +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: lagoon-kbd-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: lagoon-build-deploy +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: lagoon-kbd-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: lagoon-kbd-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: lagoon-build-deploy +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: lagoon-kbd-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: lagoon-kbd-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: lagoon-build-deploy +--- +apiVersion: v1 +kind: Service +metadata: + labels: + control-plane: controller-manager + name: lagoon-kbd-controller-manager-metrics-service + namespace: lagoon-build-deploy +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + control-plane: controller-manager + name: lagoon-kbd-controller-manager + namespace: lagoon-build-deploy +spec: + replicas: 1 + selector: + matchLabels: + control-plane: controller-manager + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=10 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + - args: + - --metrics-addr=127.0.0.1:8080 + - --enable-leader-election + - --is-openshift + command: + - /manager + env: + - name: RABBITMQ_USERNAME + value: guest + - name: RABBITMQ_PASSWORD + value: guest + - name: RABBITMQ_HOSTNAME + value: 172.17.0.1:5672 + - name: LAGOON_TARGET_NAME + value: ci-local-openshift-os + - name: OVERRIDE_BUILD_DEPLOY_DIND_IMAGE + value: 172.17.0.1:5000/lagoon/oc-build-deploy-dind:latest + - name: CONTROLLER_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + image: amazeeio/lagoon-builddeploy:v0.1.7 + name: manager + resources: + limits: + cpu: 100m + memory: 300Mi + requests: + cpu: 100m + memory: 20Mi + terminationGracePeriodSeconds: 10 diff --git a/openshift-setup/lagoon-builddeploy-crd.yml b/openshift-setup/lagoon-builddeploy-crd.yml new file mode 100644 index 0000000000..14e376d13d --- /dev/null +++ b/openshift-setup/lagoon-builddeploy-crd.yml @@ -0,0 +1,856 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: lagoonbuilds.lagoon.amazee.io +spec: + group: lagoon.amazee.io + names: + kind: LagoonBuild + listKind: LagoonBuildList + plural: lagoonbuilds + singular: lagoonbuild + scope: Namespaced + validation: + openAPIV3Schema: + description: LagoonBuild is the Schema for the lagoonbuilds API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: LagoonBuildSpec defines the desired state of LagoonBuild + properties: + branch: + description: Branch contains the branch name used for a branch deployment. + properties: + name: + type: string + type: object + build: + description: Build contains the type of build, and the image to use + for the builder. + properties: + ci: + type: string + image: + type: string + type: + type: string + required: + - type + type: object + gitReference: + type: string + project: + description: Project contains the project information from lagoon. + properties: + deployTarget: + type: string + environment: + type: string + environmentType: + type: string + gitUrl: + type: string + key: + format: byte + type: string + monitoring: + description: Monitoring contains the monitoring information for + the project in Lagoon. + properties: + contact: + type: string + statuspageID: + type: string + type: object + name: + type: string + namespacePattern: + type: string + productionEnvironment: + type: string + projectSecret: + type: string + registry: + type: string + routerPattern: + type: string + standbyEnvironment: + type: string + subfolder: + type: string + uiLink: + type: string + variables: + description: Variables contains the project and environment variables + from lagoon. + properties: + environment: + format: byte + type: string + project: + format: byte + type: string + type: object + required: + - deployTarget + - environment + - environmentType + - gitUrl + - key + - monitoring + - name + - productionEnvironment + - projectSecret + - standbyEnvironment + - variables + type: object + promote: + description: Promote contains the information for a promote deployment. + properties: + sourceEnvironment: + type: string + sourceProject: + type: string + type: object + pullrequest: + description: Pullrequest contains the information for a pullrequest + deployment. + properties: + baseBranch: + type: string + baseSha: + type: string + headBranch: + type: string + headSha: + type: string + number: + type: string + title: + type: string + type: object + required: + - build + - gitReference + - project + type: object + status: + description: LagoonBuildStatus defines the observed state of LagoonBuild + properties: + conditions: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + items: + description: LagoonConditions defines the observed conditions of the + pods. + properties: + lastTransitionTime: + type: string + status: + type: string + type: + description: JobConditionType const for the status type + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + log: + format: byte + type: string + type: object + statusMessages: + description: LagoonStatusMessages is where unsent messages are stored for + re-sending. + properties: + buildLogMessage: + description: LagoonLog is used to sendToLagoonLogs messaging queue this + is general logging information + properties: + event: + type: string + message: + type: string + meta: + description: LagoonLogMeta is the metadata that is used by logging + in Lagoon. + properties: + advancedData: + type: string + branchName: + type: string + buildName: + type: string + buildPhase: + type: string + endTime: + type: string + environment: + type: string + jobName: + type: string + jobStatus: + type: string + key: + type: string + logLink: + type: string + monitoringUrls: + items: + type: string + type: array + project: + type: string + projectName: + type: string + remoteId: + type: string + route: + type: string + routes: + items: + type: string + type: array + services: + items: + type: string + type: array + startTime: + type: string + task: + description: LagoonTaskInfo defines what a task can use to communicate + with Lagoon via SSH/API. + properties: + apiHost: + type: string + command: + type: string + id: + type: string + name: + type: string + service: + type: string + sshHost: + type: string + sshPort: + type: string + required: + - id + type: object + type: object + project: + type: string + severity: + type: string + uuid: + type: string + type: object + environmentMessage: + description: LagoonMessage is used for sending build info back to Lagoon + messaging queue to update the environment or deployment + properties: + meta: + description: LagoonLogMeta is the metadata that is used by logging + in Lagoon. + properties: + advancedData: + type: string + branchName: + type: string + buildName: + type: string + buildPhase: + type: string + endTime: + type: string + environment: + type: string + jobName: + type: string + jobStatus: + type: string + key: + type: string + logLink: + type: string + monitoringUrls: + items: + type: string + type: array + project: + type: string + projectName: + type: string + remoteId: + type: string + route: + type: string + routes: + items: + type: string + type: array + services: + items: + type: string + type: array + startTime: + type: string + task: + description: LagoonTaskInfo defines what a task can use to communicate + with Lagoon via SSH/API. + properties: + apiHost: + type: string + command: + type: string + id: + type: string + name: + type: string + service: + type: string + sshHost: + type: string + sshPort: + type: string + required: + - id + type: object + type: object + namespace: + type: string + type: + type: string + type: object + statusMessage: + description: LagoonLog is used to sendToLagoonLogs messaging queue this + is general logging information + properties: + event: + type: string + message: + type: string + meta: + description: LagoonLogMeta is the metadata that is used by logging + in Lagoon. + properties: + advancedData: + type: string + branchName: + type: string + buildName: + type: string + buildPhase: + type: string + endTime: + type: string + environment: + type: string + jobName: + type: string + jobStatus: + type: string + key: + type: string + logLink: + type: string + monitoringUrls: + items: + type: string + type: array + project: + type: string + projectName: + type: string + remoteId: + type: string + route: + type: string + routes: + items: + type: string + type: array + services: + items: + type: string + type: array + startTime: + type: string + task: + description: LagoonTaskInfo defines what a task can use to communicate + with Lagoon via SSH/API. + properties: + apiHost: + type: string + command: + type: string + id: + type: string + name: + type: string + service: + type: string + sshHost: + type: string + sshPort: + type: string + required: + - id + type: object + type: object + project: + type: string + severity: + type: string + uuid: + type: string + type: object + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.4 + creationTimestamp: null + name: lagoontasks.lagoon.amazee.io +spec: + group: lagoon.amazee.io + names: + kind: LagoonTask + listKind: LagoonTaskList + plural: lagoontasks + singular: lagoontask + scope: Namespaced + validation: + openAPIV3Schema: + description: LagoonTask is the Schema for the lagoontasks API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: LagoonTaskSpec defines the desired state of LagoonTask + properties: + advancedTask: + description: LagoonAdvancedTaskInfo defines what an advanced task can + use for the creation of the pod. + properties: + JSONPayload: + type: string + runnerImage: + type: string + type: object + environment: + description: LagoonTaskEnvironment defines the lagoon environment information. + properties: + environmentType: + type: string + id: + type: string + name: + type: string + openshiftProjectName: + type: string + project: + type: string + required: + - environmentType + - id + - name + - openshiftProjectName + - project + type: object + key: + description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + Important: Run "make" to regenerate code after modifying this file' + type: string + misc: + description: LagoonMiscInfo defines the resource or backup information + for a misc task. + properties: + backup: + description: LagoonMiscBackupInfo defines the information for a + backup. + properties: + backupId: + type: string + id: + type: string + source: + type: string + required: + - backupId + - id + - source + type: object + id: + type: string + miscResource: + format: byte + type: string + name: + type: string + required: + - id + type: object + project: + description: LagoonTaskProject defines the lagoon project information. + properties: + id: + type: string + name: + type: string + required: + - id + - name + type: object + task: + description: LagoonTaskInfo defines what a task can use to communicate + with Lagoon via SSH/API. + properties: + apiHost: + type: string + command: + type: string + id: + type: string + name: + type: string + service: + type: string + sshHost: + type: string + sshPort: + type: string + required: + - id + type: object + type: object + status: + description: LagoonTaskStatus defines the observed state of LagoonTask + properties: + conditions: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + items: + description: LagoonConditions defines the observed conditions of the + pods. + properties: + lastTransitionTime: + type: string + status: + type: string + type: + description: JobConditionType const for the status type + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + log: + format: byte + type: string + type: object + statusMessages: + description: LagoonStatusMessages is where unsent messages are stored for + re-sending. + properties: + buildLogMessage: + description: LagoonLog is used to sendToLagoonLogs messaging queue this + is general logging information + properties: + event: + type: string + message: + type: string + meta: + description: LagoonLogMeta is the metadata that is used by logging + in Lagoon. + properties: + advancedData: + type: string + branchName: + type: string + buildName: + type: string + buildPhase: + type: string + endTime: + type: string + environment: + type: string + jobName: + type: string + jobStatus: + type: string + key: + type: string + logLink: + type: string + monitoringUrls: + items: + type: string + type: array + project: + type: string + projectName: + type: string + remoteId: + type: string + route: + type: string + routes: + items: + type: string + type: array + services: + items: + type: string + type: array + startTime: + type: string + task: + description: LagoonTaskInfo defines what a task can use to communicate + with Lagoon via SSH/API. + properties: + apiHost: + type: string + command: + type: string + id: + type: string + name: + type: string + service: + type: string + sshHost: + type: string + sshPort: + type: string + required: + - id + type: object + type: object + project: + type: string + severity: + type: string + uuid: + type: string + type: object + environmentMessage: + description: LagoonMessage is used for sending build info back to Lagoon + messaging queue to update the environment or deployment + properties: + meta: + description: LagoonLogMeta is the metadata that is used by logging + in Lagoon. + properties: + advancedData: + type: string + branchName: + type: string + buildName: + type: string + buildPhase: + type: string + endTime: + type: string + environment: + type: string + jobName: + type: string + jobStatus: + type: string + key: + type: string + logLink: + type: string + monitoringUrls: + items: + type: string + type: array + project: + type: string + projectName: + type: string + remoteId: + type: string + route: + type: string + routes: + items: + type: string + type: array + services: + items: + type: string + type: array + startTime: + type: string + task: + description: LagoonTaskInfo defines what a task can use to communicate + with Lagoon via SSH/API. + properties: + apiHost: + type: string + command: + type: string + id: + type: string + name: + type: string + service: + type: string + sshHost: + type: string + sshPort: + type: string + required: + - id + type: object + type: object + namespace: + type: string + type: + type: string + type: object + statusMessage: + description: LagoonLog is used to sendToLagoonLogs messaging queue this + is general logging information + properties: + event: + type: string + message: + type: string + meta: + description: LagoonLogMeta is the metadata that is used by logging + in Lagoon. + properties: + advancedData: + type: string + branchName: + type: string + buildName: + type: string + buildPhase: + type: string + endTime: + type: string + environment: + type: string + jobName: + type: string + jobStatus: + type: string + key: + type: string + logLink: + type: string + monitoringUrls: + items: + type: string + type: array + project: + type: string + projectName: + type: string + remoteId: + type: string + route: + type: string + routes: + items: + type: string + type: array + services: + items: + type: string + type: array + startTime: + type: string + task: + description: LagoonTaskInfo defines what a task can use to communicate + with Lagoon via SSH/API. + properties: + apiHost: + type: string + command: + type: string + id: + type: string + name: + type: string + service: + type: string + sshHost: + type: string + sshPort: + type: string + required: + - id + type: object + type: object + project: + type: string + severity: + type: string + uuid: + type: string + type: object + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/services/api-db/.lagoon.app.yml b/services/api-db/.lagoon.app.yml deleted file mode 100644 index bd68c60f69..0000000000 --- a/services/api-db/.lagoon.app.yml +++ /dev/null @@ -1,151 +0,0 @@ ---- -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-mariadb -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneline of Cronjobs - value: "" - - name: PERSISTENT_STORAGE_SIZE - description: Size of the Storage to request - value: "5Gi" - - name: ENVIRONMENT_TYPE - description: production level of this environment - value: 'production' -objects: -- apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - annotations: - appuio.ch/backup: "false" - name: ${SERVICE_NAME}-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: ${PERSISTENT_STORAGE_SIZE} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 3306-tcp - port: 3306 - protocol: TCP - targetPort: 3306 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - annotations: - appuio.ch/backupcommand: /bin/sh -c "mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --all-databases" - backup.appuio.ch/file-extension: .${SERVICE_NAME}.sql - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - volumes: - - name: ${SERVICE_NAME}-data - persistentVolumeClaim: - claimName: ${SERVICE_NAME}-data - priorityClassName: lagoon-priority-${ENVIRONMENT_TYPE} - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 3306 - protocol: TCP - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 15 - timeoutSeconds: 1 - livenessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 120 - periodSeconds: 5 - volumeMounts: - - name: ${SERVICE_NAME}-data - mountPath: /var/lib/mysql - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: api-db-password - key: API_DB_PASSWORD - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange \ No newline at end of file diff --git a/services/api-db/Dockerfile b/services/api-db/Dockerfile index f588759ba8..7286b087e6 100644 --- a/services/api-db/Dockerfile +++ b/services/api-db/Dockerfile @@ -1,5 +1,9 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/mariadb +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/mariadb:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION USER root RUN apk add --no-cache openssh-keygen diff --git a/services/api-db/docker-entrypoint-initdb.d/01-migrations.sql b/services/api-db/docker-entrypoint-initdb.d/01-migrations.sql index c50372dcc7..6b91b0e07b 100644 --- a/services/api-db/docker-entrypoint-initdb.d/01-migrations.sql +++ b/services/api-db/docker-entrypoint-initdb.d/01-migrations.sql @@ -314,7 +314,7 @@ CREATE OR REPLACE PROCEDURE ALTER TABLE `project` ADD `active_systems_promote` varchar(300); UPDATE project - SET active_systems_promote = 'lagoon_openshiftBuildDeploy'; + SET active_systems_promote = 'lagoon_controllerBuildDeploy'; END IF; END; $$ @@ -1161,10 +1161,19 @@ CREATE OR REPLACE PROCEDURE add_metadata_to_project() BEGIN - ALTER TABLE project - ADD metadata JSON DEFAULT '{}' CHECK (JSON_VALID(metadata)); - UPDATE project - SET metadata = '{}'; + IF NOT EXISTS( + SELECT NULL + FROM INFORMATION_SCHEMA.COLUMNS + WHERE + table_name = 'project' + AND table_schema = 'infrastructure' + AND column_name = 'metadata' + ) THEN + ALTER TABLE project + ADD metadata JSON DEFAULT '{}' CHECK (JSON_VALID(metadata)); + UPDATE project + SET metadata = '{}'; + END IF; END; $$ diff --git a/services/api-db/docker-entrypoint-initdb.d/03-procedures.sql b/services/api-db/docker-entrypoint-initdb.d/03-procedures.sql index 41d8ea7c20..ce1d7093a5 100644 --- a/services/api-db/docker-entrypoint-initdb.d/03-procedures.sql +++ b/services/api-db/docker-entrypoint-initdb.d/03-procedures.sql @@ -212,7 +212,8 @@ CREATE OR REPLACE PROCEDURE ( IN environment int, IN persistent_storage_claim varchar(100), - IN bytes_used bigint + IN bytes_used bigint, + IN updated date ) BEGIN INSERT INTO environment_storage ( @@ -224,7 +225,7 @@ CREATE OR REPLACE PROCEDURE environment, persistent_storage_claim, bytes_used, - DATE(NOW()) + updated ) ON DUPLICATE KEY UPDATE bytes_used=bytes_used; @@ -234,7 +235,7 @@ CREATE OR REPLACE PROCEDURE FROM environment_storage es WHERE es.environment = environment AND es.persistent_storage_claim = persistent_storage_claim AND - es.updated = DATE(NOW()); + es.updated = updated; END; $$ diff --git a/services/api-redis/.lagoon.app.yml b/services/api-redis/.lagoon.app.yml deleted file mode 100644 index e4ec8adba4..0000000000 --- a/services/api-redis/.lagoon.app.yml +++ /dev/null @@ -1,130 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-redis -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" - - name: ENVIRONMENT_TYPE - description: production level of this environment - value: 'production' - - name: CONFIG_MAP_SHA - description: SHA sum of the configmap - value: '' -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - annotations: - lagoon.sh/configMapSha: ${CONFIG_MAP_SHA} - spec: - priorityClassName: lagoon-priority-${ENVIRONMENT_TYPE} - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 6379 - protocol: TCP - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 15 - timeoutSeconds: 1 - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 120 - periodSeconds: 10 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: api-redis-password - key: API_REDIS_PASSWORD - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 6379-tcp - port: 6379 - protocol: TCP - targetPort: 6379 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} diff --git a/services/api-redis/Dockerfile b/services/api-redis/Dockerfile index 3392398948..8e93d568a1 100644 --- a/services/api-redis/Dockerfile +++ b/services/api-redis/Dockerfile @@ -1,4 +1,8 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/redis +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/redis-5:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION ENV REDIS_PASSWORD=admin \ No newline at end of file diff --git a/services/api/.lagoon.app.yml b/services/api/.lagoon.app.yml deleted file mode 100644 index 005463723f..0000000000 --- a/services/api/.lagoon.app.yml +++ /dev/null @@ -1,191 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 3000 - protocol: TCP - readinessProbe: - httpGet: - path: /status - port: 3000 - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 1 - livenessProbe: - httpGet: - path: /status - port: 3000 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 1 - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: KEYCLOAK_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: keycloak-admin-password - key: KEYCLOAK_ADMIN_PASSWORD - - name: KEYCLOAK_API_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: keycloak-api-client-secret - key: KEYCLOAK_API_CLIENT_SECRET - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: harbor-admin-password - key: HARBOR_ADMIN_PASSWORD - - name: API_DB_PASSWORD - valueFrom: - secretKeyRef: - name: api-db-password - key: API_DB_PASSWORD - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: api-redis-password - key: API_REDIS_PASSWORD - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 3000-tcp - port: 3000 - protocol: TCP - targetPort: 3000 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: Route - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - host: ${SERVICE_ROUTER_URL} - port: - targetPort: 3000-tcp - to: - kind: Service - name: ${SERVICE_NAME} \ No newline at end of file diff --git a/services/api/Dockerfile b/services/api/Dockerfile index ec502a4cd3..a35cc8e303 100644 --- a/services/api/Dockerfile +++ b/services/api/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app @@ -28,7 +33,7 @@ ENV NODE_ENV=production \ ELASTICSEARCH_HOST=logs-db-service:9200 \ ELASTICSEARCH_URL=http://logs-db-service:9200 \ KEYCLOAK_API_CLIENT_SECRET=39d5282d-3684-4026-b4ed-04bbc034b61a \ - HARBOR_ADMIN_PASSWORD=admin \ + HARBOR_ADMIN_PASSWORD=Harbor12345 \ REDIS_PASSWORD=admin \ HARBOR_API_VERSION=v2.0 diff --git a/services/api/package.json b/services/api/package.json index b9266c048d..614272e759 100644 --- a/services/api/package.json +++ b/services/api/package.json @@ -13,7 +13,7 @@ "test:watch": "jest --forceExit --detectOpenHandles --maxWorkers=10 --watch", "build": "tsc --build", "start": "node -r dotenv-extended/config dist/index", - "dev": "mkdir -p ../../node-packages/commons/dist && NODE_ENV=development nodemon", + "dev": "NODE_ENV=development nodemon", "sync:gitlab:users": "node dist/gitlab-sync/users", "sync:gitlab:groups": "node dist/gitlab-sync/groups", "sync:gitlab:projects": "node dist/gitlab-sync/projects", diff --git a/services/api/src/apolloServer.js b/services/api/src/apolloServer.js index b0ab7b474c..321a769920 100644 --- a/services/api/src/apolloServer.js +++ b/services/api/src/apolloServer.js @@ -14,6 +14,7 @@ const { keycloakHasPermission } = require('./util/auth'); const { getSqlClient } = require('./clients/sqlClient'); +const esClient = require('./clients/esClient'); const redisClient = require('./clients/redisClient'); const { getKeycloakAdminClient } = require('./clients/keycloak-admin'); const logger = require('./logger'); @@ -84,16 +85,17 @@ const apolloServer = new ApolloServer({ requestCache, models: { UserModel: User.User({ keycloakAdminClient, redisClient }), - GroupModel: Group.Group({ keycloakAdminClient, sqlClient, redisClient }), + GroupModel: Group.Group({ keycloakAdminClient, sqlClient, redisClient, esClient }), BillingModel: BillingModel.BillingModel({ keycloakAdminClient, - sqlClient + sqlClient, + esClient }), ProjectModel: ProjectModel.ProjectModel({ keycloakAdminClient, sqlClient }), - EnvironmentModel: EnvironmentModel.EnvironmentModel({ sqlClient }) + EnvironmentModel: EnvironmentModel.EnvironmentModel({ sqlClient, esClient }) } }; }, @@ -139,10 +141,11 @@ const apolloServer = new ApolloServer({ requestCache, models: { UserModel: User.User({ keycloakAdminClient, redisClient }), - GroupModel: Group.Group({ keycloakAdminClient, sqlClient, redisClient }), + GroupModel: Group.Group({ keycloakAdminClient, sqlClient, redisClient, esClient }), BillingModel: BillingModel.BillingModel({ keycloakAdminClient, - sqlClient + sqlClient, + esClient }), ProjectModel: ProjectModel.ProjectModel({ keycloakAdminClient, @@ -150,7 +153,8 @@ const apolloServer = new ApolloServer({ }), EnvironmentModel: EnvironmentModel.EnvironmentModel({ keycloakAdminClient, - sqlClient + sqlClient, + esClient }) } }; diff --git a/services/api/src/bitbucket-sync/repo-permissions.ts b/services/api/src/bitbucket-sync/repo-permissions.ts index c35d73f270..60a24ea766 100644 --- a/services/api/src/bitbucket-sync/repo-permissions.ts +++ b/services/api/src/bitbucket-sync/repo-permissions.ts @@ -13,7 +13,7 @@ const LAGOON_SYNC_GROUP = R.propOr( interface BitbucketUser { name: string; displayName: string; - emailAddress: string; + emailAddress?: string; id: number; } @@ -90,9 +90,14 @@ const getBitbucketRepo = async (gitUrl: string, projectName: string) => { let userPermissions = []; try { - userPermissions = await bitbucketApi.getRepoUsers(bbProject, bbRepo); + const permissions = await bitbucketApi.getRepoUsers(bbProject, bbRepo); + + // Useres w/o an email address were deleted/deactivated, but somehow + // still returned in the API + // @ts-ignore + userPermissions = R.filter(R.propSatisfies(R.has('emailAddress'), 'user'), permissions); } catch (e) { - logger.warn(`Could not load users for repo: ${R.prop('slug', repo)}`); + logger.warn(`Could not load users for repo ${R.prop('slug', repo)}: ${e.message}`); continue; } @@ -101,19 +106,19 @@ const getBitbucketRepo = async (gitUrl: string, projectName: string) => { const bbUser = userPermission.user as BitbucketUser; const bbPerm = userPermission.permission; - const email = bbUser.emailAddress.toLowerCase(); + try { + const email = bbUser.emailAddress.toLowerCase(); - if (!R.contains(email, existingUsers)) { - const userAddedOrExists = await addUser(email); - if (!userAddedOrExists) { - // Errors for this case are logged in addUser - continue; - } + if (!R.contains(email, existingUsers)) { + const userAddedOrExists = await addUser(email); + if (!userAddedOrExists) { + // Errors for this case are logged in addUser + continue; + } - existingUsers.push(email); - } + existingUsers.push(email); + } - try { await api.addUserToGroup( email, lagoonProjectGroup, @@ -121,7 +126,7 @@ const getBitbucketRepo = async (gitUrl: string, projectName: string) => { ); } catch (err) { logger.error( - `Could not add user (${email}) to group (${lagoonProjectGroup}): ${err.message}` + `Could not add user (${bbUser.name}) to group (${lagoonProjectGroup}): ${err.message}` ); } } diff --git a/services/api/src/clients/harborClient.js b/services/api/src/clients/harborClient.js index 852fa35ad2..93ffd07c68 100644 --- a/services/api/src/clients/harborClient.js +++ b/services/api/src/clients/harborClient.js @@ -3,7 +3,7 @@ const R = require('ramda'); const { HARBOR_ADMIN_PASSWORD } = process.env; -const defaultHarborUrl = R.propOr('http://172.17.0.1:8084', 'HARBOR_URL', process.env); +const defaultHarborUrl = R.propOr('http://harbor-harbor-core.harbor.svc.cluster.local:80', 'HARBOR_URL', process.env); const lagoonHarborRoute = R.compose( R.defaultTo(defaultHarborUrl), @@ -18,7 +18,7 @@ const apiVersion = R.propOr('v2.0', 'HARBOR_API_VERSION', process.env); const harborClient = got.extend({ baseUrl: `${lagoonHarborRoute}/api/${apiVersion ? apiVersion.concat('/') : '' }`, json: true, - auth: `admin:${HARBOR_ADMIN_PASSWORD || 'admin'}`, + auth: `admin:${HARBOR_ADMIN_PASSWORD || 'Harbor12345'}`, }); module.exports = harborClient; \ No newline at end of file diff --git a/services/api/src/helpers/sync-groups-opendistro-security.ts b/services/api/src/helpers/sync-groups-opendistro-security.ts index 0903cd9824..7f0e75628a 100755 --- a/services/api/src/helpers/sync-groups-opendistro-security.ts +++ b/services/api/src/helpers/sync-groups-opendistro-security.ts @@ -10,6 +10,8 @@ import { getKeycloakAdminClient } from '../clients/keycloak-admin'; const sqlClient = getSqlClient(); const GroupModel = Group({ keycloakAdminClient }); + const groupRegex = process.env.GROUP_REGEX ? new RegExp(process.env.GROUP_REGEX) : /.*/; + const allGroups = await GroupModel.loadAllGroups(); let groupsQueue = (allGroups as Group[]).map(group => ({ group, @@ -20,6 +22,12 @@ import { getKeycloakAdminClient } from '../clients/keycloak-admin'; while (groupsQueue.length > 0) { const { group, retries } = groupsQueue.shift(); + + if (!R.test(groupRegex, group.name)) { + logger.info(`Skipping ${group.name}`); + continue; + } + try { logger.debug(`Processing ${group.name}`); const projectIdsArray = await GroupModel.getProjectsFromGroupAndSubgroups(group) diff --git a/services/api/src/migrations/2-harbor/harborSync.ts b/services/api/src/migrations/2-harbor/harborSync.ts index 14f517a571..b987927922 100644 --- a/services/api/src/migrations/2-harbor/harborSync.ts +++ b/services/api/src/migrations/2-harbor/harborSync.ts @@ -5,7 +5,7 @@ import { createHarborOperations } from '../../resources/project/harborSetup'; import { Helpers as projectHelpers } from '../../resources/project/helpers'; import { query, prepare } from '../../util/db'; -const defaultHarborUrl = R.propOr('http://172.17.0.1:8084', 'HARBOR_URL', process.env); +const defaultHarborUrl = R.propOr('http://harbor-harbor-core.harbor.svc.cluster.local:80', 'HARBOR_URL', process.env); const lagoonHarborRoute = R.compose( R.defaultTo(defaultHarborUrl), diff --git a/services/api/src/mocks.js b/services/api/src/mocks.js index c0f0c24cc1..64e2382954 100644 --- a/services/api/src/mocks.js +++ b/services/api/src/mocks.js @@ -224,10 +224,10 @@ MIIJKQIBAAKCAgEA+o[...]P0yoL8BoQQG2jCvYfWh6vyglQdrDYx/o6/8ecTwXokKKh6fg1q -----END RSA PRIVATE KEY-----`, subfolder: '', notifications: [mocks.Notification()], - activeSystemsDeploy: 'lagoon_openshiftBuildDeploy', - activeSystemsPromote: 'lagoon_openshiftBuildDeploy', - activeSystemsRemove: 'lagoon_openshiftRemove', - activeSystemsTask: 'lagoon_openshiftJob', + activeSystemsDeploy: 'lagoon_controllerBuildDeploy', + activeSystemsPromote: 'lagoon_controllerBuildDeploy', + activeSystemsRemove: 'lagoon_controllerRemove', + activeSystemsTask: 'lagoon_controllerJob', branches: faker.random.arrayElement(['true', 'false', '^(master|staging)$']), pullrequests: faker.random.arrayElement(['true', 'false', '[BUILD]']), productionEnvironment: 'master', diff --git a/services/api/src/models/environment.test.ts b/services/api/src/models/environment.test.ts new file mode 100644 index 0000000000..d2ccc1878d --- /dev/null +++ b/services/api/src/models/environment.test.ts @@ -0,0 +1,189 @@ +import { EnvironmentModel } from "./environment"; + +import aLegacy from "./mockHitDataLegacy-project-a.json"; +import aLegacyMissingData from "./mockHitDataLegacy-project-a-missing-data.json"; +import bNew from "./mockHitDataNew-project-b.json"; +import bNewMissingData from "./mockHitDataNew-project-b-missing-data.json"; +import cLegacyPartial from "./mockHitDataLegacy-project-c.json"; +import cNewPartial from "./mockHitDataNew-project-c.json" + + +import legacyData from "./legacy.json"; +import newData from "./new.json"; + +import esClient from '../clients/esClient'; + +const zeroOutBuckets = (mockResult) => { + return { + ...mockResult, + hits: { total: {value : 0 }}, + aggregations: { + hourly : { + buckets : mockResult.aggregations.hourly.buckets.map(bucket => ({ + ...bucket, + count: { value: 0 } + })) + }, + average : { + value : 0 + } + } + } +} + + +const legacyHitsMonthByEnvironmentId = (result) => { + + // 0 hits found in elasticsearch, don't even try to generate monthly counts + if (result.hits.total.value === 0) { + return { total: 0 }; + } + + var total = 0; + + // loop through all hourly sum counts + // if the sum count is empty, this means we have missing data and we use the overall average instead. + result.aggregations.hourly.buckets.forEach(bucket => { + total += (bucket.count.value === 0 ? parseInt(result.aggregations.average.value) : bucket.count.value); + }); + + return { total }; +}; + + + +// Unit Under Test +describe('Environment Data', () => { + + describe('Hits', () => { + + it('When calculating hits, it should match legacy numbers #calculations', async () => { + + const environmentModel = EnvironmentModel({esClient}); + + const legacyCalculations = legacyHitsMonthByEnvironmentId(legacyData); + const newCalculations = environmentModel.calculateHitsFromESData(legacyData, newData) + + console.log(`legacy: ${legacyCalculations.total} new: ${newCalculations.total}`) + + expect(newCalculations.total).toBe(legacyCalculations.total); + }) + + // scenarios and expectation + it('When using the legacy logging system, with all Sept hourly buckets total set to 10, then the hits should be 7200 #legacy #logging', async () => { + // Arrange + const environmentModel = EnvironmentModel({esClient}); + const openshiftProjectName = "test-legacy-prod"; + const month = "2020-09" + const projectName = "test-legacy" + esClient.search = async (obj) => { + // new query request - return empty object + if(obj.index === `router-logs-${projectName}-_-*`){ + return zeroOutBuckets(aLegacy); + } + return aLegacy; + } + + // Act + const hits = await environmentModel.environmentHitsMonthByEnvironmentId(projectName, openshiftProjectName, month); + + // Assert + expect(hits.total).toBe(7200); + }); + + // scenarios and expectation + it('When using the legacy logging system, with missing data (20 Sept hourly buckets set to zero) (720 total buckets set to 10), then the hits should be 7200 #legacy #logging #missing-data', async () => { + // Arrange + const environmentModel = EnvironmentModel({esClient}); + const openshiftProjectName = "test-legacy-prod"; + const month = "2020-09" + const projectName = "test-legacy" + esClient.search = async (obj) => { + // new query request - return empty object + if(obj.index === `router-logs-${projectName}-_-*`){ + return zeroOutBuckets(aLegacyMissingData); + } + return aLegacyMissingData; + } + + // Act + const hits = await environmentModel.environmentHitsMonthByEnvironmentId(projectName, openshiftProjectName, month); + + // Assert + expect(hits.total).toBe(7200); + }); + + // scenarios and expectation + it('When using the new logging system, with all Sept 2020 hourly buckets total set to 2, then the hits should be 1440 #new #logging', async () => { + // Arrange + const environmentModel = EnvironmentModel({esClient}); + const openshiftProjectName = "test-prod"; + const month = "2020-09" + const projectName = "test" + esClient.search = async (obj) => { + // legacy query request - return empty object + if(obj.index === `router-logs-${openshiftProjectName}-*`){ + return zeroOutBuckets(bNew); + } + return bNew; + } + + // Act + const hits = await environmentModel.environmentHitsMonthByEnvironmentId(projectName, openshiftProjectName, month); + + // Assert + expect(hits.total).toBe(1440); + }); + + // scenarios and expectation + it('When using the new logging system, with missing data, (20 Sept hourly buckets set to zero) (720 total buckets set to 2), then the hits should be 1440 #new #logging #missing-data', async () => { + // Arrange + const environmentModel = EnvironmentModel({esClient}); + const openshiftProjectName = "test-prod"; + const month = "2020-09" + const projectName = "test" + esClient.search = async (obj) => { + // legacy query request - return empty object + if(obj.index === `router-logs-${openshiftProjectName}-*`){ + return zeroOutBuckets(bNewMissingData); + } + return bNewMissingData; + } + + // Act + const hits = await environmentModel.environmentHitsMonthByEnvironmentId(projectName, openshiftProjectName, month); + + // Assert + expect(hits.total).toBe(1440); + }); + + + // scenarios and expectation + it('When a project uses both the new and legacy logging system, then the hits should be 7200 #partial #new #legacy #logging', async () => { + // Arrange + const openshiftProjectName = "test-partial-prod"; + esClient.search = async (obj) => { + if (obj.index === `router-logs-${openshiftProjectName}-*`){ + return cLegacyPartial; + } + if (obj.index === `router-logs-${projectName}-_-*`){ + return cNewPartial; + } + return {} + } + const environmentModel = EnvironmentModel({esClient}); + const month = "2020-09" + const projectName = "test" + + // Act + const hits = await environmentModel.environmentHitsMonthByEnvironmentId(projectName, openshiftProjectName, month); + + // Assert + expect(hits.total).toBe(7200); + }); + + + + }); + +}); // End Unit Under Test \ No newline at end of file diff --git a/services/api/src/models/environment.ts b/services/api/src/models/environment.ts index 36326ee14f..7b74ca4f77 100644 --- a/services/api/src/models/environment.ts +++ b/services/api/src/models/environment.ts @@ -1,6 +1,5 @@ import moment from 'moment'; -import esClient from '../clients/esClient'; import { prepare, query } from '../util/db'; import * as logger from '../logger'; @@ -35,13 +34,14 @@ interface EnvironmentData { type projectEnvWithDataType = ( pid: string, + projectName: string, month: string, ) => Promise; export const EnvironmentModel = (clients) => { - const { sqlClient } = clients; + const { sqlClient, esClient } = clients; /** * Get all environments for a project. @@ -78,7 +78,7 @@ export const EnvironmentModel = (clients) => { // Needed for local Dev - Required if not connected to openshift const errorCatcherFn = (msg, responseObj) => err => { - const errMsg = err && err.status && err.message ? `${err.status} : ${err.message}` : `err undefined`; + const errMsg = err && err.status && err.message ? `${err.status} : ${err.message} : ${err.headers} : ${err.url}` : `err undefined`; logger.error(`${msg}: ${errMsg}`); return { ...responseObj }; }; @@ -95,9 +95,10 @@ export const EnvironmentModel = (clients) => { const environmentData = async ( eid: number, month: string, + project: string, openshiftProjectName: string, ) => { - const hits = await environmentHitsMonthByEnvironmentId(openshiftProjectName, month) + const hits = await environmentHitsMonthByEnvironmentId(project, openshiftProjectName, month) .catch(errorCatcherFn(`getHits - openShiftProjectName: ${openshiftProjectName} month: ${month}`, { total: 0 })); const storage = await environmentStorageMonthByEnvironmentId(eid, month) @@ -119,6 +120,7 @@ export const EnvironmentModel = (clients) => { */ const projectEnvironmentsWithData: projectEnvWithDataType = async ( pid, + projectName, month, ) => { const environments = await projectEnvironments(pid, null, true); @@ -131,7 +133,7 @@ export const EnvironmentModel = (clients) => { eid, type, data: { - ...(await environmentData(eid, month, openshift)), + ...(await environmentData(eid, month, projectName, openshift)), }, }); const data = await Promise.all(environments.map(environmentDataFn)); @@ -251,32 +253,10 @@ export const EnvironmentModel = (clients) => { return { month, hours }; }; - const environmentHitsMonthByEnvironmentId = async ( - openshiftProjectName, - yearMonth, - ) => { - const interested_date = yearMonth ? new Date(yearMonth) : new Date(); - const year = interested_date.getUTCFullYear(); - const month = interested_date.getUTCMonth() + 1; // internally months start with 0, we need them with 1 - - // This generates YYYY-MM - const interested_year_month = `${year}-${month < 10 ? `0${month}` : month}`; - - // generate a string of the date on the very first second of the month - const interested_date_begin_string = interested_date.toISOString(); - - // generate a string of the date on the very last second of the month - const interested_date_end = interested_date; - interested_date_end.setUTCMonth(interested_date.getUTCMonth() + 1) - interested_date_end.setUTCDate(0); // setting the date to 0 will select 1 day before the actual date - interested_date_end.setUTCHours(23); - interested_date_end.setUTCMinutes(59); - interested_date_end.setUTCSeconds(59); - interested_date_end.setUTCMilliseconds(999); - const interested_date_end_string = interested_date_end.toISOString(); - + const fetchElasticSearchHitsData = async (project, openshiftProjectName, interestedYearMonth, interestedDateBeginString, interestedDateEndString) => { try { - const result = await esClient.search({ + // LEGACY LOGGING SYSTEM - REMOVE ONCE WE MIGRATE EVERYTHING TO THE NEW SYSTEM + const legacyQuery = { index: `router-logs-${openshiftProjectName}-*`, body: { "size": 0, @@ -286,8 +266,8 @@ export const EnvironmentModel = (clients) => { { "range": { "@timestamp": { - "gte": `${interested_year_month}||/M`, - "lte": `${interested_year_month}||/M`, + "gte": `${interestedYearMonth}||/M`, + "lte": `${interestedYearMonth}||/M`, "format": "strict_year_month" } } @@ -296,10 +276,24 @@ export const EnvironmentModel = (clients) => { "must_not": [ { "match_phrase": { - "request_header_useragent": { + "request_header_useragent": { // Legacy Logging - OpenShift Router: Exclude requests from StatusCake "query": "StatusCake" } } + }, + { + "match_phrase": { + "request_header_useragent": { // Legacy Logging - OpenShift Router: Exclude requests from UptimeRobot + "query": "UptimeRobot" + } + } + }, + { + "match_phrase": { + "http_request": { // Legacy Logging - OpenShift Router: Exclude requests to acme challenges + "query": "acme-challenge" + } + } } ] } @@ -311,8 +305,8 @@ export const EnvironmentModel = (clients) => { "fixed_interval": "1h", "min_doc_count": 0, "extended_bounds": { - "min": interested_date_begin_string, - "max": interested_date_end_string + "min": interestedDateBeginString, + "max": interestedDateEndString } }, "aggs": { @@ -331,37 +325,214 @@ export const EnvironmentModel = (clients) => { } } }, - }); + }; + const legacyResult = await esClient.search(legacyQuery); - // 0 hits found in elasticsearch, don't even try to generate monthly counts - if (result.hits.total.value === 0) { - return { total: 0 }; - } - - var total = 0; - - // loop through all hourly sum counts - // if the sum count is empty, this means we have missing data and we use the overall average instead. - result.aggregations.hourly.buckets.forEach(bucket => { - total += (bucket.count.value === 0 ? parseInt(result.aggregations.average.value) : bucket.count.value); - }); + // NEW LOGGING SYSTEM - K8S openshift/HAProxy && kubernetes Nginx/kubernetes logs + const newQuery = { + index: `router-logs-${project}-_-*`, + body: { + "size": 0, + "query": { + "bool": { + "must": [ + { + "range": { + "@timestamp": { + "gte": `${interestedYearMonth}||/M`, + "lte": `${interestedYearMonth}||/M`, + "format": "strict_year_month" + } + } + }, + { + "match_phrase": { "kubernetes.namespace_name": `${openshiftProjectName}` } + } + ], + "must_not": [ + { + "match_phrase": { + "http_user_agent": { // New Logging - Kubernetes Ingress: Exclude requests from Statuscake + "query": "StatusCake" + } + } + }, + { + "match_phrase": { + "http_user_agent": { // New Logging - Kubernetes Ingress: Exclude requests from UptimeRobot + "query": "UptimeRobot" + } + } + }, + { + "match_phrase": { + "request_user_agent": { // New Logging - OpenShift Router: Exclude requests from Statuscake + "query": "StatusCake" + } + } + }, + { + "match_phrase": { + "request_user_agent": { // New Logging - OpenShift Router: Exclude requests from UptimeRobot + "query": "UptimeRobot" + } + } + }, + { + "match_phrase": { + "request_uri": { // New Logging - Kubernetes Ingress: Exclude requests to acme challenges + "query": "acme-challenge" + } + } + }, + { + "match_phrase": { + "http_request": { // New Logging - OpenShift Router: Exclude requests to acme challenges + "query": "acme-challenge" + } + } + } + ] + } + }, + "aggs": { + "hourly": { + "date_histogram": { + "field": "@timestamp", + "fixed_interval": "1h", + "min_doc_count": 0, + "extended_bounds": { + "min": interestedDateBeginString, + "max": interestedDateEndString + } + }, + "aggs": { + "count": { + "value_count": { + "field": "@timestamp" + } + } + } + }, + "average": { + "avg_bucket": { + "buckets_path": "hourly>count", + "gap_policy": "skip" // makes sure that we don't use empty buckets as average calculation + } + } + } + }, + }; + const newResult = await esClient.search(newQuery); - return { total }; + return {newResult, legacyResult}; } catch (e) { logger.error(`Elastic Search Query Error: ${JSON.stringify(e)}`); - const noHits = { total: 0 }; + // const noHits = { total: 0 }; - if(e.body === "Open Distro Security not initialized."){ - return noHits; - } + // if(e.body === "Open Distro Security not initialized."){ + // return noHits; + // } - if (e.body && e.body.error && e.body.error.type && (e.body.error.type === 'index_not_found_exception' || e.body.error.type === 'security_exception')) { - return noHits; - } + // if (e.body && e.body.error && e.body.error.type && (e.body.error.type === 'index_not_found_exception' || e.body.error.type === 'security_exception')) { + // return noHits; + // } + + return { newResult: null, legacyResult: null } throw e; } + } + + const calculateHitsFromESData = (legacyResult, newResult) => { + + // 0 hits found in elasticsearch, don't even try to generate monthly counts + if (legacyResult.hits.total.value === 0 && newResult.hits.total.value === 0) { + return { total: 0 }; + } + + var total = 0; + + const legacyBuckets = legacyResult && legacyResult.aggregations && legacyResult.aggregations.hourly && legacyResult.aggregations.hourly.buckets ? legacyResult.aggregations.hourly.buckets : 0; + const legacyResultCount = legacyResult && legacyResult.aggregations && legacyResult.aggregations.hourly && legacyResult.aggregations.hourly.buckets && legacyResult.aggregations.hourly.buckets.length ? legacyResult.aggregations.hourly.buckets.length : 0; + const legacyAvg = legacyResult && legacyResult.aggregations && legacyResult.aggregations.average && legacyResult.aggregations.average.value ? parseInt(legacyResult.aggregations.average.value) : 0; + + const newBuckets = newResult && newResult.aggregations && newResult.aggregations.hourly && newResult.aggregations.hourly.buckets ? newResult.aggregations.hourly.buckets : 0; + const newResultCount = newResult && newResult.aggregations && newResult.aggregations.hourly && newResult.aggregations.hourly.buckets && newResult.aggregations.hourly.buckets.length ? newResult.aggregations.hourly.buckets.length : 0; + const newAvg = newResult && newResult.aggregations && newResult.aggregations.average && newResult.aggregations.average.value ? parseInt(newResult.aggregations.average.value) : 0; + + + /* + foreach hourlybucket (#both result buckets should have the exact same amount of buckets) + add to total + if newResult.bucketcount is not 0 use newResult.bucketcount + if legacyResult.bucketcount is not 0 use legacyResult.bucketcount + if newResult.bucketcount is 0 and legacyResult.bucketcount is 0 + --> if newResult.average is not 0, use newResult.average + --> if legacyResult.average is not 0, use legacyResult.average + --> if both are 0, use newResult.average + */ + + const count = newResultCount > 0 ? newResultCount : legacyResultCount; + for (let i = 0; i < count; i++) { + if (newResultCount !== 0 && newBuckets[i] && newBuckets[i].count && newBuckets[i].count.value !== 0){ + // We have new logging data, use this for total + total += newBuckets[i].count.value; + }else if (legacyResultCount !== 0 && legacyBuckets[i] && legacyBuckets[i].count && legacyBuckets[i].count.value !== 0){ + // We have legacy data + total += legacyBuckets[i].count.value; + }else{ + // Both legacy and new logging buckets are zero, meaning we have missing data, use the avg + if(newAvg !== 0 && newAvg > legacyAvg){ + total += newAvg; + }else if (legacyAvg !== 0){ + total += legacyAvg; + }else{ + total += newAvg; + } + } + } + + return { total }; + } + + + const environmentHitsMonthByEnvironmentId = async ( + project, + openshiftProjectName, + yearMonth, + ) => { + + const interestedDate = yearMonth ? new Date(yearMonth) : new Date(); + const year = interestedDate.getUTCFullYear(); + const month = interestedDate.getUTCMonth() + 1; // internally months start with 0, we need them with 1 + + // This generates YYYY-MM + const interestedYearMonth = `${year}-${month < 10 ? `0${month}` : month}`; + + // generate a string of the date on the very first second of the month + const interestedDateBeginString = interestedDate.toISOString(); + + // generate a string of the date on the very last second of the month + const interestedDateEnd = interestedDate; + interestedDateEnd.setUTCMonth(interestedDate.getUTCMonth() + 1) + interestedDateEnd.setUTCDate(0); // setting the date to 0 will select 1 day before the actual date + interestedDateEnd.setUTCHours(23); + interestedDateEnd.setUTCMinutes(59); + interestedDateEnd.setUTCSeconds(59); + interestedDateEnd.setUTCMilliseconds(999); + const interestedDateEndString = interestedDateEnd.toISOString(); + + const {newResult, legacyResult} = await fetchElasticSearchHitsData(project.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'), openshiftProjectName, interestedYearMonth, interestedDateBeginString, interestedDateEndString) + + if ( newResult === null || legacyResult === null ){ + return { total: 0 } + } + + const result = calculateHitsFromESData(legacyResult, newResult); + + return result; }; return { @@ -372,6 +543,7 @@ export const EnvironmentModel = (clients) => { environmentStorageMonthByEnvironmentId, environmentHoursMonthByEnvironmentId, environmentHitsMonthByEnvironmentId, + calculateHitsFromESData } } diff --git a/services/api/src/models/legacy.json b/services/api/src/models/legacy.json new file mode 100644 index 0000000000..c482934545 --- /dev/null +++ b/services/api/src/models/legacy.json @@ -0,0 +1,5979 @@ +{ + "took" : 6, + "timed_out" : false, + "_shards" : { + "total" : 1, + "successful" : 1, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 10000, + "relation" : "gte" + }, + "max_score" : null, + "hits" : [ ] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-10-01T00:00:00.000Z", + "key" : 1601510400000, + "doc_count" : 2356, + "count" : { + "value" : 2356 + } + }, + { + "key_as_string" : "2020-10-01T01:00:00.000Z", + "key" : 1601514000000, + "doc_count" : 3034, + "count" : { + "value" : 3034 + } + }, + { + "key_as_string" : "2020-10-01T02:00:00.000Z", + "key" : 1601517600000, + "doc_count" : 3729, + "count" : { + "value" : 3729 + } + }, + { + "key_as_string" : "2020-10-01T03:00:00.000Z", + "key" : 1601521200000, + "doc_count" : 4139, + "count" : { + "value" : 4139 + } + }, + { + "key_as_string" : "2020-10-01T04:00:00.000Z", + "key" : 1601524800000, + "doc_count" : 3728, + "count" : { + "value" : 3728 + } + }, + { + "key_as_string" : "2020-10-01T05:00:00.000Z", + "key" : 1601528400000, + "doc_count" : 5556, + "count" : { + "value" : 5556 + } + }, + { + "key_as_string" : "2020-10-01T06:00:00.000Z", + "key" : 1601532000000, + "doc_count" : 7663, + "count" : { + "value" : 7663 + } + }, + { + "key_as_string" : "2020-10-01T07:00:00.000Z", + "key" : 1601535600000, + "doc_count" : 6372, + "count" : { + "value" : 6372 + } + }, + { + "key_as_string" : "2020-10-01T08:00:00.000Z", + "key" : 1601539200000, + "doc_count" : 9441, + "count" : { + "value" : 9441 + } + }, + { + "key_as_string" : "2020-10-01T09:00:00.000Z", + "key" : 1601542800000, + "doc_count" : 18338, + "count" : { + "value" : 18338 + } + }, + { + "key_as_string" : "2020-10-01T10:00:00.000Z", + "key" : 1601546400000, + "doc_count" : 10318, + "count" : { + "value" : 10318 + } + }, + { + "key_as_string" : "2020-10-01T11:00:00.000Z", + "key" : 1601550000000, + "doc_count" : 11332, + "count" : { + "value" : 11332 + } + }, + { + "key_as_string" : "2020-10-01T12:00:00.000Z", + "key" : 1601553600000, + "doc_count" : 9411, + "count" : { + "value" : 9411 + } + }, + { + "key_as_string" : "2020-10-01T13:00:00.000Z", + "key" : 1601557200000, + "doc_count" : 16259, + "count" : { + "value" : 16259 + } + }, + { + "key_as_string" : "2020-10-01T14:00:00.000Z", + "key" : 1601560800000, + "doc_count" : 12306, + "count" : { + "value" : 12306 + } + }, + { + "key_as_string" : "2020-10-01T15:00:00.000Z", + "key" : 1601564400000, + "doc_count" : 10972, + "count" : { + "value" : 10972 + } + }, + { + "key_as_string" : "2020-10-01T16:00:00.000Z", + "key" : 1601568000000, + "doc_count" : 8733, + "count" : { + "value" : 8733 + } + }, + { + "key_as_string" : "2020-10-01T17:00:00.000Z", + "key" : 1601571600000, + "doc_count" : 8902, + "count" : { + "value" : 8902 + } + }, + { + "key_as_string" : "2020-10-01T18:00:00.000Z", + "key" : 1601575200000, + "doc_count" : 7935, + "count" : { + "value" : 7935 + } + }, + { + "key_as_string" : "2020-10-01T19:00:00.000Z", + "key" : 1601578800000, + "doc_count" : 7978, + "count" : { + "value" : 7978 + } + }, + { + "key_as_string" : "2020-10-01T20:00:00.000Z", + "key" : 1601582400000, + "doc_count" : 9801, + "count" : { + "value" : 9801 + } + }, + { + "key_as_string" : "2020-10-01T21:00:00.000Z", + "key" : 1601586000000, + "doc_count" : 5973, + "count" : { + "value" : 5973 + } + }, + { + "key_as_string" : "2020-10-01T22:00:00.000Z", + "key" : 1601589600000, + "doc_count" : 4605, + "count" : { + "value" : 4605 + } + }, + { + "key_as_string" : "2020-10-01T23:00:00.000Z", + "key" : 1601593200000, + "doc_count" : 3863, + "count" : { + "value" : 3863 + } + }, + { + "key_as_string" : "2020-10-02T00:00:00.000Z", + "key" : 1601596800000, + "doc_count" : 4622, + "count" : { + "value" : 4622 + } + }, + { + "key_as_string" : "2020-10-02T01:00:00.000Z", + "key" : 1601600400000, + "doc_count" : 3547, + "count" : { + "value" : 3547 + } + }, + { + "key_as_string" : "2020-10-02T02:00:00.000Z", + "key" : 1601604000000, + "doc_count" : 6593, + "count" : { + "value" : 6593 + } + }, + { + "key_as_string" : "2020-10-02T03:00:00.000Z", + "key" : 1601607600000, + "doc_count" : 7491, + "count" : { + "value" : 7491 + } + }, + { + "key_as_string" : "2020-10-02T04:00:00.000Z", + "key" : 1601611200000, + "doc_count" : 5102, + "count" : { + "value" : 5102 + } + }, + { + "key_as_string" : "2020-10-02T05:00:00.000Z", + "key" : 1601614800000, + "doc_count" : 6848, + "count" : { + "value" : 6848 + } + }, + { + "key_as_string" : "2020-10-02T06:00:00.000Z", + "key" : 1601618400000, + "doc_count" : 8349, + "count" : { + "value" : 8349 + } + }, + { + "key_as_string" : "2020-10-02T07:00:00.000Z", + "key" : 1601622000000, + "doc_count" : 10655, + "count" : { + "value" : 10655 + } + }, + { + "key_as_string" : "2020-10-02T08:00:00.000Z", + "key" : 1601625600000, + "doc_count" : 11132, + "count" : { + "value" : 11132 + } + }, + { + "key_as_string" : "2020-10-02T09:00:00.000Z", + "key" : 1601629200000, + "doc_count" : 9606, + "count" : { + "value" : 9606 + } + }, + { + "key_as_string" : "2020-10-02T10:00:00.000Z", + "key" : 1601632800000, + "doc_count" : 18053, + "count" : { + "value" : 18053 + } + }, + { + "key_as_string" : "2020-10-02T11:00:00.000Z", + "key" : 1601636400000, + "doc_count" : 16847, + "count" : { + "value" : 16847 + } + }, + { + "key_as_string" : "2020-10-02T12:00:00.000Z", + "key" : 1601640000000, + "doc_count" : 25716, + "count" : { + "value" : 25716 + } + }, + { + "key_as_string" : "2020-10-02T13:00:00.000Z", + "key" : 1601643600000, + "doc_count" : 14119, + "count" : { + "value" : 14119 + } + }, + { + "key_as_string" : "2020-10-02T14:00:00.000Z", + "key" : 1601647200000, + "doc_count" : 9507, + "count" : { + "value" : 9507 + } + }, + { + "key_as_string" : "2020-10-02T15:00:00.000Z", + "key" : 1601650800000, + "doc_count" : 8066, + "count" : { + "value" : 8066 + } + }, + { + "key_as_string" : "2020-10-02T16:00:00.000Z", + "key" : 1601654400000, + "doc_count" : 8824, + "count" : { + "value" : 8824 + } + }, + { + "key_as_string" : "2020-10-02T17:00:00.000Z", + "key" : 1601658000000, + "doc_count" : 8458, + "count" : { + "value" : 8458 + } + }, + { + "key_as_string" : "2020-10-02T18:00:00.000Z", + "key" : 1601661600000, + "doc_count" : 10252, + "count" : { + "value" : 10252 + } + }, + { + "key_as_string" : "2020-10-02T19:00:00.000Z", + "key" : 1601665200000, + "doc_count" : 7928, + "count" : { + "value" : 7928 + } + }, + { + "key_as_string" : "2020-10-02T20:00:00.000Z", + "key" : 1601668800000, + "doc_count" : 7025, + "count" : { + "value" : 7025 + } + }, + { + "key_as_string" : "2020-10-02T21:00:00.000Z", + "key" : 1601672400000, + "doc_count" : 5899, + "count" : { + "value" : 5899 + } + }, + { + "key_as_string" : "2020-10-02T22:00:00.000Z", + "key" : 1601676000000, + "doc_count" : 4349, + "count" : { + "value" : 4349 + } + }, + { + "key_as_string" : "2020-10-02T23:00:00.000Z", + "key" : 1601679600000, + "doc_count" : 3975, + "count" : { + "value" : 3975 + } + }, + { + "key_as_string" : "2020-10-03T00:00:00.000Z", + "key" : 1601683200000, + "doc_count" : 3292, + "count" : { + "value" : 3292 + } + }, + { + "key_as_string" : "2020-10-03T01:00:00.000Z", + "key" : 1601686800000, + "doc_count" : 3160, + "count" : { + "value" : 3160 + } + }, + { + "key_as_string" : "2020-10-03T02:00:00.000Z", + "key" : 1601690400000, + "doc_count" : 2497, + "count" : { + "value" : 2497 + } + }, + { + "key_as_string" : "2020-10-03T03:00:00.000Z", + "key" : 1601694000000, + "doc_count" : 1939, + "count" : { + "value" : 1939 + } + }, + { + "key_as_string" : "2020-10-03T04:00:00.000Z", + "key" : 1601697600000, + "doc_count" : 2633, + "count" : { + "value" : 2633 + } + }, + { + "key_as_string" : "2020-10-03T05:00:00.000Z", + "key" : 1601701200000, + "doc_count" : 6528, + "count" : { + "value" : 6528 + } + }, + { + "key_as_string" : "2020-10-03T06:00:00.000Z", + "key" : 1601704800000, + "doc_count" : 6861, + "count" : { + "value" : 6861 + } + }, + { + "key_as_string" : "2020-10-03T07:00:00.000Z", + "key" : 1601708400000, + "doc_count" : 7372, + "count" : { + "value" : 7372 + } + }, + { + "key_as_string" : "2020-10-03T08:00:00.000Z", + "key" : 1601712000000, + "doc_count" : 7840, + "count" : { + "value" : 7840 + } + }, + { + "key_as_string" : "2020-10-03T09:00:00.000Z", + "key" : 1601715600000, + "doc_count" : 7977, + "count" : { + "value" : 7977 + } + }, + { + "key_as_string" : "2020-10-03T10:00:00.000Z", + "key" : 1601719200000, + "doc_count" : 7037, + "count" : { + "value" : 7037 + } + }, + { + "key_as_string" : "2020-10-03T11:00:00.000Z", + "key" : 1601722800000, + "doc_count" : 6595, + "count" : { + "value" : 6595 + } + }, + { + "key_as_string" : "2020-10-03T12:00:00.000Z", + "key" : 1601726400000, + "doc_count" : 6427, + "count" : { + "value" : 6427 + } + }, + { + "key_as_string" : "2020-10-03T13:00:00.000Z", + "key" : 1601730000000, + "doc_count" : 6609, + "count" : { + "value" : 6609 + } + }, + { + "key_as_string" : "2020-10-03T14:00:00.000Z", + "key" : 1601733600000, + "doc_count" : 6250, + "count" : { + "value" : 6250 + } + }, + { + "key_as_string" : "2020-10-03T15:00:00.000Z", + "key" : 1601737200000, + "doc_count" : 6694, + "count" : { + "value" : 6694 + } + }, + { + "key_as_string" : "2020-10-03T16:00:00.000Z", + "key" : 1601740800000, + "doc_count" : 6472, + "count" : { + "value" : 6472 + } + }, + { + "key_as_string" : "2020-10-03T17:00:00.000Z", + "key" : 1601744400000, + "doc_count" : 5426, + "count" : { + "value" : 5426 + } + }, + { + "key_as_string" : "2020-10-03T18:00:00.000Z", + "key" : 1601748000000, + "doc_count" : 4718, + "count" : { + "value" : 4718 + } + }, + { + "key_as_string" : "2020-10-03T19:00:00.000Z", + "key" : 1601751600000, + "doc_count" : 5103, + "count" : { + "value" : 5103 + } + }, + { + "key_as_string" : "2020-10-03T20:00:00.000Z", + "key" : 1601755200000, + "doc_count" : 5487, + "count" : { + "value" : 5487 + } + }, + { + "key_as_string" : "2020-10-03T21:00:00.000Z", + "key" : 1601758800000, + "doc_count" : 5368, + "count" : { + "value" : 5368 + } + }, + { + "key_as_string" : "2020-10-03T22:00:00.000Z", + "key" : 1601762400000, + "doc_count" : 3801, + "count" : { + "value" : 3801 + } + }, + { + "key_as_string" : "2020-10-03T23:00:00.000Z", + "key" : 1601766000000, + "doc_count" : 5298, + "count" : { + "value" : 5298 + } + }, + { + "key_as_string" : "2020-10-04T00:00:00.000Z", + "key" : 1601769600000, + "doc_count" : 5312, + "count" : { + "value" : 5312 + } + }, + { + "key_as_string" : "2020-10-04T01:00:00.000Z", + "key" : 1601773200000, + "doc_count" : 2360, + "count" : { + "value" : 2360 + } + }, + { + "key_as_string" : "2020-10-04T02:00:00.000Z", + "key" : 1601776800000, + "doc_count" : 2332, + "count" : { + "value" : 2332 + } + }, + { + "key_as_string" : "2020-10-04T03:00:00.000Z", + "key" : 1601780400000, + "doc_count" : 3164, + "count" : { + "value" : 3164 + } + }, + { + "key_as_string" : "2020-10-04T04:00:00.000Z", + "key" : 1601784000000, + "doc_count" : 3068, + "count" : { + "value" : 3068 + } + }, + { + "key_as_string" : "2020-10-04T05:00:00.000Z", + "key" : 1601787600000, + "doc_count" : 3477, + "count" : { + "value" : 3477 + } + }, + { + "key_as_string" : "2020-10-04T06:00:00.000Z", + "key" : 1601791200000, + "doc_count" : 4782, + "count" : { + "value" : 4782 + } + }, + { + "key_as_string" : "2020-10-04T07:00:00.000Z", + "key" : 1601794800000, + "doc_count" : 6026, + "count" : { + "value" : 6026 + } + }, + { + "key_as_string" : "2020-10-04T08:00:00.000Z", + "key" : 1601798400000, + "doc_count" : 6826, + "count" : { + "value" : 6826 + } + }, + { + "key_as_string" : "2020-10-04T09:00:00.000Z", + "key" : 1601802000000, + "doc_count" : 6755, + "count" : { + "value" : 6755 + } + }, + { + "key_as_string" : "2020-10-04T10:00:00.000Z", + "key" : 1601805600000, + "doc_count" : 6165, + "count" : { + "value" : 6165 + } + }, + { + "key_as_string" : "2020-10-04T11:00:00.000Z", + "key" : 1601809200000, + "doc_count" : 6013, + "count" : { + "value" : 6013 + } + }, + { + "key_as_string" : "2020-10-04T12:00:00.000Z", + "key" : 1601812800000, + "doc_count" : 5979, + "count" : { + "value" : 5979 + } + }, + { + "key_as_string" : "2020-10-04T13:00:00.000Z", + "key" : 1601816400000, + "doc_count" : 6740, + "count" : { + "value" : 6740 + } + }, + { + "key_as_string" : "2020-10-04T14:00:00.000Z", + "key" : 1601820000000, + "doc_count" : 5828, + "count" : { + "value" : 5828 + } + }, + { + "key_as_string" : "2020-10-04T15:00:00.000Z", + "key" : 1601823600000, + "doc_count" : 6322, + "count" : { + "value" : 6322 + } + }, + { + "key_as_string" : "2020-10-04T16:00:00.000Z", + "key" : 1601827200000, + "doc_count" : 5338, + "count" : { + "value" : 5338 + } + }, + { + "key_as_string" : "2020-10-04T17:00:00.000Z", + "key" : 1601830800000, + "doc_count" : 5691, + "count" : { + "value" : 5691 + } + }, + { + "key_as_string" : "2020-10-04T18:00:00.000Z", + "key" : 1601834400000, + "doc_count" : 8737, + "count" : { + "value" : 8737 + } + }, + { + "key_as_string" : "2020-10-04T19:00:00.000Z", + "key" : 1601838000000, + "doc_count" : 5749, + "count" : { + "value" : 5749 + } + }, + { + "key_as_string" : "2020-10-04T20:00:00.000Z", + "key" : 1601841600000, + "doc_count" : 4893, + "count" : { + "value" : 4893 + } + }, + { + "key_as_string" : "2020-10-04T21:00:00.000Z", + "key" : 1601845200000, + "doc_count" : 3991, + "count" : { + "value" : 3991 + } + }, + { + "key_as_string" : "2020-10-04T22:00:00.000Z", + "key" : 1601848800000, + "doc_count" : 2938, + "count" : { + "value" : 2938 + } + }, + { + "key_as_string" : "2020-10-04T23:00:00.000Z", + "key" : 1601852400000, + "doc_count" : 2953, + "count" : { + "value" : 2953 + } + }, + { + "key_as_string" : "2020-10-05T00:00:00.000Z", + "key" : 1601856000000, + "doc_count" : 1675, + "count" : { + "value" : 1675 + } + }, + { + "key_as_string" : "2020-10-05T01:00:00.000Z", + "key" : 1601859600000, + "doc_count" : 1994, + "count" : { + "value" : 1994 + } + }, + { + "key_as_string" : "2020-10-05T02:00:00.000Z", + "key" : 1601863200000, + "doc_count" : 2116, + "count" : { + "value" : 2116 + } + }, + { + "key_as_string" : "2020-10-05T03:00:00.000Z", + "key" : 1601866800000, + "doc_count" : 2032, + "count" : { + "value" : 2032 + } + }, + { + "key_as_string" : "2020-10-05T04:00:00.000Z", + "key" : 1601870400000, + "doc_count" : 3174, + "count" : { + "value" : 3174 + } + }, + { + "key_as_string" : "2020-10-05T05:00:00.000Z", + "key" : 1601874000000, + "doc_count" : 3442, + "count" : { + "value" : 3442 + } + }, + { + "key_as_string" : "2020-10-05T06:00:00.000Z", + "key" : 1601877600000, + "doc_count" : 5972, + "count" : { + "value" : 5972 + } + }, + { + "key_as_string" : "2020-10-05T07:00:00.000Z", + "key" : 1601881200000, + "doc_count" : 9029, + "count" : { + "value" : 9029 + } + }, + { + "key_as_string" : "2020-10-05T08:00:00.000Z", + "key" : 1601884800000, + "doc_count" : 16227, + "count" : { + "value" : 16227 + } + }, + { + "key_as_string" : "2020-10-05T09:00:00.000Z", + "key" : 1601888400000, + "doc_count" : 14815, + "count" : { + "value" : 14815 + } + }, + { + "key_as_string" : "2020-10-05T10:00:00.000Z", + "key" : 1601892000000, + "doc_count" : 15806, + "count" : { + "value" : 15806 + } + }, + { + "key_as_string" : "2020-10-05T11:00:00.000Z", + "key" : 1601895600000, + "doc_count" : 11633, + "count" : { + "value" : 11633 + } + }, + { + "key_as_string" : "2020-10-05T12:00:00.000Z", + "key" : 1601899200000, + "doc_count" : 14050, + "count" : { + "value" : 14050 + } + }, + { + "key_as_string" : "2020-10-05T13:00:00.000Z", + "key" : 1601902800000, + "doc_count" : 10078, + "count" : { + "value" : 10078 + } + }, + { + "key_as_string" : "2020-10-05T14:00:00.000Z", + "key" : 1601906400000, + "doc_count" : 22426, + "count" : { + "value" : 22426 + } + }, + { + "key_as_string" : "2020-10-05T15:00:00.000Z", + "key" : 1601910000000, + "doc_count" : 13901, + "count" : { + "value" : 13901 + } + }, + { + "key_as_string" : "2020-10-05T16:00:00.000Z", + "key" : 1601913600000, + "doc_count" : 8762, + "count" : { + "value" : 8762 + } + }, + { + "key_as_string" : "2020-10-05T17:00:00.000Z", + "key" : 1601917200000, + "doc_count" : 7880, + "count" : { + "value" : 7880 + } + }, + { + "key_as_string" : "2020-10-05T18:00:00.000Z", + "key" : 1601920800000, + "doc_count" : 7851, + "count" : { + "value" : 7851 + } + }, + { + "key_as_string" : "2020-10-05T19:00:00.000Z", + "key" : 1601924400000, + "doc_count" : 7637, + "count" : { + "value" : 7637 + } + }, + { + "key_as_string" : "2020-10-05T20:00:00.000Z", + "key" : 1601928000000, + "doc_count" : 7875, + "count" : { + "value" : 7875 + } + }, + { + "key_as_string" : "2020-10-05T21:00:00.000Z", + "key" : 1601931600000, + "doc_count" : 4996, + "count" : { + "value" : 4996 + } + }, + { + "key_as_string" : "2020-10-05T22:00:00.000Z", + "key" : 1601935200000, + "doc_count" : 3606, + "count" : { + "value" : 3606 + } + }, + { + "key_as_string" : "2020-10-05T23:00:00.000Z", + "key" : 1601938800000, + "doc_count" : 3603, + "count" : { + "value" : 3603 + } + }, + { + "key_as_string" : "2020-10-06T00:00:00.000Z", + "key" : 1601942400000, + "doc_count" : 2979, + "count" : { + "value" : 2979 + } + }, + { + "key_as_string" : "2020-10-06T01:00:00.000Z", + "key" : 1601946000000, + "doc_count" : 2848, + "count" : { + "value" : 2848 + } + }, + { + "key_as_string" : "2020-10-06T02:00:00.000Z", + "key" : 1601949600000, + "doc_count" : 2222, + "count" : { + "value" : 2222 + } + }, + { + "key_as_string" : "2020-10-06T03:00:00.000Z", + "key" : 1601953200000, + "doc_count" : 2891, + "count" : { + "value" : 2891 + } + }, + { + "key_as_string" : "2020-10-06T04:00:00.000Z", + "key" : 1601956800000, + "doc_count" : 3729, + "count" : { + "value" : 3729 + } + }, + { + "key_as_string" : "2020-10-06T05:00:00.000Z", + "key" : 1601960400000, + "doc_count" : 6271, + "count" : { + "value" : 6271 + } + }, + { + "key_as_string" : "2020-10-06T06:00:00.000Z", + "key" : 1601964000000, + "doc_count" : 10448, + "count" : { + "value" : 10448 + } + }, + { + "key_as_string" : "2020-10-06T07:00:00.000Z", + "key" : 1601967600000, + "doc_count" : 16040, + "count" : { + "value" : 16040 + } + }, + { + "key_as_string" : "2020-10-06T08:00:00.000Z", + "key" : 1601971200000, + "doc_count" : 6588, + "count" : { + "value" : 6588 + } + }, + { + "key_as_string" : "2020-10-06T09:00:00.000Z", + "key" : 1601974800000, + "doc_count" : 5735, + "count" : { + "value" : 5735 + } + }, + { + "key_as_string" : "2020-10-06T10:00:00.000Z", + "key" : 1601978400000, + "doc_count" : 6336, + "count" : { + "value" : 6336 + } + }, + { + "key_as_string" : "2020-10-06T11:00:00.000Z", + "key" : 1601982000000, + "doc_count" : 7014, + "count" : { + "value" : 7014 + } + }, + { + "key_as_string" : "2020-10-06T12:00:00.000Z", + "key" : 1601985600000, + "doc_count" : 6896, + "count" : { + "value" : 6896 + } + }, + { + "key_as_string" : "2020-10-06T13:00:00.000Z", + "key" : 1601989200000, + "doc_count" : 6952, + "count" : { + "value" : 6952 + } + }, + { + "key_as_string" : "2020-10-06T14:00:00.000Z", + "key" : 1601992800000, + "doc_count" : 6440, + "count" : { + "value" : 6440 + } + }, + { + "key_as_string" : "2020-10-06T15:00:00.000Z", + "key" : 1601996400000, + "doc_count" : 5963, + "count" : { + "value" : 5963 + } + }, + { + "key_as_string" : "2020-10-06T16:00:00.000Z", + "key" : 1602000000000, + "doc_count" : 5246, + "count" : { + "value" : 5246 + } + }, + { + "key_as_string" : "2020-10-06T17:00:00.000Z", + "key" : 1602003600000, + "doc_count" : 5038, + "count" : { + "value" : 5038 + } + }, + { + "key_as_string" : "2020-10-06T18:00:00.000Z", + "key" : 1602007200000, + "doc_count" : 5205, + "count" : { + "value" : 5205 + } + }, + { + "key_as_string" : "2020-10-06T19:00:00.000Z", + "key" : 1602010800000, + "doc_count" : 6600, + "count" : { + "value" : 6600 + } + }, + { + "key_as_string" : "2020-10-06T20:00:00.000Z", + "key" : 1602014400000, + "doc_count" : 5580, + "count" : { + "value" : 5580 + } + }, + { + "key_as_string" : "2020-10-06T21:00:00.000Z", + "key" : 1602018000000, + "doc_count" : 4421, + "count" : { + "value" : 4421 + } + }, + { + "key_as_string" : "2020-10-06T22:00:00.000Z", + "key" : 1602021600000, + "doc_count" : 3366, + "count" : { + "value" : 3366 + } + }, + { + "key_as_string" : "2020-10-06T23:00:00.000Z", + "key" : 1602025200000, + "doc_count" : 2090, + "count" : { + "value" : 2090 + } + }, + { + "key_as_string" : "2020-10-07T00:00:00.000Z", + "key" : 1602028800000, + "doc_count" : 2479, + "count" : { + "value" : 2479 + } + }, + { + "key_as_string" : "2020-10-07T01:00:00.000Z", + "key" : 1602032400000, + "doc_count" : 5624, + "count" : { + "value" : 5624 + } + }, + { + "key_as_string" : "2020-10-07T02:00:00.000Z", + "key" : 1602036000000, + "doc_count" : 6387, + "count" : { + "value" : 6387 + } + }, + { + "key_as_string" : "2020-10-07T03:00:00.000Z", + "key" : 1602039600000, + "doc_count" : 3133, + "count" : { + "value" : 3133 + } + }, + { + "key_as_string" : "2020-10-07T04:00:00.000Z", + "key" : 1602043200000, + "doc_count" : 3268, + "count" : { + "value" : 3268 + } + }, + { + "key_as_string" : "2020-10-07T05:00:00.000Z", + "key" : 1602046800000, + "doc_count" : 4353, + "count" : { + "value" : 4353 + } + }, + { + "key_as_string" : "2020-10-07T06:00:00.000Z", + "key" : 1602050400000, + "doc_count" : 5371, + "count" : { + "value" : 5371 + } + }, + { + "key_as_string" : "2020-10-07T07:00:00.000Z", + "key" : 1602054000000, + "doc_count" : 6796, + "count" : { + "value" : 6796 + } + }, + { + "key_as_string" : "2020-10-07T08:00:00.000Z", + "key" : 1602057600000, + "doc_count" : 5829, + "count" : { + "value" : 5829 + } + }, + { + "key_as_string" : "2020-10-07T09:00:00.000Z", + "key" : 1602061200000, + "doc_count" : 6153, + "count" : { + "value" : 6153 + } + }, + { + "key_as_string" : "2020-10-07T10:00:00.000Z", + "key" : 1602064800000, + "doc_count" : 5052, + "count" : { + "value" : 5052 + } + }, + { + "key_as_string" : "2020-10-07T11:00:00.000Z", + "key" : 1602068400000, + "doc_count" : 6199, + "count" : { + "value" : 6199 + } + }, + { + "key_as_string" : "2020-10-07T12:00:00.000Z", + "key" : 1602072000000, + "doc_count" : 6061, + "count" : { + "value" : 6061 + } + }, + { + "key_as_string" : "2020-10-07T13:00:00.000Z", + "key" : 1602075600000, + "doc_count" : 7548, + "count" : { + "value" : 7548 + } + }, + { + "key_as_string" : "2020-10-07T14:00:00.000Z", + "key" : 1602079200000, + "doc_count" : 9401, + "count" : { + "value" : 9401 + } + }, + { + "key_as_string" : "2020-10-07T15:00:00.000Z", + "key" : 1602082800000, + "doc_count" : 7646, + "count" : { + "value" : 7646 + } + }, + { + "key_as_string" : "2020-10-07T16:00:00.000Z", + "key" : 1602086400000, + "doc_count" : 6054, + "count" : { + "value" : 6054 + } + }, + { + "key_as_string" : "2020-10-07T17:00:00.000Z", + "key" : 1602090000000, + "doc_count" : 5860, + "count" : { + "value" : 5860 + } + }, + { + "key_as_string" : "2020-10-07T18:00:00.000Z", + "key" : 1602093600000, + "doc_count" : 5471, + "count" : { + "value" : 5471 + } + }, + { + "key_as_string" : "2020-10-07T19:00:00.000Z", + "key" : 1602097200000, + "doc_count" : 6783, + "count" : { + "value" : 6783 + } + }, + { + "key_as_string" : "2020-10-07T20:00:00.000Z", + "key" : 1602100800000, + "doc_count" : 6345, + "count" : { + "value" : 6345 + } + }, + { + "key_as_string" : "2020-10-07T21:00:00.000Z", + "key" : 1602104400000, + "doc_count" : 5011, + "count" : { + "value" : 5011 + } + }, + { + "key_as_string" : "2020-10-07T22:00:00.000Z", + "key" : 1602108000000, + "doc_count" : 3933, + "count" : { + "value" : 3933 + } + }, + { + "key_as_string" : "2020-10-07T23:00:00.000Z", + "key" : 1602111600000, + "doc_count" : 3395, + "count" : { + "value" : 3395 + } + }, + { + "key_as_string" : "2020-10-08T00:00:00.000Z", + "key" : 1602115200000, + "doc_count" : 2902, + "count" : { + "value" : 2902 + } + }, + { + "key_as_string" : "2020-10-08T01:00:00.000Z", + "key" : 1602118800000, + "doc_count" : 3164, + "count" : { + "value" : 3164 + } + }, + { + "key_as_string" : "2020-10-08T02:00:00.000Z", + "key" : 1602122400000, + "doc_count" : 2137, + "count" : { + "value" : 2137 + } + }, + { + "key_as_string" : "2020-10-08T03:00:00.000Z", + "key" : 1602126000000, + "doc_count" : 2612, + "count" : { + "value" : 2612 + } + }, + { + "key_as_string" : "2020-10-08T04:00:00.000Z", + "key" : 1602129600000, + "doc_count" : 3557, + "count" : { + "value" : 3557 + } + }, + { + "key_as_string" : "2020-10-08T05:00:00.000Z", + "key" : 1602133200000, + "doc_count" : 3713, + "count" : { + "value" : 3713 + } + }, + { + "key_as_string" : "2020-10-08T06:00:00.000Z", + "key" : 1602136800000, + "doc_count" : 4916, + "count" : { + "value" : 4916 + } + }, + { + "key_as_string" : "2020-10-08T07:00:00.000Z", + "key" : 1602140400000, + "doc_count" : 9034, + "count" : { + "value" : 9034 + } + }, + { + "key_as_string" : "2020-10-08T08:00:00.000Z", + "key" : 1602144000000, + "doc_count" : 13100, + "count" : { + "value" : 13100 + } + }, + { + "key_as_string" : "2020-10-08T09:00:00.000Z", + "key" : 1602147600000, + "doc_count" : 9185, + "count" : { + "value" : 9185 + } + }, + { + "key_as_string" : "2020-10-08T10:00:00.000Z", + "key" : 1602151200000, + "doc_count" : 5745, + "count" : { + "value" : 5745 + } + }, + { + "key_as_string" : "2020-10-08T11:00:00.000Z", + "key" : 1602154800000, + "doc_count" : 6213, + "count" : { + "value" : 6213 + } + }, + { + "key_as_string" : "2020-10-08T12:00:00.000Z", + "key" : 1602158400000, + "doc_count" : 6607, + "count" : { + "value" : 6607 + } + }, + { + "key_as_string" : "2020-10-08T13:00:00.000Z", + "key" : 1602162000000, + "doc_count" : 7962, + "count" : { + "value" : 7962 + } + }, + { + "key_as_string" : "2020-10-08T14:00:00.000Z", + "key" : 1602165600000, + "doc_count" : 6890, + "count" : { + "value" : 6890 + } + }, + { + "key_as_string" : "2020-10-08T15:00:00.000Z", + "key" : 1602169200000, + "doc_count" : 6154, + "count" : { + "value" : 6154 + } + }, + { + "key_as_string" : "2020-10-08T16:00:00.000Z", + "key" : 1602172800000, + "doc_count" : 5722, + "count" : { + "value" : 5722 + } + }, + { + "key_as_string" : "2020-10-08T17:00:00.000Z", + "key" : 1602176400000, + "doc_count" : 5664, + "count" : { + "value" : 5664 + } + }, + { + "key_as_string" : "2020-10-08T18:00:00.000Z", + "key" : 1602180000000, + "doc_count" : 6075, + "count" : { + "value" : 6075 + } + }, + { + "key_as_string" : "2020-10-08T19:00:00.000Z", + "key" : 1602183600000, + "doc_count" : 6773, + "count" : { + "value" : 6773 + } + }, + { + "key_as_string" : "2020-10-08T20:00:00.000Z", + "key" : 1602187200000, + "doc_count" : 6315, + "count" : { + "value" : 6315 + } + }, + { + "key_as_string" : "2020-10-08T21:00:00.000Z", + "key" : 1602190800000, + "doc_count" : 4662, + "count" : { + "value" : 4662 + } + }, + { + "key_as_string" : "2020-10-08T22:00:00.000Z", + "key" : 1602194400000, + "doc_count" : 3055, + "count" : { + "value" : 3055 + } + }, + { + "key_as_string" : "2020-10-08T23:00:00.000Z", + "key" : 1602198000000, + "doc_count" : 2627, + "count" : { + "value" : 2627 + } + }, + { + "key_as_string" : "2020-10-09T00:00:00.000Z", + "key" : 1602201600000, + "doc_count" : 3097, + "count" : { + "value" : 3097 + } + }, + { + "key_as_string" : "2020-10-09T01:00:00.000Z", + "key" : 1602205200000, + "doc_count" : 2731, + "count" : { + "value" : 2731 + } + }, + { + "key_as_string" : "2020-10-09T02:00:00.000Z", + "key" : 1602208800000, + "doc_count" : 4425, + "count" : { + "value" : 4425 + } + }, + { + "key_as_string" : "2020-10-09T03:00:00.000Z", + "key" : 1602212400000, + "doc_count" : 4562, + "count" : { + "value" : 4562 + } + }, + { + "key_as_string" : "2020-10-09T04:00:00.000Z", + "key" : 1602216000000, + "doc_count" : 4874, + "count" : { + "value" : 4874 + } + }, + { + "key_as_string" : "2020-10-09T05:00:00.000Z", + "key" : 1602219600000, + "doc_count" : 4038, + "count" : { + "value" : 4038 + } + }, + { + "key_as_string" : "2020-10-09T06:00:00.000Z", + "key" : 1602223200000, + "doc_count" : 4839, + "count" : { + "value" : 4839 + } + }, + { + "key_as_string" : "2020-10-09T07:00:00.000Z", + "key" : 1602226800000, + "doc_count" : 5892, + "count" : { + "value" : 5892 + } + }, + { + "key_as_string" : "2020-10-09T08:00:00.000Z", + "key" : 1602230400000, + "doc_count" : 5441, + "count" : { + "value" : 5441 + } + }, + { + "key_as_string" : "2020-10-09T09:00:00.000Z", + "key" : 1602234000000, + "doc_count" : 5730, + "count" : { + "value" : 5730 + } + }, + { + "key_as_string" : "2020-10-09T10:00:00.000Z", + "key" : 1602237600000, + "doc_count" : 5588, + "count" : { + "value" : 5588 + } + }, + { + "key_as_string" : "2020-10-09T11:00:00.000Z", + "key" : 1602241200000, + "doc_count" : 5360, + "count" : { + "value" : 5360 + } + }, + { + "key_as_string" : "2020-10-09T12:00:00.000Z", + "key" : 1602244800000, + "doc_count" : 5567, + "count" : { + "value" : 5567 + } + }, + { + "key_as_string" : "2020-10-09T13:00:00.000Z", + "key" : 1602248400000, + "doc_count" : 5696, + "count" : { + "value" : 5696 + } + }, + { + "key_as_string" : "2020-10-09T14:00:00.000Z", + "key" : 1602252000000, + "doc_count" : 5664, + "count" : { + "value" : 5664 + } + }, + { + "key_as_string" : "2020-10-09T15:00:00.000Z", + "key" : 1602255600000, + "doc_count" : 6509, + "count" : { + "value" : 6509 + } + }, + { + "key_as_string" : "2020-10-09T16:00:00.000Z", + "key" : 1602259200000, + "doc_count" : 4864, + "count" : { + "value" : 4864 + } + }, + { + "key_as_string" : "2020-10-09T17:00:00.000Z", + "key" : 1602262800000, + "doc_count" : 4812, + "count" : { + "value" : 4812 + } + }, + { + "key_as_string" : "2020-10-09T18:00:00.000Z", + "key" : 1602266400000, + "doc_count" : 5134, + "count" : { + "value" : 5134 + } + }, + { + "key_as_string" : "2020-10-09T19:00:00.000Z", + "key" : 1602270000000, + "doc_count" : 5396, + "count" : { + "value" : 5396 + } + }, + { + "key_as_string" : "2020-10-09T20:00:00.000Z", + "key" : 1602273600000, + "doc_count" : 6230, + "count" : { + "value" : 6230 + } + }, + { + "key_as_string" : "2020-10-09T21:00:00.000Z", + "key" : 1602277200000, + "doc_count" : 5259, + "count" : { + "value" : 5259 + } + }, + { + "key_as_string" : "2020-10-09T22:00:00.000Z", + "key" : 1602280800000, + "doc_count" : 5486, + "count" : { + "value" : 5486 + } + }, + { + "key_as_string" : "2020-10-09T23:00:00.000Z", + "key" : 1602284400000, + "doc_count" : 3073, + "count" : { + "value" : 3073 + } + }, + { + "key_as_string" : "2020-10-10T00:00:00.000Z", + "key" : 1602288000000, + "doc_count" : 2720, + "count" : { + "value" : 2720 + } + }, + { + "key_as_string" : "2020-10-10T01:00:00.000Z", + "key" : 1602291600000, + "doc_count" : 2690, + "count" : { + "value" : 2690 + } + }, + { + "key_as_string" : "2020-10-10T02:00:00.000Z", + "key" : 1602295200000, + "doc_count" : 2520, + "count" : { + "value" : 2520 + } + }, + { + "key_as_string" : "2020-10-10T03:00:00.000Z", + "key" : 1602298800000, + "doc_count" : 2684, + "count" : { + "value" : 2684 + } + }, + { + "key_as_string" : "2020-10-10T04:00:00.000Z", + "key" : 1602302400000, + "doc_count" : 3025, + "count" : { + "value" : 3025 + } + }, + { + "key_as_string" : "2020-10-10T05:00:00.000Z", + "key" : 1602306000000, + "doc_count" : 3913, + "count" : { + "value" : 3913 + } + }, + { + "key_as_string" : "2020-10-10T06:00:00.000Z", + "key" : 1602309600000, + "doc_count" : 4446, + "count" : { + "value" : 4446 + } + }, + { + "key_as_string" : "2020-10-10T07:00:00.000Z", + "key" : 1602313200000, + "doc_count" : 6542, + "count" : { + "value" : 6542 + } + }, + { + "key_as_string" : "2020-10-10T08:00:00.000Z", + "key" : 1602316800000, + "doc_count" : 6321, + "count" : { + "value" : 6321 + } + }, + { + "key_as_string" : "2020-10-10T09:00:00.000Z", + "key" : 1602320400000, + "doc_count" : 7035, + "count" : { + "value" : 7035 + } + }, + { + "key_as_string" : "2020-10-10T10:00:00.000Z", + "key" : 1602324000000, + "doc_count" : 6681, + "count" : { + "value" : 6681 + } + }, + { + "key_as_string" : "2020-10-10T11:00:00.000Z", + "key" : 1602327600000, + "doc_count" : 6540, + "count" : { + "value" : 6540 + } + }, + { + "key_as_string" : "2020-10-10T12:00:00.000Z", + "key" : 1602331200000, + "doc_count" : 5289, + "count" : { + "value" : 5289 + } + }, + { + "key_as_string" : "2020-10-10T13:00:00.000Z", + "key" : 1602334800000, + "doc_count" : 6364, + "count" : { + "value" : 6364 + } + }, + { + "key_as_string" : "2020-10-10T14:00:00.000Z", + "key" : 1602338400000, + "doc_count" : 5986, + "count" : { + "value" : 5986 + } + }, + { + "key_as_string" : "2020-10-10T15:00:00.000Z", + "key" : 1602342000000, + "doc_count" : 6400, + "count" : { + "value" : 6400 + } + }, + { + "key_as_string" : "2020-10-10T16:00:00.000Z", + "key" : 1602345600000, + "doc_count" : 8845, + "count" : { + "value" : 8845 + } + }, + { + "key_as_string" : "2020-10-10T17:00:00.000Z", + "key" : 1602349200000, + "doc_count" : 5391, + "count" : { + "value" : 5391 + } + }, + { + "key_as_string" : "2020-10-10T18:00:00.000Z", + "key" : 1602352800000, + "doc_count" : 5774, + "count" : { + "value" : 5774 + } + }, + { + "key_as_string" : "2020-10-10T19:00:00.000Z", + "key" : 1602356400000, + "doc_count" : 5196, + "count" : { + "value" : 5196 + } + }, + { + "key_as_string" : "2020-10-10T20:00:00.000Z", + "key" : 1602360000000, + "doc_count" : 5152, + "count" : { + "value" : 5152 + } + }, + { + "key_as_string" : "2020-10-10T21:00:00.000Z", + "key" : 1602363600000, + "doc_count" : 4767, + "count" : { + "value" : 4767 + } + }, + { + "key_as_string" : "2020-10-10T22:00:00.000Z", + "key" : 1602367200000, + "doc_count" : 4095, + "count" : { + "value" : 4095 + } + }, + { + "key_as_string" : "2020-10-10T23:00:00.000Z", + "key" : 1602370800000, + "doc_count" : 2389, + "count" : { + "value" : 2389 + } + }, + { + "key_as_string" : "2020-10-11T00:00:00.000Z", + "key" : 1602374400000, + "doc_count" : 2281, + "count" : { + "value" : 2281 + } + }, + { + "key_as_string" : "2020-10-11T01:00:00.000Z", + "key" : 1602378000000, + "doc_count" : 2270, + "count" : { + "value" : 2270 + } + }, + { + "key_as_string" : "2020-10-11T02:00:00.000Z", + "key" : 1602381600000, + "doc_count" : 2347, + "count" : { + "value" : 2347 + } + }, + { + "key_as_string" : "2020-10-11T03:00:00.000Z", + "key" : 1602385200000, + "doc_count" : 3648, + "count" : { + "value" : 3648 + } + }, + { + "key_as_string" : "2020-10-11T04:00:00.000Z", + "key" : 1602388800000, + "doc_count" : 6342, + "count" : { + "value" : 6342 + } + }, + { + "key_as_string" : "2020-10-11T05:00:00.000Z", + "key" : 1602392400000, + "doc_count" : 4837, + "count" : { + "value" : 4837 + } + }, + { + "key_as_string" : "2020-10-11T06:00:00.000Z", + "key" : 1602396000000, + "doc_count" : 4379, + "count" : { + "value" : 4379 + } + }, + { + "key_as_string" : "2020-10-11T07:00:00.000Z", + "key" : 1602399600000, + "doc_count" : 7285, + "count" : { + "value" : 7285 + } + }, + { + "key_as_string" : "2020-10-11T08:00:00.000Z", + "key" : 1602403200000, + "doc_count" : 7009, + "count" : { + "value" : 7009 + } + }, + { + "key_as_string" : "2020-10-11T09:00:00.000Z", + "key" : 1602406800000, + "doc_count" : 7281, + "count" : { + "value" : 7281 + } + }, + { + "key_as_string" : "2020-10-11T10:00:00.000Z", + "key" : 1602410400000, + "doc_count" : 8012, + "count" : { + "value" : 8012 + } + }, + { + "key_as_string" : "2020-10-11T11:00:00.000Z", + "key" : 1602414000000, + "doc_count" : 8099, + "count" : { + "value" : 8099 + } + }, + { + "key_as_string" : "2020-10-11T12:00:00.000Z", + "key" : 1602417600000, + "doc_count" : 6198, + "count" : { + "value" : 6198 + } + }, + { + "key_as_string" : "2020-10-11T13:00:00.000Z", + "key" : 1602421200000, + "doc_count" : 5673, + "count" : { + "value" : 5673 + } + }, + { + "key_as_string" : "2020-10-11T14:00:00.000Z", + "key" : 1602424800000, + "doc_count" : 6523, + "count" : { + "value" : 6523 + } + }, + { + "key_as_string" : "2020-10-11T15:00:00.000Z", + "key" : 1602428400000, + "doc_count" : 5373, + "count" : { + "value" : 5373 + } + }, + { + "key_as_string" : "2020-10-11T16:00:00.000Z", + "key" : 1602432000000, + "doc_count" : 6994, + "count" : { + "value" : 6994 + } + }, + { + "key_as_string" : "2020-10-11T17:00:00.000Z", + "key" : 1602435600000, + "doc_count" : 6187, + "count" : { + "value" : 6187 + } + }, + { + "key_as_string" : "2020-10-11T18:00:00.000Z", + "key" : 1602439200000, + "doc_count" : 7002, + "count" : { + "value" : 7002 + } + }, + { + "key_as_string" : "2020-10-11T19:00:00.000Z", + "key" : 1602442800000, + "doc_count" : 6211, + "count" : { + "value" : 6211 + } + }, + { + "key_as_string" : "2020-10-11T20:00:00.000Z", + "key" : 1602446400000, + "doc_count" : 5050, + "count" : { + "value" : 5050 + } + }, + { + "key_as_string" : "2020-10-11T21:00:00.000Z", + "key" : 1602450000000, + "doc_count" : 3804, + "count" : { + "value" : 3804 + } + }, + { + "key_as_string" : "2020-10-11T22:00:00.000Z", + "key" : 1602453600000, + "doc_count" : 2742, + "count" : { + "value" : 2742 + } + }, + { + "key_as_string" : "2020-10-11T23:00:00.000Z", + "key" : 1602457200000, + "doc_count" : 4011, + "count" : { + "value" : 4011 + } + }, + { + "key_as_string" : "2020-10-12T00:00:00.000Z", + "key" : 1602460800000, + "doc_count" : 3905, + "count" : { + "value" : 3905 + } + }, + { + "key_as_string" : "2020-10-12T01:00:00.000Z", + "key" : 1602464400000, + "doc_count" : 2641, + "count" : { + "value" : 2641 + } + }, + { + "key_as_string" : "2020-10-12T02:00:00.000Z", + "key" : 1602468000000, + "doc_count" : 3941, + "count" : { + "value" : 3941 + } + }, + { + "key_as_string" : "2020-10-12T03:00:00.000Z", + "key" : 1602471600000, + "doc_count" : 4009, + "count" : { + "value" : 4009 + } + }, + { + "key_as_string" : "2020-10-12T04:00:00.000Z", + "key" : 1602475200000, + "doc_count" : 3705, + "count" : { + "value" : 3705 + } + }, + { + "key_as_string" : "2020-10-12T05:00:00.000Z", + "key" : 1602478800000, + "doc_count" : 6093, + "count" : { + "value" : 6093 + } + }, + { + "key_as_string" : "2020-10-12T06:00:00.000Z", + "key" : 1602482400000, + "doc_count" : 3230, + "count" : { + "value" : 3230 + } + }, + { + "key_as_string" : "2020-10-12T07:00:00.000Z", + "key" : 1602486000000, + "doc_count" : 4953, + "count" : { + "value" : 4953 + } + }, + { + "key_as_string" : "2020-10-12T08:00:00.000Z", + "key" : 1602489600000, + "doc_count" : 4187, + "count" : { + "value" : 4187 + } + }, + { + "key_as_string" : "2020-10-12T09:00:00.000Z", + "key" : 1602493200000, + "doc_count" : 4082, + "count" : { + "value" : 4082 + } + }, + { + "key_as_string" : "2020-10-12T10:00:00.000Z", + "key" : 1602496800000, + "doc_count" : 4119, + "count" : { + "value" : 4119 + } + }, + { + "key_as_string" : "2020-10-12T11:00:00.000Z", + "key" : 1602500400000, + "doc_count" : 4668, + "count" : { + "value" : 4668 + } + }, + { + "key_as_string" : "2020-10-12T12:00:00.000Z", + "key" : 1602504000000, + "doc_count" : 3632, + "count" : { + "value" : 3632 + } + }, + { + "key_as_string" : "2020-10-12T13:00:00.000Z", + "key" : 1602507600000, + "doc_count" : 6349, + "count" : { + "value" : 6349 + } + }, + { + "key_as_string" : "2020-10-12T14:00:00.000Z", + "key" : 1602511200000, + "doc_count" : 9369, + "count" : { + "value" : 9369 + } + }, + { + "key_as_string" : "2020-10-12T15:00:00.000Z", + "key" : 1602514800000, + "doc_count" : 12113, + "count" : { + "value" : 12113 + } + }, + { + "key_as_string" : "2020-10-12T16:00:00.000Z", + "key" : 1602518400000, + "doc_count" : 5986, + "count" : { + "value" : 5986 + } + }, + { + "key_as_string" : "2020-10-12T17:00:00.000Z", + "key" : 1602522000000, + "doc_count" : 6646, + "count" : { + "value" : 6646 + } + }, + { + "key_as_string" : "2020-10-12T18:00:00.000Z", + "key" : 1602525600000, + "doc_count" : 4186, + "count" : { + "value" : 4186 + } + }, + { + "key_as_string" : "2020-10-12T19:00:00.000Z", + "key" : 1602529200000, + "doc_count" : 4640, + "count" : { + "value" : 4640 + } + }, + { + "key_as_string" : "2020-10-12T20:00:00.000Z", + "key" : 1602532800000, + "doc_count" : 4907, + "count" : { + "value" : 4907 + } + }, + { + "key_as_string" : "2020-10-12T21:00:00.000Z", + "key" : 1602536400000, + "doc_count" : 2738, + "count" : { + "value" : 2738 + } + }, + { + "key_as_string" : "2020-10-12T22:00:00.000Z", + "key" : 1602540000000, + "doc_count" : 2480, + "count" : { + "value" : 2480 + } + }, + { + "key_as_string" : "2020-10-12T23:00:00.000Z", + "key" : 1602543600000, + "doc_count" : 2466, + "count" : { + "value" : 2466 + } + }, + { + "key_as_string" : "2020-10-13T00:00:00.000Z", + "key" : 1602547200000, + "doc_count" : 1916, + "count" : { + "value" : 1916 + } + }, + { + "key_as_string" : "2020-10-13T01:00:00.000Z", + "key" : 1602550800000, + "doc_count" : 1764, + "count" : { + "value" : 1764 + } + }, + { + "key_as_string" : "2020-10-13T02:00:00.000Z", + "key" : 1602554400000, + "doc_count" : 2336, + "count" : { + "value" : 2336 + } + }, + { + "key_as_string" : "2020-10-13T03:00:00.000Z", + "key" : 1602558000000, + "doc_count" : 2048, + "count" : { + "value" : 2048 + } + }, + { + "key_as_string" : "2020-10-13T04:00:00.000Z", + "key" : 1602561600000, + "doc_count" : 3894, + "count" : { + "value" : 3894 + } + }, + { + "key_as_string" : "2020-10-13T05:00:00.000Z", + "key" : 1602565200000, + "doc_count" : 4028, + "count" : { + "value" : 4028 + } + }, + { + "key_as_string" : "2020-10-13T06:00:00.000Z", + "key" : 1602568800000, + "doc_count" : 5417, + "count" : { + "value" : 5417 + } + }, + { + "key_as_string" : "2020-10-13T07:00:00.000Z", + "key" : 1602572400000, + "doc_count" : 6316, + "count" : { + "value" : 6316 + } + }, + { + "key_as_string" : "2020-10-13T08:00:00.000Z", + "key" : 1602576000000, + "doc_count" : 14299, + "count" : { + "value" : 14299 + } + }, + { + "key_as_string" : "2020-10-13T09:00:00.000Z", + "key" : 1602579600000, + "doc_count" : 19295, + "count" : { + "value" : 19295 + } + }, + { + "key_as_string" : "2020-10-13T10:00:00.000Z", + "key" : 1602583200000, + "doc_count" : 11190, + "count" : { + "value" : 11190 + } + }, + { + "key_as_string" : "2020-10-13T11:00:00.000Z", + "key" : 1602586800000, + "doc_count" : 10323, + "count" : { + "value" : 10323 + } + }, + { + "key_as_string" : "2020-10-13T12:00:00.000Z", + "key" : 1602590400000, + "doc_count" : 9649, + "count" : { + "value" : 9649 + } + }, + { + "key_as_string" : "2020-10-13T13:00:00.000Z", + "key" : 1602594000000, + "doc_count" : 10057, + "count" : { + "value" : 10057 + } + }, + { + "key_as_string" : "2020-10-13T14:00:00.000Z", + "key" : 1602597600000, + "doc_count" : 9112, + "count" : { + "value" : 9112 + } + }, + { + "key_as_string" : "2020-10-13T15:00:00.000Z", + "key" : 1602601200000, + "doc_count" : 10716, + "count" : { + "value" : 10716 + } + }, + { + "key_as_string" : "2020-10-13T16:00:00.000Z", + "key" : 1602604800000, + "doc_count" : 7322, + "count" : { + "value" : 7322 + } + }, + { + "key_as_string" : "2020-10-13T17:00:00.000Z", + "key" : 1602608400000, + "doc_count" : 7999, + "count" : { + "value" : 7999 + } + }, + { + "key_as_string" : "2020-10-13T18:00:00.000Z", + "key" : 1602612000000, + "doc_count" : 8611, + "count" : { + "value" : 8611 + } + }, + { + "key_as_string" : "2020-10-13T19:00:00.000Z", + "key" : 1602615600000, + "doc_count" : 10758, + "count" : { + "value" : 10758 + } + }, + { + "key_as_string" : "2020-10-13T20:00:00.000Z", + "key" : 1602619200000, + "doc_count" : 8193, + "count" : { + "value" : 8193 + } + }, + { + "key_as_string" : "2020-10-13T21:00:00.000Z", + "key" : 1602622800000, + "doc_count" : 6291, + "count" : { + "value" : 6291 + } + }, + { + "key_as_string" : "2020-10-13T22:00:00.000Z", + "key" : 1602626400000, + "doc_count" : 4632, + "count" : { + "value" : 4632 + } + }, + { + "key_as_string" : "2020-10-13T23:00:00.000Z", + "key" : 1602630000000, + "doc_count" : 3447, + "count" : { + "value" : 3447 + } + }, + { + "key_as_string" : "2020-10-14T00:00:00.000Z", + "key" : 1602633600000, + "doc_count" : 3863, + "count" : { + "value" : 3863 + } + }, + { + "key_as_string" : "2020-10-14T01:00:00.000Z", + "key" : 1602637200000, + "doc_count" : 2945, + "count" : { + "value" : 2945 + } + }, + { + "key_as_string" : "2020-10-14T02:00:00.000Z", + "key" : 1602640800000, + "doc_count" : 4267, + "count" : { + "value" : 4267 + } + }, + { + "key_as_string" : "2020-10-14T03:00:00.000Z", + "key" : 1602644400000, + "doc_count" : 3980, + "count" : { + "value" : 3980 + } + }, + { + "key_as_string" : "2020-10-14T04:00:00.000Z", + "key" : 1602648000000, + "doc_count" : 4469, + "count" : { + "value" : 4469 + } + }, + { + "key_as_string" : "2020-10-14T05:00:00.000Z", + "key" : 1602651600000, + "doc_count" : 4691, + "count" : { + "value" : 4691 + } + }, + { + "key_as_string" : "2020-10-14T06:00:00.000Z", + "key" : 1602655200000, + "doc_count" : 6179, + "count" : { + "value" : 6179 + } + }, + { + "key_as_string" : "2020-10-14T07:00:00.000Z", + "key" : 1602658800000, + "doc_count" : 6664, + "count" : { + "value" : 6664 + } + }, + { + "key_as_string" : "2020-10-14T08:00:00.000Z", + "key" : 1602662400000, + "doc_count" : 7038, + "count" : { + "value" : 7038 + } + }, + { + "key_as_string" : "2020-10-14T09:00:00.000Z", + "key" : 1602666000000, + "doc_count" : 15614, + "count" : { + "value" : 15614 + } + }, + { + "key_as_string" : "2020-10-14T10:00:00.000Z", + "key" : 1602669600000, + "doc_count" : 12873, + "count" : { + "value" : 12873 + } + }, + { + "key_as_string" : "2020-10-14T11:00:00.000Z", + "key" : 1602673200000, + "doc_count" : 11173, + "count" : { + "value" : 11173 + } + }, + { + "key_as_string" : "2020-10-14T12:00:00.000Z", + "key" : 1602676800000, + "doc_count" : 8991, + "count" : { + "value" : 8991 + } + }, + { + "key_as_string" : "2020-10-14T13:00:00.000Z", + "key" : 1602680400000, + "doc_count" : 13461, + "count" : { + "value" : 13461 + } + }, + { + "key_as_string" : "2020-10-14T14:00:00.000Z", + "key" : 1602684000000, + "doc_count" : 14430, + "count" : { + "value" : 14430 + } + }, + { + "key_as_string" : "2020-10-14T15:00:00.000Z", + "key" : 1602687600000, + "doc_count" : 10871, + "count" : { + "value" : 10871 + } + }, + { + "key_as_string" : "2020-10-14T16:00:00.000Z", + "key" : 1602691200000, + "doc_count" : 9789, + "count" : { + "value" : 9789 + } + }, + { + "key_as_string" : "2020-10-14T17:00:00.000Z", + "key" : 1602694800000, + "doc_count" : 10091, + "count" : { + "value" : 10091 + } + }, + { + "key_as_string" : "2020-10-14T18:00:00.000Z", + "key" : 1602698400000, + "doc_count" : 10143, + "count" : { + "value" : 10143 + } + }, + { + "key_as_string" : "2020-10-14T19:00:00.000Z", + "key" : 1602702000000, + "doc_count" : 8914, + "count" : { + "value" : 8914 + } + }, + { + "key_as_string" : "2020-10-14T20:00:00.000Z", + "key" : 1602705600000, + "doc_count" : 9535, + "count" : { + "value" : 9535 + } + }, + { + "key_as_string" : "2020-10-14T21:00:00.000Z", + "key" : 1602709200000, + "doc_count" : 9969, + "count" : { + "value" : 9969 + } + }, + { + "key_as_string" : "2020-10-14T22:00:00.000Z", + "key" : 1602712800000, + "doc_count" : 7947, + "count" : { + "value" : 7947 + } + }, + { + "key_as_string" : "2020-10-14T23:00:00.000Z", + "key" : 1602716400000, + "doc_count" : 3843, + "count" : { + "value" : 3843 + } + }, + { + "key_as_string" : "2020-10-15T00:00:00.000Z", + "key" : 1602720000000, + "doc_count" : 3617, + "count" : { + "value" : 3617 + } + }, + { + "key_as_string" : "2020-10-15T01:00:00.000Z", + "key" : 1602723600000, + "doc_count" : 3430, + "count" : { + "value" : 3430 + } + }, + { + "key_as_string" : "2020-10-15T02:00:00.000Z", + "key" : 1602727200000, + "doc_count" : 2757, + "count" : { + "value" : 2757 + } + }, + { + "key_as_string" : "2020-10-15T03:00:00.000Z", + "key" : 1602730800000, + "doc_count" : 2793, + "count" : { + "value" : 2793 + } + }, + { + "key_as_string" : "2020-10-15T04:00:00.000Z", + "key" : 1602734400000, + "doc_count" : 4341, + "count" : { + "value" : 4341 + } + }, + { + "key_as_string" : "2020-10-15T05:00:00.000Z", + "key" : 1602738000000, + "doc_count" : 4527, + "count" : { + "value" : 4527 + } + }, + { + "key_as_string" : "2020-10-15T06:00:00.000Z", + "key" : 1602741600000, + "doc_count" : 5300, + "count" : { + "value" : 5300 + } + }, + { + "key_as_string" : "2020-10-15T07:00:00.000Z", + "key" : 1602745200000, + "doc_count" : 6735, + "count" : { + "value" : 6735 + } + }, + { + "key_as_string" : "2020-10-15T08:00:00.000Z", + "key" : 1602748800000, + "doc_count" : 7200, + "count" : { + "value" : 7200 + } + }, + { + "key_as_string" : "2020-10-15T09:00:00.000Z", + "key" : 1602752400000, + "doc_count" : 5692, + "count" : { + "value" : 5692 + } + }, + { + "key_as_string" : "2020-10-15T10:00:00.000Z", + "key" : 1602756000000, + "doc_count" : 5419, + "count" : { + "value" : 5419 + } + }, + { + "key_as_string" : "2020-10-15T11:00:00.000Z", + "key" : 1602759600000, + "doc_count" : 6002, + "count" : { + "value" : 6002 + } + }, + { + "key_as_string" : "2020-10-15T12:00:00.000Z", + "key" : 1602763200000, + "doc_count" : 6155, + "count" : { + "value" : 6155 + } + }, + { + "key_as_string" : "2020-10-15T13:00:00.000Z", + "key" : 1602766800000, + "doc_count" : 6368, + "count" : { + "value" : 6368 + } + }, + { + "key_as_string" : "2020-10-15T14:00:00.000Z", + "key" : 1602770400000, + "doc_count" : 5935, + "count" : { + "value" : 5935 + } + }, + { + "key_as_string" : "2020-10-15T15:00:00.000Z", + "key" : 1602774000000, + "doc_count" : 7081, + "count" : { + "value" : 7081 + } + }, + { + "key_as_string" : "2020-10-15T16:00:00.000Z", + "key" : 1602777600000, + "doc_count" : 6024, + "count" : { + "value" : 6024 + } + }, + { + "key_as_string" : "2020-10-15T17:00:00.000Z", + "key" : 1602781200000, + "doc_count" : 6589, + "count" : { + "value" : 6589 + } + }, + { + "key_as_string" : "2020-10-15T18:00:00.000Z", + "key" : 1602784800000, + "doc_count" : 5372, + "count" : { + "value" : 5372 + } + }, + { + "key_as_string" : "2020-10-15T19:00:00.000Z", + "key" : 1602788400000, + "doc_count" : 5052, + "count" : { + "value" : 5052 + } + }, + { + "key_as_string" : "2020-10-15T20:00:00.000Z", + "key" : 1602792000000, + "doc_count" : 4986, + "count" : { + "value" : 4986 + } + }, + { + "key_as_string" : "2020-10-15T21:00:00.000Z", + "key" : 1602795600000, + "doc_count" : 3968, + "count" : { + "value" : 3968 + } + }, + { + "key_as_string" : "2020-10-15T22:00:00.000Z", + "key" : 1602799200000, + "doc_count" : 3502, + "count" : { + "value" : 3502 + } + }, + { + "key_as_string" : "2020-10-15T23:00:00.000Z", + "key" : 1602802800000, + "doc_count" : 2748, + "count" : { + "value" : 2748 + } + }, + { + "key_as_string" : "2020-10-16T00:00:00.000Z", + "key" : 1602806400000, + "doc_count" : 3028, + "count" : { + "value" : 3028 + } + }, + { + "key_as_string" : "2020-10-16T01:00:00.000Z", + "key" : 1602810000000, + "doc_count" : 2401, + "count" : { + "value" : 2401 + } + }, + { + "key_as_string" : "2020-10-16T02:00:00.000Z", + "key" : 1602813600000, + "doc_count" : 1994, + "count" : { + "value" : 1994 + } + }, + { + "key_as_string" : "2020-10-16T03:00:00.000Z", + "key" : 1602817200000, + "doc_count" : 1949, + "count" : { + "value" : 1949 + } + }, + { + "key_as_string" : "2020-10-16T04:00:00.000Z", + "key" : 1602820800000, + "doc_count" : 2495, + "count" : { + "value" : 2495 + } + }, + { + "key_as_string" : "2020-10-16T05:00:00.000Z", + "key" : 1602824400000, + "doc_count" : 4725, + "count" : { + "value" : 4725 + } + }, + { + "key_as_string" : "2020-10-16T06:00:00.000Z", + "key" : 1602828000000, + "doc_count" : 5692, + "count" : { + "value" : 5692 + } + }, + { + "key_as_string" : "2020-10-16T07:00:00.000Z", + "key" : 1602831600000, + "doc_count" : 5493, + "count" : { + "value" : 5493 + } + }, + { + "key_as_string" : "2020-10-16T08:00:00.000Z", + "key" : 1602835200000, + "doc_count" : 5201, + "count" : { + "value" : 5201 + } + }, + { + "key_as_string" : "2020-10-16T09:00:00.000Z", + "key" : 1602838800000, + "doc_count" : 5016, + "count" : { + "value" : 5016 + } + }, + { + "key_as_string" : "2020-10-16T10:00:00.000Z", + "key" : 1602842400000, + "doc_count" : 9463, + "count" : { + "value" : 9463 + } + }, + { + "key_as_string" : "2020-10-16T11:00:00.000Z", + "key" : 1602846000000, + "doc_count" : 8967, + "count" : { + "value" : 8967 + } + }, + { + "key_as_string" : "2020-10-16T12:00:00.000Z", + "key" : 1602849600000, + "doc_count" : 5925, + "count" : { + "value" : 5925 + } + }, + { + "key_as_string" : "2020-10-16T13:00:00.000Z", + "key" : 1602853200000, + "doc_count" : 6591, + "count" : { + "value" : 6591 + } + }, + { + "key_as_string" : "2020-10-16T14:00:00.000Z", + "key" : 1602856800000, + "doc_count" : 7194, + "count" : { + "value" : 7194 + } + }, + { + "key_as_string" : "2020-10-16T15:00:00.000Z", + "key" : 1602860400000, + "doc_count" : 6172, + "count" : { + "value" : 6172 + } + }, + { + "key_as_string" : "2020-10-16T16:00:00.000Z", + "key" : 1602864000000, + "doc_count" : 5966, + "count" : { + "value" : 5966 + } + }, + { + "key_as_string" : "2020-10-16T17:00:00.000Z", + "key" : 1602867600000, + "doc_count" : 6574, + "count" : { + "value" : 6574 + } + }, + { + "key_as_string" : "2020-10-16T18:00:00.000Z", + "key" : 1602871200000, + "doc_count" : 5710, + "count" : { + "value" : 5710 + } + }, + { + "key_as_string" : "2020-10-16T19:00:00.000Z", + "key" : 1602874800000, + "doc_count" : 5691, + "count" : { + "value" : 5691 + } + }, + { + "key_as_string" : "2020-10-16T20:00:00.000Z", + "key" : 1602878400000, + "doc_count" : 4166, + "count" : { + "value" : 4166 + } + }, + { + "key_as_string" : "2020-10-16T21:00:00.000Z", + "key" : 1602882000000, + "doc_count" : 4246, + "count" : { + "value" : 4246 + } + }, + { + "key_as_string" : "2020-10-16T22:00:00.000Z", + "key" : 1602885600000, + "doc_count" : 4408, + "count" : { + "value" : 4408 + } + }, + { + "key_as_string" : "2020-10-16T23:00:00.000Z", + "key" : 1602889200000, + "doc_count" : 3039, + "count" : { + "value" : 3039 + } + }, + { + "key_as_string" : "2020-10-17T00:00:00.000Z", + "key" : 1602892800000, + "doc_count" : 3752, + "count" : { + "value" : 3752 + } + }, + { + "key_as_string" : "2020-10-17T01:00:00.000Z", + "key" : 1602896400000, + "doc_count" : 3545, + "count" : { + "value" : 3545 + } + }, + { + "key_as_string" : "2020-10-17T02:00:00.000Z", + "key" : 1602900000000, + "doc_count" : 3239, + "count" : { + "value" : 3239 + } + }, + { + "key_as_string" : "2020-10-17T03:00:00.000Z", + "key" : 1602903600000, + "doc_count" : 3054, + "count" : { + "value" : 3054 + } + }, + { + "key_as_string" : "2020-10-17T04:00:00.000Z", + "key" : 1602907200000, + "doc_count" : 4554, + "count" : { + "value" : 4554 + } + }, + { + "key_as_string" : "2020-10-17T05:00:00.000Z", + "key" : 1602910800000, + "doc_count" : 6539, + "count" : { + "value" : 6539 + } + }, + { + "key_as_string" : "2020-10-17T06:00:00.000Z", + "key" : 1602914400000, + "doc_count" : 5573, + "count" : { + "value" : 5573 + } + }, + { + "key_as_string" : "2020-10-17T07:00:00.000Z", + "key" : 1602918000000, + "doc_count" : 7249, + "count" : { + "value" : 7249 + } + }, + { + "key_as_string" : "2020-10-17T08:00:00.000Z", + "key" : 1602921600000, + "doc_count" : 6936, + "count" : { + "value" : 6936 + } + }, + { + "key_as_string" : "2020-10-17T09:00:00.000Z", + "key" : 1602925200000, + "doc_count" : 6691, + "count" : { + "value" : 6691 + } + }, + { + "key_as_string" : "2020-10-17T10:00:00.000Z", + "key" : 1602928800000, + "doc_count" : 6546, + "count" : { + "value" : 6546 + } + }, + { + "key_as_string" : "2020-10-17T11:00:00.000Z", + "key" : 1602932400000, + "doc_count" : 8571, + "count" : { + "value" : 8571 + } + }, + { + "key_as_string" : "2020-10-17T12:00:00.000Z", + "key" : 1602936000000, + "doc_count" : 9124, + "count" : { + "value" : 9124 + } + }, + { + "key_as_string" : "2020-10-17T13:00:00.000Z", + "key" : 1602939600000, + "doc_count" : 7092, + "count" : { + "value" : 7092 + } + }, + { + "key_as_string" : "2020-10-17T14:00:00.000Z", + "key" : 1602943200000, + "doc_count" : 6394, + "count" : { + "value" : 6394 + } + }, + { + "key_as_string" : "2020-10-17T15:00:00.000Z", + "key" : 1602946800000, + "doc_count" : 5533, + "count" : { + "value" : 5533 + } + }, + { + "key_as_string" : "2020-10-17T16:00:00.000Z", + "key" : 1602950400000, + "doc_count" : 5651, + "count" : { + "value" : 5651 + } + }, + { + "key_as_string" : "2020-10-17T17:00:00.000Z", + "key" : 1602954000000, + "doc_count" : 5038, + "count" : { + "value" : 5038 + } + }, + { + "key_as_string" : "2020-10-17T18:00:00.000Z", + "key" : 1602957600000, + "doc_count" : 4361, + "count" : { + "value" : 4361 + } + }, + { + "key_as_string" : "2020-10-17T19:00:00.000Z", + "key" : 1602961200000, + "doc_count" : 4966, + "count" : { + "value" : 4966 + } + }, + { + "key_as_string" : "2020-10-17T20:00:00.000Z", + "key" : 1602964800000, + "doc_count" : 5178, + "count" : { + "value" : 5178 + } + }, + { + "key_as_string" : "2020-10-17T21:00:00.000Z", + "key" : 1602968400000, + "doc_count" : 4529, + "count" : { + "value" : 4529 + } + }, + { + "key_as_string" : "2020-10-17T22:00:00.000Z", + "key" : 1602972000000, + "doc_count" : 3013, + "count" : { + "value" : 3013 + } + }, + { + "key_as_string" : "2020-10-17T23:00:00.000Z", + "key" : 1602975600000, + "doc_count" : 3083, + "count" : { + "value" : 3083 + } + }, + { + "key_as_string" : "2020-10-18T00:00:00.000Z", + "key" : 1602979200000, + "doc_count" : 2572, + "count" : { + "value" : 2572 + } + }, + { + "key_as_string" : "2020-10-18T01:00:00.000Z", + "key" : 1602982800000, + "doc_count" : 2538, + "count" : { + "value" : 2538 + } + }, + { + "key_as_string" : "2020-10-18T02:00:00.000Z", + "key" : 1602986400000, + "doc_count" : 2148, + "count" : { + "value" : 2148 + } + }, + { + "key_as_string" : "2020-10-18T03:00:00.000Z", + "key" : 1602990000000, + "doc_count" : 2030, + "count" : { + "value" : 2030 + } + }, + { + "key_as_string" : "2020-10-18T04:00:00.000Z", + "key" : 1602993600000, + "doc_count" : 2252, + "count" : { + "value" : 2252 + } + }, + { + "key_as_string" : "2020-10-18T05:00:00.000Z", + "key" : 1602997200000, + "doc_count" : 4067, + "count" : { + "value" : 4067 + } + }, + { + "key_as_string" : "2020-10-18T06:00:00.000Z", + "key" : 1603000800000, + "doc_count" : 4906, + "count" : { + "value" : 4906 + } + }, + { + "key_as_string" : "2020-10-18T07:00:00.000Z", + "key" : 1603004400000, + "doc_count" : 7538, + "count" : { + "value" : 7538 + } + }, + { + "key_as_string" : "2020-10-18T08:00:00.000Z", + "key" : 1603008000000, + "doc_count" : 6223, + "count" : { + "value" : 6223 + } + }, + { + "key_as_string" : "2020-10-18T09:00:00.000Z", + "key" : 1603011600000, + "doc_count" : 7293, + "count" : { + "value" : 7293 + } + }, + { + "key_as_string" : "2020-10-18T10:00:00.000Z", + "key" : 1603015200000, + "doc_count" : 6420, + "count" : { + "value" : 6420 + } + }, + { + "key_as_string" : "2020-10-18T11:00:00.000Z", + "key" : 1603018800000, + "doc_count" : 5375, + "count" : { + "value" : 5375 + } + }, + { + "key_as_string" : "2020-10-18T12:00:00.000Z", + "key" : 1603022400000, + "doc_count" : 6098, + "count" : { + "value" : 6098 + } + }, + { + "key_as_string" : "2020-10-18T13:00:00.000Z", + "key" : 1603026000000, + "doc_count" : 5072, + "count" : { + "value" : 5072 + } + }, + { + "key_as_string" : "2020-10-18T14:00:00.000Z", + "key" : 1603029600000, + "doc_count" : 5743, + "count" : { + "value" : 5743 + } + }, + { + "key_as_string" : "2020-10-18T15:00:00.000Z", + "key" : 1603033200000, + "doc_count" : 6226, + "count" : { + "value" : 6226 + } + }, + { + "key_as_string" : "2020-10-18T16:00:00.000Z", + "key" : 1603036800000, + "doc_count" : 5107, + "count" : { + "value" : 5107 + } + }, + { + "key_as_string" : "2020-10-18T17:00:00.000Z", + "key" : 1603040400000, + "doc_count" : 5386, + "count" : { + "value" : 5386 + } + }, + { + "key_as_string" : "2020-10-18T18:00:00.000Z", + "key" : 1603044000000, + "doc_count" : 6236, + "count" : { + "value" : 6236 + } + }, + { + "key_as_string" : "2020-10-18T19:00:00.000Z", + "key" : 1603047600000, + "doc_count" : 6194, + "count" : { + "value" : 6194 + } + }, + { + "key_as_string" : "2020-10-18T20:00:00.000Z", + "key" : 1603051200000, + "doc_count" : 5111, + "count" : { + "value" : 5111 + } + }, + { + "key_as_string" : "2020-10-18T21:00:00.000Z", + "key" : 1603054800000, + "doc_count" : 3833, + "count" : { + "value" : 3833 + } + }, + { + "key_as_string" : "2020-10-18T22:00:00.000Z", + "key" : 1603058400000, + "doc_count" : 2938, + "count" : { + "value" : 2938 + } + }, + { + "key_as_string" : "2020-10-18T23:00:00.000Z", + "key" : 1603062000000, + "doc_count" : 2486, + "count" : { + "value" : 2486 + } + }, + { + "key_as_string" : "2020-10-19T00:00:00.000Z", + "key" : 1603065600000, + "doc_count" : 4483, + "count" : { + "value" : 4483 + } + }, + { + "key_as_string" : "2020-10-19T01:00:00.000Z", + "key" : 1603069200000, + "doc_count" : 3129, + "count" : { + "value" : 3129 + } + }, + { + "key_as_string" : "2020-10-19T02:00:00.000Z", + "key" : 1603072800000, + "doc_count" : 2856, + "count" : { + "value" : 2856 + } + }, + { + "key_as_string" : "2020-10-19T03:00:00.000Z", + "key" : 1603076400000, + "doc_count" : 2061, + "count" : { + "value" : 2061 + } + }, + { + "key_as_string" : "2020-10-19T04:00:00.000Z", + "key" : 1603080000000, + "doc_count" : 2156, + "count" : { + "value" : 2156 + } + }, + { + "key_as_string" : "2020-10-19T05:00:00.000Z", + "key" : 1603083600000, + "doc_count" : 2672, + "count" : { + "value" : 2672 + } + }, + { + "key_as_string" : "2020-10-19T06:00:00.000Z", + "key" : 1603087200000, + "doc_count" : 1890, + "count" : { + "value" : 1890 + } + }, + { + "key_as_string" : "2020-10-19T07:00:00.000Z", + "key" : 1603090800000, + "doc_count" : 3683, + "count" : { + "value" : 3683 + } + }, + { + "key_as_string" : "2020-10-19T08:00:00.000Z", + "key" : 1603094400000, + "doc_count" : 3764, + "count" : { + "value" : 3764 + } + }, + { + "key_as_string" : "2020-10-19T09:00:00.000Z", + "key" : 1603098000000, + "doc_count" : 4063, + "count" : { + "value" : 4063 + } + }, + { + "key_as_string" : "2020-10-19T10:00:00.000Z", + "key" : 1603101600000, + "doc_count" : 3637, + "count" : { + "value" : 3637 + } + }, + { + "key_as_string" : "2020-10-19T11:00:00.000Z", + "key" : 1603105200000, + "doc_count" : 3076, + "count" : { + "value" : 3076 + } + }, + { + "key_as_string" : "2020-10-19T12:00:00.000Z", + "key" : 1603108800000, + "doc_count" : 3790, + "count" : { + "value" : 3790 + } + }, + { + "key_as_string" : "2020-10-19T13:00:00.000Z", + "key" : 1603112400000, + "doc_count" : 6098, + "count" : { + "value" : 6098 + } + }, + { + "key_as_string" : "2020-10-19T14:00:00.000Z", + "key" : 1603116000000, + "doc_count" : 4701, + "count" : { + "value" : 4701 + } + }, + { + "key_as_string" : "2020-10-19T15:00:00.000Z", + "key" : 1603119600000, + "doc_count" : 5028, + "count" : { + "value" : 5028 + } + }, + { + "key_as_string" : "2020-10-19T16:00:00.000Z", + "key" : 1603123200000, + "doc_count" : 4536, + "count" : { + "value" : 4536 + } + }, + { + "key_as_string" : "2020-10-19T17:00:00.000Z", + "key" : 1603126800000, + "doc_count" : 5243, + "count" : { + "value" : 5243 + } + }, + { + "key_as_string" : "2020-10-19T18:00:00.000Z", + "key" : 1603130400000, + "doc_count" : 6236, + "count" : { + "value" : 6236 + } + }, + { + "key_as_string" : "2020-10-19T19:00:00.000Z", + "key" : 1603134000000, + "doc_count" : 6321, + "count" : { + "value" : 6321 + } + }, + { + "key_as_string" : "2020-10-19T20:00:00.000Z", + "key" : 1603137600000, + "doc_count" : 5241, + "count" : { + "value" : 5241 + } + }, + { + "key_as_string" : "2020-10-19T21:00:00.000Z", + "key" : 1603141200000, + "doc_count" : 4625, + "count" : { + "value" : 4625 + } + }, + { + "key_as_string" : "2020-10-19T22:00:00.000Z", + "key" : 1603144800000, + "doc_count" : 3459, + "count" : { + "value" : 3459 + } + }, + { + "key_as_string" : "2020-10-19T23:00:00.000Z", + "key" : 1603148400000, + "doc_count" : 3429, + "count" : { + "value" : 3429 + } + }, + { + "key_as_string" : "2020-10-20T00:00:00.000Z", + "key" : 1603152000000, + "doc_count" : 2603, + "count" : { + "value" : 2603 + } + }, + { + "key_as_string" : "2020-10-20T01:00:00.000Z", + "key" : 1603155600000, + "doc_count" : 2159, + "count" : { + "value" : 2159 + } + }, + { + "key_as_string" : "2020-10-20T02:00:00.000Z", + "key" : 1603159200000, + "doc_count" : 2379, + "count" : { + "value" : 2379 + } + }, + { + "key_as_string" : "2020-10-20T03:00:00.000Z", + "key" : 1603162800000, + "doc_count" : 2336, + "count" : { + "value" : 2336 + } + }, + { + "key_as_string" : "2020-10-20T04:00:00.000Z", + "key" : 1603166400000, + "doc_count" : 2717, + "count" : { + "value" : 2717 + } + }, + { + "key_as_string" : "2020-10-20T05:00:00.000Z", + "key" : 1603170000000, + "doc_count" : 2554, + "count" : { + "value" : 2554 + } + }, + { + "key_as_string" : "2020-10-20T06:00:00.000Z", + "key" : 1603173600000, + "doc_count" : 3640, + "count" : { + "value" : 3640 + } + }, + { + "key_as_string" : "2020-10-20T07:00:00.000Z", + "key" : 1603177200000, + "doc_count" : 3153, + "count" : { + "value" : 3153 + } + }, + { + "key_as_string" : "2020-10-20T08:00:00.000Z", + "key" : 1603180800000, + "doc_count" : 2825, + "count" : { + "value" : 2825 + } + }, + { + "key_as_string" : "2020-10-20T09:00:00.000Z", + "key" : 1603184400000, + "doc_count" : 3471, + "count" : { + "value" : 3471 + } + }, + { + "key_as_string" : "2020-10-20T10:00:00.000Z", + "key" : 1603188000000, + "doc_count" : 3208, + "count" : { + "value" : 3208 + } + }, + { + "key_as_string" : "2020-10-20T11:00:00.000Z", + "key" : 1603191600000, + "doc_count" : 3342, + "count" : { + "value" : 3342 + } + }, + { + "key_as_string" : "2020-10-20T12:00:00.000Z", + "key" : 1603195200000, + "doc_count" : 2745, + "count" : { + "value" : 2745 + } + }, + { + "key_as_string" : "2020-10-20T13:00:00.000Z", + "key" : 1603198800000, + "doc_count" : 2422, + "count" : { + "value" : 2422 + } + }, + { + "key_as_string" : "2020-10-20T14:00:00.000Z", + "key" : 1603202400000, + "doc_count" : 1651, + "count" : { + "value" : 1651 + } + }, + { + "key_as_string" : "2020-10-20T15:00:00.000Z", + "key" : 1603206000000, + "doc_count" : 5750, + "count" : { + "value" : 5750 + } + }, + { + "key_as_string" : "2020-10-20T16:00:00.000Z", + "key" : 1603209600000, + "doc_count" : 5289, + "count" : { + "value" : 5289 + } + }, + { + "key_as_string" : "2020-10-20T17:00:00.000Z", + "key" : 1603213200000, + "doc_count" : 7408, + "count" : { + "value" : 7408 + } + }, + { + "key_as_string" : "2020-10-20T18:00:00.000Z", + "key" : 1603216800000, + "doc_count" : 8478, + "count" : { + "value" : 8478 + } + }, + { + "key_as_string" : "2020-10-20T19:00:00.000Z", + "key" : 1603220400000, + "doc_count" : 6345, + "count" : { + "value" : 6345 + } + }, + { + "key_as_string" : "2020-10-20T20:00:00.000Z", + "key" : 1603224000000, + "doc_count" : 5353, + "count" : { + "value" : 5353 + } + }, + { + "key_as_string" : "2020-10-20T21:00:00.000Z", + "key" : 1603227600000, + "doc_count" : 5279, + "count" : { + "value" : 5279 + } + }, + { + "key_as_string" : "2020-10-20T22:00:00.000Z", + "key" : 1603231200000, + "doc_count" : 4477, + "count" : { + "value" : 4477 + } + }, + { + "key_as_string" : "2020-10-20T23:00:00.000Z", + "key" : 1603234800000, + "doc_count" : 3213, + "count" : { + "value" : 3213 + } + }, + { + "key_as_string" : "2020-10-21T00:00:00.000Z", + "key" : 1603238400000, + "doc_count" : 3019, + "count" : { + "value" : 3019 + } + }, + { + "key_as_string" : "2020-10-21T01:00:00.000Z", + "key" : 1603242000000, + "doc_count" : 3076, + "count" : { + "value" : 3076 + } + }, + { + "key_as_string" : "2020-10-21T02:00:00.000Z", + "key" : 1603245600000, + "doc_count" : 2281, + "count" : { + "value" : 2281 + } + }, + { + "key_as_string" : "2020-10-21T03:00:00.000Z", + "key" : 1603249200000, + "doc_count" : 3302, + "count" : { + "value" : 3302 + } + }, + { + "key_as_string" : "2020-10-21T04:00:00.000Z", + "key" : 1603252800000, + "doc_count" : 1859, + "count" : { + "value" : 1859 + } + }, + { + "key_as_string" : "2020-10-21T05:00:00.000Z", + "key" : 1603256400000, + "doc_count" : 860, + "count" : { + "value" : 860 + } + }, + { + "key_as_string" : "2020-10-21T06:00:00.000Z", + "key" : 1603260000000, + "doc_count" : 608, + "count" : { + "value" : 608 + } + }, + { + "key_as_string" : "2020-10-21T07:00:00.000Z", + "key" : 1603263600000, + "doc_count" : 1474, + "count" : { + "value" : 1474 + } + }, + { + "key_as_string" : "2020-10-21T08:00:00.000Z", + "key" : 1603267200000, + "doc_count" : 1671, + "count" : { + "value" : 1671 + } + }, + { + "key_as_string" : "2020-10-21T09:00:00.000Z", + "key" : 1603270800000, + "doc_count" : 1185, + "count" : { + "value" : 1185 + } + }, + { + "key_as_string" : "2020-10-21T10:00:00.000Z", + "key" : 1603274400000, + "doc_count" : 820, + "count" : { + "value" : 820 + } + }, + { + "key_as_string" : "2020-10-21T11:00:00.000Z", + "key" : 1603278000000, + "doc_count" : 859, + "count" : { + "value" : 859 + } + }, + { + "key_as_string" : "2020-10-21T12:00:00.000Z", + "key" : 1603281600000, + "doc_count" : 1207, + "count" : { + "value" : 1207 + } + }, + { + "key_as_string" : "2020-10-21T13:00:00.000Z", + "key" : 1603285200000, + "doc_count" : 856, + "count" : { + "value" : 856 + } + }, + { + "key_as_string" : "2020-10-21T14:00:00.000Z", + "key" : 1603288800000, + "doc_count" : 1150, + "count" : { + "value" : 1150 + } + }, + { + "key_as_string" : "2020-10-21T15:00:00.000Z", + "key" : 1603292400000, + "doc_count" : 1607, + "count" : { + "value" : 1607 + } + }, + { + "key_as_string" : "2020-10-21T16:00:00.000Z", + "key" : 1603296000000, + "doc_count" : 2308, + "count" : { + "value" : 2308 + } + }, + { + "key_as_string" : "2020-10-21T17:00:00.000Z", + "key" : 1603299600000, + "doc_count" : 2789, + "count" : { + "value" : 2789 + } + }, + { + "key_as_string" : "2020-10-21T18:00:00.000Z", + "key" : 1603303200000, + "doc_count" : 2212, + "count" : { + "value" : 2212 + } + }, + { + "key_as_string" : "2020-10-21T19:00:00.000Z", + "key" : 1603306800000, + "doc_count" : 3653, + "count" : { + "value" : 3653 + } + }, + { + "key_as_string" : "2020-10-21T20:00:00.000Z", + "key" : 1603310400000, + "doc_count" : 5751, + "count" : { + "value" : 5751 + } + }, + { + "key_as_string" : "2020-10-21T21:00:00.000Z", + "key" : 1603314000000, + "doc_count" : 2720, + "count" : { + "value" : 2720 + } + }, + { + "key_as_string" : "2020-10-21T22:00:00.000Z", + "key" : 1603317600000, + "doc_count" : 3033, + "count" : { + "value" : 3033 + } + }, + { + "key_as_string" : "2020-10-21T23:00:00.000Z", + "key" : 1603321200000, + "doc_count" : 2692, + "count" : { + "value" : 2692 + } + }, + { + "key_as_string" : "2020-10-22T00:00:00.000Z", + "key" : 1603324800000, + "doc_count" : 2502, + "count" : { + "value" : 2502 + } + }, + { + "key_as_string" : "2020-10-22T01:00:00.000Z", + "key" : 1603328400000, + "doc_count" : 4446, + "count" : { + "value" : 4446 + } + }, + { + "key_as_string" : "2020-10-22T02:00:00.000Z", + "key" : 1603332000000, + "doc_count" : 2284, + "count" : { + "value" : 2284 + } + }, + { + "key_as_string" : "2020-10-22T03:00:00.000Z", + "key" : 1603335600000, + "doc_count" : 2045, + "count" : { + "value" : 2045 + } + }, + { + "key_as_string" : "2020-10-22T04:00:00.000Z", + "key" : 1603339200000, + "doc_count" : 934, + "count" : { + "value" : 934 + } + }, + { + "key_as_string" : "2020-10-22T05:00:00.000Z", + "key" : 1603342800000, + "doc_count" : 812, + "count" : { + "value" : 812 + } + }, + { + "key_as_string" : "2020-10-22T06:00:00.000Z", + "key" : 1603346400000, + "doc_count" : 820, + "count" : { + "value" : 820 + } + }, + { + "key_as_string" : "2020-10-22T07:00:00.000Z", + "key" : 1603350000000, + "doc_count" : 323, + "count" : { + "value" : 323 + } + }, + { + "key_as_string" : "2020-10-22T08:00:00.000Z", + "key" : 1603353600000, + "doc_count" : 647, + "count" : { + "value" : 647 + } + }, + { + "key_as_string" : "2020-10-22T09:00:00.000Z", + "key" : 1603357200000, + "doc_count" : 553, + "count" : { + "value" : 553 + } + }, + { + "key_as_string" : "2020-10-22T10:00:00.000Z", + "key" : 1603360800000, + "doc_count" : 521, + "count" : { + "value" : 521 + } + }, + { + "key_as_string" : "2020-10-22T11:00:00.000Z", + "key" : 1603364400000, + "doc_count" : 529, + "count" : { + "value" : 529 + } + }, + { + "key_as_string" : "2020-10-22T12:00:00.000Z", + "key" : 1603368000000, + "doc_count" : 853, + "count" : { + "value" : 853 + } + }, + { + "key_as_string" : "2020-10-22T13:00:00.000Z", + "key" : 1603371600000, + "doc_count" : 862, + "count" : { + "value" : 862 + } + }, + { + "key_as_string" : "2020-10-22T14:00:00.000Z", + "key" : 1603375200000, + "doc_count" : 688, + "count" : { + "value" : 688 + } + }, + { + "key_as_string" : "2020-10-22T15:00:00.000Z", + "key" : 1603378800000, + "doc_count" : 742, + "count" : { + "value" : 742 + } + }, + { + "key_as_string" : "2020-10-22T16:00:00.000Z", + "key" : 1603382400000, + "doc_count" : 977, + "count" : { + "value" : 977 + } + }, + { + "key_as_string" : "2020-10-22T17:00:00.000Z", + "key" : 1603386000000, + "doc_count" : 1629, + "count" : { + "value" : 1629 + } + }, + { + "key_as_string" : "2020-10-22T18:00:00.000Z", + "key" : 1603389600000, + "doc_count" : 3084, + "count" : { + "value" : 3084 + } + }, + { + "key_as_string" : "2020-10-22T19:00:00.000Z", + "key" : 1603393200000, + "doc_count" : 3424, + "count" : { + "value" : 3424 + } + }, + { + "key_as_string" : "2020-10-22T20:00:00.000Z", + "key" : 1603396800000, + "doc_count" : 1427, + "count" : { + "value" : 1427 + } + }, + { + "key_as_string" : "2020-10-22T21:00:00.000Z", + "key" : 1603400400000, + "doc_count" : 1952, + "count" : { + "value" : 1952 + } + }, + { + "key_as_string" : "2020-10-22T22:00:00.000Z", + "key" : 1603404000000, + "doc_count" : 1396, + "count" : { + "value" : 1396 + } + }, + { + "key_as_string" : "2020-10-22T23:00:00.000Z", + "key" : 1603407600000, + "doc_count" : 1983, + "count" : { + "value" : 1983 + } + }, + { + "key_as_string" : "2020-10-23T00:00:00.000Z", + "key" : 1603411200000, + "doc_count" : 1939, + "count" : { + "value" : 1939 + } + }, + { + "key_as_string" : "2020-10-23T01:00:00.000Z", + "key" : 1603414800000, + "doc_count" : 1594, + "count" : { + "value" : 1594 + } + }, + { + "key_as_string" : "2020-10-23T02:00:00.000Z", + "key" : 1603418400000, + "doc_count" : 1251, + "count" : { + "value" : 1251 + } + }, + { + "key_as_string" : "2020-10-23T03:00:00.000Z", + "key" : 1603422000000, + "doc_count" : 2271, + "count" : { + "value" : 2271 + } + }, + { + "key_as_string" : "2020-10-23T04:00:00.000Z", + "key" : 1603425600000, + "doc_count" : 1001, + "count" : { + "value" : 1001 + } + }, + { + "key_as_string" : "2020-10-23T05:00:00.000Z", + "key" : 1603429200000, + "doc_count" : 411, + "count" : { + "value" : 411 + } + }, + { + "key_as_string" : "2020-10-23T06:00:00.000Z", + "key" : 1603432800000, + "doc_count" : 322, + "count" : { + "value" : 322 + } + }, + { + "key_as_string" : "2020-10-23T07:00:00.000Z", + "key" : 1603436400000, + "doc_count" : 407, + "count" : { + "value" : 407 + } + }, + { + "key_as_string" : "2020-10-23T08:00:00.000Z", + "key" : 1603440000000, + "doc_count" : 887, + "count" : { + "value" : 887 + } + }, + { + "key_as_string" : "2020-10-23T09:00:00.000Z", + "key" : 1603443600000, + "doc_count" : 571, + "count" : { + "value" : 571 + } + }, + { + "key_as_string" : "2020-10-23T10:00:00.000Z", + "key" : 1603447200000, + "doc_count" : 692, + "count" : { + "value" : 692 + } + }, + { + "key_as_string" : "2020-10-23T11:00:00.000Z", + "key" : 1603450800000, + "doc_count" : 536, + "count" : { + "value" : 536 + } + }, + { + "key_as_string" : "2020-10-23T12:00:00.000Z", + "key" : 1603454400000, + "doc_count" : 714, + "count" : { + "value" : 714 + } + }, + { + "key_as_string" : "2020-10-23T13:00:00.000Z", + "key" : 1603458000000, + "doc_count" : 679, + "count" : { + "value" : 679 + } + }, + { + "key_as_string" : "2020-10-23T14:00:00.000Z", + "key" : 1603461600000, + "doc_count" : 842, + "count" : { + "value" : 842 + } + }, + { + "key_as_string" : "2020-10-23T15:00:00.000Z", + "key" : 1603465200000, + "doc_count" : 1351, + "count" : { + "value" : 1351 + } + }, + { + "key_as_string" : "2020-10-23T16:00:00.000Z", + "key" : 1603468800000, + "doc_count" : 1722, + "count" : { + "value" : 1722 + } + }, + { + "key_as_string" : "2020-10-23T17:00:00.000Z", + "key" : 1603472400000, + "doc_count" : 2171, + "count" : { + "value" : 2171 + } + }, + { + "key_as_string" : "2020-10-23T18:00:00.000Z", + "key" : 1603476000000, + "doc_count" : 1869, + "count" : { + "value" : 1869 + } + }, + { + "key_as_string" : "2020-10-23T19:00:00.000Z", + "key" : 1603479600000, + "doc_count" : 2117, + "count" : { + "value" : 2117 + } + }, + { + "key_as_string" : "2020-10-23T20:00:00.000Z", + "key" : 1603483200000, + "doc_count" : 1849, + "count" : { + "value" : 1849 + } + }, + { + "key_as_string" : "2020-10-23T21:00:00.000Z", + "key" : 1603486800000, + "doc_count" : 2385, + "count" : { + "value" : 2385 + } + }, + { + "key_as_string" : "2020-10-23T22:00:00.000Z", + "key" : 1603490400000, + "doc_count" : 945, + "count" : { + "value" : 945 + } + }, + { + "key_as_string" : "2020-10-23T23:00:00.000Z", + "key" : 1603494000000, + "doc_count" : 680, + "count" : { + "value" : 680 + } + }, + { + "key_as_string" : "2020-10-24T00:00:00.000Z", + "key" : 1603497600000, + "doc_count" : 1282, + "count" : { + "value" : 1282 + } + }, + { + "key_as_string" : "2020-10-24T01:00:00.000Z", + "key" : 1603501200000, + "doc_count" : 2436, + "count" : { + "value" : 2436 + } + }, + { + "key_as_string" : "2020-10-24T02:00:00.000Z", + "key" : 1603504800000, + "doc_count" : 1522, + "count" : { + "value" : 1522 + } + }, + { + "key_as_string" : "2020-10-24T03:00:00.000Z", + "key" : 1603508400000, + "doc_count" : 1161, + "count" : { + "value" : 1161 + } + }, + { + "key_as_string" : "2020-10-24T04:00:00.000Z", + "key" : 1603512000000, + "doc_count" : 1481, + "count" : { + "value" : 1481 + } + }, + { + "key_as_string" : "2020-10-24T05:00:00.000Z", + "key" : 1603515600000, + "doc_count" : 779, + "count" : { + "value" : 779 + } + }, + { + "key_as_string" : "2020-10-24T06:00:00.000Z", + "key" : 1603519200000, + "doc_count" : 2020, + "count" : { + "value" : 2020 + } + }, + { + "key_as_string" : "2020-10-24T07:00:00.000Z", + "key" : 1603522800000, + "doc_count" : 2563, + "count" : { + "value" : 2563 + } + }, + { + "key_as_string" : "2020-10-24T08:00:00.000Z", + "key" : 1603526400000, + "doc_count" : 1294, + "count" : { + "value" : 1294 + } + }, + { + "key_as_string" : "2020-10-24T09:00:00.000Z", + "key" : 1603530000000, + "doc_count" : 1752, + "count" : { + "value" : 1752 + } + }, + { + "key_as_string" : "2020-10-24T10:00:00.000Z", + "key" : 1603533600000, + "doc_count" : 1871, + "count" : { + "value" : 1871 + } + }, + { + "key_as_string" : "2020-10-24T11:00:00.000Z", + "key" : 1603537200000, + "doc_count" : 1872, + "count" : { + "value" : 1872 + } + }, + { + "key_as_string" : "2020-10-24T12:00:00.000Z", + "key" : 1603540800000, + "doc_count" : 2716, + "count" : { + "value" : 2716 + } + }, + { + "key_as_string" : "2020-10-24T13:00:00.000Z", + "key" : 1603544400000, + "doc_count" : 4760, + "count" : { + "value" : 4760 + } + }, + { + "key_as_string" : "2020-10-24T14:00:00.000Z", + "key" : 1603548000000, + "doc_count" : 1495, + "count" : { + "value" : 1495 + } + }, + { + "key_as_string" : "2020-10-24T15:00:00.000Z", + "key" : 1603551600000, + "doc_count" : 2460, + "count" : { + "value" : 2460 + } + }, + { + "key_as_string" : "2020-10-24T16:00:00.000Z", + "key" : 1603555200000, + "doc_count" : 2753, + "count" : { + "value" : 2753 + } + }, + { + "key_as_string" : "2020-10-24T17:00:00.000Z", + "key" : 1603558800000, + "doc_count" : 2828, + "count" : { + "value" : 2828 + } + }, + { + "key_as_string" : "2020-10-24T18:00:00.000Z", + "key" : 1603562400000, + "doc_count" : 2757, + "count" : { + "value" : 2757 + } + }, + { + "key_as_string" : "2020-10-24T19:00:00.000Z", + "key" : 1603566000000, + "doc_count" : 1261, + "count" : { + "value" : 1261 + } + }, + { + "key_as_string" : "2020-10-24T20:00:00.000Z", + "key" : 1603569600000, + "doc_count" : 1949, + "count" : { + "value" : 1949 + } + }, + { + "key_as_string" : "2020-10-24T21:00:00.000Z", + "key" : 1603573200000, + "doc_count" : 2694, + "count" : { + "value" : 2694 + } + }, + { + "key_as_string" : "2020-10-24T22:00:00.000Z", + "key" : 1603576800000, + "doc_count" : 2405, + "count" : { + "value" : 2405 + } + }, + { + "key_as_string" : "2020-10-24T23:00:00.000Z", + "key" : 1603580400000, + "doc_count" : 2258, + "count" : { + "value" : 2258 + } + }, + { + "key_as_string" : "2020-10-25T00:00:00.000Z", + "key" : 1603584000000, + "doc_count" : 2416, + "count" : { + "value" : 2416 + } + }, + { + "key_as_string" : "2020-10-25T01:00:00.000Z", + "key" : 1603587600000, + "doc_count" : 1975, + "count" : { + "value" : 1975 + } + }, + { + "key_as_string" : "2020-10-25T02:00:00.000Z", + "key" : 1603591200000, + "doc_count" : 2469, + "count" : { + "value" : 2469 + } + }, + { + "key_as_string" : "2020-10-25T03:00:00.000Z", + "key" : 1603594800000, + "doc_count" : 3716, + "count" : { + "value" : 3716 + } + }, + { + "key_as_string" : "2020-10-25T04:00:00.000Z", + "key" : 1603598400000, + "doc_count" : 1485, + "count" : { + "value" : 1485 + } + }, + { + "key_as_string" : "2020-10-25T05:00:00.000Z", + "key" : 1603602000000, + "doc_count" : 1779, + "count" : { + "value" : 1779 + } + }, + { + "key_as_string" : "2020-10-25T06:00:00.000Z", + "key" : 1603605600000, + "doc_count" : 2678, + "count" : { + "value" : 2678 + } + }, + { + "key_as_string" : "2020-10-25T07:00:00.000Z", + "key" : 1603609200000, + "doc_count" : 4151, + "count" : { + "value" : 4151 + } + }, + { + "key_as_string" : "2020-10-25T08:00:00.000Z", + "key" : 1603612800000, + "doc_count" : 4526, + "count" : { + "value" : 4526 + } + }, + { + "key_as_string" : "2020-10-25T09:00:00.000Z", + "key" : 1603616400000, + "doc_count" : 3422, + "count" : { + "value" : 3422 + } + }, + { + "key_as_string" : "2020-10-25T10:00:00.000Z", + "key" : 1603620000000, + "doc_count" : 4100, + "count" : { + "value" : 4100 + } + }, + { + "key_as_string" : "2020-10-25T11:00:00.000Z", + "key" : 1603623600000, + "doc_count" : 2771, + "count" : { + "value" : 2771 + } + }, + { + "key_as_string" : "2020-10-25T12:00:00.000Z", + "key" : 1603627200000, + "doc_count" : 2656, + "count" : { + "value" : 2656 + } + }, + { + "key_as_string" : "2020-10-25T13:00:00.000Z", + "key" : 1603630800000, + "doc_count" : 1886, + "count" : { + "value" : 1886 + } + }, + { + "key_as_string" : "2020-10-25T14:00:00.000Z", + "key" : 1603634400000, + "doc_count" : 2379, + "count" : { + "value" : 2379 + } + }, + { + "key_as_string" : "2020-10-25T15:00:00.000Z", + "key" : 1603638000000, + "doc_count" : 3541, + "count" : { + "value" : 3541 + } + }, + { + "key_as_string" : "2020-10-25T16:00:00.000Z", + "key" : 1603641600000, + "doc_count" : 2138, + "count" : { + "value" : 2138 + } + }, + { + "key_as_string" : "2020-10-25T17:00:00.000Z", + "key" : 1603645200000, + "doc_count" : 2543, + "count" : { + "value" : 2543 + } + }, + { + "key_as_string" : "2020-10-25T18:00:00.000Z", + "key" : 1603648800000, + "doc_count" : 467, + "count" : { + "value" : 467 + } + }, + { + "key_as_string" : "2020-10-25T19:00:00.000Z", + "key" : 1603652400000, + "doc_count" : 991, + "count" : { + "value" : 991 + } + }, + { + "key_as_string" : "2020-10-25T20:00:00.000Z", + "key" : 1603656000000, + "doc_count" : 1342, + "count" : { + "value" : 1342 + } + }, + { + "key_as_string" : "2020-10-25T21:00:00.000Z", + "key" : 1603659600000, + "doc_count" : 2942, + "count" : { + "value" : 2942 + } + }, + { + "key_as_string" : "2020-10-25T22:00:00.000Z", + "key" : 1603663200000, + "doc_count" : 3469, + "count" : { + "value" : 3469 + } + }, + { + "key_as_string" : "2020-10-25T23:00:00.000Z", + "key" : 1603666800000, + "doc_count" : 2571, + "count" : { + "value" : 2571 + } + }, + { + "key_as_string" : "2020-10-26T00:00:00.000Z", + "key" : 1603670400000, + "doc_count" : 1029, + "count" : { + "value" : 1029 + } + }, + { + "key_as_string" : "2020-10-26T01:00:00.000Z", + "key" : 1603674000000, + "doc_count" : 1194, + "count" : { + "value" : 1194 + } + }, + { + "key_as_string" : "2020-10-26T02:00:00.000Z", + "key" : 1603677600000, + "doc_count" : 682, + "count" : { + "value" : 682 + } + }, + { + "key_as_string" : "2020-10-26T03:00:00.000Z", + "key" : 1603681200000, + "doc_count" : 2098, + "count" : { + "value" : 2098 + } + }, + { + "key_as_string" : "2020-10-26T04:00:00.000Z", + "key" : 1603684800000, + "doc_count" : 1491, + "count" : { + "value" : 1491 + } + }, + { + "key_as_string" : "2020-10-26T05:00:00.000Z", + "key" : 1603688400000, + "doc_count" : 608, + "count" : { + "value" : 608 + } + }, + { + "key_as_string" : "2020-10-26T06:00:00.000Z", + "key" : 1603692000000, + "doc_count" : 163, + "count" : { + "value" : 163 + } + }, + { + "key_as_string" : "2020-10-26T07:00:00.000Z", + "key" : 1603695600000, + "doc_count" : 108, + "count" : { + "value" : 108 + } + }, + { + "key_as_string" : "2020-10-26T08:00:00.000Z", + "key" : 1603699200000, + "doc_count" : 142, + "count" : { + "value" : 142 + } + }, + { + "key_as_string" : "2020-10-26T09:00:00.000Z", + "key" : 1603702800000, + "doc_count" : 180, + "count" : { + "value" : 180 + } + }, + { + "key_as_string" : "2020-10-26T10:00:00.000Z", + "key" : 1603706400000, + "doc_count" : 132, + "count" : { + "value" : 132 + } + }, + { + "key_as_string" : "2020-10-26T11:00:00.000Z", + "key" : 1603710000000, + "doc_count" : 193, + "count" : { + "value" : 193 + } + }, + { + "key_as_string" : "2020-10-26T12:00:00.000Z", + "key" : 1603713600000, + "doc_count" : 148, + "count" : { + "value" : 148 + } + }, + { + "key_as_string" : "2020-10-26T13:00:00.000Z", + "key" : 1603717200000, + "doc_count" : 83, + "count" : { + "value" : 83 + } + }, + { + "key_as_string" : "2020-10-26T14:00:00.000Z", + "key" : 1603720800000, + "doc_count" : 183, + "count" : { + "value" : 183 + } + }, + { + "key_as_string" : "2020-10-26T15:00:00.000Z", + "key" : 1603724400000, + "doc_count" : 257, + "count" : { + "value" : 257 + } + }, + { + "key_as_string" : "2020-10-26T16:00:00.000Z", + "key" : 1603728000000, + "doc_count" : 872, + "count" : { + "value" : 872 + } + }, + { + "key_as_string" : "2020-10-26T17:00:00.000Z", + "key" : 1603731600000, + "doc_count" : 337, + "count" : { + "value" : 337 + } + }, + { + "key_as_string" : "2020-10-26T18:00:00.000Z", + "key" : 1603735200000, + "doc_count" : 398, + "count" : { + "value" : 398 + } + }, + { + "key_as_string" : "2020-10-26T19:00:00.000Z", + "key" : 1603738800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T20:00:00.000Z", + "key" : 1603742400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T21:00:00.000Z", + "key" : 1603746000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T22:00:00.000Z", + "key" : 1603749600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T23:00:00.000Z", + "key" : 1603753200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T00:00:00.000Z", + "key" : 1603756800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T01:00:00.000Z", + "key" : 1603760400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T02:00:00.000Z", + "key" : 1603764000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T03:00:00.000Z", + "key" : 1603767600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T04:00:00.000Z", + "key" : 1603771200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T05:00:00.000Z", + "key" : 1603774800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T06:00:00.000Z", + "key" : 1603778400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T07:00:00.000Z", + "key" : 1603782000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T08:00:00.000Z", + "key" : 1603785600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T09:00:00.000Z", + "key" : 1603789200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T10:00:00.000Z", + "key" : 1603792800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T11:00:00.000Z", + "key" : 1603796400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T12:00:00.000Z", + "key" : 1603800000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T13:00:00.000Z", + "key" : 1603803600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T14:00:00.000Z", + "key" : 1603807200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T15:00:00.000Z", + "key" : 1603810800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T16:00:00.000Z", + "key" : 1603814400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T17:00:00.000Z", + "key" : 1603818000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T18:00:00.000Z", + "key" : 1603821600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T19:00:00.000Z", + "key" : 1603825200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T20:00:00.000Z", + "key" : 1603828800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T21:00:00.000Z", + "key" : 1603832400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T22:00:00.000Z", + "key" : 1603836000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T23:00:00.000Z", + "key" : 1603839600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T00:00:00.000Z", + "key" : 1603843200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T01:00:00.000Z", + "key" : 1603846800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T02:00:00.000Z", + "key" : 1603850400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T03:00:00.000Z", + "key" : 1603854000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T04:00:00.000Z", + "key" : 1603857600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T05:00:00.000Z", + "key" : 1603861200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T06:00:00.000Z", + "key" : 1603864800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T07:00:00.000Z", + "key" : 1603868400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T08:00:00.000Z", + "key" : 1603872000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T09:00:00.000Z", + "key" : 1603875600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T10:00:00.000Z", + "key" : 1603879200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T11:00:00.000Z", + "key" : 1603882800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T12:00:00.000Z", + "key" : 1603886400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T13:00:00.000Z", + "key" : 1603890000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T14:00:00.000Z", + "key" : 1603893600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T15:00:00.000Z", + "key" : 1603897200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T16:00:00.000Z", + "key" : 1603900800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T17:00:00.000Z", + "key" : 1603904400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T18:00:00.000Z", + "key" : 1603908000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T19:00:00.000Z", + "key" : 1603911600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T20:00:00.000Z", + "key" : 1603915200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T21:00:00.000Z", + "key" : 1603918800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T22:00:00.000Z", + "key" : 1603922400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T23:00:00.000Z", + "key" : 1603926000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T00:00:00.000Z", + "key" : 1603929600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T01:00:00.000Z", + "key" : 1603933200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T02:00:00.000Z", + "key" : 1603936800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T03:00:00.000Z", + "key" : 1603940400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T04:00:00.000Z", + "key" : 1603944000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T05:00:00.000Z", + "key" : 1603947600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T06:00:00.000Z", + "key" : 1603951200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T07:00:00.000Z", + "key" : 1603954800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T08:00:00.000Z", + "key" : 1603958400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T09:00:00.000Z", + "key" : 1603962000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T10:00:00.000Z", + "key" : 1603965600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T11:00:00.000Z", + "key" : 1603969200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T12:00:00.000Z", + "key" : 1603972800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T13:00:00.000Z", + "key" : 1603976400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T14:00:00.000Z", + "key" : 1603980000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T15:00:00.000Z", + "key" : 1603983600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T16:00:00.000Z", + "key" : 1603987200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T17:00:00.000Z", + "key" : 1603990800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T18:00:00.000Z", + "key" : 1603994400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T19:00:00.000Z", + "key" : 1603998000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T20:00:00.000Z", + "key" : 1604001600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T21:00:00.000Z", + "key" : 1604005200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T22:00:00.000Z", + "key" : 1604008800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T23:00:00.000Z", + "key" : 1604012400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T00:00:00.000Z", + "key" : 1604016000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T01:00:00.000Z", + "key" : 1604019600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T02:00:00.000Z", + "key" : 1604023200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T03:00:00.000Z", + "key" : 1604026800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T04:00:00.000Z", + "key" : 1604030400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T05:00:00.000Z", + "key" : 1604034000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T06:00:00.000Z", + "key" : 1604037600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T07:00:00.000Z", + "key" : 1604041200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T08:00:00.000Z", + "key" : 1604044800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T09:00:00.000Z", + "key" : 1604048400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T10:00:00.000Z", + "key" : 1604052000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T11:00:00.000Z", + "key" : 1604055600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T12:00:00.000Z", + "key" : 1604059200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T13:00:00.000Z", + "key" : 1604062800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T14:00:00.000Z", + "key" : 1604066400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T15:00:00.000Z", + "key" : 1604070000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T16:00:00.000Z", + "key" : 1604073600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T17:00:00.000Z", + "key" : 1604077200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T18:00:00.000Z", + "key" : 1604080800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T19:00:00.000Z", + "key" : 1604084400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T20:00:00.000Z", + "key" : 1604088000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T21:00:00.000Z", + "key" : 1604091600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T22:00:00.000Z", + "key" : 1604095200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T23:00:00.000Z", + "key" : 1604098800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T00:00:00.000Z", + "key" : 1604102400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T01:00:00.000Z", + "key" : 1604106000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T02:00:00.000Z", + "key" : 1604109600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T03:00:00.000Z", + "key" : 1604113200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T04:00:00.000Z", + "key" : 1604116800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T05:00:00.000Z", + "key" : 1604120400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T06:00:00.000Z", + "key" : 1604124000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T07:00:00.000Z", + "key" : 1604127600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T08:00:00.000Z", + "key" : 1604131200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T09:00:00.000Z", + "key" : 1604134800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T10:00:00.000Z", + "key" : 1604138400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T11:00:00.000Z", + "key" : 1604142000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T12:00:00.000Z", + "key" : 1604145600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T13:00:00.000Z", + "key" : 1604149200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T14:00:00.000Z", + "key" : 1604152800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T15:00:00.000Z", + "key" : 1604156400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T16:00:00.000Z", + "key" : 1604160000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T17:00:00.000Z", + "key" : 1604163600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T18:00:00.000Z", + "key" : 1604167200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T19:00:00.000Z", + "key" : 1604170800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T20:00:00.000Z", + "key" : 1604174400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T21:00:00.000Z", + "key" : 1604178000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T22:00:00.000Z", + "key" : 1604181600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T23:00:00.000Z", + "key" : 1604185200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + } + ] + }, + "average" : { + "value" : 4939.126009693054 + } + } +} diff --git a/services/api/src/models/mockHitDataLegacy-project-a-missing-data.json b/services/api/src/models/mockHitDataLegacy-project-a-missing-data.json new file mode 100644 index 0000000000..f6f616e8ad --- /dev/null +++ b/services/api/src/models/mockHitDataLegacy-project-a-missing-data.json @@ -0,0 +1,5787 @@ +{ + "took" : 2453, + "timed_out" : false, + "_shards" : { + "total" : 2, + "successful" : 2, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 7200, + "relation" : "gte" + }, + "max_score" : 1.0, + "hits" : [] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-09-01T00:00:00.000Z", + "key" : 1598918400000, + "doc_count" : 944, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T01:00:00.000Z", + "key" : 1598922000000, + "doc_count" : 2662, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T02:00:00.000Z", + "key" : 1598925600000, + "doc_count" : 2924, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T03:00:00.000Z", + "key" : 1598929200000, + "doc_count" : 6756, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T04:00:00.000Z", + "key" : 1598932800000, + "doc_count" : 4545, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T05:00:00.000Z", + "key" : 1598936400000, + "doc_count" : 7131, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T06:00:00.000Z", + "key" : 1598940000000, + "doc_count" : 7077, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T07:00:00.000Z", + "key" : 1598943600000, + "doc_count" : 13414, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T08:00:00.000Z", + "key" : 1598947200000, + "doc_count" : 12588, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T09:00:00.000Z", + "key" : 1598950800000, + "doc_count" : 10648, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T10:00:00.000Z", + "key" : 1598954400000, + "doc_count" : 8862, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T11:00:00.000Z", + "key" : 1598958000000, + "doc_count" : 13007, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T12:00:00.000Z", + "key" : 1598961600000, + "doc_count" : 7581, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T13:00:00.000Z", + "key" : 1598965200000, + "doc_count" : 14882, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T14:00:00.000Z", + "key" : 1598968800000, + "doc_count" : 15423, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T15:00:00.000Z", + "key" : 1598972400000, + "doc_count" : 11008, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T16:00:00.000Z", + "key" : 1598976000000, + "doc_count" : 8298, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T17:00:00.000Z", + "key" : 1598979600000, + "doc_count" : 7120, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T18:00:00.000Z", + "key" : 1598983200000, + "doc_count" : 8097, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T19:00:00.000Z", + "key" : 1598986800000, + "doc_count" : 8688, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T20:00:00.000Z", + "key" : 1598990400000, + "doc_count" : 6807, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T21:00:00.000Z", + "key" : 1598994000000, + "doc_count" : 4425, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T22:00:00.000Z", + "key" : 1598997600000, + "doc_count" : 3184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T23:00:00.000Z", + "key" : 1599001200000, + "doc_count" : 2817, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T00:00:00.000Z", + "key" : 1599004800000, + "doc_count" : 3009, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T01:00:00.000Z", + "key" : 1599008400000, + "doc_count" : 2468, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T02:00:00.000Z", + "key" : 1599012000000, + "doc_count" : 1832, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T03:00:00.000Z", + "key" : 1599015600000, + "doc_count" : 2481, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T04:00:00.000Z", + "key" : 1599019200000, + "doc_count" : 3069, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T05:00:00.000Z", + "key" : 1599022800000, + "doc_count" : 4119, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T06:00:00.000Z", + "key" : 1599026400000, + "doc_count" : 5234, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T07:00:00.000Z", + "key" : 1599030000000, + "doc_count" : 6582, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T08:00:00.000Z", + "key" : 1599033600000, + "doc_count" : 10879, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T09:00:00.000Z", + "key" : 1599037200000, + "doc_count" : 10298, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T10:00:00.000Z", + "key" : 1599040800000, + "doc_count" : 12992, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T11:00:00.000Z", + "key" : 1599044400000, + "doc_count" : 12301, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T12:00:00.000Z", + "key" : 1599048000000, + "doc_count" : 10647, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T13:00:00.000Z", + "key" : 1599051600000, + "doc_count" : 11518, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T14:00:00.000Z", + "key" : 1599055200000, + "doc_count" : 8682, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T15:00:00.000Z", + "key" : 1599058800000, + "doc_count" : 8802, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T16:00:00.000Z", + "key" : 1599062400000, + "doc_count" : 6745, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T17:00:00.000Z", + "key" : 1599066000000, + "doc_count" : 6872, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T18:00:00.000Z", + "key" : 1599069600000, + "doc_count" : 7209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T19:00:00.000Z", + "key" : 1599073200000, + "doc_count" : 7669, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T20:00:00.000Z", + "key" : 1599076800000, + "doc_count" : 6579, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T21:00:00.000Z", + "key" : 1599080400000, + "doc_count" : 5865, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T22:00:00.000Z", + "key" : 1599084000000, + "doc_count" : 3413, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T23:00:00.000Z", + "key" : 1599087600000, + "doc_count" : 3262, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T00:00:00.000Z", + "key" : 1599091200000, + "doc_count" : 4056, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T01:00:00.000Z", + "key" : 1599094800000, + "doc_count" : 3452, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T02:00:00.000Z", + "key" : 1599098400000, + "doc_count" : 5088, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T03:00:00.000Z", + "key" : 1599102000000, + "doc_count" : 6927, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T04:00:00.000Z", + "key" : 1599105600000, + "doc_count" : 5051, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T05:00:00.000Z", + "key" : 1599109200000, + "doc_count" : 6748, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T06:00:00.000Z", + "key" : 1599112800000, + "doc_count" : 6848, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T07:00:00.000Z", + "key" : 1599116400000, + "doc_count" : 6907, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T08:00:00.000Z", + "key" : 1599120000000, + "doc_count" : 7342, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T09:00:00.000Z", + "key" : 1599123600000, + "doc_count" : 7591, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T10:00:00.000Z", + "key" : 1599127200000, + "doc_count" : 6986, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T11:00:00.000Z", + "key" : 1599130800000, + "doc_count" : 15011, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T12:00:00.000Z", + "key" : 1599134400000, + "doc_count" : 16058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T13:00:00.000Z", + "key" : 1599138000000, + "doc_count" : 12096, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T14:00:00.000Z", + "key" : 1599141600000, + "doc_count" : 10311, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T15:00:00.000Z", + "key" : 1599145200000, + "doc_count" : 8735, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T16:00:00.000Z", + "key" : 1599148800000, + "doc_count" : 7153, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T17:00:00.000Z", + "key" : 1599152400000, + "doc_count" : 7572, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T18:00:00.000Z", + "key" : 1599156000000, + "doc_count" : 8493, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T19:00:00.000Z", + "key" : 1599159600000, + "doc_count" : 9328, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T20:00:00.000Z", + "key" : 1599163200000, + "doc_count" : 7587, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T21:00:00.000Z", + "key" : 1599166800000, + "doc_count" : 9464, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T22:00:00.000Z", + "key" : 1599170400000, + "doc_count" : 7958, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T23:00:00.000Z", + "key" : 1599174000000, + "doc_count" : 3505, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T00:00:00.000Z", + "key" : 1599177600000, + "doc_count" : 2370, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T01:00:00.000Z", + "key" : 1599181200000, + "doc_count" : 2423, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T02:00:00.000Z", + "key" : 1599184800000, + "doc_count" : 2815, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T03:00:00.000Z", + "key" : 1599188400000, + "doc_count" : 2163, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T04:00:00.000Z", + "key" : 1599192000000, + "doc_count" : 2864, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T05:00:00.000Z", + "key" : 1599195600000, + "doc_count" : 4695, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T06:00:00.000Z", + "key" : 1599199200000, + "doc_count" : 6497, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T07:00:00.000Z", + "key" : 1599202800000, + "doc_count" : 6634, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T08:00:00.000Z", + "key" : 1599206400000, + "doc_count" : 7042, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T09:00:00.000Z", + "key" : 1599210000000, + "doc_count" : 7554, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T10:00:00.000Z", + "key" : 1599213600000, + "doc_count" : 5946, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T11:00:00.000Z", + "key" : 1599217200000, + "doc_count" : 7070, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T12:00:00.000Z", + "key" : 1599220800000, + "doc_count" : 6781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T13:00:00.000Z", + "key" : 1599224400000, + "doc_count" : 7139, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T14:00:00.000Z", + "key" : 1599228000000, + "doc_count" : 7292, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T15:00:00.000Z", + "key" : 1599231600000, + "doc_count" : 8757, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T16:00:00.000Z", + "key" : 1599235200000, + "doc_count" : 8160, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T17:00:00.000Z", + "key" : 1599238800000, + "doc_count" : 9821, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T18:00:00.000Z", + "key" : 1599242400000, + "doc_count" : 6753, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T19:00:00.000Z", + "key" : 1599246000000, + "doc_count" : 7511, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T20:00:00.000Z", + "key" : 1599249600000, + "doc_count" : 7204, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T21:00:00.000Z", + "key" : 1599253200000, + "doc_count" : 6557, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T22:00:00.000Z", + "key" : 1599256800000, + "doc_count" : 4891, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T23:00:00.000Z", + "key" : 1599260400000, + "doc_count" : 4481, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T00:00:00.000Z", + "key" : 1599264000000, + "doc_count" : 4066, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T01:00:00.000Z", + "key" : 1599267600000, + "doc_count" : 5230, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T02:00:00.000Z", + "key" : 1599271200000, + "doc_count" : 4880, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T03:00:00.000Z", + "key" : 1599274800000, + "doc_count" : 4816, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T04:00:00.000Z", + "key" : 1599278400000, + "doc_count" : 5239, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T05:00:00.000Z", + "key" : 1599282000000, + "doc_count" : 7294, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T06:00:00.000Z", + "key" : 1599285600000, + "doc_count" : 7409, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T07:00:00.000Z", + "key" : 1599289200000, + "doc_count" : 8609, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T08:00:00.000Z", + "key" : 1599292800000, + "doc_count" : 9194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T09:00:00.000Z", + "key" : 1599296400000, + "doc_count" : 10781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T10:00:00.000Z", + "key" : 1599300000000, + "doc_count" : 9436, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T11:00:00.000Z", + "key" : 1599303600000, + "doc_count" : 8995, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T12:00:00.000Z", + "key" : 1599307200000, + "doc_count" : 10198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T13:00:00.000Z", + "key" : 1599310800000, + "doc_count" : 8098, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T14:00:00.000Z", + "key" : 1599314400000, + "doc_count" : 7837, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T15:00:00.000Z", + "key" : 1599318000000, + "doc_count" : 7784, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T16:00:00.000Z", + "key" : 1599321600000, + "doc_count" : 7747, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T17:00:00.000Z", + "key" : 1599325200000, + "doc_count" : 7408, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T18:00:00.000Z", + "key" : 1599328800000, + "doc_count" : 11140, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T19:00:00.000Z", + "key" : 1599332400000, + "doc_count" : 12122, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T20:00:00.000Z", + "key" : 1599336000000, + "doc_count" : 9441, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T21:00:00.000Z", + "key" : 1599339600000, + "doc_count" : 8365, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T22:00:00.000Z", + "key" : 1599343200000, + "doc_count" : 5243, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T23:00:00.000Z", + "key" : 1599346800000, + "doc_count" : 4407, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T00:00:00.000Z", + "key" : 1599350400000, + "doc_count" : 3096, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T01:00:00.000Z", + "key" : 1599354000000, + "doc_count" : 5001, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T02:00:00.000Z", + "key" : 1599357600000, + "doc_count" : 2228, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T03:00:00.000Z", + "key" : 1599361200000, + "doc_count" : 2500, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T04:00:00.000Z", + "key" : 1599364800000, + "doc_count" : 3343, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T05:00:00.000Z", + "key" : 1599368400000, + "doc_count" : 7398, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T06:00:00.000Z", + "key" : 1599372000000, + "doc_count" : 10976, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T07:00:00.000Z", + "key" : 1599375600000, + "doc_count" : 11644, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T08:00:00.000Z", + "key" : 1599379200000, + "doc_count" : 12455, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T09:00:00.000Z", + "key" : 1599382800000, + "doc_count" : 10296, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T10:00:00.000Z", + "key" : 1599386400000, + "doc_count" : 9073, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T11:00:00.000Z", + "key" : 1599390000000, + "doc_count" : 10303, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T12:00:00.000Z", + "key" : 1599393600000, + "doc_count" : 10522, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T13:00:00.000Z", + "key" : 1599397200000, + "doc_count" : 9908, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T14:00:00.000Z", + "key" : 1599400800000, + "doc_count" : 9622, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T15:00:00.000Z", + "key" : 1599404400000, + "doc_count" : 10342, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T16:00:00.000Z", + "key" : 1599408000000, + "doc_count" : 5966, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T17:00:00.000Z", + "key" : 1599411600000, + "doc_count" : 7763, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T18:00:00.000Z", + "key" : 1599415200000, + "doc_count" : 7950, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T19:00:00.000Z", + "key" : 1599418800000, + "doc_count" : 11029, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T20:00:00.000Z", + "key" : 1599422400000, + "doc_count" : 9658, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T21:00:00.000Z", + "key" : 1599426000000, + "doc_count" : 6984, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T22:00:00.000Z", + "key" : 1599429600000, + "doc_count" : 5371, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T23:00:00.000Z", + "key" : 1599433200000, + "doc_count" : 3893, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T00:00:00.000Z", + "key" : 1599436800000, + "doc_count" : 4313, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T01:00:00.000Z", + "key" : 1599440400000, + "doc_count" : 4540, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T02:00:00.000Z", + "key" : 1599444000000, + "doc_count" : 3492, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T03:00:00.000Z", + "key" : 1599447600000, + "doc_count" : 2937, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T04:00:00.000Z", + "key" : 1599451200000, + "doc_count" : 3148, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T05:00:00.000Z", + "key" : 1599454800000, + "doc_count" : 4138, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T06:00:00.000Z", + "key" : 1599458400000, + "doc_count" : 7714, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T07:00:00.000Z", + "key" : 1599462000000, + "doc_count" : 8749, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T08:00:00.000Z", + "key" : 1599465600000, + "doc_count" : 7864, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T09:00:00.000Z", + "key" : 1599469200000, + "doc_count" : 10273, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T10:00:00.000Z", + "key" : 1599472800000, + "doc_count" : 8277, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T11:00:00.000Z", + "key" : 1599476400000, + "doc_count" : 7763, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T12:00:00.000Z", + "key" : 1599480000000, + "doc_count" : 8687, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T13:00:00.000Z", + "key" : 1599483600000, + "doc_count" : 7654, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T14:00:00.000Z", + "key" : 1599487200000, + "doc_count" : 7013, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T15:00:00.000Z", + "key" : 1599490800000, + "doc_count" : 7212, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T16:00:00.000Z", + "key" : 1599494400000, + "doc_count" : 6781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T17:00:00.000Z", + "key" : 1599498000000, + "doc_count" : 6463, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T18:00:00.000Z", + "key" : 1599501600000, + "doc_count" : 7589, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T19:00:00.000Z", + "key" : 1599505200000, + "doc_count" : 7668, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T20:00:00.000Z", + "key" : 1599508800000, + "doc_count" : 6977, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T21:00:00.000Z", + "key" : 1599512400000, + "doc_count" : 5500, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T22:00:00.000Z", + "key" : 1599516000000, + "doc_count" : 3897, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T23:00:00.000Z", + "key" : 1599519600000, + "doc_count" : 3945, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T00:00:00.000Z", + "key" : 1599523200000, + "doc_count" : 3680, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T01:00:00.000Z", + "key" : 1599526800000, + "doc_count" : 3863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T02:00:00.000Z", + "key" : 1599530400000, + "doc_count" : 3734, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T03:00:00.000Z", + "key" : 1599534000000, + "doc_count" : 4931, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T04:00:00.000Z", + "key" : 1599537600000, + "doc_count" : 5650, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T05:00:00.000Z", + "key" : 1599541200000, + "doc_count" : 6558, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T06:00:00.000Z", + "key" : 1599544800000, + "doc_count" : 5441, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T07:00:00.000Z", + "key" : 1599548400000, + "doc_count" : 7107, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T08:00:00.000Z", + "key" : 1599552000000, + "doc_count" : 7444, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T09:00:00.000Z", + "key" : 1599555600000, + "doc_count" : 6543, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T10:00:00.000Z", + "key" : 1599559200000, + "doc_count" : 5834, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T11:00:00.000Z", + "key" : 1599562800000, + "doc_count" : 6856, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T12:00:00.000Z", + "key" : 1599566400000, + "doc_count" : 6920, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T13:00:00.000Z", + "key" : 1599570000000, + "doc_count" : 6414, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T14:00:00.000Z", + "key" : 1599573600000, + "doc_count" : 7784, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T15:00:00.000Z", + "key" : 1599577200000, + "doc_count" : 18394, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T16:00:00.000Z", + "key" : 1599580800000, + "doc_count" : 11821, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T17:00:00.000Z", + "key" : 1599584400000, + "doc_count" : 10548, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T18:00:00.000Z", + "key" : 1599588000000, + "doc_count" : 10414, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T19:00:00.000Z", + "key" : 1599591600000, + "doc_count" : 10176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T20:00:00.000Z", + "key" : 1599595200000, + "doc_count" : 8811, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T21:00:00.000Z", + "key" : 1599598800000, + "doc_count" : 5966, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T22:00:00.000Z", + "key" : 1599602400000, + "doc_count" : 7058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T23:00:00.000Z", + "key" : 1599606000000, + "doc_count" : 4987, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T00:00:00.000Z", + "key" : 1599609600000, + "doc_count" : 4562, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T01:00:00.000Z", + "key" : 1599613200000, + "doc_count" : 3279, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T02:00:00.000Z", + "key" : 1599616800000, + "doc_count" : 3527, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T03:00:00.000Z", + "key" : 1599620400000, + "doc_count" : 2700, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T04:00:00.000Z", + "key" : 1599624000000, + "doc_count" : 3834, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T05:00:00.000Z", + "key" : 1599627600000, + "doc_count" : 4240, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T06:00:00.000Z", + "key" : 1599631200000, + "doc_count" : 6401, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T07:00:00.000Z", + "key" : 1599634800000, + "doc_count" : 7058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T08:00:00.000Z", + "key" : 1599638400000, + "doc_count" : 8066, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T09:00:00.000Z", + "key" : 1599642000000, + "doc_count" : 6711, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T10:00:00.000Z", + "key" : 1599645600000, + "doc_count" : 5761, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T11:00:00.000Z", + "key" : 1599649200000, + "doc_count" : 6860, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T12:00:00.000Z", + "key" : 1599652800000, + "doc_count" : 6709, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T13:00:00.000Z", + "key" : 1599656400000, + "doc_count" : 7962, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T14:00:00.000Z", + "key" : 1599660000000, + "doc_count" : 6262, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T15:00:00.000Z", + "key" : 1599663600000, + "doc_count" : 6271, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T16:00:00.000Z", + "key" : 1599667200000, + "doc_count" : 6469, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T17:00:00.000Z", + "key" : 1599670800000, + "doc_count" : 8031, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T18:00:00.000Z", + "key" : 1599674400000, + "doc_count" : 7821, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T19:00:00.000Z", + "key" : 1599678000000, + "doc_count" : 8997, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T20:00:00.000Z", + "key" : 1599681600000, + "doc_count" : 5884, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T21:00:00.000Z", + "key" : 1599685200000, + "doc_count" : 4460, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T22:00:00.000Z", + "key" : 1599688800000, + "doc_count" : 3618, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T23:00:00.000Z", + "key" : 1599692400000, + "doc_count" : 2812, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T00:00:00.000Z", + "key" : 1599696000000, + "doc_count" : 2163, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T01:00:00.000Z", + "key" : 1599699600000, + "doc_count" : 2549, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T02:00:00.000Z", + "key" : 1599703200000, + "doc_count" : 3205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T03:00:00.000Z", + "key" : 1599706800000, + "doc_count" : 4736, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T04:00:00.000Z", + "key" : 1599710400000, + "doc_count" : 5811, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T05:00:00.000Z", + "key" : 1599714000000, + "doc_count" : 5282, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T06:00:00.000Z", + "key" : 1599717600000, + "doc_count" : 7138, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T07:00:00.000Z", + "key" : 1599721200000, + "doc_count" : 7686, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T08:00:00.000Z", + "key" : 1599724800000, + "doc_count" : 12730, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T09:00:00.000Z", + "key" : 1599728400000, + "doc_count" : 9877, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T10:00:00.000Z", + "key" : 1599732000000, + "doc_count" : 7673, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T11:00:00.000Z", + "key" : 1599735600000, + "doc_count" : 9883, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T12:00:00.000Z", + "key" : 1599739200000, + "doc_count" : 8764, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T13:00:00.000Z", + "key" : 1599742800000, + "doc_count" : 9073, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T14:00:00.000Z", + "key" : 1599746400000, + "doc_count" : 7091, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T15:00:00.000Z", + "key" : 1599750000000, + "doc_count" : 7783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T16:00:00.000Z", + "key" : 1599753600000, + "doc_count" : 7678, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T17:00:00.000Z", + "key" : 1599757200000, + "doc_count" : 6399, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T18:00:00.000Z", + "key" : 1599760800000, + "doc_count" : 5440, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T19:00:00.000Z", + "key" : 1599764400000, + "doc_count" : 9519, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T20:00:00.000Z", + "key" : 1599768000000, + "doc_count" : 10172, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T21:00:00.000Z", + "key" : 1599771600000, + "doc_count" : 8273, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T22:00:00.000Z", + "key" : 1599775200000, + "doc_count" : 3159, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T23:00:00.000Z", + "key" : 1599778800000, + "doc_count" : 4429, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T00:00:00.000Z", + "key" : 1599782400000, + "doc_count" : 2921, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T01:00:00.000Z", + "key" : 1599786000000, + "doc_count" : 2714, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T02:00:00.000Z", + "key" : 1599789600000, + "doc_count" : 2771, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T03:00:00.000Z", + "key" : 1599793200000, + "doc_count" : 2685, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T04:00:00.000Z", + "key" : 1599796800000, + "doc_count" : 2790, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T05:00:00.000Z", + "key" : 1599800400000, + "doc_count" : 4005, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T06:00:00.000Z", + "key" : 1599804000000, + "doc_count" : 9110, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T07:00:00.000Z", + "key" : 1599807600000, + "doc_count" : 7405, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T08:00:00.000Z", + "key" : 1599811200000, + "doc_count" : 7192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T09:00:00.000Z", + "key" : 1599814800000, + "doc_count" : 6746, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T10:00:00.000Z", + "key" : 1599818400000, + "doc_count" : 6700, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T11:00:00.000Z", + "key" : 1599822000000, + "doc_count" : 6564, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T12:00:00.000Z", + "key" : 1599825600000, + "doc_count" : 5636, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T13:00:00.000Z", + "key" : 1599829200000, + "doc_count" : 8730, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T14:00:00.000Z", + "key" : 1599832800000, + "doc_count" : 7375, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T15:00:00.000Z", + "key" : 1599836400000, + "doc_count" : 7577, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T16:00:00.000Z", + "key" : 1599840000000, + "doc_count" : 6306, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T17:00:00.000Z", + "key" : 1599843600000, + "doc_count" : 6637, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T18:00:00.000Z", + "key" : 1599847200000, + "doc_count" : 5783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T19:00:00.000Z", + "key" : 1599850800000, + "doc_count" : 6889, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T20:00:00.000Z", + "key" : 1599854400000, + "doc_count" : 5651, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T21:00:00.000Z", + "key" : 1599858000000, + "doc_count" : 5004, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T22:00:00.000Z", + "key" : 1599861600000, + "doc_count" : 3739, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T23:00:00.000Z", + "key" : 1599865200000, + "doc_count" : 3116, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T00:00:00.000Z", + "key" : 1599868800000, + "doc_count" : 3123, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T01:00:00.000Z", + "key" : 1599872400000, + "doc_count" : 3158, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T02:00:00.000Z", + "key" : 1599876000000, + "doc_count" : 3962, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T03:00:00.000Z", + "key" : 1599879600000, + "doc_count" : 3086, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T04:00:00.000Z", + "key" : 1599883200000, + "doc_count" : 3628, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T05:00:00.000Z", + "key" : 1599886800000, + "doc_count" : 4180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T06:00:00.000Z", + "key" : 1599890400000, + "doc_count" : 7456, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T07:00:00.000Z", + "key" : 1599894000000, + "doc_count" : 7307, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T08:00:00.000Z", + "key" : 1599897600000, + "doc_count" : 11424, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T09:00:00.000Z", + "key" : 1599901200000, + "doc_count" : 9267, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T10:00:00.000Z", + "key" : 1599904800000, + "doc_count" : 6059, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T11:00:00.000Z", + "key" : 1599908400000, + "doc_count" : 6402, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T12:00:00.000Z", + "key" : 1599912000000, + "doc_count" : 6572, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T13:00:00.000Z", + "key" : 1599915600000, + "doc_count" : 6753, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T14:00:00.000Z", + "key" : 1599919200000, + "doc_count" : 6679, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T15:00:00.000Z", + "key" : 1599922800000, + "doc_count" : 6267, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T16:00:00.000Z", + "key" : 1599926400000, + "doc_count" : 5786, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T17:00:00.000Z", + "key" : 1599930000000, + "doc_count" : 5807, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T18:00:00.000Z", + "key" : 1599933600000, + "doc_count" : 6819, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T19:00:00.000Z", + "key" : 1599937200000, + "doc_count" : 6788, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T20:00:00.000Z", + "key" : 1599940800000, + "doc_count" : 5655, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T21:00:00.000Z", + "key" : 1599944400000, + "doc_count" : 4367, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T22:00:00.000Z", + "key" : 1599948000000, + "doc_count" : 3859, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T23:00:00.000Z", + "key" : 1599951600000, + "doc_count" : 2598, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T00:00:00.000Z", + "key" : 1599955200000, + "doc_count" : 2973, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T01:00:00.000Z", + "key" : 1599958800000, + "doc_count" : 2600, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T02:00:00.000Z", + "key" : 1599962400000, + "doc_count" : 3076, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T03:00:00.000Z", + "key" : 1599966000000, + "doc_count" : 5236, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T04:00:00.000Z", + "key" : 1599969600000, + "doc_count" : 4609, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T05:00:00.000Z", + "key" : 1599973200000, + "doc_count" : 3238, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T06:00:00.000Z", + "key" : 1599976800000, + "doc_count" : 4563, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T07:00:00.000Z", + "key" : 1599980400000, + "doc_count" : 5619, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T08:00:00.000Z", + "key" : 1599984000000, + "doc_count" : 6848, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T09:00:00.000Z", + "key" : 1599987600000, + "doc_count" : 8534, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T10:00:00.000Z", + "key" : 1599991200000, + "doc_count" : 6983, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T11:00:00.000Z", + "key" : 1599994800000, + "doc_count" : 6568, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T12:00:00.000Z", + "key" : 1599998400000, + "doc_count" : 9070, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T13:00:00.000Z", + "key" : 1600002000000, + "doc_count" : 6111, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T14:00:00.000Z", + "key" : 1600005600000, + "doc_count" : 6168, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T15:00:00.000Z", + "key" : 1600009200000, + "doc_count" : 6814, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T16:00:00.000Z", + "key" : 1600012800000, + "doc_count" : 6050, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T17:00:00.000Z", + "key" : 1600016400000, + "doc_count" : 5209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T18:00:00.000Z", + "key" : 1600020000000, + "doc_count" : 5638, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T19:00:00.000Z", + "key" : 1600023600000, + "doc_count" : 6357, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T20:00:00.000Z", + "key" : 1600027200000, + "doc_count" : 5958, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T21:00:00.000Z", + "key" : 1600030800000, + "doc_count" : 4696, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T22:00:00.000Z", + "key" : 1600034400000, + "doc_count" : 5766, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T23:00:00.000Z", + "key" : 1600038000000, + "doc_count" : 2302, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T00:00:00.000Z", + "key" : 1600041600000, + "doc_count" : 2503, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T01:00:00.000Z", + "key" : 1600045200000, + "doc_count" : 2498, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T02:00:00.000Z", + "key" : 1600048800000, + "doc_count" : 2074, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T03:00:00.000Z", + "key" : 1600052400000, + "doc_count" : 2453, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T04:00:00.000Z", + "key" : 1600056000000, + "doc_count" : 4133, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T05:00:00.000Z", + "key" : 1600059600000, + "doc_count" : 3812, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T06:00:00.000Z", + "key" : 1600063200000, + "doc_count" : 4981, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T07:00:00.000Z", + "key" : 1600066800000, + "doc_count" : 5883, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T08:00:00.000Z", + "key" : 1600070400000, + "doc_count" : 6653, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T09:00:00.000Z", + "key" : 1600074000000, + "doc_count" : 6306, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T10:00:00.000Z", + "key" : 1600077600000, + "doc_count" : 6590, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T11:00:00.000Z", + "key" : 1600081200000, + "doc_count" : 6652, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T12:00:00.000Z", + "key" : 1600084800000, + "doc_count" : 6905, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T13:00:00.000Z", + "key" : 1600088400000, + "doc_count" : 6052, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T14:00:00.000Z", + "key" : 1600092000000, + "doc_count" : 6445, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T15:00:00.000Z", + "key" : 1600095600000, + "doc_count" : 6379, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T16:00:00.000Z", + "key" : 1600099200000, + "doc_count" : 8510, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T17:00:00.000Z", + "key" : 1600102800000, + "doc_count" : 7303, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T18:00:00.000Z", + "key" : 1600106400000, + "doc_count" : 6635, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T19:00:00.000Z", + "key" : 1600110000000, + "doc_count" : 8406, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T20:00:00.000Z", + "key" : 1600113600000, + "doc_count" : 6545, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T21:00:00.000Z", + "key" : 1600117200000, + "doc_count" : 6429, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T22:00:00.000Z", + "key" : 1600120800000, + "doc_count" : 4395, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T23:00:00.000Z", + "key" : 1600124400000, + "doc_count" : 4472, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T00:00:00.000Z", + "key" : 1600128000000, + "doc_count" : 3382, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T01:00:00.000Z", + "key" : 1600131600000, + "doc_count" : 2524, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T02:00:00.000Z", + "key" : 1600135200000, + "doc_count" : 3244, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T03:00:00.000Z", + "key" : 1600138800000, + "doc_count" : 3360, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T04:00:00.000Z", + "key" : 1600142400000, + "doc_count" : 3473, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T05:00:00.000Z", + "key" : 1600146000000, + "doc_count" : 3505, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T06:00:00.000Z", + "key" : 1600149600000, + "doc_count" : 5048, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T07:00:00.000Z", + "key" : 1600153200000, + "doc_count" : 11405, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T08:00:00.000Z", + "key" : 1600156800000, + "doc_count" : 15142, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T09:00:00.000Z", + "key" : 1600160400000, + "doc_count" : 11132, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T10:00:00.000Z", + "key" : 1600164000000, + "doc_count" : 9614, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T11:00:00.000Z", + "key" : 1600167600000, + "doc_count" : 11313, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T12:00:00.000Z", + "key" : 1600171200000, + "doc_count" : 8602, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T13:00:00.000Z", + "key" : 1600174800000, + "doc_count" : 8665, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T14:00:00.000Z", + "key" : 1600178400000, + "doc_count" : 8459, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T15:00:00.000Z", + "key" : 1600182000000, + "doc_count" : 6788, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T16:00:00.000Z", + "key" : 1600185600000, + "doc_count" : 6138, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T17:00:00.000Z", + "key" : 1600189200000, + "doc_count" : 6183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T18:00:00.000Z", + "key" : 1600192800000, + "doc_count" : 6430, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T19:00:00.000Z", + "key" : 1600196400000, + "doc_count" : 7523, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T20:00:00.000Z", + "key" : 1600200000000, + "doc_count" : 7611, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T21:00:00.000Z", + "key" : 1600203600000, + "doc_count" : 4826, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T22:00:00.000Z", + "key" : 1600207200000, + "doc_count" : 4991, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T23:00:00.000Z", + "key" : 1600210800000, + "doc_count" : 4298, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T00:00:00.000Z", + "key" : 1600214400000, + "doc_count" : 5859, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T01:00:00.000Z", + "key" : 1600218000000, + "doc_count" : 8961, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T02:00:00.000Z", + "key" : 1600221600000, + "doc_count" : 6042, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T03:00:00.000Z", + "key" : 1600225200000, + "doc_count" : 6811, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T04:00:00.000Z", + "key" : 1600228800000, + "doc_count" : 4562, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T05:00:00.000Z", + "key" : 1600232400000, + "doc_count" : 5265, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T06:00:00.000Z", + "key" : 1600236000000, + "doc_count" : 5871, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T07:00:00.000Z", + "key" : 1600239600000, + "doc_count" : 9117, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T08:00:00.000Z", + "key" : 1600243200000, + "doc_count" : 8240, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T09:00:00.000Z", + "key" : 1600246800000, + "doc_count" : 8009, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T10:00:00.000Z", + "key" : 1600250400000, + "doc_count" : 7019, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T11:00:00.000Z", + "key" : 1600254000000, + "doc_count" : 5552, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T12:00:00.000Z", + "key" : 1600257600000, + "doc_count" : 7842, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T13:00:00.000Z", + "key" : 1600261200000, + "doc_count" : 7926, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T14:00:00.000Z", + "key" : 1600264800000, + "doc_count" : 8941, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T15:00:00.000Z", + "key" : 1600268400000, + "doc_count" : 18372, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T16:00:00.000Z", + "key" : 1600272000000, + "doc_count" : 13897, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T17:00:00.000Z", + "key" : 1600275600000, + "doc_count" : 12343, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T18:00:00.000Z", + "key" : 1600279200000, + "doc_count" : 11615, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T19:00:00.000Z", + "key" : 1600282800000, + "doc_count" : 606, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T20:00:00.000Z", + "key" : 1600286400000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T21:00:00.000Z", + "key" : 1600290000000, + "doc_count" : 734, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T22:00:00.000Z", + "key" : 1600293600000, + "doc_count" : 5076, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T23:00:00.000Z", + "key" : 1600297200000, + "doc_count" : 3793, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T00:00:00.000Z", + "key" : 1600300800000, + "doc_count" : 4783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T01:00:00.000Z", + "key" : 1600304400000, + "doc_count" : 4074, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T02:00:00.000Z", + "key" : 1600308000000, + "doc_count" : 4945, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T03:00:00.000Z", + "key" : 1600311600000, + "doc_count" : 6020, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T04:00:00.000Z", + "key" : 1600315200000, + "doc_count" : 7031, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T05:00:00.000Z", + "key" : 1600318800000, + "doc_count" : 9998, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T06:00:00.000Z", + "key" : 1600322400000, + "doc_count" : 10980, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T07:00:00.000Z", + "key" : 1600326000000, + "doc_count" : 11817, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T08:00:00.000Z", + "key" : 1600329600000, + "doc_count" : 11057, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T09:00:00.000Z", + "key" : 1600333200000, + "doc_count" : 9292, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T10:00:00.000Z", + "key" : 1600336800000, + "doc_count" : 9122, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T11:00:00.000Z", + "key" : 1600340400000, + "doc_count" : 7766, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T12:00:00.000Z", + "key" : 1600344000000, + "doc_count" : 8240, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T13:00:00.000Z", + "key" : 1600347600000, + "doc_count" : 6261, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T14:00:00.000Z", + "key" : 1600351200000, + "doc_count" : 11326, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T15:00:00.000Z", + "key" : 1600354800000, + "doc_count" : 11573, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T16:00:00.000Z", + "key" : 1600358400000, + "doc_count" : 8024, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T17:00:00.000Z", + "key" : 1600362000000, + "doc_count" : 6898, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T18:00:00.000Z", + "key" : 1600365600000, + "doc_count" : 7668, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T19:00:00.000Z", + "key" : 1600369200000, + "doc_count" : 7551, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T20:00:00.000Z", + "key" : 1600372800000, + "doc_count" : 7094, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T21:00:00.000Z", + "key" : 1600376400000, + "doc_count" : 5336, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T22:00:00.000Z", + "key" : 1600380000000, + "doc_count" : 3724, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T23:00:00.000Z", + "key" : 1600383600000, + "doc_count" : 3201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T00:00:00.000Z", + "key" : 1600387200000, + "doc_count" : 3535, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T01:00:00.000Z", + "key" : 1600390800000, + "doc_count" : 2763, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T02:00:00.000Z", + "key" : 1600394400000, + "doc_count" : 2612, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T03:00:00.000Z", + "key" : 1600398000000, + "doc_count" : 3550, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T04:00:00.000Z", + "key" : 1600401600000, + "doc_count" : 4210, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T05:00:00.000Z", + "key" : 1600405200000, + "doc_count" : 5482, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T06:00:00.000Z", + "key" : 1600408800000, + "doc_count" : 6916, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T07:00:00.000Z", + "key" : 1600412400000, + "doc_count" : 7936, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T08:00:00.000Z", + "key" : 1600416000000, + "doc_count" : 10665, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T09:00:00.000Z", + "key" : 1600419600000, + "doc_count" : 10062, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T10:00:00.000Z", + "key" : 1600423200000, + "doc_count" : 7630, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T11:00:00.000Z", + "key" : 1600426800000, + "doc_count" : 8136, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T12:00:00.000Z", + "key" : 1600430400000, + "doc_count" : 7739, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T13:00:00.000Z", + "key" : 1600434000000, + "doc_count" : 7669, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T14:00:00.000Z", + "key" : 1600437600000, + "doc_count" : 7675, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T15:00:00.000Z", + "key" : 1600441200000, + "doc_count" : 6259, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T16:00:00.000Z", + "key" : 1600444800000, + "doc_count" : 6432, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T17:00:00.000Z", + "key" : 1600448400000, + "doc_count" : 5897, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T18:00:00.000Z", + "key" : 1600452000000, + "doc_count" : 6228, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T19:00:00.000Z", + "key" : 1600455600000, + "doc_count" : 6669, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T20:00:00.000Z", + "key" : 1600459200000, + "doc_count" : 6393, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T21:00:00.000Z", + "key" : 1600462800000, + "doc_count" : 6199, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T22:00:00.000Z", + "key" : 1600466400000, + "doc_count" : 4926, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T23:00:00.000Z", + "key" : 1600470000000, + "doc_count" : 3873, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T00:00:00.000Z", + "key" : 1600473600000, + "doc_count" : 3132, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T01:00:00.000Z", + "key" : 1600477200000, + "doc_count" : 3871, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T02:00:00.000Z", + "key" : 1600480800000, + "doc_count" : 3324, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T03:00:00.000Z", + "key" : 1600484400000, + "doc_count" : 6205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T04:00:00.000Z", + "key" : 1600488000000, + "doc_count" : 7410, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T05:00:00.000Z", + "key" : 1600491600000, + "doc_count" : 5780, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T06:00:00.000Z", + "key" : 1600495200000, + "doc_count" : 6680, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T07:00:00.000Z", + "key" : 1600498800000, + "doc_count" : 7499, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T08:00:00.000Z", + "key" : 1600502400000, + "doc_count" : 8609, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T09:00:00.000Z", + "key" : 1600506000000, + "doc_count" : 8408, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T10:00:00.000Z", + "key" : 1600509600000, + "doc_count" : 6713, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T11:00:00.000Z", + "key" : 1600513200000, + "doc_count" : 7432, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T12:00:00.000Z", + "key" : 1600516800000, + "doc_count" : 13255, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T13:00:00.000Z", + "key" : 1600520400000, + "doc_count" : 6616, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T14:00:00.000Z", + "key" : 1600524000000, + "doc_count" : 6927, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T15:00:00.000Z", + "key" : 1600527600000, + "doc_count" : 6708, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T16:00:00.000Z", + "key" : 1600531200000, + "doc_count" : 6329, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T17:00:00.000Z", + "key" : 1600534800000, + "doc_count" : 6058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T18:00:00.000Z", + "key" : 1600538400000, + "doc_count" : 5891, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T19:00:00.000Z", + "key" : 1600542000000, + "doc_count" : 5805, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T20:00:00.000Z", + "key" : 1600545600000, + "doc_count" : 5552, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T21:00:00.000Z", + "key" : 1600549200000, + "doc_count" : 4769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T22:00:00.000Z", + "key" : 1600552800000, + "doc_count" : 6190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T23:00:00.000Z", + "key" : 1600556400000, + "doc_count" : 4126, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T00:00:00.000Z", + "key" : 1600560000000, + "doc_count" : 2637, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T01:00:00.000Z", + "key" : 1600563600000, + "doc_count" : 2043, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T02:00:00.000Z", + "key" : 1600567200000, + "doc_count" : 2216, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T03:00:00.000Z", + "key" : 1600570800000, + "doc_count" : 2569, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T04:00:00.000Z", + "key" : 1600574400000, + "doc_count" : 3174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T05:00:00.000Z", + "key" : 1600578000000, + "doc_count" : 3716, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T06:00:00.000Z", + "key" : 1600581600000, + "doc_count" : 5537, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T07:00:00.000Z", + "key" : 1600585200000, + "doc_count" : 6716, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T08:00:00.000Z", + "key" : 1600588800000, + "doc_count" : 7331, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T09:00:00.000Z", + "key" : 1600592400000, + "doc_count" : 7035, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T10:00:00.000Z", + "key" : 1600596000000, + "doc_count" : 6186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T11:00:00.000Z", + "key" : 1600599600000, + "doc_count" : 6002, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T12:00:00.000Z", + "key" : 1600603200000, + "doc_count" : 5998, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T13:00:00.000Z", + "key" : 1600606800000, + "doc_count" : 5271, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T14:00:00.000Z", + "key" : 1600610400000, + "doc_count" : 5294, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T15:00:00.000Z", + "key" : 1600614000000, + "doc_count" : 5940, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T16:00:00.000Z", + "key" : 1600617600000, + "doc_count" : 7507, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T17:00:00.000Z", + "key" : 1600621200000, + "doc_count" : 7348, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T18:00:00.000Z", + "key" : 1600624800000, + "doc_count" : 4479, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T19:00:00.000Z", + "key" : 1600628400000, + "doc_count" : 5786, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T20:00:00.000Z", + "key" : 1600632000000, + "doc_count" : 5108, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T21:00:00.000Z", + "key" : 1600635600000, + "doc_count" : 4366, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T22:00:00.000Z", + "key" : 1600639200000, + "doc_count" : 4025, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T23:00:00.000Z", + "key" : 1600642800000, + "doc_count" : 1932, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T00:00:00.000Z", + "key" : 1600646400000, + "doc_count" : 2067, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T01:00:00.000Z", + "key" : 1600650000000, + "doc_count" : 2213, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T02:00:00.000Z", + "key" : 1600653600000, + "doc_count" : 2192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T03:00:00.000Z", + "key" : 1600657200000, + "doc_count" : 2929, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T04:00:00.000Z", + "key" : 1600660800000, + "doc_count" : 7834, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T05:00:00.000Z", + "key" : 1600664400000, + "doc_count" : 9116, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T06:00:00.000Z", + "key" : 1600668000000, + "doc_count" : 9304, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T07:00:00.000Z", + "key" : 1600671600000, + "doc_count" : 7926, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T08:00:00.000Z", + "key" : 1600675200000, + "doc_count" : 10585, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T09:00:00.000Z", + "key" : 1600678800000, + "doc_count" : 8465, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T10:00:00.000Z", + "key" : 1600682400000, + "doc_count" : 10705, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T11:00:00.000Z", + "key" : 1600686000000, + "doc_count" : 7603, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T12:00:00.000Z", + "key" : 1600689600000, + "doc_count" : 8452, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T13:00:00.000Z", + "key" : 1600693200000, + "doc_count" : 6320, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T14:00:00.000Z", + "key" : 1600696800000, + "doc_count" : 6490, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T15:00:00.000Z", + "key" : 1600700400000, + "doc_count" : 6772, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T16:00:00.000Z", + "key" : 1600704000000, + "doc_count" : 5481, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T17:00:00.000Z", + "key" : 1600707600000, + "doc_count" : 4959, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T18:00:00.000Z", + "key" : 1600711200000, + "doc_count" : 5676, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T19:00:00.000Z", + "key" : 1600714800000, + "doc_count" : 5705, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T20:00:00.000Z", + "key" : 1600718400000, + "doc_count" : 5511, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T21:00:00.000Z", + "key" : 1600722000000, + "doc_count" : 4631, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T22:00:00.000Z", + "key" : 1600725600000, + "doc_count" : 8366, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T23:00:00.000Z", + "key" : 1600729200000, + "doc_count" : 6797, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T00:00:00.000Z", + "key" : 1600732800000, + "doc_count" : 6369, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T01:00:00.000Z", + "key" : 1600736400000, + "doc_count" : 2365, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T02:00:00.000Z", + "key" : 1600740000000, + "doc_count" : 2319, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T03:00:00.000Z", + "key" : 1600743600000, + "doc_count" : 2992, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T04:00:00.000Z", + "key" : 1600747200000, + "doc_count" : 3192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T05:00:00.000Z", + "key" : 1600750800000, + "doc_count" : 4062, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T06:00:00.000Z", + "key" : 1600754400000, + "doc_count" : 6184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T07:00:00.000Z", + "key" : 1600758000000, + "doc_count" : 7990, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T08:00:00.000Z", + "key" : 1600761600000, + "doc_count" : 6817, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T09:00:00.000Z", + "key" : 1600765200000, + "doc_count" : 6769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T10:00:00.000Z", + "key" : 1600768800000, + "doc_count" : 5225, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T11:00:00.000Z", + "key" : 1600772400000, + "doc_count" : 6643, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T12:00:00.000Z", + "key" : 1600776000000, + "doc_count" : 6569, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T13:00:00.000Z", + "key" : 1600779600000, + "doc_count" : 7178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T14:00:00.000Z", + "key" : 1600783200000, + "doc_count" : 5939, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T15:00:00.000Z", + "key" : 1600786800000, + "doc_count" : 7378, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T16:00:00.000Z", + "key" : 1600790400000, + "doc_count" : 6561, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T17:00:00.000Z", + "key" : 1600794000000, + "doc_count" : 7693, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T18:00:00.000Z", + "key" : 1600797600000, + "doc_count" : 7565, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T19:00:00.000Z", + "key" : 1600801200000, + "doc_count" : 5803, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T20:00:00.000Z", + "key" : 1600804800000, + "doc_count" : 5209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T21:00:00.000Z", + "key" : 1600808400000, + "doc_count" : 6148, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T22:00:00.000Z", + "key" : 1600812000000, + "doc_count" : 4180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T23:00:00.000Z", + "key" : 1600815600000, + "doc_count" : 3946, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T00:00:00.000Z", + "key" : 1600819200000, + "doc_count" : 4464, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T01:00:00.000Z", + "key" : 1600822800000, + "doc_count" : 4195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T02:00:00.000Z", + "key" : 1600826400000, + "doc_count" : 2623, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T03:00:00.000Z", + "key" : 1600830000000, + "doc_count" : 3422, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T04:00:00.000Z", + "key" : 1600833600000, + "doc_count" : 3893, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T05:00:00.000Z", + "key" : 1600837200000, + "doc_count" : 6052, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T06:00:00.000Z", + "key" : 1600840800000, + "doc_count" : 6683, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T07:00:00.000Z", + "key" : 1600844400000, + "doc_count" : 6119, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T08:00:00.000Z", + "key" : 1600848000000, + "doc_count" : 6406, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T09:00:00.000Z", + "key" : 1600851600000, + "doc_count" : 10932, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T10:00:00.000Z", + "key" : 1600855200000, + "doc_count" : 13769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T11:00:00.000Z", + "key" : 1600858800000, + "doc_count" : 10401, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T12:00:00.000Z", + "key" : 1600862400000, + "doc_count" : 12491, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T13:00:00.000Z", + "key" : 1600866000000, + "doc_count" : 10518, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T14:00:00.000Z", + "key" : 1600869600000, + "doc_count" : 9353, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T15:00:00.000Z", + "key" : 1600873200000, + "doc_count" : 18699, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T16:00:00.000Z", + "key" : 1600876800000, + "doc_count" : 10855, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T17:00:00.000Z", + "key" : 1600880400000, + "doc_count" : 8601, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T18:00:00.000Z", + "key" : 1600884000000, + "doc_count" : 9599, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T19:00:00.000Z", + "key" : 1600887600000, + "doc_count" : 12387, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T20:00:00.000Z", + "key" : 1600891200000, + "doc_count" : 7712, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T21:00:00.000Z", + "key" : 1600894800000, + "doc_count" : 7764, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T22:00:00.000Z", + "key" : 1600898400000, + "doc_count" : 3810, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T23:00:00.000Z", + "key" : 1600902000000, + "doc_count" : 3078, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T00:00:00.000Z", + "key" : 1600905600000, + "doc_count" : 2781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T01:00:00.000Z", + "key" : 1600909200000, + "doc_count" : 3165, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T02:00:00.000Z", + "key" : 1600912800000, + "doc_count" : 3486, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T03:00:00.000Z", + "key" : 1600916400000, + "doc_count" : 3106, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T04:00:00.000Z", + "key" : 1600920000000, + "doc_count" : 8318, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T05:00:00.000Z", + "key" : 1600923600000, + "doc_count" : 4146, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T06:00:00.000Z", + "key" : 1600927200000, + "doc_count" : 8003, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T07:00:00.000Z", + "key" : 1600930800000, + "doc_count" : 5501, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T08:00:00.000Z", + "key" : 1600934400000, + "doc_count" : 5789, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T09:00:00.000Z", + "key" : 1600938000000, + "doc_count" : 6415, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T10:00:00.000Z", + "key" : 1600941600000, + "doc_count" : 5871, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T11:00:00.000Z", + "key" : 1600945200000, + "doc_count" : 5087, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T12:00:00.000Z", + "key" : 1600948800000, + "doc_count" : 3808, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T13:00:00.000Z", + "key" : 1600952400000, + "doc_count" : 5527, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T14:00:00.000Z", + "key" : 1600956000000, + "doc_count" : 5534, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T15:00:00.000Z", + "key" : 1600959600000, + "doc_count" : 5740, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T16:00:00.000Z", + "key" : 1600963200000, + "doc_count" : 4073, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T17:00:00.000Z", + "key" : 1600966800000, + "doc_count" : 4553, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T18:00:00.000Z", + "key" : 1600970400000, + "doc_count" : 5407, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T19:00:00.000Z", + "key" : 1600974000000, + "doc_count" : 7169, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T20:00:00.000Z", + "key" : 1600977600000, + "doc_count" : 5516, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T21:00:00.000Z", + "key" : 1600981200000, + "doc_count" : 4105, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T22:00:00.000Z", + "key" : 1600984800000, + "doc_count" : 3863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T23:00:00.000Z", + "key" : 1600988400000, + "doc_count" : 3174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T00:00:00.000Z", + "key" : 1600992000000, + "doc_count" : 4056, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T01:00:00.000Z", + "key" : 1600995600000, + "doc_count" : 5538, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T02:00:00.000Z", + "key" : 1600999200000, + "doc_count" : 2368, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T03:00:00.000Z", + "key" : 1601002800000, + "doc_count" : 2242, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T04:00:00.000Z", + "key" : 1601006400000, + "doc_count" : 2714, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T05:00:00.000Z", + "key" : 1601010000000, + "doc_count" : 4055, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T06:00:00.000Z", + "key" : 1601013600000, + "doc_count" : 5500, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T07:00:00.000Z", + "key" : 1601017200000, + "doc_count" : 6237, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T08:00:00.000Z", + "key" : 1601020800000, + "doc_count" : 6079, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T09:00:00.000Z", + "key" : 1601024400000, + "doc_count" : 5506, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T10:00:00.000Z", + "key" : 1601028000000, + "doc_count" : 6746, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T11:00:00.000Z", + "key" : 1601031600000, + "doc_count" : 5193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T12:00:00.000Z", + "key" : 1601035200000, + "doc_count" : 5808, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T13:00:00.000Z", + "key" : 1601038800000, + "doc_count" : 5885, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T14:00:00.000Z", + "key" : 1601042400000, + "doc_count" : 7784, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T15:00:00.000Z", + "key" : 1601046000000, + "doc_count" : 5618, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T16:00:00.000Z", + "key" : 1601049600000, + "doc_count" : 4993, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T17:00:00.000Z", + "key" : 1601053200000, + "doc_count" : 4705, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T18:00:00.000Z", + "key" : 1601056800000, + "doc_count" : 6369, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T19:00:00.000Z", + "key" : 1601060400000, + "doc_count" : 9129, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T20:00:00.000Z", + "key" : 1601064000000, + "doc_count" : 5237, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T21:00:00.000Z", + "key" : 1601067600000, + "doc_count" : 4557, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T22:00:00.000Z", + "key" : 1601071200000, + "doc_count" : 3814, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T23:00:00.000Z", + "key" : 1601074800000, + "doc_count" : 2721, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T00:00:00.000Z", + "key" : 1601078400000, + "doc_count" : 2479, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T01:00:00.000Z", + "key" : 1601082000000, + "doc_count" : 2076, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T02:00:00.000Z", + "key" : 1601085600000, + "doc_count" : 2743, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T03:00:00.000Z", + "key" : 1601089200000, + "doc_count" : 2559, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T04:00:00.000Z", + "key" : 1601092800000, + "doc_count" : 3381, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T05:00:00.000Z", + "key" : 1601096400000, + "doc_count" : 3673, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T06:00:00.000Z", + "key" : 1601100000000, + "doc_count" : 5373, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T07:00:00.000Z", + "key" : 1601103600000, + "doc_count" : 5355, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T08:00:00.000Z", + "key" : 1601107200000, + "doc_count" : 6442, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T09:00:00.000Z", + "key" : 1601110800000, + "doc_count" : 6519, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T10:00:00.000Z", + "key" : 1601114400000, + "doc_count" : 7473, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T11:00:00.000Z", + "key" : 1601118000000, + "doc_count" : 7863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T12:00:00.000Z", + "key" : 1601121600000, + "doc_count" : 6667, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T13:00:00.000Z", + "key" : 1601125200000, + "doc_count" : 8302, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T14:00:00.000Z", + "key" : 1601128800000, + "doc_count" : 8663, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T15:00:00.000Z", + "key" : 1601132400000, + "doc_count" : 6790, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T16:00:00.000Z", + "key" : 1601136000000, + "doc_count" : 7273, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T17:00:00.000Z", + "key" : 1601139600000, + "doc_count" : 5127, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T18:00:00.000Z", + "key" : 1601143200000, + "doc_count" : 4437, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T19:00:00.000Z", + "key" : 1601146800000, + "doc_count" : 4812, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T20:00:00.000Z", + "key" : 1601150400000, + "doc_count" : 5121, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T21:00:00.000Z", + "key" : 1601154000000, + "doc_count" : 4530, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T22:00:00.000Z", + "key" : 1601157600000, + "doc_count" : 2982, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T23:00:00.000Z", + "key" : 1601161200000, + "doc_count" : 3177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T00:00:00.000Z", + "key" : 1601164800000, + "doc_count" : 1755, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T01:00:00.000Z", + "key" : 1601168400000, + "doc_count" : 3370, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T02:00:00.000Z", + "key" : 1601172000000, + "doc_count" : 2881, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T03:00:00.000Z", + "key" : 1601175600000, + "doc_count" : 3020, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T04:00:00.000Z", + "key" : 1601179200000, + "doc_count" : 2906, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T05:00:00.000Z", + "key" : 1601182800000, + "doc_count" : 3824, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T06:00:00.000Z", + "key" : 1601186400000, + "doc_count" : 4976, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T07:00:00.000Z", + "key" : 1601190000000, + "doc_count" : 7501, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T08:00:00.000Z", + "key" : 1601193600000, + "doc_count" : 9443, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T09:00:00.000Z", + "key" : 1601197200000, + "doc_count" : 7090, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T10:00:00.000Z", + "key" : 1601200800000, + "doc_count" : 6867, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T11:00:00.000Z", + "key" : 1601204400000, + "doc_count" : 6206, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T12:00:00.000Z", + "key" : 1601208000000, + "doc_count" : 6998, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T13:00:00.000Z", + "key" : 1601211600000, + "doc_count" : 9347, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T14:00:00.000Z", + "key" : 1601215200000, + "doc_count" : 9271, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T15:00:00.000Z", + "key" : 1601218800000, + "doc_count" : 5485, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T16:00:00.000Z", + "key" : 1601222400000, + "doc_count" : 6874, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T17:00:00.000Z", + "key" : 1601226000000, + "doc_count" : 5417, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T18:00:00.000Z", + "key" : 1601229600000, + "doc_count" : 8044, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T19:00:00.000Z", + "key" : 1601233200000, + "doc_count" : 5995, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T20:00:00.000Z", + "key" : 1601236800000, + "doc_count" : 5611, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T21:00:00.000Z", + "key" : 1601240400000, + "doc_count" : 3782, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T22:00:00.000Z", + "key" : 1601244000000, + "doc_count" : 2804, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T23:00:00.000Z", + "key" : 1601247600000, + "doc_count" : 2208, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T00:00:00.000Z", + "key" : 1601251200000, + "doc_count" : 2012, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T01:00:00.000Z", + "key" : 1601254800000, + "doc_count" : 2495, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T02:00:00.000Z", + "key" : 1601258400000, + "doc_count" : 3168, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T03:00:00.000Z", + "key" : 1601262000000, + "doc_count" : 3777, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T04:00:00.000Z", + "key" : 1601265600000, + "doc_count" : 2687, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T05:00:00.000Z", + "key" : 1601269200000, + "doc_count" : 2312, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T06:00:00.000Z", + "key" : 1601272800000, + "doc_count" : 3466, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T07:00:00.000Z", + "key" : 1601276400000, + "doc_count" : 6562, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T08:00:00.000Z", + "key" : 1601280000000, + "doc_count" : 5578, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T09:00:00.000Z", + "key" : 1601283600000, + "doc_count" : 5683, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T10:00:00.000Z", + "key" : 1601287200000, + "doc_count" : 4449, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T11:00:00.000Z", + "key" : 1601290800000, + "doc_count" : 4966, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T12:00:00.000Z", + "key" : 1601294400000, + "doc_count" : 4294, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T13:00:00.000Z", + "key" : 1601298000000, + "doc_count" : 5590, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T14:00:00.000Z", + "key" : 1601301600000, + "doc_count" : 6814, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T15:00:00.000Z", + "key" : 1601305200000, + "doc_count" : 6542, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T16:00:00.000Z", + "key" : 1601308800000, + "doc_count" : 4673, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T17:00:00.000Z", + "key" : 1601312400000, + "doc_count" : 4511, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T18:00:00.000Z", + "key" : 1601316000000, + "doc_count" : 5977, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T19:00:00.000Z", + "key" : 1601319600000, + "doc_count" : 6258, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T20:00:00.000Z", + "key" : 1601323200000, + "doc_count" : 4808, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T21:00:00.000Z", + "key" : 1601326800000, + "doc_count" : 4914, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T22:00:00.000Z", + "key" : 1601330400000, + "doc_count" : 3575, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T23:00:00.000Z", + "key" : 1601334000000, + "doc_count" : 2590, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T00:00:00.000Z", + "key" : 1601337600000, + "doc_count" : 1879, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T01:00:00.000Z", + "key" : 1601341200000, + "doc_count" : 4182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T02:00:00.000Z", + "key" : 1601344800000, + "doc_count" : 6304, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T03:00:00.000Z", + "key" : 1601348400000, + "doc_count" : 2439, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T04:00:00.000Z", + "key" : 1601352000000, + "doc_count" : 2680, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T05:00:00.000Z", + "key" : 1601355600000, + "doc_count" : 1766, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T06:00:00.000Z", + "key" : 1601359200000, + "doc_count" : 2635, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T07:00:00.000Z", + "key" : 1601362800000, + "doc_count" : 3603, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T08:00:00.000Z", + "key" : 1601366400000, + "doc_count" : 4684, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T09:00:00.000Z", + "key" : 1601370000000, + "doc_count" : 5321, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T10:00:00.000Z", + "key" : 1601373600000, + "doc_count" : 3769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T11:00:00.000Z", + "key" : 1601377200000, + "doc_count" : 4001, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T12:00:00.000Z", + "key" : 1601380800000, + "doc_count" : 9982, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T13:00:00.000Z", + "key" : 1601384400000, + "doc_count" : 8863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T14:00:00.000Z", + "key" : 1601388000000, + "doc_count" : 7383, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T15:00:00.000Z", + "key" : 1601391600000, + "doc_count" : 8174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T16:00:00.000Z", + "key" : 1601395200000, + "doc_count" : 6588, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T17:00:00.000Z", + "key" : 1601398800000, + "doc_count" : 6106, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T18:00:00.000Z", + "key" : 1601402400000, + "doc_count" : 6632, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T19:00:00.000Z", + "key" : 1601406000000, + "doc_count" : 5914, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T20:00:00.000Z", + "key" : 1601409600000, + "doc_count" : 8547, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T21:00:00.000Z", + "key" : 1601413200000, + "doc_count" : 5059, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T22:00:00.000Z", + "key" : 1601416800000, + "doc_count" : 3140, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T23:00:00.000Z", + "key" : 1601420400000, + "doc_count" : 3968, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T00:00:00.000Z", + "key" : 1601424000000, + "doc_count" : 2624, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T01:00:00.000Z", + "key" : 1601427600000, + "doc_count" : 2226, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T02:00:00.000Z", + "key" : 1601431200000, + "doc_count" : 2835, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T03:00:00.000Z", + "key" : 1601434800000, + "doc_count" : 2473, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T04:00:00.000Z", + "key" : 1601438400000, + "doc_count" : 2285, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T05:00:00.000Z", + "key" : 1601442000000, + "doc_count" : 783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T06:00:00.000Z", + "key" : 1601445600000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T07:00:00.000Z", + "key" : 1601449200000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T08:00:00.000Z", + "key" : 1601452800000, + "doc_count" : 7, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T09:00:00.000Z", + "key" : 1601456400000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T10:00:00.000Z", + "key" : 1601460000000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T11:00:00.000Z", + "key" : 1601463600000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T12:00:00.000Z", + "key" : 1601467200000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T13:00:00.000Z", + "key" : 1601470800000, + "doc_count" : 1, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T14:00:00.000Z", + "key" : 1601474400000, + "doc_count" : 3, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T15:00:00.000Z", + "key" : 1601478000000, + "doc_count" : 48, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T16:00:00.000Z", + "key" : 1601481600000, + "doc_count" : 17, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T17:00:00.000Z", + "key" : 1601485200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T18:00:00.000Z", + "key" : 1601488800000, + "doc_count" : 23, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T19:00:00.000Z", + "key" : 1601492400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T20:00:00.000Z", + "key" : 1601496000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T21:00:00.000Z", + "key" : 1601499600000, + "doc_count" : 16, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T22:00:00.000Z", + "key" : 1601503200000, + "doc_count" : 2, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T23:00:00.000Z", + "key" : 1601506800000, + "doc_count" : 3134, + "count" : { + "value" : 0 + } + } + ] + }, + "average" : { + "value" : 10 + } + } +} diff --git a/services/api/src/models/mockHitDataLegacy-project-a.json b/services/api/src/models/mockHitDataLegacy-project-a.json new file mode 100644 index 0000000000..ae79d7e78b --- /dev/null +++ b/services/api/src/models/mockHitDataLegacy-project-a.json @@ -0,0 +1,5787 @@ +{ + "took" : 2453, + "timed_out" : false, + "_shards" : { + "total" : 2, + "successful" : 2, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 7200, + "relation" : "gte" + }, + "max_score" : 1.0, + "hits" : [] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-09-01T00:00:00.000Z", + "key" : 1598918400000, + "doc_count" : 944, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T01:00:00.000Z", + "key" : 1598922000000, + "doc_count" : 2662, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T02:00:00.000Z", + "key" : 1598925600000, + "doc_count" : 2924, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T03:00:00.000Z", + "key" : 1598929200000, + "doc_count" : 6756, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T04:00:00.000Z", + "key" : 1598932800000, + "doc_count" : 4545, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T05:00:00.000Z", + "key" : 1598936400000, + "doc_count" : 7131, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T06:00:00.000Z", + "key" : 1598940000000, + "doc_count" : 7077, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T07:00:00.000Z", + "key" : 1598943600000, + "doc_count" : 13414, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T08:00:00.000Z", + "key" : 1598947200000, + "doc_count" : 12588, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T09:00:00.000Z", + "key" : 1598950800000, + "doc_count" : 10648, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T10:00:00.000Z", + "key" : 1598954400000, + "doc_count" : 8862, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T11:00:00.000Z", + "key" : 1598958000000, + "doc_count" : 13007, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T12:00:00.000Z", + "key" : 1598961600000, + "doc_count" : 7581, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T13:00:00.000Z", + "key" : 1598965200000, + "doc_count" : 14882, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T14:00:00.000Z", + "key" : 1598968800000, + "doc_count" : 15423, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T15:00:00.000Z", + "key" : 1598972400000, + "doc_count" : 11008, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T16:00:00.000Z", + "key" : 1598976000000, + "doc_count" : 8298, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T17:00:00.000Z", + "key" : 1598979600000, + "doc_count" : 7120, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T18:00:00.000Z", + "key" : 1598983200000, + "doc_count" : 8097, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T19:00:00.000Z", + "key" : 1598986800000, + "doc_count" : 8688, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T20:00:00.000Z", + "key" : 1598990400000, + "doc_count" : 6807, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T21:00:00.000Z", + "key" : 1598994000000, + "doc_count" : 4425, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T22:00:00.000Z", + "key" : 1598997600000, + "doc_count" : 3184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T23:00:00.000Z", + "key" : 1599001200000, + "doc_count" : 2817, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T00:00:00.000Z", + "key" : 1599004800000, + "doc_count" : 3009, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T01:00:00.000Z", + "key" : 1599008400000, + "doc_count" : 2468, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T02:00:00.000Z", + "key" : 1599012000000, + "doc_count" : 1832, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T03:00:00.000Z", + "key" : 1599015600000, + "doc_count" : 2481, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T04:00:00.000Z", + "key" : 1599019200000, + "doc_count" : 3069, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T05:00:00.000Z", + "key" : 1599022800000, + "doc_count" : 4119, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T06:00:00.000Z", + "key" : 1599026400000, + "doc_count" : 5234, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T07:00:00.000Z", + "key" : 1599030000000, + "doc_count" : 6582, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T08:00:00.000Z", + "key" : 1599033600000, + "doc_count" : 10879, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T09:00:00.000Z", + "key" : 1599037200000, + "doc_count" : 10298, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T10:00:00.000Z", + "key" : 1599040800000, + "doc_count" : 12992, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T11:00:00.000Z", + "key" : 1599044400000, + "doc_count" : 12301, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T12:00:00.000Z", + "key" : 1599048000000, + "doc_count" : 10647, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T13:00:00.000Z", + "key" : 1599051600000, + "doc_count" : 11518, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T14:00:00.000Z", + "key" : 1599055200000, + "doc_count" : 8682, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T15:00:00.000Z", + "key" : 1599058800000, + "doc_count" : 8802, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T16:00:00.000Z", + "key" : 1599062400000, + "doc_count" : 6745, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T17:00:00.000Z", + "key" : 1599066000000, + "doc_count" : 6872, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T18:00:00.000Z", + "key" : 1599069600000, + "doc_count" : 7209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T19:00:00.000Z", + "key" : 1599073200000, + "doc_count" : 7669, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T20:00:00.000Z", + "key" : 1599076800000, + "doc_count" : 6579, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T21:00:00.000Z", + "key" : 1599080400000, + "doc_count" : 5865, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T22:00:00.000Z", + "key" : 1599084000000, + "doc_count" : 3413, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T23:00:00.000Z", + "key" : 1599087600000, + "doc_count" : 3262, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T00:00:00.000Z", + "key" : 1599091200000, + "doc_count" : 4056, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T01:00:00.000Z", + "key" : 1599094800000, + "doc_count" : 3452, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T02:00:00.000Z", + "key" : 1599098400000, + "doc_count" : 5088, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T03:00:00.000Z", + "key" : 1599102000000, + "doc_count" : 6927, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T04:00:00.000Z", + "key" : 1599105600000, + "doc_count" : 5051, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T05:00:00.000Z", + "key" : 1599109200000, + "doc_count" : 6748, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T06:00:00.000Z", + "key" : 1599112800000, + "doc_count" : 6848, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T07:00:00.000Z", + "key" : 1599116400000, + "doc_count" : 6907, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T08:00:00.000Z", + "key" : 1599120000000, + "doc_count" : 7342, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T09:00:00.000Z", + "key" : 1599123600000, + "doc_count" : 7591, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T10:00:00.000Z", + "key" : 1599127200000, + "doc_count" : 6986, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T11:00:00.000Z", + "key" : 1599130800000, + "doc_count" : 15011, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T12:00:00.000Z", + "key" : 1599134400000, + "doc_count" : 16058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T13:00:00.000Z", + "key" : 1599138000000, + "doc_count" : 12096, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T14:00:00.000Z", + "key" : 1599141600000, + "doc_count" : 10311, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T15:00:00.000Z", + "key" : 1599145200000, + "doc_count" : 8735, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T16:00:00.000Z", + "key" : 1599148800000, + "doc_count" : 7153, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T17:00:00.000Z", + "key" : 1599152400000, + "doc_count" : 7572, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T18:00:00.000Z", + "key" : 1599156000000, + "doc_count" : 8493, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T19:00:00.000Z", + "key" : 1599159600000, + "doc_count" : 9328, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T20:00:00.000Z", + "key" : 1599163200000, + "doc_count" : 7587, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T21:00:00.000Z", + "key" : 1599166800000, + "doc_count" : 9464, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T22:00:00.000Z", + "key" : 1599170400000, + "doc_count" : 7958, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T23:00:00.000Z", + "key" : 1599174000000, + "doc_count" : 3505, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T00:00:00.000Z", + "key" : 1599177600000, + "doc_count" : 2370, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T01:00:00.000Z", + "key" : 1599181200000, + "doc_count" : 2423, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T02:00:00.000Z", + "key" : 1599184800000, + "doc_count" : 2815, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T03:00:00.000Z", + "key" : 1599188400000, + "doc_count" : 2163, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T04:00:00.000Z", + "key" : 1599192000000, + "doc_count" : 2864, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T05:00:00.000Z", + "key" : 1599195600000, + "doc_count" : 4695, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T06:00:00.000Z", + "key" : 1599199200000, + "doc_count" : 6497, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T07:00:00.000Z", + "key" : 1599202800000, + "doc_count" : 6634, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T08:00:00.000Z", + "key" : 1599206400000, + "doc_count" : 7042, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T09:00:00.000Z", + "key" : 1599210000000, + "doc_count" : 7554, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T10:00:00.000Z", + "key" : 1599213600000, + "doc_count" : 5946, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T11:00:00.000Z", + "key" : 1599217200000, + "doc_count" : 7070, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T12:00:00.000Z", + "key" : 1599220800000, + "doc_count" : 6781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T13:00:00.000Z", + "key" : 1599224400000, + "doc_count" : 7139, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T14:00:00.000Z", + "key" : 1599228000000, + "doc_count" : 7292, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T15:00:00.000Z", + "key" : 1599231600000, + "doc_count" : 8757, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T16:00:00.000Z", + "key" : 1599235200000, + "doc_count" : 8160, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T17:00:00.000Z", + "key" : 1599238800000, + "doc_count" : 9821, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T18:00:00.000Z", + "key" : 1599242400000, + "doc_count" : 6753, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T19:00:00.000Z", + "key" : 1599246000000, + "doc_count" : 7511, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T20:00:00.000Z", + "key" : 1599249600000, + "doc_count" : 7204, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T21:00:00.000Z", + "key" : 1599253200000, + "doc_count" : 6557, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T22:00:00.000Z", + "key" : 1599256800000, + "doc_count" : 4891, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T23:00:00.000Z", + "key" : 1599260400000, + "doc_count" : 4481, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T00:00:00.000Z", + "key" : 1599264000000, + "doc_count" : 4066, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T01:00:00.000Z", + "key" : 1599267600000, + "doc_count" : 5230, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T02:00:00.000Z", + "key" : 1599271200000, + "doc_count" : 4880, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T03:00:00.000Z", + "key" : 1599274800000, + "doc_count" : 4816, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T04:00:00.000Z", + "key" : 1599278400000, + "doc_count" : 5239, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T05:00:00.000Z", + "key" : 1599282000000, + "doc_count" : 7294, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T06:00:00.000Z", + "key" : 1599285600000, + "doc_count" : 7409, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T07:00:00.000Z", + "key" : 1599289200000, + "doc_count" : 8609, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T08:00:00.000Z", + "key" : 1599292800000, + "doc_count" : 9194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T09:00:00.000Z", + "key" : 1599296400000, + "doc_count" : 10781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T10:00:00.000Z", + "key" : 1599300000000, + "doc_count" : 9436, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T11:00:00.000Z", + "key" : 1599303600000, + "doc_count" : 8995, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T12:00:00.000Z", + "key" : 1599307200000, + "doc_count" : 10198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T13:00:00.000Z", + "key" : 1599310800000, + "doc_count" : 8098, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T14:00:00.000Z", + "key" : 1599314400000, + "doc_count" : 7837, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T15:00:00.000Z", + "key" : 1599318000000, + "doc_count" : 7784, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T16:00:00.000Z", + "key" : 1599321600000, + "doc_count" : 7747, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T17:00:00.000Z", + "key" : 1599325200000, + "doc_count" : 7408, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T18:00:00.000Z", + "key" : 1599328800000, + "doc_count" : 11140, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T19:00:00.000Z", + "key" : 1599332400000, + "doc_count" : 12122, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T20:00:00.000Z", + "key" : 1599336000000, + "doc_count" : 9441, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T21:00:00.000Z", + "key" : 1599339600000, + "doc_count" : 8365, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T22:00:00.000Z", + "key" : 1599343200000, + "doc_count" : 5243, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T23:00:00.000Z", + "key" : 1599346800000, + "doc_count" : 4407, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T00:00:00.000Z", + "key" : 1599350400000, + "doc_count" : 3096, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T01:00:00.000Z", + "key" : 1599354000000, + "doc_count" : 5001, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T02:00:00.000Z", + "key" : 1599357600000, + "doc_count" : 2228, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T03:00:00.000Z", + "key" : 1599361200000, + "doc_count" : 2500, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T04:00:00.000Z", + "key" : 1599364800000, + "doc_count" : 3343, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T05:00:00.000Z", + "key" : 1599368400000, + "doc_count" : 7398, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T06:00:00.000Z", + "key" : 1599372000000, + "doc_count" : 10976, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T07:00:00.000Z", + "key" : 1599375600000, + "doc_count" : 11644, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T08:00:00.000Z", + "key" : 1599379200000, + "doc_count" : 12455, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T09:00:00.000Z", + "key" : 1599382800000, + "doc_count" : 10296, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T10:00:00.000Z", + "key" : 1599386400000, + "doc_count" : 9073, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T11:00:00.000Z", + "key" : 1599390000000, + "doc_count" : 10303, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T12:00:00.000Z", + "key" : 1599393600000, + "doc_count" : 10522, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T13:00:00.000Z", + "key" : 1599397200000, + "doc_count" : 9908, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T14:00:00.000Z", + "key" : 1599400800000, + "doc_count" : 9622, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T15:00:00.000Z", + "key" : 1599404400000, + "doc_count" : 10342, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T16:00:00.000Z", + "key" : 1599408000000, + "doc_count" : 5966, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T17:00:00.000Z", + "key" : 1599411600000, + "doc_count" : 7763, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T18:00:00.000Z", + "key" : 1599415200000, + "doc_count" : 7950, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T19:00:00.000Z", + "key" : 1599418800000, + "doc_count" : 11029, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T20:00:00.000Z", + "key" : 1599422400000, + "doc_count" : 9658, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T21:00:00.000Z", + "key" : 1599426000000, + "doc_count" : 6984, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T22:00:00.000Z", + "key" : 1599429600000, + "doc_count" : 5371, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T23:00:00.000Z", + "key" : 1599433200000, + "doc_count" : 3893, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T00:00:00.000Z", + "key" : 1599436800000, + "doc_count" : 4313, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T01:00:00.000Z", + "key" : 1599440400000, + "doc_count" : 4540, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T02:00:00.000Z", + "key" : 1599444000000, + "doc_count" : 3492, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T03:00:00.000Z", + "key" : 1599447600000, + "doc_count" : 2937, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T04:00:00.000Z", + "key" : 1599451200000, + "doc_count" : 3148, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T05:00:00.000Z", + "key" : 1599454800000, + "doc_count" : 4138, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T06:00:00.000Z", + "key" : 1599458400000, + "doc_count" : 7714, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T07:00:00.000Z", + "key" : 1599462000000, + "doc_count" : 8749, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T08:00:00.000Z", + "key" : 1599465600000, + "doc_count" : 7864, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T09:00:00.000Z", + "key" : 1599469200000, + "doc_count" : 10273, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T10:00:00.000Z", + "key" : 1599472800000, + "doc_count" : 8277, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T11:00:00.000Z", + "key" : 1599476400000, + "doc_count" : 7763, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T12:00:00.000Z", + "key" : 1599480000000, + "doc_count" : 8687, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T13:00:00.000Z", + "key" : 1599483600000, + "doc_count" : 7654, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T14:00:00.000Z", + "key" : 1599487200000, + "doc_count" : 7013, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T15:00:00.000Z", + "key" : 1599490800000, + "doc_count" : 7212, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T16:00:00.000Z", + "key" : 1599494400000, + "doc_count" : 6781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T17:00:00.000Z", + "key" : 1599498000000, + "doc_count" : 6463, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T18:00:00.000Z", + "key" : 1599501600000, + "doc_count" : 7589, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T19:00:00.000Z", + "key" : 1599505200000, + "doc_count" : 7668, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T20:00:00.000Z", + "key" : 1599508800000, + "doc_count" : 6977, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T21:00:00.000Z", + "key" : 1599512400000, + "doc_count" : 5500, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T22:00:00.000Z", + "key" : 1599516000000, + "doc_count" : 3897, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T23:00:00.000Z", + "key" : 1599519600000, + "doc_count" : 3945, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T00:00:00.000Z", + "key" : 1599523200000, + "doc_count" : 3680, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T01:00:00.000Z", + "key" : 1599526800000, + "doc_count" : 3863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T02:00:00.000Z", + "key" : 1599530400000, + "doc_count" : 3734, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T03:00:00.000Z", + "key" : 1599534000000, + "doc_count" : 4931, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T04:00:00.000Z", + "key" : 1599537600000, + "doc_count" : 5650, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T05:00:00.000Z", + "key" : 1599541200000, + "doc_count" : 6558, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T06:00:00.000Z", + "key" : 1599544800000, + "doc_count" : 5441, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T07:00:00.000Z", + "key" : 1599548400000, + "doc_count" : 7107, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T08:00:00.000Z", + "key" : 1599552000000, + "doc_count" : 7444, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T09:00:00.000Z", + "key" : 1599555600000, + "doc_count" : 6543, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T10:00:00.000Z", + "key" : 1599559200000, + "doc_count" : 5834, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T11:00:00.000Z", + "key" : 1599562800000, + "doc_count" : 6856, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T12:00:00.000Z", + "key" : 1599566400000, + "doc_count" : 6920, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T13:00:00.000Z", + "key" : 1599570000000, + "doc_count" : 6414, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T14:00:00.000Z", + "key" : 1599573600000, + "doc_count" : 7784, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T15:00:00.000Z", + "key" : 1599577200000, + "doc_count" : 18394, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T16:00:00.000Z", + "key" : 1599580800000, + "doc_count" : 11821, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T17:00:00.000Z", + "key" : 1599584400000, + "doc_count" : 10548, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T18:00:00.000Z", + "key" : 1599588000000, + "doc_count" : 10414, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T19:00:00.000Z", + "key" : 1599591600000, + "doc_count" : 10176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T20:00:00.000Z", + "key" : 1599595200000, + "doc_count" : 8811, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T21:00:00.000Z", + "key" : 1599598800000, + "doc_count" : 5966, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T22:00:00.000Z", + "key" : 1599602400000, + "doc_count" : 7058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T23:00:00.000Z", + "key" : 1599606000000, + "doc_count" : 4987, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T00:00:00.000Z", + "key" : 1599609600000, + "doc_count" : 4562, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T01:00:00.000Z", + "key" : 1599613200000, + "doc_count" : 3279, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T02:00:00.000Z", + "key" : 1599616800000, + "doc_count" : 3527, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T03:00:00.000Z", + "key" : 1599620400000, + "doc_count" : 2700, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T04:00:00.000Z", + "key" : 1599624000000, + "doc_count" : 3834, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T05:00:00.000Z", + "key" : 1599627600000, + "doc_count" : 4240, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T06:00:00.000Z", + "key" : 1599631200000, + "doc_count" : 6401, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T07:00:00.000Z", + "key" : 1599634800000, + "doc_count" : 7058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T08:00:00.000Z", + "key" : 1599638400000, + "doc_count" : 8066, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T09:00:00.000Z", + "key" : 1599642000000, + "doc_count" : 6711, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T10:00:00.000Z", + "key" : 1599645600000, + "doc_count" : 5761, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T11:00:00.000Z", + "key" : 1599649200000, + "doc_count" : 6860, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T12:00:00.000Z", + "key" : 1599652800000, + "doc_count" : 6709, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T13:00:00.000Z", + "key" : 1599656400000, + "doc_count" : 7962, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T14:00:00.000Z", + "key" : 1599660000000, + "doc_count" : 6262, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T15:00:00.000Z", + "key" : 1599663600000, + "doc_count" : 6271, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T16:00:00.000Z", + "key" : 1599667200000, + "doc_count" : 6469, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T17:00:00.000Z", + "key" : 1599670800000, + "doc_count" : 8031, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T18:00:00.000Z", + "key" : 1599674400000, + "doc_count" : 7821, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T19:00:00.000Z", + "key" : 1599678000000, + "doc_count" : 8997, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T20:00:00.000Z", + "key" : 1599681600000, + "doc_count" : 5884, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T21:00:00.000Z", + "key" : 1599685200000, + "doc_count" : 4460, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T22:00:00.000Z", + "key" : 1599688800000, + "doc_count" : 3618, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T23:00:00.000Z", + "key" : 1599692400000, + "doc_count" : 2812, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T00:00:00.000Z", + "key" : 1599696000000, + "doc_count" : 2163, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T01:00:00.000Z", + "key" : 1599699600000, + "doc_count" : 2549, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T02:00:00.000Z", + "key" : 1599703200000, + "doc_count" : 3205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T03:00:00.000Z", + "key" : 1599706800000, + "doc_count" : 4736, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T04:00:00.000Z", + "key" : 1599710400000, + "doc_count" : 5811, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T05:00:00.000Z", + "key" : 1599714000000, + "doc_count" : 5282, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T06:00:00.000Z", + "key" : 1599717600000, + "doc_count" : 7138, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T07:00:00.000Z", + "key" : 1599721200000, + "doc_count" : 7686, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T08:00:00.000Z", + "key" : 1599724800000, + "doc_count" : 12730, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T09:00:00.000Z", + "key" : 1599728400000, + "doc_count" : 9877, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T10:00:00.000Z", + "key" : 1599732000000, + "doc_count" : 7673, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T11:00:00.000Z", + "key" : 1599735600000, + "doc_count" : 9883, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T12:00:00.000Z", + "key" : 1599739200000, + "doc_count" : 8764, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T13:00:00.000Z", + "key" : 1599742800000, + "doc_count" : 9073, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T14:00:00.000Z", + "key" : 1599746400000, + "doc_count" : 7091, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T15:00:00.000Z", + "key" : 1599750000000, + "doc_count" : 7783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T16:00:00.000Z", + "key" : 1599753600000, + "doc_count" : 7678, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T17:00:00.000Z", + "key" : 1599757200000, + "doc_count" : 6399, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T18:00:00.000Z", + "key" : 1599760800000, + "doc_count" : 5440, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T19:00:00.000Z", + "key" : 1599764400000, + "doc_count" : 9519, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T20:00:00.000Z", + "key" : 1599768000000, + "doc_count" : 10172, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T21:00:00.000Z", + "key" : 1599771600000, + "doc_count" : 8273, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T22:00:00.000Z", + "key" : 1599775200000, + "doc_count" : 3159, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T23:00:00.000Z", + "key" : 1599778800000, + "doc_count" : 4429, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T00:00:00.000Z", + "key" : 1599782400000, + "doc_count" : 2921, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T01:00:00.000Z", + "key" : 1599786000000, + "doc_count" : 2714, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T02:00:00.000Z", + "key" : 1599789600000, + "doc_count" : 2771, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T03:00:00.000Z", + "key" : 1599793200000, + "doc_count" : 2685, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T04:00:00.000Z", + "key" : 1599796800000, + "doc_count" : 2790, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T05:00:00.000Z", + "key" : 1599800400000, + "doc_count" : 4005, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T06:00:00.000Z", + "key" : 1599804000000, + "doc_count" : 9110, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T07:00:00.000Z", + "key" : 1599807600000, + "doc_count" : 7405, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T08:00:00.000Z", + "key" : 1599811200000, + "doc_count" : 7192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T09:00:00.000Z", + "key" : 1599814800000, + "doc_count" : 6746, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T10:00:00.000Z", + "key" : 1599818400000, + "doc_count" : 6700, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T11:00:00.000Z", + "key" : 1599822000000, + "doc_count" : 6564, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T12:00:00.000Z", + "key" : 1599825600000, + "doc_count" : 5636, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T13:00:00.000Z", + "key" : 1599829200000, + "doc_count" : 8730, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T14:00:00.000Z", + "key" : 1599832800000, + "doc_count" : 7375, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T15:00:00.000Z", + "key" : 1599836400000, + "doc_count" : 7577, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T16:00:00.000Z", + "key" : 1599840000000, + "doc_count" : 6306, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T17:00:00.000Z", + "key" : 1599843600000, + "doc_count" : 6637, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T18:00:00.000Z", + "key" : 1599847200000, + "doc_count" : 5783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T19:00:00.000Z", + "key" : 1599850800000, + "doc_count" : 6889, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T20:00:00.000Z", + "key" : 1599854400000, + "doc_count" : 5651, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T21:00:00.000Z", + "key" : 1599858000000, + "doc_count" : 5004, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T22:00:00.000Z", + "key" : 1599861600000, + "doc_count" : 3739, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T23:00:00.000Z", + "key" : 1599865200000, + "doc_count" : 3116, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T00:00:00.000Z", + "key" : 1599868800000, + "doc_count" : 3123, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T01:00:00.000Z", + "key" : 1599872400000, + "doc_count" : 3158, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T02:00:00.000Z", + "key" : 1599876000000, + "doc_count" : 3962, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T03:00:00.000Z", + "key" : 1599879600000, + "doc_count" : 3086, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T04:00:00.000Z", + "key" : 1599883200000, + "doc_count" : 3628, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T05:00:00.000Z", + "key" : 1599886800000, + "doc_count" : 4180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T06:00:00.000Z", + "key" : 1599890400000, + "doc_count" : 7456, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T07:00:00.000Z", + "key" : 1599894000000, + "doc_count" : 7307, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T08:00:00.000Z", + "key" : 1599897600000, + "doc_count" : 11424, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T09:00:00.000Z", + "key" : 1599901200000, + "doc_count" : 9267, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T10:00:00.000Z", + "key" : 1599904800000, + "doc_count" : 6059, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T11:00:00.000Z", + "key" : 1599908400000, + "doc_count" : 6402, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T12:00:00.000Z", + "key" : 1599912000000, + "doc_count" : 6572, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T13:00:00.000Z", + "key" : 1599915600000, + "doc_count" : 6753, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T14:00:00.000Z", + "key" : 1599919200000, + "doc_count" : 6679, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T15:00:00.000Z", + "key" : 1599922800000, + "doc_count" : 6267, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T16:00:00.000Z", + "key" : 1599926400000, + "doc_count" : 5786, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T17:00:00.000Z", + "key" : 1599930000000, + "doc_count" : 5807, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T18:00:00.000Z", + "key" : 1599933600000, + "doc_count" : 6819, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T19:00:00.000Z", + "key" : 1599937200000, + "doc_count" : 6788, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T20:00:00.000Z", + "key" : 1599940800000, + "doc_count" : 5655, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T21:00:00.000Z", + "key" : 1599944400000, + "doc_count" : 4367, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T22:00:00.000Z", + "key" : 1599948000000, + "doc_count" : 3859, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T23:00:00.000Z", + "key" : 1599951600000, + "doc_count" : 2598, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T00:00:00.000Z", + "key" : 1599955200000, + "doc_count" : 2973, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T01:00:00.000Z", + "key" : 1599958800000, + "doc_count" : 2600, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T02:00:00.000Z", + "key" : 1599962400000, + "doc_count" : 3076, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T03:00:00.000Z", + "key" : 1599966000000, + "doc_count" : 5236, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T04:00:00.000Z", + "key" : 1599969600000, + "doc_count" : 4609, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T05:00:00.000Z", + "key" : 1599973200000, + "doc_count" : 3238, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T06:00:00.000Z", + "key" : 1599976800000, + "doc_count" : 4563, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T07:00:00.000Z", + "key" : 1599980400000, + "doc_count" : 5619, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T08:00:00.000Z", + "key" : 1599984000000, + "doc_count" : 6848, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T09:00:00.000Z", + "key" : 1599987600000, + "doc_count" : 8534, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T10:00:00.000Z", + "key" : 1599991200000, + "doc_count" : 6983, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T11:00:00.000Z", + "key" : 1599994800000, + "doc_count" : 6568, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T12:00:00.000Z", + "key" : 1599998400000, + "doc_count" : 9070, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T13:00:00.000Z", + "key" : 1600002000000, + "doc_count" : 6111, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T14:00:00.000Z", + "key" : 1600005600000, + "doc_count" : 6168, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T15:00:00.000Z", + "key" : 1600009200000, + "doc_count" : 6814, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T16:00:00.000Z", + "key" : 1600012800000, + "doc_count" : 6050, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T17:00:00.000Z", + "key" : 1600016400000, + "doc_count" : 5209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T18:00:00.000Z", + "key" : 1600020000000, + "doc_count" : 5638, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T19:00:00.000Z", + "key" : 1600023600000, + "doc_count" : 6357, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T20:00:00.000Z", + "key" : 1600027200000, + "doc_count" : 5958, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T21:00:00.000Z", + "key" : 1600030800000, + "doc_count" : 4696, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T22:00:00.000Z", + "key" : 1600034400000, + "doc_count" : 5766, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T23:00:00.000Z", + "key" : 1600038000000, + "doc_count" : 2302, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T00:00:00.000Z", + "key" : 1600041600000, + "doc_count" : 2503, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T01:00:00.000Z", + "key" : 1600045200000, + "doc_count" : 2498, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T02:00:00.000Z", + "key" : 1600048800000, + "doc_count" : 2074, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T03:00:00.000Z", + "key" : 1600052400000, + "doc_count" : 2453, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T04:00:00.000Z", + "key" : 1600056000000, + "doc_count" : 4133, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T05:00:00.000Z", + "key" : 1600059600000, + "doc_count" : 3812, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T06:00:00.000Z", + "key" : 1600063200000, + "doc_count" : 4981, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T07:00:00.000Z", + "key" : 1600066800000, + "doc_count" : 5883, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T08:00:00.000Z", + "key" : 1600070400000, + "doc_count" : 6653, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T09:00:00.000Z", + "key" : 1600074000000, + "doc_count" : 6306, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T10:00:00.000Z", + "key" : 1600077600000, + "doc_count" : 6590, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T11:00:00.000Z", + "key" : 1600081200000, + "doc_count" : 6652, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T12:00:00.000Z", + "key" : 1600084800000, + "doc_count" : 6905, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T13:00:00.000Z", + "key" : 1600088400000, + "doc_count" : 6052, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T14:00:00.000Z", + "key" : 1600092000000, + "doc_count" : 6445, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T15:00:00.000Z", + "key" : 1600095600000, + "doc_count" : 6379, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T16:00:00.000Z", + "key" : 1600099200000, + "doc_count" : 8510, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T17:00:00.000Z", + "key" : 1600102800000, + "doc_count" : 7303, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T18:00:00.000Z", + "key" : 1600106400000, + "doc_count" : 6635, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T19:00:00.000Z", + "key" : 1600110000000, + "doc_count" : 8406, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T20:00:00.000Z", + "key" : 1600113600000, + "doc_count" : 6545, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T21:00:00.000Z", + "key" : 1600117200000, + "doc_count" : 6429, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T22:00:00.000Z", + "key" : 1600120800000, + "doc_count" : 4395, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T23:00:00.000Z", + "key" : 1600124400000, + "doc_count" : 4472, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T00:00:00.000Z", + "key" : 1600128000000, + "doc_count" : 3382, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T01:00:00.000Z", + "key" : 1600131600000, + "doc_count" : 2524, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T02:00:00.000Z", + "key" : 1600135200000, + "doc_count" : 3244, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T03:00:00.000Z", + "key" : 1600138800000, + "doc_count" : 3360, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T04:00:00.000Z", + "key" : 1600142400000, + "doc_count" : 3473, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T05:00:00.000Z", + "key" : 1600146000000, + "doc_count" : 3505, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T06:00:00.000Z", + "key" : 1600149600000, + "doc_count" : 5048, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T07:00:00.000Z", + "key" : 1600153200000, + "doc_count" : 11405, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T08:00:00.000Z", + "key" : 1600156800000, + "doc_count" : 15142, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T09:00:00.000Z", + "key" : 1600160400000, + "doc_count" : 11132, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T10:00:00.000Z", + "key" : 1600164000000, + "doc_count" : 9614, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T11:00:00.000Z", + "key" : 1600167600000, + "doc_count" : 11313, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T12:00:00.000Z", + "key" : 1600171200000, + "doc_count" : 8602, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T13:00:00.000Z", + "key" : 1600174800000, + "doc_count" : 8665, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T14:00:00.000Z", + "key" : 1600178400000, + "doc_count" : 8459, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T15:00:00.000Z", + "key" : 1600182000000, + "doc_count" : 6788, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T16:00:00.000Z", + "key" : 1600185600000, + "doc_count" : 6138, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T17:00:00.000Z", + "key" : 1600189200000, + "doc_count" : 6183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T18:00:00.000Z", + "key" : 1600192800000, + "doc_count" : 6430, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T19:00:00.000Z", + "key" : 1600196400000, + "doc_count" : 7523, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T20:00:00.000Z", + "key" : 1600200000000, + "doc_count" : 7611, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T21:00:00.000Z", + "key" : 1600203600000, + "doc_count" : 4826, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T22:00:00.000Z", + "key" : 1600207200000, + "doc_count" : 4991, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T23:00:00.000Z", + "key" : 1600210800000, + "doc_count" : 4298, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T00:00:00.000Z", + "key" : 1600214400000, + "doc_count" : 5859, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T01:00:00.000Z", + "key" : 1600218000000, + "doc_count" : 8961, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T02:00:00.000Z", + "key" : 1600221600000, + "doc_count" : 6042, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T03:00:00.000Z", + "key" : 1600225200000, + "doc_count" : 6811, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T04:00:00.000Z", + "key" : 1600228800000, + "doc_count" : 4562, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T05:00:00.000Z", + "key" : 1600232400000, + "doc_count" : 5265, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T06:00:00.000Z", + "key" : 1600236000000, + "doc_count" : 5871, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T07:00:00.000Z", + "key" : 1600239600000, + "doc_count" : 9117, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T08:00:00.000Z", + "key" : 1600243200000, + "doc_count" : 8240, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T09:00:00.000Z", + "key" : 1600246800000, + "doc_count" : 8009, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T10:00:00.000Z", + "key" : 1600250400000, + "doc_count" : 7019, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T11:00:00.000Z", + "key" : 1600254000000, + "doc_count" : 5552, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T12:00:00.000Z", + "key" : 1600257600000, + "doc_count" : 7842, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T13:00:00.000Z", + "key" : 1600261200000, + "doc_count" : 7926, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T14:00:00.000Z", + "key" : 1600264800000, + "doc_count" : 8941, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T15:00:00.000Z", + "key" : 1600268400000, + "doc_count" : 18372, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T16:00:00.000Z", + "key" : 1600272000000, + "doc_count" : 13897, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T17:00:00.000Z", + "key" : 1600275600000, + "doc_count" : 12343, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T18:00:00.000Z", + "key" : 1600279200000, + "doc_count" : 11615, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T19:00:00.000Z", + "key" : 1600282800000, + "doc_count" : 606, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T20:00:00.000Z", + "key" : 1600286400000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T21:00:00.000Z", + "key" : 1600290000000, + "doc_count" : 734, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T22:00:00.000Z", + "key" : 1600293600000, + "doc_count" : 5076, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T23:00:00.000Z", + "key" : 1600297200000, + "doc_count" : 3793, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T00:00:00.000Z", + "key" : 1600300800000, + "doc_count" : 4783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T01:00:00.000Z", + "key" : 1600304400000, + "doc_count" : 4074, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T02:00:00.000Z", + "key" : 1600308000000, + "doc_count" : 4945, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T03:00:00.000Z", + "key" : 1600311600000, + "doc_count" : 6020, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T04:00:00.000Z", + "key" : 1600315200000, + "doc_count" : 7031, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T05:00:00.000Z", + "key" : 1600318800000, + "doc_count" : 9998, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T06:00:00.000Z", + "key" : 1600322400000, + "doc_count" : 10980, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T07:00:00.000Z", + "key" : 1600326000000, + "doc_count" : 11817, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T08:00:00.000Z", + "key" : 1600329600000, + "doc_count" : 11057, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T09:00:00.000Z", + "key" : 1600333200000, + "doc_count" : 9292, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T10:00:00.000Z", + "key" : 1600336800000, + "doc_count" : 9122, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T11:00:00.000Z", + "key" : 1600340400000, + "doc_count" : 7766, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T12:00:00.000Z", + "key" : 1600344000000, + "doc_count" : 8240, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T13:00:00.000Z", + "key" : 1600347600000, + "doc_count" : 6261, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T14:00:00.000Z", + "key" : 1600351200000, + "doc_count" : 11326, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T15:00:00.000Z", + "key" : 1600354800000, + "doc_count" : 11573, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T16:00:00.000Z", + "key" : 1600358400000, + "doc_count" : 8024, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T17:00:00.000Z", + "key" : 1600362000000, + "doc_count" : 6898, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T18:00:00.000Z", + "key" : 1600365600000, + "doc_count" : 7668, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T19:00:00.000Z", + "key" : 1600369200000, + "doc_count" : 7551, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T20:00:00.000Z", + "key" : 1600372800000, + "doc_count" : 7094, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T21:00:00.000Z", + "key" : 1600376400000, + "doc_count" : 5336, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T22:00:00.000Z", + "key" : 1600380000000, + "doc_count" : 3724, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T23:00:00.000Z", + "key" : 1600383600000, + "doc_count" : 3201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T00:00:00.000Z", + "key" : 1600387200000, + "doc_count" : 3535, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T01:00:00.000Z", + "key" : 1600390800000, + "doc_count" : 2763, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T02:00:00.000Z", + "key" : 1600394400000, + "doc_count" : 2612, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T03:00:00.000Z", + "key" : 1600398000000, + "doc_count" : 3550, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T04:00:00.000Z", + "key" : 1600401600000, + "doc_count" : 4210, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T05:00:00.000Z", + "key" : 1600405200000, + "doc_count" : 5482, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T06:00:00.000Z", + "key" : 1600408800000, + "doc_count" : 6916, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T07:00:00.000Z", + "key" : 1600412400000, + "doc_count" : 7936, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T08:00:00.000Z", + "key" : 1600416000000, + "doc_count" : 10665, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T09:00:00.000Z", + "key" : 1600419600000, + "doc_count" : 10062, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T10:00:00.000Z", + "key" : 1600423200000, + "doc_count" : 7630, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T11:00:00.000Z", + "key" : 1600426800000, + "doc_count" : 8136, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T12:00:00.000Z", + "key" : 1600430400000, + "doc_count" : 7739, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T13:00:00.000Z", + "key" : 1600434000000, + "doc_count" : 7669, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T14:00:00.000Z", + "key" : 1600437600000, + "doc_count" : 7675, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T15:00:00.000Z", + "key" : 1600441200000, + "doc_count" : 6259, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T16:00:00.000Z", + "key" : 1600444800000, + "doc_count" : 6432, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T17:00:00.000Z", + "key" : 1600448400000, + "doc_count" : 5897, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T18:00:00.000Z", + "key" : 1600452000000, + "doc_count" : 6228, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T19:00:00.000Z", + "key" : 1600455600000, + "doc_count" : 6669, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T20:00:00.000Z", + "key" : 1600459200000, + "doc_count" : 6393, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T21:00:00.000Z", + "key" : 1600462800000, + "doc_count" : 6199, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T22:00:00.000Z", + "key" : 1600466400000, + "doc_count" : 4926, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T23:00:00.000Z", + "key" : 1600470000000, + "doc_count" : 3873, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T00:00:00.000Z", + "key" : 1600473600000, + "doc_count" : 3132, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T01:00:00.000Z", + "key" : 1600477200000, + "doc_count" : 3871, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T02:00:00.000Z", + "key" : 1600480800000, + "doc_count" : 3324, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T03:00:00.000Z", + "key" : 1600484400000, + "doc_count" : 6205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T04:00:00.000Z", + "key" : 1600488000000, + "doc_count" : 7410, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T05:00:00.000Z", + "key" : 1600491600000, + "doc_count" : 5780, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T06:00:00.000Z", + "key" : 1600495200000, + "doc_count" : 6680, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T07:00:00.000Z", + "key" : 1600498800000, + "doc_count" : 7499, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T08:00:00.000Z", + "key" : 1600502400000, + "doc_count" : 8609, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T09:00:00.000Z", + "key" : 1600506000000, + "doc_count" : 8408, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T10:00:00.000Z", + "key" : 1600509600000, + "doc_count" : 6713, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T11:00:00.000Z", + "key" : 1600513200000, + "doc_count" : 7432, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T12:00:00.000Z", + "key" : 1600516800000, + "doc_count" : 13255, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T13:00:00.000Z", + "key" : 1600520400000, + "doc_count" : 6616, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T14:00:00.000Z", + "key" : 1600524000000, + "doc_count" : 6927, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T15:00:00.000Z", + "key" : 1600527600000, + "doc_count" : 6708, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T16:00:00.000Z", + "key" : 1600531200000, + "doc_count" : 6329, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T17:00:00.000Z", + "key" : 1600534800000, + "doc_count" : 6058, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T18:00:00.000Z", + "key" : 1600538400000, + "doc_count" : 5891, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T19:00:00.000Z", + "key" : 1600542000000, + "doc_count" : 5805, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T20:00:00.000Z", + "key" : 1600545600000, + "doc_count" : 5552, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T21:00:00.000Z", + "key" : 1600549200000, + "doc_count" : 4769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T22:00:00.000Z", + "key" : 1600552800000, + "doc_count" : 6190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T23:00:00.000Z", + "key" : 1600556400000, + "doc_count" : 4126, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T00:00:00.000Z", + "key" : 1600560000000, + "doc_count" : 2637, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T01:00:00.000Z", + "key" : 1600563600000, + "doc_count" : 2043, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T02:00:00.000Z", + "key" : 1600567200000, + "doc_count" : 2216, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T03:00:00.000Z", + "key" : 1600570800000, + "doc_count" : 2569, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T04:00:00.000Z", + "key" : 1600574400000, + "doc_count" : 3174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T05:00:00.000Z", + "key" : 1600578000000, + "doc_count" : 3716, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T06:00:00.000Z", + "key" : 1600581600000, + "doc_count" : 5537, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T07:00:00.000Z", + "key" : 1600585200000, + "doc_count" : 6716, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T08:00:00.000Z", + "key" : 1600588800000, + "doc_count" : 7331, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T09:00:00.000Z", + "key" : 1600592400000, + "doc_count" : 7035, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T10:00:00.000Z", + "key" : 1600596000000, + "doc_count" : 6186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T11:00:00.000Z", + "key" : 1600599600000, + "doc_count" : 6002, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T12:00:00.000Z", + "key" : 1600603200000, + "doc_count" : 5998, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T13:00:00.000Z", + "key" : 1600606800000, + "doc_count" : 5271, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T14:00:00.000Z", + "key" : 1600610400000, + "doc_count" : 5294, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T15:00:00.000Z", + "key" : 1600614000000, + "doc_count" : 5940, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T16:00:00.000Z", + "key" : 1600617600000, + "doc_count" : 7507, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T17:00:00.000Z", + "key" : 1600621200000, + "doc_count" : 7348, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T18:00:00.000Z", + "key" : 1600624800000, + "doc_count" : 4479, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T19:00:00.000Z", + "key" : 1600628400000, + "doc_count" : 5786, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T20:00:00.000Z", + "key" : 1600632000000, + "doc_count" : 5108, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T21:00:00.000Z", + "key" : 1600635600000, + "doc_count" : 4366, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T22:00:00.000Z", + "key" : 1600639200000, + "doc_count" : 4025, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T23:00:00.000Z", + "key" : 1600642800000, + "doc_count" : 1932, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T00:00:00.000Z", + "key" : 1600646400000, + "doc_count" : 2067, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T01:00:00.000Z", + "key" : 1600650000000, + "doc_count" : 2213, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T02:00:00.000Z", + "key" : 1600653600000, + "doc_count" : 2192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T03:00:00.000Z", + "key" : 1600657200000, + "doc_count" : 2929, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T04:00:00.000Z", + "key" : 1600660800000, + "doc_count" : 7834, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T05:00:00.000Z", + "key" : 1600664400000, + "doc_count" : 9116, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T06:00:00.000Z", + "key" : 1600668000000, + "doc_count" : 9304, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T07:00:00.000Z", + "key" : 1600671600000, + "doc_count" : 7926, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T08:00:00.000Z", + "key" : 1600675200000, + "doc_count" : 10585, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T09:00:00.000Z", + "key" : 1600678800000, + "doc_count" : 8465, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T10:00:00.000Z", + "key" : 1600682400000, + "doc_count" : 10705, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T11:00:00.000Z", + "key" : 1600686000000, + "doc_count" : 7603, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T12:00:00.000Z", + "key" : 1600689600000, + "doc_count" : 8452, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T13:00:00.000Z", + "key" : 1600693200000, + "doc_count" : 6320, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T14:00:00.000Z", + "key" : 1600696800000, + "doc_count" : 6490, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T15:00:00.000Z", + "key" : 1600700400000, + "doc_count" : 6772, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T16:00:00.000Z", + "key" : 1600704000000, + "doc_count" : 5481, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T17:00:00.000Z", + "key" : 1600707600000, + "doc_count" : 4959, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T18:00:00.000Z", + "key" : 1600711200000, + "doc_count" : 5676, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T19:00:00.000Z", + "key" : 1600714800000, + "doc_count" : 5705, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T20:00:00.000Z", + "key" : 1600718400000, + "doc_count" : 5511, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T21:00:00.000Z", + "key" : 1600722000000, + "doc_count" : 4631, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T22:00:00.000Z", + "key" : 1600725600000, + "doc_count" : 8366, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T23:00:00.000Z", + "key" : 1600729200000, + "doc_count" : 6797, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T00:00:00.000Z", + "key" : 1600732800000, + "doc_count" : 6369, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T01:00:00.000Z", + "key" : 1600736400000, + "doc_count" : 2365, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T02:00:00.000Z", + "key" : 1600740000000, + "doc_count" : 2319, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T03:00:00.000Z", + "key" : 1600743600000, + "doc_count" : 2992, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T04:00:00.000Z", + "key" : 1600747200000, + "doc_count" : 3192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T05:00:00.000Z", + "key" : 1600750800000, + "doc_count" : 4062, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T06:00:00.000Z", + "key" : 1600754400000, + "doc_count" : 6184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T07:00:00.000Z", + "key" : 1600758000000, + "doc_count" : 7990, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T08:00:00.000Z", + "key" : 1600761600000, + "doc_count" : 6817, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T09:00:00.000Z", + "key" : 1600765200000, + "doc_count" : 6769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T10:00:00.000Z", + "key" : 1600768800000, + "doc_count" : 5225, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T11:00:00.000Z", + "key" : 1600772400000, + "doc_count" : 6643, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T12:00:00.000Z", + "key" : 1600776000000, + "doc_count" : 6569, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T13:00:00.000Z", + "key" : 1600779600000, + "doc_count" : 7178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T14:00:00.000Z", + "key" : 1600783200000, + "doc_count" : 5939, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T15:00:00.000Z", + "key" : 1600786800000, + "doc_count" : 7378, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T16:00:00.000Z", + "key" : 1600790400000, + "doc_count" : 6561, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T17:00:00.000Z", + "key" : 1600794000000, + "doc_count" : 7693, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T18:00:00.000Z", + "key" : 1600797600000, + "doc_count" : 7565, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T19:00:00.000Z", + "key" : 1600801200000, + "doc_count" : 5803, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T20:00:00.000Z", + "key" : 1600804800000, + "doc_count" : 5209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T21:00:00.000Z", + "key" : 1600808400000, + "doc_count" : 6148, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T22:00:00.000Z", + "key" : 1600812000000, + "doc_count" : 4180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T23:00:00.000Z", + "key" : 1600815600000, + "doc_count" : 3946, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T00:00:00.000Z", + "key" : 1600819200000, + "doc_count" : 4464, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T01:00:00.000Z", + "key" : 1600822800000, + "doc_count" : 4195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T02:00:00.000Z", + "key" : 1600826400000, + "doc_count" : 2623, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T03:00:00.000Z", + "key" : 1600830000000, + "doc_count" : 3422, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T04:00:00.000Z", + "key" : 1600833600000, + "doc_count" : 3893, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T05:00:00.000Z", + "key" : 1600837200000, + "doc_count" : 6052, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T06:00:00.000Z", + "key" : 1600840800000, + "doc_count" : 6683, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T07:00:00.000Z", + "key" : 1600844400000, + "doc_count" : 6119, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T08:00:00.000Z", + "key" : 1600848000000, + "doc_count" : 6406, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T09:00:00.000Z", + "key" : 1600851600000, + "doc_count" : 10932, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T10:00:00.000Z", + "key" : 1600855200000, + "doc_count" : 13769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T11:00:00.000Z", + "key" : 1600858800000, + "doc_count" : 10401, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T12:00:00.000Z", + "key" : 1600862400000, + "doc_count" : 12491, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T13:00:00.000Z", + "key" : 1600866000000, + "doc_count" : 10518, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T14:00:00.000Z", + "key" : 1600869600000, + "doc_count" : 9353, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T15:00:00.000Z", + "key" : 1600873200000, + "doc_count" : 18699, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T16:00:00.000Z", + "key" : 1600876800000, + "doc_count" : 10855, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T17:00:00.000Z", + "key" : 1600880400000, + "doc_count" : 8601, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T18:00:00.000Z", + "key" : 1600884000000, + "doc_count" : 9599, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T19:00:00.000Z", + "key" : 1600887600000, + "doc_count" : 12387, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T20:00:00.000Z", + "key" : 1600891200000, + "doc_count" : 7712, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T21:00:00.000Z", + "key" : 1600894800000, + "doc_count" : 7764, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T22:00:00.000Z", + "key" : 1600898400000, + "doc_count" : 3810, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T23:00:00.000Z", + "key" : 1600902000000, + "doc_count" : 3078, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T00:00:00.000Z", + "key" : 1600905600000, + "doc_count" : 2781, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T01:00:00.000Z", + "key" : 1600909200000, + "doc_count" : 3165, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T02:00:00.000Z", + "key" : 1600912800000, + "doc_count" : 3486, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T03:00:00.000Z", + "key" : 1600916400000, + "doc_count" : 3106, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T04:00:00.000Z", + "key" : 1600920000000, + "doc_count" : 8318, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T05:00:00.000Z", + "key" : 1600923600000, + "doc_count" : 4146, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T06:00:00.000Z", + "key" : 1600927200000, + "doc_count" : 8003, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T07:00:00.000Z", + "key" : 1600930800000, + "doc_count" : 5501, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T08:00:00.000Z", + "key" : 1600934400000, + "doc_count" : 5789, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T09:00:00.000Z", + "key" : 1600938000000, + "doc_count" : 6415, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T10:00:00.000Z", + "key" : 1600941600000, + "doc_count" : 5871, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T11:00:00.000Z", + "key" : 1600945200000, + "doc_count" : 5087, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T12:00:00.000Z", + "key" : 1600948800000, + "doc_count" : 3808, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T13:00:00.000Z", + "key" : 1600952400000, + "doc_count" : 5527, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T14:00:00.000Z", + "key" : 1600956000000, + "doc_count" : 5534, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T15:00:00.000Z", + "key" : 1600959600000, + "doc_count" : 5740, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T16:00:00.000Z", + "key" : 1600963200000, + "doc_count" : 4073, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T17:00:00.000Z", + "key" : 1600966800000, + "doc_count" : 4553, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T18:00:00.000Z", + "key" : 1600970400000, + "doc_count" : 5407, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T19:00:00.000Z", + "key" : 1600974000000, + "doc_count" : 7169, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T20:00:00.000Z", + "key" : 1600977600000, + "doc_count" : 5516, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T21:00:00.000Z", + "key" : 1600981200000, + "doc_count" : 4105, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T22:00:00.000Z", + "key" : 1600984800000, + "doc_count" : 3863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T23:00:00.000Z", + "key" : 1600988400000, + "doc_count" : 3174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T00:00:00.000Z", + "key" : 1600992000000, + "doc_count" : 4056, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T01:00:00.000Z", + "key" : 1600995600000, + "doc_count" : 5538, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T02:00:00.000Z", + "key" : 1600999200000, + "doc_count" : 2368, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T03:00:00.000Z", + "key" : 1601002800000, + "doc_count" : 2242, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T04:00:00.000Z", + "key" : 1601006400000, + "doc_count" : 2714, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T05:00:00.000Z", + "key" : 1601010000000, + "doc_count" : 4055, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T06:00:00.000Z", + "key" : 1601013600000, + "doc_count" : 5500, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T07:00:00.000Z", + "key" : 1601017200000, + "doc_count" : 6237, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T08:00:00.000Z", + "key" : 1601020800000, + "doc_count" : 6079, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T09:00:00.000Z", + "key" : 1601024400000, + "doc_count" : 5506, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T10:00:00.000Z", + "key" : 1601028000000, + "doc_count" : 6746, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T11:00:00.000Z", + "key" : 1601031600000, + "doc_count" : 5193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T12:00:00.000Z", + "key" : 1601035200000, + "doc_count" : 5808, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T13:00:00.000Z", + "key" : 1601038800000, + "doc_count" : 5885, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T14:00:00.000Z", + "key" : 1601042400000, + "doc_count" : 7784, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T15:00:00.000Z", + "key" : 1601046000000, + "doc_count" : 5618, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T16:00:00.000Z", + "key" : 1601049600000, + "doc_count" : 4993, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T17:00:00.000Z", + "key" : 1601053200000, + "doc_count" : 4705, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T18:00:00.000Z", + "key" : 1601056800000, + "doc_count" : 6369, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T19:00:00.000Z", + "key" : 1601060400000, + "doc_count" : 9129, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T20:00:00.000Z", + "key" : 1601064000000, + "doc_count" : 5237, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T21:00:00.000Z", + "key" : 1601067600000, + "doc_count" : 4557, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T22:00:00.000Z", + "key" : 1601071200000, + "doc_count" : 3814, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T23:00:00.000Z", + "key" : 1601074800000, + "doc_count" : 2721, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T00:00:00.000Z", + "key" : 1601078400000, + "doc_count" : 2479, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T01:00:00.000Z", + "key" : 1601082000000, + "doc_count" : 2076, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T02:00:00.000Z", + "key" : 1601085600000, + "doc_count" : 2743, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T03:00:00.000Z", + "key" : 1601089200000, + "doc_count" : 2559, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T04:00:00.000Z", + "key" : 1601092800000, + "doc_count" : 3381, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T05:00:00.000Z", + "key" : 1601096400000, + "doc_count" : 3673, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T06:00:00.000Z", + "key" : 1601100000000, + "doc_count" : 5373, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T07:00:00.000Z", + "key" : 1601103600000, + "doc_count" : 5355, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T08:00:00.000Z", + "key" : 1601107200000, + "doc_count" : 6442, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T09:00:00.000Z", + "key" : 1601110800000, + "doc_count" : 6519, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T10:00:00.000Z", + "key" : 1601114400000, + "doc_count" : 7473, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T11:00:00.000Z", + "key" : 1601118000000, + "doc_count" : 7863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T12:00:00.000Z", + "key" : 1601121600000, + "doc_count" : 6667, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T13:00:00.000Z", + "key" : 1601125200000, + "doc_count" : 8302, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T14:00:00.000Z", + "key" : 1601128800000, + "doc_count" : 8663, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T15:00:00.000Z", + "key" : 1601132400000, + "doc_count" : 6790, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T16:00:00.000Z", + "key" : 1601136000000, + "doc_count" : 7273, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T17:00:00.000Z", + "key" : 1601139600000, + "doc_count" : 5127, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T18:00:00.000Z", + "key" : 1601143200000, + "doc_count" : 4437, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T19:00:00.000Z", + "key" : 1601146800000, + "doc_count" : 4812, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T20:00:00.000Z", + "key" : 1601150400000, + "doc_count" : 5121, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T21:00:00.000Z", + "key" : 1601154000000, + "doc_count" : 4530, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T22:00:00.000Z", + "key" : 1601157600000, + "doc_count" : 2982, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T23:00:00.000Z", + "key" : 1601161200000, + "doc_count" : 3177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T00:00:00.000Z", + "key" : 1601164800000, + "doc_count" : 1755, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T01:00:00.000Z", + "key" : 1601168400000, + "doc_count" : 3370, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T02:00:00.000Z", + "key" : 1601172000000, + "doc_count" : 2881, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T03:00:00.000Z", + "key" : 1601175600000, + "doc_count" : 3020, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T04:00:00.000Z", + "key" : 1601179200000, + "doc_count" : 2906, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T05:00:00.000Z", + "key" : 1601182800000, + "doc_count" : 3824, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T06:00:00.000Z", + "key" : 1601186400000, + "doc_count" : 4976, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T07:00:00.000Z", + "key" : 1601190000000, + "doc_count" : 7501, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T08:00:00.000Z", + "key" : 1601193600000, + "doc_count" : 9443, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T09:00:00.000Z", + "key" : 1601197200000, + "doc_count" : 7090, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T10:00:00.000Z", + "key" : 1601200800000, + "doc_count" : 6867, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T11:00:00.000Z", + "key" : 1601204400000, + "doc_count" : 6206, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T12:00:00.000Z", + "key" : 1601208000000, + "doc_count" : 6998, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T13:00:00.000Z", + "key" : 1601211600000, + "doc_count" : 9347, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T14:00:00.000Z", + "key" : 1601215200000, + "doc_count" : 9271, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T15:00:00.000Z", + "key" : 1601218800000, + "doc_count" : 5485, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T16:00:00.000Z", + "key" : 1601222400000, + "doc_count" : 6874, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T17:00:00.000Z", + "key" : 1601226000000, + "doc_count" : 5417, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T18:00:00.000Z", + "key" : 1601229600000, + "doc_count" : 8044, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T19:00:00.000Z", + "key" : 1601233200000, + "doc_count" : 5995, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T20:00:00.000Z", + "key" : 1601236800000, + "doc_count" : 5611, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T21:00:00.000Z", + "key" : 1601240400000, + "doc_count" : 3782, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T22:00:00.000Z", + "key" : 1601244000000, + "doc_count" : 2804, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T23:00:00.000Z", + "key" : 1601247600000, + "doc_count" : 2208, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T00:00:00.000Z", + "key" : 1601251200000, + "doc_count" : 2012, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T01:00:00.000Z", + "key" : 1601254800000, + "doc_count" : 2495, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T02:00:00.000Z", + "key" : 1601258400000, + "doc_count" : 3168, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T03:00:00.000Z", + "key" : 1601262000000, + "doc_count" : 3777, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T04:00:00.000Z", + "key" : 1601265600000, + "doc_count" : 2687, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T05:00:00.000Z", + "key" : 1601269200000, + "doc_count" : 2312, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T06:00:00.000Z", + "key" : 1601272800000, + "doc_count" : 3466, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T07:00:00.000Z", + "key" : 1601276400000, + "doc_count" : 6562, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T08:00:00.000Z", + "key" : 1601280000000, + "doc_count" : 5578, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T09:00:00.000Z", + "key" : 1601283600000, + "doc_count" : 5683, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T10:00:00.000Z", + "key" : 1601287200000, + "doc_count" : 4449, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T11:00:00.000Z", + "key" : 1601290800000, + "doc_count" : 4966, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T12:00:00.000Z", + "key" : 1601294400000, + "doc_count" : 4294, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T13:00:00.000Z", + "key" : 1601298000000, + "doc_count" : 5590, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T14:00:00.000Z", + "key" : 1601301600000, + "doc_count" : 6814, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T15:00:00.000Z", + "key" : 1601305200000, + "doc_count" : 6542, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T16:00:00.000Z", + "key" : 1601308800000, + "doc_count" : 4673, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T17:00:00.000Z", + "key" : 1601312400000, + "doc_count" : 4511, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T18:00:00.000Z", + "key" : 1601316000000, + "doc_count" : 5977, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T19:00:00.000Z", + "key" : 1601319600000, + "doc_count" : 6258, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T20:00:00.000Z", + "key" : 1601323200000, + "doc_count" : 4808, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T21:00:00.000Z", + "key" : 1601326800000, + "doc_count" : 4914, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T22:00:00.000Z", + "key" : 1601330400000, + "doc_count" : 3575, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T23:00:00.000Z", + "key" : 1601334000000, + "doc_count" : 2590, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T00:00:00.000Z", + "key" : 1601337600000, + "doc_count" : 1879, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T01:00:00.000Z", + "key" : 1601341200000, + "doc_count" : 4182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T02:00:00.000Z", + "key" : 1601344800000, + "doc_count" : 6304, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T03:00:00.000Z", + "key" : 1601348400000, + "doc_count" : 2439, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T04:00:00.000Z", + "key" : 1601352000000, + "doc_count" : 2680, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T05:00:00.000Z", + "key" : 1601355600000, + "doc_count" : 1766, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T06:00:00.000Z", + "key" : 1601359200000, + "doc_count" : 2635, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T07:00:00.000Z", + "key" : 1601362800000, + "doc_count" : 3603, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T08:00:00.000Z", + "key" : 1601366400000, + "doc_count" : 4684, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T09:00:00.000Z", + "key" : 1601370000000, + "doc_count" : 5321, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T10:00:00.000Z", + "key" : 1601373600000, + "doc_count" : 3769, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T11:00:00.000Z", + "key" : 1601377200000, + "doc_count" : 4001, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T12:00:00.000Z", + "key" : 1601380800000, + "doc_count" : 9982, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T13:00:00.000Z", + "key" : 1601384400000, + "doc_count" : 8863, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T14:00:00.000Z", + "key" : 1601388000000, + "doc_count" : 7383, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T15:00:00.000Z", + "key" : 1601391600000, + "doc_count" : 8174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T16:00:00.000Z", + "key" : 1601395200000, + "doc_count" : 6588, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T17:00:00.000Z", + "key" : 1601398800000, + "doc_count" : 6106, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T18:00:00.000Z", + "key" : 1601402400000, + "doc_count" : 6632, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T19:00:00.000Z", + "key" : 1601406000000, + "doc_count" : 5914, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T20:00:00.000Z", + "key" : 1601409600000, + "doc_count" : 8547, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T21:00:00.000Z", + "key" : 1601413200000, + "doc_count" : 5059, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T22:00:00.000Z", + "key" : 1601416800000, + "doc_count" : 3140, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T23:00:00.000Z", + "key" : 1601420400000, + "doc_count" : 3968, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T00:00:00.000Z", + "key" : 1601424000000, + "doc_count" : 2624, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T01:00:00.000Z", + "key" : 1601427600000, + "doc_count" : 2226, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T02:00:00.000Z", + "key" : 1601431200000, + "doc_count" : 2835, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T03:00:00.000Z", + "key" : 1601434800000, + "doc_count" : 2473, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T04:00:00.000Z", + "key" : 1601438400000, + "doc_count" : 2285, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T05:00:00.000Z", + "key" : 1601442000000, + "doc_count" : 783, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T06:00:00.000Z", + "key" : 1601445600000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T07:00:00.000Z", + "key" : 1601449200000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T08:00:00.000Z", + "key" : 1601452800000, + "doc_count" : 7, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T09:00:00.000Z", + "key" : 1601456400000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T10:00:00.000Z", + "key" : 1601460000000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T11:00:00.000Z", + "key" : 1601463600000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T12:00:00.000Z", + "key" : 1601467200000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T13:00:00.000Z", + "key" : 1601470800000, + "doc_count" : 1, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T14:00:00.000Z", + "key" : 1601474400000, + "doc_count" : 3, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T15:00:00.000Z", + "key" : 1601478000000, + "doc_count" : 48, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T16:00:00.000Z", + "key" : 1601481600000, + "doc_count" : 17, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T17:00:00.000Z", + "key" : 1601485200000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T18:00:00.000Z", + "key" : 1601488800000, + "doc_count" : 23, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T19:00:00.000Z", + "key" : 1601492400000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T20:00:00.000Z", + "key" : 1601496000000, + "doc_count" : 0, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T21:00:00.000Z", + "key" : 1601499600000, + "doc_count" : 16, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T22:00:00.000Z", + "key" : 1601503200000, + "doc_count" : 2, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T23:00:00.000Z", + "key" : 1601506800000, + "doc_count" : 3134, + "count" : { + "value" : 10 + } + } + ] + }, + "average" : { + "value" : 10 + } + } +} diff --git a/services/api/src/models/mockHitDataLegacy-project-c.json b/services/api/src/models/mockHitDataLegacy-project-c.json new file mode 100644 index 0000000000..c2689e3312 --- /dev/null +++ b/services/api/src/models/mockHitDataLegacy-project-c.json @@ -0,0 +1,5787 @@ +{ + "took" : 2453, + "timed_out" : false, + "_shards" : { + "total" : 2, + "successful" : 2, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 240, + "relation" : "gte" + }, + "max_score" : 1.0, + "hits" : [] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-09-01T00:00:00.000Z", + "key" : 1598918400000, + "doc_count" : 944, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T01:00:00.000Z", + "key" : 1598922000000, + "doc_count" : 2662, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T02:00:00.000Z", + "key" : 1598925600000, + "doc_count" : 2924, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T03:00:00.000Z", + "key" : 1598929200000, + "doc_count" : 6756, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T04:00:00.000Z", + "key" : 1598932800000, + "doc_count" : 4545, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T05:00:00.000Z", + "key" : 1598936400000, + "doc_count" : 7131, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T06:00:00.000Z", + "key" : 1598940000000, + "doc_count" : 7077, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T07:00:00.000Z", + "key" : 1598943600000, + "doc_count" : 13414, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T08:00:00.000Z", + "key" : 1598947200000, + "doc_count" : 12588, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T09:00:00.000Z", + "key" : 1598950800000, + "doc_count" : 10648, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T10:00:00.000Z", + "key" : 1598954400000, + "doc_count" : 8862, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T11:00:00.000Z", + "key" : 1598958000000, + "doc_count" : 13007, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T12:00:00.000Z", + "key" : 1598961600000, + "doc_count" : 7581, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T13:00:00.000Z", + "key" : 1598965200000, + "doc_count" : 14882, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T14:00:00.000Z", + "key" : 1598968800000, + "doc_count" : 15423, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T15:00:00.000Z", + "key" : 1598972400000, + "doc_count" : 11008, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T16:00:00.000Z", + "key" : 1598976000000, + "doc_count" : 8298, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T17:00:00.000Z", + "key" : 1598979600000, + "doc_count" : 7120, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T18:00:00.000Z", + "key" : 1598983200000, + "doc_count" : 8097, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T19:00:00.000Z", + "key" : 1598986800000, + "doc_count" : 8688, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T20:00:00.000Z", + "key" : 1598990400000, + "doc_count" : 6807, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T21:00:00.000Z", + "key" : 1598994000000, + "doc_count" : 4425, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T22:00:00.000Z", + "key" : 1598997600000, + "doc_count" : 3184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-01T23:00:00.000Z", + "key" : 1599001200000, + "doc_count" : 2817, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T00:00:00.000Z", + "key" : 1599004800000, + "doc_count" : 3009, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T01:00:00.000Z", + "key" : 1599008400000, + "doc_count" : 2468, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T02:00:00.000Z", + "key" : 1599012000000, + "doc_count" : 1832, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T03:00:00.000Z", + "key" : 1599015600000, + "doc_count" : 2481, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T04:00:00.000Z", + "key" : 1599019200000, + "doc_count" : 3069, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T05:00:00.000Z", + "key" : 1599022800000, + "doc_count" : 4119, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T06:00:00.000Z", + "key" : 1599026400000, + "doc_count" : 5234, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T07:00:00.000Z", + "key" : 1599030000000, + "doc_count" : 6582, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T08:00:00.000Z", + "key" : 1599033600000, + "doc_count" : 10879, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T09:00:00.000Z", + "key" : 1599037200000, + "doc_count" : 10298, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T10:00:00.000Z", + "key" : 1599040800000, + "doc_count" : 12992, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T11:00:00.000Z", + "key" : 1599044400000, + "doc_count" : 12301, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T12:00:00.000Z", + "key" : 1599048000000, + "doc_count" : 10647, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T13:00:00.000Z", + "key" : 1599051600000, + "doc_count" : 11518, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T14:00:00.000Z", + "key" : 1599055200000, + "doc_count" : 8682, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T15:00:00.000Z", + "key" : 1599058800000, + "doc_count" : 8802, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T16:00:00.000Z", + "key" : 1599062400000, + "doc_count" : 6745, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T17:00:00.000Z", + "key" : 1599066000000, + "doc_count" : 6872, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T18:00:00.000Z", + "key" : 1599069600000, + "doc_count" : 7209, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T19:00:00.000Z", + "key" : 1599073200000, + "doc_count" : 7669, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T20:00:00.000Z", + "key" : 1599076800000, + "doc_count" : 6579, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T21:00:00.000Z", + "key" : 1599080400000, + "doc_count" : 5865, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T22:00:00.000Z", + "key" : 1599084000000, + "doc_count" : 3413, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T23:00:00.000Z", + "key" : 1599087600000, + "doc_count" : 3262, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T00:00:00.000Z", + "key" : 1599091200000, + "doc_count" : 4056, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T01:00:00.000Z", + "key" : 1599094800000, + "doc_count" : 3452, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T02:00:00.000Z", + "key" : 1599098400000, + "doc_count" : 5088, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T03:00:00.000Z", + "key" : 1599102000000, + "doc_count" : 6927, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T04:00:00.000Z", + "key" : 1599105600000, + "doc_count" : 5051, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T05:00:00.000Z", + "key" : 1599109200000, + "doc_count" : 6748, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T06:00:00.000Z", + "key" : 1599112800000, + "doc_count" : 6848, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T07:00:00.000Z", + "key" : 1599116400000, + "doc_count" : 6907, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T08:00:00.000Z", + "key" : 1599120000000, + "doc_count" : 7342, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T09:00:00.000Z", + "key" : 1599123600000, + "doc_count" : 7591, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T10:00:00.000Z", + "key" : 1599127200000, + "doc_count" : 6986, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T11:00:00.000Z", + "key" : 1599130800000, + "doc_count" : 15011, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T12:00:00.000Z", + "key" : 1599134400000, + "doc_count" : 16058, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T13:00:00.000Z", + "key" : 1599138000000, + "doc_count" : 12096, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T14:00:00.000Z", + "key" : 1599141600000, + "doc_count" : 10311, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T15:00:00.000Z", + "key" : 1599145200000, + "doc_count" : 8735, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T16:00:00.000Z", + "key" : 1599148800000, + "doc_count" : 7153, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T17:00:00.000Z", + "key" : 1599152400000, + "doc_count" : 7572, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T18:00:00.000Z", + "key" : 1599156000000, + "doc_count" : 8493, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T19:00:00.000Z", + "key" : 1599159600000, + "doc_count" : 9328, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T20:00:00.000Z", + "key" : 1599163200000, + "doc_count" : 7587, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T21:00:00.000Z", + "key" : 1599166800000, + "doc_count" : 9464, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T22:00:00.000Z", + "key" : 1599170400000, + "doc_count" : 7958, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-03T23:00:00.000Z", + "key" : 1599174000000, + "doc_count" : 3505, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T00:00:00.000Z", + "key" : 1599177600000, + "doc_count" : 2370, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T01:00:00.000Z", + "key" : 1599181200000, + "doc_count" : 2423, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T02:00:00.000Z", + "key" : 1599184800000, + "doc_count" : 2815, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T03:00:00.000Z", + "key" : 1599188400000, + "doc_count" : 2163, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T04:00:00.000Z", + "key" : 1599192000000, + "doc_count" : 2864, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T05:00:00.000Z", + "key" : 1599195600000, + "doc_count" : 4695, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T06:00:00.000Z", + "key" : 1599199200000, + "doc_count" : 6497, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T07:00:00.000Z", + "key" : 1599202800000, + "doc_count" : 6634, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T08:00:00.000Z", + "key" : 1599206400000, + "doc_count" : 7042, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T09:00:00.000Z", + "key" : 1599210000000, + "doc_count" : 7554, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T10:00:00.000Z", + "key" : 1599213600000, + "doc_count" : 5946, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T11:00:00.000Z", + "key" : 1599217200000, + "doc_count" : 7070, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T12:00:00.000Z", + "key" : 1599220800000, + "doc_count" : 6781, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T13:00:00.000Z", + "key" : 1599224400000, + "doc_count" : 7139, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T14:00:00.000Z", + "key" : 1599228000000, + "doc_count" : 7292, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T15:00:00.000Z", + "key" : 1599231600000, + "doc_count" : 8757, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T16:00:00.000Z", + "key" : 1599235200000, + "doc_count" : 8160, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T17:00:00.000Z", + "key" : 1599238800000, + "doc_count" : 9821, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T18:00:00.000Z", + "key" : 1599242400000, + "doc_count" : 6753, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T19:00:00.000Z", + "key" : 1599246000000, + "doc_count" : 7511, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T20:00:00.000Z", + "key" : 1599249600000, + "doc_count" : 7204, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T21:00:00.000Z", + "key" : 1599253200000, + "doc_count" : 6557, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T22:00:00.000Z", + "key" : 1599256800000, + "doc_count" : 4891, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-04T23:00:00.000Z", + "key" : 1599260400000, + "doc_count" : 4481, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T00:00:00.000Z", + "key" : 1599264000000, + "doc_count" : 4066, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T01:00:00.000Z", + "key" : 1599267600000, + "doc_count" : 5230, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T02:00:00.000Z", + "key" : 1599271200000, + "doc_count" : 4880, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T03:00:00.000Z", + "key" : 1599274800000, + "doc_count" : 4816, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T04:00:00.000Z", + "key" : 1599278400000, + "doc_count" : 5239, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T05:00:00.000Z", + "key" : 1599282000000, + "doc_count" : 7294, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T06:00:00.000Z", + "key" : 1599285600000, + "doc_count" : 7409, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T07:00:00.000Z", + "key" : 1599289200000, + "doc_count" : 8609, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T08:00:00.000Z", + "key" : 1599292800000, + "doc_count" : 9194, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T09:00:00.000Z", + "key" : 1599296400000, + "doc_count" : 10781, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T10:00:00.000Z", + "key" : 1599300000000, + "doc_count" : 9436, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T11:00:00.000Z", + "key" : 1599303600000, + "doc_count" : 8995, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T12:00:00.000Z", + "key" : 1599307200000, + "doc_count" : 10198, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T13:00:00.000Z", + "key" : 1599310800000, + "doc_count" : 8098, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T14:00:00.000Z", + "key" : 1599314400000, + "doc_count" : 7837, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T15:00:00.000Z", + "key" : 1599318000000, + "doc_count" : 7784, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T16:00:00.000Z", + "key" : 1599321600000, + "doc_count" : 7747, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T17:00:00.000Z", + "key" : 1599325200000, + "doc_count" : 7408, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T18:00:00.000Z", + "key" : 1599328800000, + "doc_count" : 11140, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T19:00:00.000Z", + "key" : 1599332400000, + "doc_count" : 12122, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T20:00:00.000Z", + "key" : 1599336000000, + "doc_count" : 9441, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T21:00:00.000Z", + "key" : 1599339600000, + "doc_count" : 8365, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T22:00:00.000Z", + "key" : 1599343200000, + "doc_count" : 5243, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-05T23:00:00.000Z", + "key" : 1599346800000, + "doc_count" : 4407, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T00:00:00.000Z", + "key" : 1599350400000, + "doc_count" : 3096, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T01:00:00.000Z", + "key" : 1599354000000, + "doc_count" : 5001, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T02:00:00.000Z", + "key" : 1599357600000, + "doc_count" : 2228, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T03:00:00.000Z", + "key" : 1599361200000, + "doc_count" : 2500, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T04:00:00.000Z", + "key" : 1599364800000, + "doc_count" : 3343, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T05:00:00.000Z", + "key" : 1599368400000, + "doc_count" : 7398, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T06:00:00.000Z", + "key" : 1599372000000, + "doc_count" : 10976, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T07:00:00.000Z", + "key" : 1599375600000, + "doc_count" : 11644, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T08:00:00.000Z", + "key" : 1599379200000, + "doc_count" : 12455, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T09:00:00.000Z", + "key" : 1599382800000, + "doc_count" : 10296, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T10:00:00.000Z", + "key" : 1599386400000, + "doc_count" : 9073, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T11:00:00.000Z", + "key" : 1599390000000, + "doc_count" : 10303, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T12:00:00.000Z", + "key" : 1599393600000, + "doc_count" : 10522, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T13:00:00.000Z", + "key" : 1599397200000, + "doc_count" : 9908, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T14:00:00.000Z", + "key" : 1599400800000, + "doc_count" : 9622, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T15:00:00.000Z", + "key" : 1599404400000, + "doc_count" : 10342, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T16:00:00.000Z", + "key" : 1599408000000, + "doc_count" : 5966, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T17:00:00.000Z", + "key" : 1599411600000, + "doc_count" : 7763, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T18:00:00.000Z", + "key" : 1599415200000, + "doc_count" : 7950, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T19:00:00.000Z", + "key" : 1599418800000, + "doc_count" : 11029, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T20:00:00.000Z", + "key" : 1599422400000, + "doc_count" : 9658, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T21:00:00.000Z", + "key" : 1599426000000, + "doc_count" : 6984, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T22:00:00.000Z", + "key" : 1599429600000, + "doc_count" : 5371, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-06T23:00:00.000Z", + "key" : 1599433200000, + "doc_count" : 3893, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T00:00:00.000Z", + "key" : 1599436800000, + "doc_count" : 4313, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T01:00:00.000Z", + "key" : 1599440400000, + "doc_count" : 4540, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T02:00:00.000Z", + "key" : 1599444000000, + "doc_count" : 3492, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T03:00:00.000Z", + "key" : 1599447600000, + "doc_count" : 2937, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T04:00:00.000Z", + "key" : 1599451200000, + "doc_count" : 3148, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T05:00:00.000Z", + "key" : 1599454800000, + "doc_count" : 4138, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T06:00:00.000Z", + "key" : 1599458400000, + "doc_count" : 7714, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T07:00:00.000Z", + "key" : 1599462000000, + "doc_count" : 8749, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T08:00:00.000Z", + "key" : 1599465600000, + "doc_count" : 7864, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T09:00:00.000Z", + "key" : 1599469200000, + "doc_count" : 10273, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T10:00:00.000Z", + "key" : 1599472800000, + "doc_count" : 8277, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T11:00:00.000Z", + "key" : 1599476400000, + "doc_count" : 7763, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T12:00:00.000Z", + "key" : 1599480000000, + "doc_count" : 8687, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T13:00:00.000Z", + "key" : 1599483600000, + "doc_count" : 7654, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T14:00:00.000Z", + "key" : 1599487200000, + "doc_count" : 7013, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T15:00:00.000Z", + "key" : 1599490800000, + "doc_count" : 7212, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T16:00:00.000Z", + "key" : 1599494400000, + "doc_count" : 6781, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T17:00:00.000Z", + "key" : 1599498000000, + "doc_count" : 6463, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T18:00:00.000Z", + "key" : 1599501600000, + "doc_count" : 7589, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T19:00:00.000Z", + "key" : 1599505200000, + "doc_count" : 7668, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T20:00:00.000Z", + "key" : 1599508800000, + "doc_count" : 6977, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T21:00:00.000Z", + "key" : 1599512400000, + "doc_count" : 5500, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T22:00:00.000Z", + "key" : 1599516000000, + "doc_count" : 3897, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-07T23:00:00.000Z", + "key" : 1599519600000, + "doc_count" : 3945, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T00:00:00.000Z", + "key" : 1599523200000, + "doc_count" : 3680, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T01:00:00.000Z", + "key" : 1599526800000, + "doc_count" : 3863, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T02:00:00.000Z", + "key" : 1599530400000, + "doc_count" : 3734, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T03:00:00.000Z", + "key" : 1599534000000, + "doc_count" : 4931, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T04:00:00.000Z", + "key" : 1599537600000, + "doc_count" : 5650, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T05:00:00.000Z", + "key" : 1599541200000, + "doc_count" : 6558, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T06:00:00.000Z", + "key" : 1599544800000, + "doc_count" : 5441, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T07:00:00.000Z", + "key" : 1599548400000, + "doc_count" : 7107, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T08:00:00.000Z", + "key" : 1599552000000, + "doc_count" : 7444, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T09:00:00.000Z", + "key" : 1599555600000, + "doc_count" : 6543, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T10:00:00.000Z", + "key" : 1599559200000, + "doc_count" : 5834, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T11:00:00.000Z", + "key" : 1599562800000, + "doc_count" : 6856, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T12:00:00.000Z", + "key" : 1599566400000, + "doc_count" : 6920, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T13:00:00.000Z", + "key" : 1599570000000, + "doc_count" : 6414, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T14:00:00.000Z", + "key" : 1599573600000, + "doc_count" : 7784, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T15:00:00.000Z", + "key" : 1599577200000, + "doc_count" : 18394, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T16:00:00.000Z", + "key" : 1599580800000, + "doc_count" : 11821, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T17:00:00.000Z", + "key" : 1599584400000, + "doc_count" : 10548, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T18:00:00.000Z", + "key" : 1599588000000, + "doc_count" : 10414, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T19:00:00.000Z", + "key" : 1599591600000, + "doc_count" : 10176, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T20:00:00.000Z", + "key" : 1599595200000, + "doc_count" : 8811, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T21:00:00.000Z", + "key" : 1599598800000, + "doc_count" : 5966, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T22:00:00.000Z", + "key" : 1599602400000, + "doc_count" : 7058, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-08T23:00:00.000Z", + "key" : 1599606000000, + "doc_count" : 4987, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T00:00:00.000Z", + "key" : 1599609600000, + "doc_count" : 4562, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T01:00:00.000Z", + "key" : 1599613200000, + "doc_count" : 3279, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T02:00:00.000Z", + "key" : 1599616800000, + "doc_count" : 3527, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T03:00:00.000Z", + "key" : 1599620400000, + "doc_count" : 2700, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T04:00:00.000Z", + "key" : 1599624000000, + "doc_count" : 3834, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T05:00:00.000Z", + "key" : 1599627600000, + "doc_count" : 4240, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T06:00:00.000Z", + "key" : 1599631200000, + "doc_count" : 6401, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T07:00:00.000Z", + "key" : 1599634800000, + "doc_count" : 7058, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T08:00:00.000Z", + "key" : 1599638400000, + "doc_count" : 8066, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T09:00:00.000Z", + "key" : 1599642000000, + "doc_count" : 6711, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T10:00:00.000Z", + "key" : 1599645600000, + "doc_count" : 5761, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T11:00:00.000Z", + "key" : 1599649200000, + "doc_count" : 6860, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T12:00:00.000Z", + "key" : 1599652800000, + "doc_count" : 6709, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T13:00:00.000Z", + "key" : 1599656400000, + "doc_count" : 7962, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T14:00:00.000Z", + "key" : 1599660000000, + "doc_count" : 6262, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T15:00:00.000Z", + "key" : 1599663600000, + "doc_count" : 6271, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T16:00:00.000Z", + "key" : 1599667200000, + "doc_count" : 6469, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T17:00:00.000Z", + "key" : 1599670800000, + "doc_count" : 8031, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T18:00:00.000Z", + "key" : 1599674400000, + "doc_count" : 7821, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T19:00:00.000Z", + "key" : 1599678000000, + "doc_count" : 8997, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T20:00:00.000Z", + "key" : 1599681600000, + "doc_count" : 5884, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T21:00:00.000Z", + "key" : 1599685200000, + "doc_count" : 4460, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T22:00:00.000Z", + "key" : 1599688800000, + "doc_count" : 3618, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-09T23:00:00.000Z", + "key" : 1599692400000, + "doc_count" : 2812, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T00:00:00.000Z", + "key" : 1599696000000, + "doc_count" : 2163, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T01:00:00.000Z", + "key" : 1599699600000, + "doc_count" : 2549, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T02:00:00.000Z", + "key" : 1599703200000, + "doc_count" : 3205, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T03:00:00.000Z", + "key" : 1599706800000, + "doc_count" : 4736, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T04:00:00.000Z", + "key" : 1599710400000, + "doc_count" : 5811, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T05:00:00.000Z", + "key" : 1599714000000, + "doc_count" : 5282, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T06:00:00.000Z", + "key" : 1599717600000, + "doc_count" : 7138, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T07:00:00.000Z", + "key" : 1599721200000, + "doc_count" : 7686, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T08:00:00.000Z", + "key" : 1599724800000, + "doc_count" : 12730, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T09:00:00.000Z", + "key" : 1599728400000, + "doc_count" : 9877, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T10:00:00.000Z", + "key" : 1599732000000, + "doc_count" : 7673, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T11:00:00.000Z", + "key" : 1599735600000, + "doc_count" : 9883, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T12:00:00.000Z", + "key" : 1599739200000, + "doc_count" : 8764, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T13:00:00.000Z", + "key" : 1599742800000, + "doc_count" : 9073, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T14:00:00.000Z", + "key" : 1599746400000, + "doc_count" : 7091, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T15:00:00.000Z", + "key" : 1599750000000, + "doc_count" : 7783, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T16:00:00.000Z", + "key" : 1599753600000, + "doc_count" : 7678, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T17:00:00.000Z", + "key" : 1599757200000, + "doc_count" : 6399, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T18:00:00.000Z", + "key" : 1599760800000, + "doc_count" : 5440, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T19:00:00.000Z", + "key" : 1599764400000, + "doc_count" : 9519, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T20:00:00.000Z", + "key" : 1599768000000, + "doc_count" : 10172, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T21:00:00.000Z", + "key" : 1599771600000, + "doc_count" : 8273, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T22:00:00.000Z", + "key" : 1599775200000, + "doc_count" : 3159, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-10T23:00:00.000Z", + "key" : 1599778800000, + "doc_count" : 4429, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T00:00:00.000Z", + "key" : 1599782400000, + "doc_count" : 2921, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T01:00:00.000Z", + "key" : 1599786000000, + "doc_count" : 2714, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T02:00:00.000Z", + "key" : 1599789600000, + "doc_count" : 2771, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T03:00:00.000Z", + "key" : 1599793200000, + "doc_count" : 2685, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T04:00:00.000Z", + "key" : 1599796800000, + "doc_count" : 2790, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T05:00:00.000Z", + "key" : 1599800400000, + "doc_count" : 4005, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T06:00:00.000Z", + "key" : 1599804000000, + "doc_count" : 9110, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T07:00:00.000Z", + "key" : 1599807600000, + "doc_count" : 7405, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T08:00:00.000Z", + "key" : 1599811200000, + "doc_count" : 7192, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T09:00:00.000Z", + "key" : 1599814800000, + "doc_count" : 6746, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T10:00:00.000Z", + "key" : 1599818400000, + "doc_count" : 6700, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T11:00:00.000Z", + "key" : 1599822000000, + "doc_count" : 6564, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T12:00:00.000Z", + "key" : 1599825600000, + "doc_count" : 5636, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T13:00:00.000Z", + "key" : 1599829200000, + "doc_count" : 8730, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T14:00:00.000Z", + "key" : 1599832800000, + "doc_count" : 7375, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T15:00:00.000Z", + "key" : 1599836400000, + "doc_count" : 7577, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T16:00:00.000Z", + "key" : 1599840000000, + "doc_count" : 6306, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T17:00:00.000Z", + "key" : 1599843600000, + "doc_count" : 6637, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T18:00:00.000Z", + "key" : 1599847200000, + "doc_count" : 5783, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T19:00:00.000Z", + "key" : 1599850800000, + "doc_count" : 6889, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T20:00:00.000Z", + "key" : 1599854400000, + "doc_count" : 5651, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T21:00:00.000Z", + "key" : 1599858000000, + "doc_count" : 5004, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T22:00:00.000Z", + "key" : 1599861600000, + "doc_count" : 3739, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-11T23:00:00.000Z", + "key" : 1599865200000, + "doc_count" : 3116, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T00:00:00.000Z", + "key" : 1599868800000, + "doc_count" : 3123, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T01:00:00.000Z", + "key" : 1599872400000, + "doc_count" : 3158, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T02:00:00.000Z", + "key" : 1599876000000, + "doc_count" : 3962, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T03:00:00.000Z", + "key" : 1599879600000, + "doc_count" : 3086, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T04:00:00.000Z", + "key" : 1599883200000, + "doc_count" : 3628, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T05:00:00.000Z", + "key" : 1599886800000, + "doc_count" : 4180, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T06:00:00.000Z", + "key" : 1599890400000, + "doc_count" : 7456, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T07:00:00.000Z", + "key" : 1599894000000, + "doc_count" : 7307, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T08:00:00.000Z", + "key" : 1599897600000, + "doc_count" : 11424, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T09:00:00.000Z", + "key" : 1599901200000, + "doc_count" : 9267, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T10:00:00.000Z", + "key" : 1599904800000, + "doc_count" : 6059, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T11:00:00.000Z", + "key" : 1599908400000, + "doc_count" : 6402, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T12:00:00.000Z", + "key" : 1599912000000, + "doc_count" : 6572, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T13:00:00.000Z", + "key" : 1599915600000, + "doc_count" : 6753, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T14:00:00.000Z", + "key" : 1599919200000, + "doc_count" : 6679, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T15:00:00.000Z", + "key" : 1599922800000, + "doc_count" : 6267, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T16:00:00.000Z", + "key" : 1599926400000, + "doc_count" : 5786, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T17:00:00.000Z", + "key" : 1599930000000, + "doc_count" : 5807, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T18:00:00.000Z", + "key" : 1599933600000, + "doc_count" : 6819, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T19:00:00.000Z", + "key" : 1599937200000, + "doc_count" : 6788, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T20:00:00.000Z", + "key" : 1599940800000, + "doc_count" : 5655, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T21:00:00.000Z", + "key" : 1599944400000, + "doc_count" : 4367, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T22:00:00.000Z", + "key" : 1599948000000, + "doc_count" : 3859, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-12T23:00:00.000Z", + "key" : 1599951600000, + "doc_count" : 2598, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T00:00:00.000Z", + "key" : 1599955200000, + "doc_count" : 2973, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T01:00:00.000Z", + "key" : 1599958800000, + "doc_count" : 2600, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T02:00:00.000Z", + "key" : 1599962400000, + "doc_count" : 3076, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T03:00:00.000Z", + "key" : 1599966000000, + "doc_count" : 5236, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T04:00:00.000Z", + "key" : 1599969600000, + "doc_count" : 4609, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T05:00:00.000Z", + "key" : 1599973200000, + "doc_count" : 3238, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T06:00:00.000Z", + "key" : 1599976800000, + "doc_count" : 4563, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T07:00:00.000Z", + "key" : 1599980400000, + "doc_count" : 5619, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T08:00:00.000Z", + "key" : 1599984000000, + "doc_count" : 6848, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T09:00:00.000Z", + "key" : 1599987600000, + "doc_count" : 8534, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T10:00:00.000Z", + "key" : 1599991200000, + "doc_count" : 6983, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T11:00:00.000Z", + "key" : 1599994800000, + "doc_count" : 6568, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T12:00:00.000Z", + "key" : 1599998400000, + "doc_count" : 9070, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T13:00:00.000Z", + "key" : 1600002000000, + "doc_count" : 6111, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T14:00:00.000Z", + "key" : 1600005600000, + "doc_count" : 6168, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T15:00:00.000Z", + "key" : 1600009200000, + "doc_count" : 6814, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T16:00:00.000Z", + "key" : 1600012800000, + "doc_count" : 6050, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T17:00:00.000Z", + "key" : 1600016400000, + "doc_count" : 5209, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T18:00:00.000Z", + "key" : 1600020000000, + "doc_count" : 5638, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T19:00:00.000Z", + "key" : 1600023600000, + "doc_count" : 6357, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T20:00:00.000Z", + "key" : 1600027200000, + "doc_count" : 5958, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T21:00:00.000Z", + "key" : 1600030800000, + "doc_count" : 4696, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T22:00:00.000Z", + "key" : 1600034400000, + "doc_count" : 5766, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-13T23:00:00.000Z", + "key" : 1600038000000, + "doc_count" : 2302, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T00:00:00.000Z", + "key" : 1600041600000, + "doc_count" : 2503, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T01:00:00.000Z", + "key" : 1600045200000, + "doc_count" : 2498, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T02:00:00.000Z", + "key" : 1600048800000, + "doc_count" : 2074, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T03:00:00.000Z", + "key" : 1600052400000, + "doc_count" : 2453, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T04:00:00.000Z", + "key" : 1600056000000, + "doc_count" : 4133, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T05:00:00.000Z", + "key" : 1600059600000, + "doc_count" : 3812, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T06:00:00.000Z", + "key" : 1600063200000, + "doc_count" : 4981, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T07:00:00.000Z", + "key" : 1600066800000, + "doc_count" : 5883, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T08:00:00.000Z", + "key" : 1600070400000, + "doc_count" : 6653, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T09:00:00.000Z", + "key" : 1600074000000, + "doc_count" : 6306, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T10:00:00.000Z", + "key" : 1600077600000, + "doc_count" : 6590, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T11:00:00.000Z", + "key" : 1600081200000, + "doc_count" : 6652, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T12:00:00.000Z", + "key" : 1600084800000, + "doc_count" : 6905, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T13:00:00.000Z", + "key" : 1600088400000, + "doc_count" : 6052, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T14:00:00.000Z", + "key" : 1600092000000, + "doc_count" : 6445, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T15:00:00.000Z", + "key" : 1600095600000, + "doc_count" : 6379, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T16:00:00.000Z", + "key" : 1600099200000, + "doc_count" : 8510, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T17:00:00.000Z", + "key" : 1600102800000, + "doc_count" : 7303, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T18:00:00.000Z", + "key" : 1600106400000, + "doc_count" : 6635, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T19:00:00.000Z", + "key" : 1600110000000, + "doc_count" : 8406, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T20:00:00.000Z", + "key" : 1600113600000, + "doc_count" : 6545, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T21:00:00.000Z", + "key" : 1600117200000, + "doc_count" : 6429, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T22:00:00.000Z", + "key" : 1600120800000, + "doc_count" : 4395, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-14T23:00:00.000Z", + "key" : 1600124400000, + "doc_count" : 4472, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T00:00:00.000Z", + "key" : 1600128000000, + "doc_count" : 3382, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T01:00:00.000Z", + "key" : 1600131600000, + "doc_count" : 2524, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T02:00:00.000Z", + "key" : 1600135200000, + "doc_count" : 3244, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T03:00:00.000Z", + "key" : 1600138800000, + "doc_count" : 3360, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T04:00:00.000Z", + "key" : 1600142400000, + "doc_count" : 3473, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T05:00:00.000Z", + "key" : 1600146000000, + "doc_count" : 3505, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T06:00:00.000Z", + "key" : 1600149600000, + "doc_count" : 5048, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T07:00:00.000Z", + "key" : 1600153200000, + "doc_count" : 11405, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T08:00:00.000Z", + "key" : 1600156800000, + "doc_count" : 15142, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T09:00:00.000Z", + "key" : 1600160400000, + "doc_count" : 11132, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T10:00:00.000Z", + "key" : 1600164000000, + "doc_count" : 9614, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T11:00:00.000Z", + "key" : 1600167600000, + "doc_count" : 11313, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T12:00:00.000Z", + "key" : 1600171200000, + "doc_count" : 8602, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T13:00:00.000Z", + "key" : 1600174800000, + "doc_count" : 8665, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T14:00:00.000Z", + "key" : 1600178400000, + "doc_count" : 8459, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T15:00:00.000Z", + "key" : 1600182000000, + "doc_count" : 6788, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T16:00:00.000Z", + "key" : 1600185600000, + "doc_count" : 6138, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T17:00:00.000Z", + "key" : 1600189200000, + "doc_count" : 6183, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T18:00:00.000Z", + "key" : 1600192800000, + "doc_count" : 6430, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T19:00:00.000Z", + "key" : 1600196400000, + "doc_count" : 7523, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T20:00:00.000Z", + "key" : 1600200000000, + "doc_count" : 7611, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T21:00:00.000Z", + "key" : 1600203600000, + "doc_count" : 4826, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T22:00:00.000Z", + "key" : 1600207200000, + "doc_count" : 4991, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-15T23:00:00.000Z", + "key" : 1600210800000, + "doc_count" : 4298, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T00:00:00.000Z", + "key" : 1600214400000, + "doc_count" : 5859, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T01:00:00.000Z", + "key" : 1600218000000, + "doc_count" : 8961, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T02:00:00.000Z", + "key" : 1600221600000, + "doc_count" : 6042, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T03:00:00.000Z", + "key" : 1600225200000, + "doc_count" : 6811, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T04:00:00.000Z", + "key" : 1600228800000, + "doc_count" : 4562, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T05:00:00.000Z", + "key" : 1600232400000, + "doc_count" : 5265, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T06:00:00.000Z", + "key" : 1600236000000, + "doc_count" : 5871, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T07:00:00.000Z", + "key" : 1600239600000, + "doc_count" : 9117, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T08:00:00.000Z", + "key" : 1600243200000, + "doc_count" : 8240, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T09:00:00.000Z", + "key" : 1600246800000, + "doc_count" : 8009, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T10:00:00.000Z", + "key" : 1600250400000, + "doc_count" : 7019, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T11:00:00.000Z", + "key" : 1600254000000, + "doc_count" : 5552, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T12:00:00.000Z", + "key" : 1600257600000, + "doc_count" : 7842, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T13:00:00.000Z", + "key" : 1600261200000, + "doc_count" : 7926, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T14:00:00.000Z", + "key" : 1600264800000, + "doc_count" : 8941, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T15:00:00.000Z", + "key" : 1600268400000, + "doc_count" : 18372, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T16:00:00.000Z", + "key" : 1600272000000, + "doc_count" : 13897, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T17:00:00.000Z", + "key" : 1600275600000, + "doc_count" : 12343, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T18:00:00.000Z", + "key" : 1600279200000, + "doc_count" : 11615, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T19:00:00.000Z", + "key" : 1600282800000, + "doc_count" : 606, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T20:00:00.000Z", + "key" : 1600286400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T21:00:00.000Z", + "key" : 1600290000000, + "doc_count" : 734, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T22:00:00.000Z", + "key" : 1600293600000, + "doc_count" : 5076, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-16T23:00:00.000Z", + "key" : 1600297200000, + "doc_count" : 3793, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T00:00:00.000Z", + "key" : 1600300800000, + "doc_count" : 4783, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T01:00:00.000Z", + "key" : 1600304400000, + "doc_count" : 4074, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T02:00:00.000Z", + "key" : 1600308000000, + "doc_count" : 4945, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T03:00:00.000Z", + "key" : 1600311600000, + "doc_count" : 6020, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T04:00:00.000Z", + "key" : 1600315200000, + "doc_count" : 7031, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T05:00:00.000Z", + "key" : 1600318800000, + "doc_count" : 9998, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T06:00:00.000Z", + "key" : 1600322400000, + "doc_count" : 10980, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T07:00:00.000Z", + "key" : 1600326000000, + "doc_count" : 11817, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T08:00:00.000Z", + "key" : 1600329600000, + "doc_count" : 11057, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T09:00:00.000Z", + "key" : 1600333200000, + "doc_count" : 9292, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T10:00:00.000Z", + "key" : 1600336800000, + "doc_count" : 9122, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T11:00:00.000Z", + "key" : 1600340400000, + "doc_count" : 7766, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T12:00:00.000Z", + "key" : 1600344000000, + "doc_count" : 8240, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T13:00:00.000Z", + "key" : 1600347600000, + "doc_count" : 6261, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T14:00:00.000Z", + "key" : 1600351200000, + "doc_count" : 11326, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T15:00:00.000Z", + "key" : 1600354800000, + "doc_count" : 11573, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T16:00:00.000Z", + "key" : 1600358400000, + "doc_count" : 8024, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T17:00:00.000Z", + "key" : 1600362000000, + "doc_count" : 6898, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T18:00:00.000Z", + "key" : 1600365600000, + "doc_count" : 7668, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T19:00:00.000Z", + "key" : 1600369200000, + "doc_count" : 7551, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T20:00:00.000Z", + "key" : 1600372800000, + "doc_count" : 7094, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T21:00:00.000Z", + "key" : 1600376400000, + "doc_count" : 5336, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T22:00:00.000Z", + "key" : 1600380000000, + "doc_count" : 3724, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-17T23:00:00.000Z", + "key" : 1600383600000, + "doc_count" : 3201, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T00:00:00.000Z", + "key" : 1600387200000, + "doc_count" : 3535, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T01:00:00.000Z", + "key" : 1600390800000, + "doc_count" : 2763, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T02:00:00.000Z", + "key" : 1600394400000, + "doc_count" : 2612, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T03:00:00.000Z", + "key" : 1600398000000, + "doc_count" : 3550, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T04:00:00.000Z", + "key" : 1600401600000, + "doc_count" : 4210, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T05:00:00.000Z", + "key" : 1600405200000, + "doc_count" : 5482, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T06:00:00.000Z", + "key" : 1600408800000, + "doc_count" : 6916, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T07:00:00.000Z", + "key" : 1600412400000, + "doc_count" : 7936, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T08:00:00.000Z", + "key" : 1600416000000, + "doc_count" : 10665, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T09:00:00.000Z", + "key" : 1600419600000, + "doc_count" : 10062, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T10:00:00.000Z", + "key" : 1600423200000, + "doc_count" : 7630, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T11:00:00.000Z", + "key" : 1600426800000, + "doc_count" : 8136, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T12:00:00.000Z", + "key" : 1600430400000, + "doc_count" : 7739, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T13:00:00.000Z", + "key" : 1600434000000, + "doc_count" : 7669, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T14:00:00.000Z", + "key" : 1600437600000, + "doc_count" : 7675, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T15:00:00.000Z", + "key" : 1600441200000, + "doc_count" : 6259, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T16:00:00.000Z", + "key" : 1600444800000, + "doc_count" : 6432, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T17:00:00.000Z", + "key" : 1600448400000, + "doc_count" : 5897, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T18:00:00.000Z", + "key" : 1600452000000, + "doc_count" : 6228, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T19:00:00.000Z", + "key" : 1600455600000, + "doc_count" : 6669, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T20:00:00.000Z", + "key" : 1600459200000, + "doc_count" : 6393, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T21:00:00.000Z", + "key" : 1600462800000, + "doc_count" : 6199, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T22:00:00.000Z", + "key" : 1600466400000, + "doc_count" : 4926, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-18T23:00:00.000Z", + "key" : 1600470000000, + "doc_count" : 3873, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T00:00:00.000Z", + "key" : 1600473600000, + "doc_count" : 3132, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T01:00:00.000Z", + "key" : 1600477200000, + "doc_count" : 3871, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T02:00:00.000Z", + "key" : 1600480800000, + "doc_count" : 3324, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T03:00:00.000Z", + "key" : 1600484400000, + "doc_count" : 6205, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T04:00:00.000Z", + "key" : 1600488000000, + "doc_count" : 7410, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T05:00:00.000Z", + "key" : 1600491600000, + "doc_count" : 5780, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T06:00:00.000Z", + "key" : 1600495200000, + "doc_count" : 6680, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T07:00:00.000Z", + "key" : 1600498800000, + "doc_count" : 7499, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T08:00:00.000Z", + "key" : 1600502400000, + "doc_count" : 8609, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T09:00:00.000Z", + "key" : 1600506000000, + "doc_count" : 8408, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T10:00:00.000Z", + "key" : 1600509600000, + "doc_count" : 6713, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T11:00:00.000Z", + "key" : 1600513200000, + "doc_count" : 7432, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T12:00:00.000Z", + "key" : 1600516800000, + "doc_count" : 13255, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T13:00:00.000Z", + "key" : 1600520400000, + "doc_count" : 6616, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T14:00:00.000Z", + "key" : 1600524000000, + "doc_count" : 6927, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T15:00:00.000Z", + "key" : 1600527600000, + "doc_count" : 6708, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T16:00:00.000Z", + "key" : 1600531200000, + "doc_count" : 6329, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T17:00:00.000Z", + "key" : 1600534800000, + "doc_count" : 6058, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T18:00:00.000Z", + "key" : 1600538400000, + "doc_count" : 5891, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T19:00:00.000Z", + "key" : 1600542000000, + "doc_count" : 5805, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T20:00:00.000Z", + "key" : 1600545600000, + "doc_count" : 5552, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T21:00:00.000Z", + "key" : 1600549200000, + "doc_count" : 4769, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T22:00:00.000Z", + "key" : 1600552800000, + "doc_count" : 6190, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-19T23:00:00.000Z", + "key" : 1600556400000, + "doc_count" : 4126, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T00:00:00.000Z", + "key" : 1600560000000, + "doc_count" : 2637, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T01:00:00.000Z", + "key" : 1600563600000, + "doc_count" : 2043, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T02:00:00.000Z", + "key" : 1600567200000, + "doc_count" : 2216, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T03:00:00.000Z", + "key" : 1600570800000, + "doc_count" : 2569, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T04:00:00.000Z", + "key" : 1600574400000, + "doc_count" : 3174, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T05:00:00.000Z", + "key" : 1600578000000, + "doc_count" : 3716, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T06:00:00.000Z", + "key" : 1600581600000, + "doc_count" : 5537, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T07:00:00.000Z", + "key" : 1600585200000, + "doc_count" : 6716, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T08:00:00.000Z", + "key" : 1600588800000, + "doc_count" : 7331, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T09:00:00.000Z", + "key" : 1600592400000, + "doc_count" : 7035, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T10:00:00.000Z", + "key" : 1600596000000, + "doc_count" : 6186, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T11:00:00.000Z", + "key" : 1600599600000, + "doc_count" : 6002, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T12:00:00.000Z", + "key" : 1600603200000, + "doc_count" : 5998, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T13:00:00.000Z", + "key" : 1600606800000, + "doc_count" : 5271, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T14:00:00.000Z", + "key" : 1600610400000, + "doc_count" : 5294, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T15:00:00.000Z", + "key" : 1600614000000, + "doc_count" : 5940, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T16:00:00.000Z", + "key" : 1600617600000, + "doc_count" : 7507, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T17:00:00.000Z", + "key" : 1600621200000, + "doc_count" : 7348, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T18:00:00.000Z", + "key" : 1600624800000, + "doc_count" : 4479, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T19:00:00.000Z", + "key" : 1600628400000, + "doc_count" : 5786, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T20:00:00.000Z", + "key" : 1600632000000, + "doc_count" : 5108, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T21:00:00.000Z", + "key" : 1600635600000, + "doc_count" : 4366, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T22:00:00.000Z", + "key" : 1600639200000, + "doc_count" : 4025, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-20T23:00:00.000Z", + "key" : 1600642800000, + "doc_count" : 1932, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T00:00:00.000Z", + "key" : 1600646400000, + "doc_count" : 2067, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T01:00:00.000Z", + "key" : 1600650000000, + "doc_count" : 2213, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T02:00:00.000Z", + "key" : 1600653600000, + "doc_count" : 2192, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T03:00:00.000Z", + "key" : 1600657200000, + "doc_count" : 2929, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T04:00:00.000Z", + "key" : 1600660800000, + "doc_count" : 7834, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T05:00:00.000Z", + "key" : 1600664400000, + "doc_count" : 9116, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T06:00:00.000Z", + "key" : 1600668000000, + "doc_count" : 9304, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T07:00:00.000Z", + "key" : 1600671600000, + "doc_count" : 7926, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T08:00:00.000Z", + "key" : 1600675200000, + "doc_count" : 10585, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T09:00:00.000Z", + "key" : 1600678800000, + "doc_count" : 8465, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T10:00:00.000Z", + "key" : 1600682400000, + "doc_count" : 10705, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T11:00:00.000Z", + "key" : 1600686000000, + "doc_count" : 7603, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T12:00:00.000Z", + "key" : 1600689600000, + "doc_count" : 8452, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T13:00:00.000Z", + "key" : 1600693200000, + "doc_count" : 6320, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T14:00:00.000Z", + "key" : 1600696800000, + "doc_count" : 6490, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T15:00:00.000Z", + "key" : 1600700400000, + "doc_count" : 6772, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T16:00:00.000Z", + "key" : 1600704000000, + "doc_count" : 5481, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T17:00:00.000Z", + "key" : 1600707600000, + "doc_count" : 4959, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T18:00:00.000Z", + "key" : 1600711200000, + "doc_count" : 5676, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T19:00:00.000Z", + "key" : 1600714800000, + "doc_count" : 5705, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T20:00:00.000Z", + "key" : 1600718400000, + "doc_count" : 5511, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T21:00:00.000Z", + "key" : 1600722000000, + "doc_count" : 4631, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T22:00:00.000Z", + "key" : 1600725600000, + "doc_count" : 8366, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-21T23:00:00.000Z", + "key" : 1600729200000, + "doc_count" : 6797, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T00:00:00.000Z", + "key" : 1600732800000, + "doc_count" : 6369, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T01:00:00.000Z", + "key" : 1600736400000, + "doc_count" : 2365, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T02:00:00.000Z", + "key" : 1600740000000, + "doc_count" : 2319, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T03:00:00.000Z", + "key" : 1600743600000, + "doc_count" : 2992, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T04:00:00.000Z", + "key" : 1600747200000, + "doc_count" : 3192, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T05:00:00.000Z", + "key" : 1600750800000, + "doc_count" : 4062, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T06:00:00.000Z", + "key" : 1600754400000, + "doc_count" : 6184, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T07:00:00.000Z", + "key" : 1600758000000, + "doc_count" : 7990, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T08:00:00.000Z", + "key" : 1600761600000, + "doc_count" : 6817, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T09:00:00.000Z", + "key" : 1600765200000, + "doc_count" : 6769, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T10:00:00.000Z", + "key" : 1600768800000, + "doc_count" : 5225, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T11:00:00.000Z", + "key" : 1600772400000, + "doc_count" : 6643, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T12:00:00.000Z", + "key" : 1600776000000, + "doc_count" : 6569, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T13:00:00.000Z", + "key" : 1600779600000, + "doc_count" : 7178, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T14:00:00.000Z", + "key" : 1600783200000, + "doc_count" : 5939, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T15:00:00.000Z", + "key" : 1600786800000, + "doc_count" : 7378, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T16:00:00.000Z", + "key" : 1600790400000, + "doc_count" : 6561, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T17:00:00.000Z", + "key" : 1600794000000, + "doc_count" : 7693, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T18:00:00.000Z", + "key" : 1600797600000, + "doc_count" : 7565, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T19:00:00.000Z", + "key" : 1600801200000, + "doc_count" : 5803, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T20:00:00.000Z", + "key" : 1600804800000, + "doc_count" : 5209, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T21:00:00.000Z", + "key" : 1600808400000, + "doc_count" : 6148, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T22:00:00.000Z", + "key" : 1600812000000, + "doc_count" : 4180, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-22T23:00:00.000Z", + "key" : 1600815600000, + "doc_count" : 3946, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T00:00:00.000Z", + "key" : 1600819200000, + "doc_count" : 4464, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T01:00:00.000Z", + "key" : 1600822800000, + "doc_count" : 4195, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T02:00:00.000Z", + "key" : 1600826400000, + "doc_count" : 2623, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T03:00:00.000Z", + "key" : 1600830000000, + "doc_count" : 3422, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T04:00:00.000Z", + "key" : 1600833600000, + "doc_count" : 3893, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T05:00:00.000Z", + "key" : 1600837200000, + "doc_count" : 6052, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T06:00:00.000Z", + "key" : 1600840800000, + "doc_count" : 6683, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T07:00:00.000Z", + "key" : 1600844400000, + "doc_count" : 6119, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T08:00:00.000Z", + "key" : 1600848000000, + "doc_count" : 6406, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T09:00:00.000Z", + "key" : 1600851600000, + "doc_count" : 10932, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T10:00:00.000Z", + "key" : 1600855200000, + "doc_count" : 13769, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T11:00:00.000Z", + "key" : 1600858800000, + "doc_count" : 10401, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T12:00:00.000Z", + "key" : 1600862400000, + "doc_count" : 12491, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T13:00:00.000Z", + "key" : 1600866000000, + "doc_count" : 10518, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T14:00:00.000Z", + "key" : 1600869600000, + "doc_count" : 9353, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T15:00:00.000Z", + "key" : 1600873200000, + "doc_count" : 18699, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T16:00:00.000Z", + "key" : 1600876800000, + "doc_count" : 10855, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T17:00:00.000Z", + "key" : 1600880400000, + "doc_count" : 8601, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T18:00:00.000Z", + "key" : 1600884000000, + "doc_count" : 9599, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T19:00:00.000Z", + "key" : 1600887600000, + "doc_count" : 12387, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T20:00:00.000Z", + "key" : 1600891200000, + "doc_count" : 7712, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T21:00:00.000Z", + "key" : 1600894800000, + "doc_count" : 7764, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T22:00:00.000Z", + "key" : 1600898400000, + "doc_count" : 3810, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-23T23:00:00.000Z", + "key" : 1600902000000, + "doc_count" : 3078, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T00:00:00.000Z", + "key" : 1600905600000, + "doc_count" : 2781, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T01:00:00.000Z", + "key" : 1600909200000, + "doc_count" : 3165, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T02:00:00.000Z", + "key" : 1600912800000, + "doc_count" : 3486, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T03:00:00.000Z", + "key" : 1600916400000, + "doc_count" : 3106, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T04:00:00.000Z", + "key" : 1600920000000, + "doc_count" : 8318, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T05:00:00.000Z", + "key" : 1600923600000, + "doc_count" : 4146, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T06:00:00.000Z", + "key" : 1600927200000, + "doc_count" : 8003, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T07:00:00.000Z", + "key" : 1600930800000, + "doc_count" : 5501, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T08:00:00.000Z", + "key" : 1600934400000, + "doc_count" : 5789, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T09:00:00.000Z", + "key" : 1600938000000, + "doc_count" : 6415, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T10:00:00.000Z", + "key" : 1600941600000, + "doc_count" : 5871, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T11:00:00.000Z", + "key" : 1600945200000, + "doc_count" : 5087, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T12:00:00.000Z", + "key" : 1600948800000, + "doc_count" : 3808, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T13:00:00.000Z", + "key" : 1600952400000, + "doc_count" : 5527, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T14:00:00.000Z", + "key" : 1600956000000, + "doc_count" : 5534, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T15:00:00.000Z", + "key" : 1600959600000, + "doc_count" : 5740, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T16:00:00.000Z", + "key" : 1600963200000, + "doc_count" : 4073, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T17:00:00.000Z", + "key" : 1600966800000, + "doc_count" : 4553, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T18:00:00.000Z", + "key" : 1600970400000, + "doc_count" : 5407, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T19:00:00.000Z", + "key" : 1600974000000, + "doc_count" : 7169, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T20:00:00.000Z", + "key" : 1600977600000, + "doc_count" : 5516, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T21:00:00.000Z", + "key" : 1600981200000, + "doc_count" : 4105, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T22:00:00.000Z", + "key" : 1600984800000, + "doc_count" : 3863, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-24T23:00:00.000Z", + "key" : 1600988400000, + "doc_count" : 3174, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T00:00:00.000Z", + "key" : 1600992000000, + "doc_count" : 4056, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T01:00:00.000Z", + "key" : 1600995600000, + "doc_count" : 5538, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T02:00:00.000Z", + "key" : 1600999200000, + "doc_count" : 2368, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T03:00:00.000Z", + "key" : 1601002800000, + "doc_count" : 2242, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T04:00:00.000Z", + "key" : 1601006400000, + "doc_count" : 2714, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T05:00:00.000Z", + "key" : 1601010000000, + "doc_count" : 4055, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T06:00:00.000Z", + "key" : 1601013600000, + "doc_count" : 5500, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T07:00:00.000Z", + "key" : 1601017200000, + "doc_count" : 6237, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T08:00:00.000Z", + "key" : 1601020800000, + "doc_count" : 6079, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T09:00:00.000Z", + "key" : 1601024400000, + "doc_count" : 5506, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T10:00:00.000Z", + "key" : 1601028000000, + "doc_count" : 6746, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T11:00:00.000Z", + "key" : 1601031600000, + "doc_count" : 5193, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T12:00:00.000Z", + "key" : 1601035200000, + "doc_count" : 5808, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T13:00:00.000Z", + "key" : 1601038800000, + "doc_count" : 5885, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T14:00:00.000Z", + "key" : 1601042400000, + "doc_count" : 7784, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T15:00:00.000Z", + "key" : 1601046000000, + "doc_count" : 5618, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T16:00:00.000Z", + "key" : 1601049600000, + "doc_count" : 4993, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T17:00:00.000Z", + "key" : 1601053200000, + "doc_count" : 4705, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T18:00:00.000Z", + "key" : 1601056800000, + "doc_count" : 6369, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T19:00:00.000Z", + "key" : 1601060400000, + "doc_count" : 9129, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T20:00:00.000Z", + "key" : 1601064000000, + "doc_count" : 5237, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T21:00:00.000Z", + "key" : 1601067600000, + "doc_count" : 4557, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T22:00:00.000Z", + "key" : 1601071200000, + "doc_count" : 3814, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-25T23:00:00.000Z", + "key" : 1601074800000, + "doc_count" : 2721, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T00:00:00.000Z", + "key" : 1601078400000, + "doc_count" : 2479, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T01:00:00.000Z", + "key" : 1601082000000, + "doc_count" : 2076, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T02:00:00.000Z", + "key" : 1601085600000, + "doc_count" : 2743, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T03:00:00.000Z", + "key" : 1601089200000, + "doc_count" : 2559, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T04:00:00.000Z", + "key" : 1601092800000, + "doc_count" : 3381, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T05:00:00.000Z", + "key" : 1601096400000, + "doc_count" : 3673, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T06:00:00.000Z", + "key" : 1601100000000, + "doc_count" : 5373, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T07:00:00.000Z", + "key" : 1601103600000, + "doc_count" : 5355, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T08:00:00.000Z", + "key" : 1601107200000, + "doc_count" : 6442, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T09:00:00.000Z", + "key" : 1601110800000, + "doc_count" : 6519, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T10:00:00.000Z", + "key" : 1601114400000, + "doc_count" : 7473, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T11:00:00.000Z", + "key" : 1601118000000, + "doc_count" : 7863, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T12:00:00.000Z", + "key" : 1601121600000, + "doc_count" : 6667, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T13:00:00.000Z", + "key" : 1601125200000, + "doc_count" : 8302, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T14:00:00.000Z", + "key" : 1601128800000, + "doc_count" : 8663, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T15:00:00.000Z", + "key" : 1601132400000, + "doc_count" : 6790, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T16:00:00.000Z", + "key" : 1601136000000, + "doc_count" : 7273, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T17:00:00.000Z", + "key" : 1601139600000, + "doc_count" : 5127, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T18:00:00.000Z", + "key" : 1601143200000, + "doc_count" : 4437, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T19:00:00.000Z", + "key" : 1601146800000, + "doc_count" : 4812, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T20:00:00.000Z", + "key" : 1601150400000, + "doc_count" : 5121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T21:00:00.000Z", + "key" : 1601154000000, + "doc_count" : 4530, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T22:00:00.000Z", + "key" : 1601157600000, + "doc_count" : 2982, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-26T23:00:00.000Z", + "key" : 1601161200000, + "doc_count" : 3177, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T00:00:00.000Z", + "key" : 1601164800000, + "doc_count" : 1755, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T01:00:00.000Z", + "key" : 1601168400000, + "doc_count" : 3370, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T02:00:00.000Z", + "key" : 1601172000000, + "doc_count" : 2881, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T03:00:00.000Z", + "key" : 1601175600000, + "doc_count" : 3020, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T04:00:00.000Z", + "key" : 1601179200000, + "doc_count" : 2906, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T05:00:00.000Z", + "key" : 1601182800000, + "doc_count" : 3824, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T06:00:00.000Z", + "key" : 1601186400000, + "doc_count" : 4976, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T07:00:00.000Z", + "key" : 1601190000000, + "doc_count" : 7501, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T08:00:00.000Z", + "key" : 1601193600000, + "doc_count" : 9443, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T09:00:00.000Z", + "key" : 1601197200000, + "doc_count" : 7090, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T10:00:00.000Z", + "key" : 1601200800000, + "doc_count" : 6867, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T11:00:00.000Z", + "key" : 1601204400000, + "doc_count" : 6206, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T12:00:00.000Z", + "key" : 1601208000000, + "doc_count" : 6998, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T13:00:00.000Z", + "key" : 1601211600000, + "doc_count" : 9347, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T14:00:00.000Z", + "key" : 1601215200000, + "doc_count" : 9271, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T15:00:00.000Z", + "key" : 1601218800000, + "doc_count" : 5485, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T16:00:00.000Z", + "key" : 1601222400000, + "doc_count" : 6874, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T17:00:00.000Z", + "key" : 1601226000000, + "doc_count" : 5417, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T18:00:00.000Z", + "key" : 1601229600000, + "doc_count" : 8044, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T19:00:00.000Z", + "key" : 1601233200000, + "doc_count" : 5995, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T20:00:00.000Z", + "key" : 1601236800000, + "doc_count" : 5611, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T21:00:00.000Z", + "key" : 1601240400000, + "doc_count" : 3782, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T22:00:00.000Z", + "key" : 1601244000000, + "doc_count" : 2804, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-27T23:00:00.000Z", + "key" : 1601247600000, + "doc_count" : 2208, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T00:00:00.000Z", + "key" : 1601251200000, + "doc_count" : 2012, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T01:00:00.000Z", + "key" : 1601254800000, + "doc_count" : 2495, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T02:00:00.000Z", + "key" : 1601258400000, + "doc_count" : 3168, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T03:00:00.000Z", + "key" : 1601262000000, + "doc_count" : 3777, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T04:00:00.000Z", + "key" : 1601265600000, + "doc_count" : 2687, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T05:00:00.000Z", + "key" : 1601269200000, + "doc_count" : 2312, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T06:00:00.000Z", + "key" : 1601272800000, + "doc_count" : 3466, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T07:00:00.000Z", + "key" : 1601276400000, + "doc_count" : 6562, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T08:00:00.000Z", + "key" : 1601280000000, + "doc_count" : 5578, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T09:00:00.000Z", + "key" : 1601283600000, + "doc_count" : 5683, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T10:00:00.000Z", + "key" : 1601287200000, + "doc_count" : 4449, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T11:00:00.000Z", + "key" : 1601290800000, + "doc_count" : 4966, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T12:00:00.000Z", + "key" : 1601294400000, + "doc_count" : 4294, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T13:00:00.000Z", + "key" : 1601298000000, + "doc_count" : 5590, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T14:00:00.000Z", + "key" : 1601301600000, + "doc_count" : 6814, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T15:00:00.000Z", + "key" : 1601305200000, + "doc_count" : 6542, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T16:00:00.000Z", + "key" : 1601308800000, + "doc_count" : 4673, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T17:00:00.000Z", + "key" : 1601312400000, + "doc_count" : 4511, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T18:00:00.000Z", + "key" : 1601316000000, + "doc_count" : 5977, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T19:00:00.000Z", + "key" : 1601319600000, + "doc_count" : 6258, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T20:00:00.000Z", + "key" : 1601323200000, + "doc_count" : 4808, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T21:00:00.000Z", + "key" : 1601326800000, + "doc_count" : 4914, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T22:00:00.000Z", + "key" : 1601330400000, + "doc_count" : 3575, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-28T23:00:00.000Z", + "key" : 1601334000000, + "doc_count" : 2590, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T00:00:00.000Z", + "key" : 1601337600000, + "doc_count" : 1879, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T01:00:00.000Z", + "key" : 1601341200000, + "doc_count" : 4182, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T02:00:00.000Z", + "key" : 1601344800000, + "doc_count" : 6304, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T03:00:00.000Z", + "key" : 1601348400000, + "doc_count" : 2439, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T04:00:00.000Z", + "key" : 1601352000000, + "doc_count" : 2680, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T05:00:00.000Z", + "key" : 1601355600000, + "doc_count" : 1766, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T06:00:00.000Z", + "key" : 1601359200000, + "doc_count" : 2635, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T07:00:00.000Z", + "key" : 1601362800000, + "doc_count" : 3603, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T08:00:00.000Z", + "key" : 1601366400000, + "doc_count" : 4684, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T09:00:00.000Z", + "key" : 1601370000000, + "doc_count" : 5321, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T10:00:00.000Z", + "key" : 1601373600000, + "doc_count" : 3769, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T11:00:00.000Z", + "key" : 1601377200000, + "doc_count" : 4001, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T12:00:00.000Z", + "key" : 1601380800000, + "doc_count" : 9982, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T13:00:00.000Z", + "key" : 1601384400000, + "doc_count" : 8863, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T14:00:00.000Z", + "key" : 1601388000000, + "doc_count" : 7383, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T15:00:00.000Z", + "key" : 1601391600000, + "doc_count" : 8174, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T16:00:00.000Z", + "key" : 1601395200000, + "doc_count" : 6588, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T17:00:00.000Z", + "key" : 1601398800000, + "doc_count" : 6106, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T18:00:00.000Z", + "key" : 1601402400000, + "doc_count" : 6632, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T19:00:00.000Z", + "key" : 1601406000000, + "doc_count" : 5914, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T20:00:00.000Z", + "key" : 1601409600000, + "doc_count" : 8547, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T21:00:00.000Z", + "key" : 1601413200000, + "doc_count" : 5059, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T22:00:00.000Z", + "key" : 1601416800000, + "doc_count" : 3140, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-29T23:00:00.000Z", + "key" : 1601420400000, + "doc_count" : 3968, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T00:00:00.000Z", + "key" : 1601424000000, + "doc_count" : 2624, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T01:00:00.000Z", + "key" : 1601427600000, + "doc_count" : 2226, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T02:00:00.000Z", + "key" : 1601431200000, + "doc_count" : 2835, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T03:00:00.000Z", + "key" : 1601434800000, + "doc_count" : 2473, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T04:00:00.000Z", + "key" : 1601438400000, + "doc_count" : 2285, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T05:00:00.000Z", + "key" : 1601442000000, + "doc_count" : 783, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T06:00:00.000Z", + "key" : 1601445600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T07:00:00.000Z", + "key" : 1601449200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T08:00:00.000Z", + "key" : 1601452800000, + "doc_count" : 7, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T09:00:00.000Z", + "key" : 1601456400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T10:00:00.000Z", + "key" : 1601460000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T11:00:00.000Z", + "key" : 1601463600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T12:00:00.000Z", + "key" : 1601467200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T13:00:00.000Z", + "key" : 1601470800000, + "doc_count" : 1, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T14:00:00.000Z", + "key" : 1601474400000, + "doc_count" : 3, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T15:00:00.000Z", + "key" : 1601478000000, + "doc_count" : 48, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T16:00:00.000Z", + "key" : 1601481600000, + "doc_count" : 17, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T17:00:00.000Z", + "key" : 1601485200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T18:00:00.000Z", + "key" : 1601488800000, + "doc_count" : 23, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T19:00:00.000Z", + "key" : 1601492400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T20:00:00.000Z", + "key" : 1601496000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T21:00:00.000Z", + "key" : 1601499600000, + "doc_count" : 16, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T22:00:00.000Z", + "key" : 1601503200000, + "doc_count" : 2, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-30T23:00:00.000Z", + "key" : 1601506800000, + "doc_count" : 3134, + "count" : { + "value" : 0 + } + } + ] + }, + "average" : { + "value" : 10 + } + } +} diff --git a/services/api/src/models/mockHitDataNew-project-b-missing-data.json b/services/api/src/models/mockHitDataNew-project-b-missing-data.json new file mode 100644 index 0000000000..3473423f96 --- /dev/null +++ b/services/api/src/models/mockHitDataNew-project-b-missing-data.json @@ -0,0 +1,5787 @@ +{ + "took" : 262, + "timed_out" : false, + "_shards" : { + "total" : 4, + "successful" : 4, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 1440, + "relation" : "gte" + }, + "max_score" : 1.0000149, + "hits" : [] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-09-01T00:00:00.000Z", + "key" : 1598918400000, + "doc_count" : 119, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T01:00:00.000Z", + "key" : 1598922000000, + "doc_count" : 114, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T02:00:00.000Z", + "key" : 1598925600000, + "doc_count" : 127, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T03:00:00.000Z", + "key" : 1598929200000, + "doc_count" : 116, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T04:00:00.000Z", + "key" : 1598932800000, + "doc_count" : 144, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T05:00:00.000Z", + "key" : 1598936400000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T06:00:00.000Z", + "key" : 1598940000000, + "doc_count" : 114, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T07:00:00.000Z", + "key" : 1598943600000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T08:00:00.000Z", + "key" : 1598947200000, + "doc_count" : 126, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T09:00:00.000Z", + "key" : 1598950800000, + "doc_count" : 136, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T10:00:00.000Z", + "key" : 1598954400000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T11:00:00.000Z", + "key" : 1598958000000, + "doc_count" : 118, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T12:00:00.000Z", + "key" : 1598961600000, + "doc_count" : 452, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T13:00:00.000Z", + "key" : 1598965200000, + "doc_count" : 133, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T14:00:00.000Z", + "key" : 1598968800000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T15:00:00.000Z", + "key" : 1598972400000, + "doc_count" : 123, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T16:00:00.000Z", + "key" : 1598976000000, + "doc_count" : 160, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T17:00:00.000Z", + "key" : 1598979600000, + "doc_count" : 150, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T18:00:00.000Z", + "key" : 1598983200000, + "doc_count" : 123, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T19:00:00.000Z", + "key" : 1598986800000, + "doc_count" : 119, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T20:00:00.000Z", + "key" : 1598990400000, + "doc_count" : 117, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T21:00:00.000Z", + "key" : 1598994000000, + "doc_count" : 151, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T22:00:00.000Z", + "key" : 1598997600000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T23:00:00.000Z", + "key" : 1599001200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T00:00:00.000Z", + "key" : 1599004800000, + "doc_count" : 169, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T01:00:00.000Z", + "key" : 1599008400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T02:00:00.000Z", + "key" : 1599012000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T03:00:00.000Z", + "key" : 1599015600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T04:00:00.000Z", + "key" : 1599019200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T05:00:00.000Z", + "key" : 1599022800000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T06:00:00.000Z", + "key" : 1599026400000, + "doc_count" : 168, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T07:00:00.000Z", + "key" : 1599030000000, + "doc_count" : 134, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T08:00:00.000Z", + "key" : 1599033600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T09:00:00.000Z", + "key" : 1599037200000, + "doc_count" : 290, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T10:00:00.000Z", + "key" : 1599040800000, + "doc_count" : 827, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T11:00:00.000Z", + "key" : 1599044400000, + "doc_count" : 409, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T12:00:00.000Z", + "key" : 1599048000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T13:00:00.000Z", + "key" : 1599051600000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T14:00:00.000Z", + "key" : 1599055200000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T15:00:00.000Z", + "key" : 1599058800000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T16:00:00.000Z", + "key" : 1599062400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T17:00:00.000Z", + "key" : 1599066000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T18:00:00.000Z", + "key" : 1599069600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T19:00:00.000Z", + "key" : 1599073200000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T20:00:00.000Z", + "key" : 1599076800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T21:00:00.000Z", + "key" : 1599080400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T22:00:00.000Z", + "key" : 1599084000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T23:00:00.000Z", + "key" : 1599087600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T00:00:00.000Z", + "key" : 1599091200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T01:00:00.000Z", + "key" : 1599094800000, + "doc_count" : 172, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T02:00:00.000Z", + "key" : 1599098400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T03:00:00.000Z", + "key" : 1599102000000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T04:00:00.000Z", + "key" : 1599105600000, + "doc_count" : 173, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T05:00:00.000Z", + "key" : 1599109200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T06:00:00.000Z", + "key" : 1599112800000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T07:00:00.000Z", + "key" : 1599116400000, + "doc_count" : 230, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T08:00:00.000Z", + "key" : 1599120000000, + "doc_count" : 244, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T09:00:00.000Z", + "key" : 1599123600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T10:00:00.000Z", + "key" : 1599127200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T11:00:00.000Z", + "key" : 1599130800000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T12:00:00.000Z", + "key" : 1599134400000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T13:00:00.000Z", + "key" : 1599138000000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T14:00:00.000Z", + "key" : 1599141600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T15:00:00.000Z", + "key" : 1599145200000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T16:00:00.000Z", + "key" : 1599148800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T17:00:00.000Z", + "key" : 1599152400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T18:00:00.000Z", + "key" : 1599156000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T19:00:00.000Z", + "key" : 1599159600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T20:00:00.000Z", + "key" : 1599163200000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T21:00:00.000Z", + "key" : 1599166800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T22:00:00.000Z", + "key" : 1599170400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T23:00:00.000Z", + "key" : 1599174000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T00:00:00.000Z", + "key" : 1599177600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T01:00:00.000Z", + "key" : 1599181200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T02:00:00.000Z", + "key" : 1599184800000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T03:00:00.000Z", + "key" : 1599188400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T04:00:00.000Z", + "key" : 1599192000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T05:00:00.000Z", + "key" : 1599195600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T06:00:00.000Z", + "key" : 1599199200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T07:00:00.000Z", + "key" : 1599202800000, + "doc_count" : 316, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T08:00:00.000Z", + "key" : 1599206400000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T09:00:00.000Z", + "key" : 1599210000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T10:00:00.000Z", + "key" : 1599213600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T11:00:00.000Z", + "key" : 1599217200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T12:00:00.000Z", + "key" : 1599220800000, + "doc_count" : 280, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T13:00:00.000Z", + "key" : 1599224400000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T14:00:00.000Z", + "key" : 1599228000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T15:00:00.000Z", + "key" : 1599231600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T16:00:00.000Z", + "key" : 1599235200000, + "doc_count" : 219, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T17:00:00.000Z", + "key" : 1599238800000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T18:00:00.000Z", + "key" : 1599242400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T19:00:00.000Z", + "key" : 1599246000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T20:00:00.000Z", + "key" : 1599249600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T21:00:00.000Z", + "key" : 1599253200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T22:00:00.000Z", + "key" : 1599256800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T23:00:00.000Z", + "key" : 1599260400000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T00:00:00.000Z", + "key" : 1599264000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T01:00:00.000Z", + "key" : 1599267600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T02:00:00.000Z", + "key" : 1599271200000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T03:00:00.000Z", + "key" : 1599274800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T04:00:00.000Z", + "key" : 1599278400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T05:00:00.000Z", + "key" : 1599282000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T06:00:00.000Z", + "key" : 1599285600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T07:00:00.000Z", + "key" : 1599289200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T08:00:00.000Z", + "key" : 1599292800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T09:00:00.000Z", + "key" : 1599296400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T10:00:00.000Z", + "key" : 1599300000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T11:00:00.000Z", + "key" : 1599303600000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T12:00:00.000Z", + "key" : 1599307200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T13:00:00.000Z", + "key" : 1599310800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T14:00:00.000Z", + "key" : 1599314400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T15:00:00.000Z", + "key" : 1599318000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T16:00:00.000Z", + "key" : 1599321600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T17:00:00.000Z", + "key" : 1599325200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T18:00:00.000Z", + "key" : 1599328800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T19:00:00.000Z", + "key" : 1599332400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T20:00:00.000Z", + "key" : 1599336000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T21:00:00.000Z", + "key" : 1599339600000, + "doc_count" : 160, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T22:00:00.000Z", + "key" : 1599343200000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T23:00:00.000Z", + "key" : 1599346800000, + "doc_count" : 161, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T00:00:00.000Z", + "key" : 1599350400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T01:00:00.000Z", + "key" : 1599354000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T02:00:00.000Z", + "key" : 1599357600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T03:00:00.000Z", + "key" : 1599361200000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T04:00:00.000Z", + "key" : 1599364800000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T05:00:00.000Z", + "key" : 1599368400000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T06:00:00.000Z", + "key" : 1599372000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T07:00:00.000Z", + "key" : 1599375600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T08:00:00.000Z", + "key" : 1599379200000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T09:00:00.000Z", + "key" : 1599382800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T10:00:00.000Z", + "key" : 1599386400000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T11:00:00.000Z", + "key" : 1599390000000, + "doc_count" : 214, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T12:00:00.000Z", + "key" : 1599393600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T13:00:00.000Z", + "key" : 1599397200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T14:00:00.000Z", + "key" : 1599400800000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T15:00:00.000Z", + "key" : 1599404400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T16:00:00.000Z", + "key" : 1599408000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T17:00:00.000Z", + "key" : 1599411600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T18:00:00.000Z", + "key" : 1599415200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T19:00:00.000Z", + "key" : 1599418800000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T20:00:00.000Z", + "key" : 1599422400000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T21:00:00.000Z", + "key" : 1599426000000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T22:00:00.000Z", + "key" : 1599429600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T23:00:00.000Z", + "key" : 1599433200000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T00:00:00.000Z", + "key" : 1599436800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T01:00:00.000Z", + "key" : 1599440400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T02:00:00.000Z", + "key" : 1599444000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T03:00:00.000Z", + "key" : 1599447600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T04:00:00.000Z", + "key" : 1599451200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T05:00:00.000Z", + "key" : 1599454800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T06:00:00.000Z", + "key" : 1599458400000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T07:00:00.000Z", + "key" : 1599462000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T08:00:00.000Z", + "key" : 1599465600000, + "doc_count" : 227, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T09:00:00.000Z", + "key" : 1599469200000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T10:00:00.000Z", + "key" : 1599472800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T11:00:00.000Z", + "key" : 1599476400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T12:00:00.000Z", + "key" : 1599480000000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T13:00:00.000Z", + "key" : 1599483600000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T14:00:00.000Z", + "key" : 1599487200000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T15:00:00.000Z", + "key" : 1599490800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T16:00:00.000Z", + "key" : 1599494400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T17:00:00.000Z", + "key" : 1599498000000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T18:00:00.000Z", + "key" : 1599501600000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T19:00:00.000Z", + "key" : 1599505200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T20:00:00.000Z", + "key" : 1599508800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T21:00:00.000Z", + "key" : 1599512400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T22:00:00.000Z", + "key" : 1599516000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T23:00:00.000Z", + "key" : 1599519600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T00:00:00.000Z", + "key" : 1599523200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T01:00:00.000Z", + "key" : 1599526800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T02:00:00.000Z", + "key" : 1599530400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T03:00:00.000Z", + "key" : 1599534000000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T04:00:00.000Z", + "key" : 1599537600000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T05:00:00.000Z", + "key" : 1599541200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T06:00:00.000Z", + "key" : 1599544800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T07:00:00.000Z", + "key" : 1599548400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T08:00:00.000Z", + "key" : 1599552000000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T09:00:00.000Z", + "key" : 1599555600000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T10:00:00.000Z", + "key" : 1599559200000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T11:00:00.000Z", + "key" : 1599562800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T12:00:00.000Z", + "key" : 1599566400000, + "doc_count" : 221, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T13:00:00.000Z", + "key" : 1599570000000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T14:00:00.000Z", + "key" : 1599573600000, + "doc_count" : 210, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T15:00:00.000Z", + "key" : 1599577200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T16:00:00.000Z", + "key" : 1599580800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T17:00:00.000Z", + "key" : 1599584400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T18:00:00.000Z", + "key" : 1599588000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T19:00:00.000Z", + "key" : 1599591600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T20:00:00.000Z", + "key" : 1599595200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T21:00:00.000Z", + "key" : 1599598800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T22:00:00.000Z", + "key" : 1599602400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T23:00:00.000Z", + "key" : 1599606000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T00:00:00.000Z", + "key" : 1599609600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T01:00:00.000Z", + "key" : 1599613200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T02:00:00.000Z", + "key" : 1599616800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T03:00:00.000Z", + "key" : 1599620400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T04:00:00.000Z", + "key" : 1599624000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T05:00:00.000Z", + "key" : 1599627600000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T06:00:00.000Z", + "key" : 1599631200000, + "doc_count" : 221, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T07:00:00.000Z", + "key" : 1599634800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T08:00:00.000Z", + "key" : 1599638400000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T09:00:00.000Z", + "key" : 1599642000000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T10:00:00.000Z", + "key" : 1599645600000, + "doc_count" : 230, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T11:00:00.000Z", + "key" : 1599649200000, + "doc_count" : 392, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T12:00:00.000Z", + "key" : 1599652800000, + "doc_count" : 258, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T13:00:00.000Z", + "key" : 1599656400000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T14:00:00.000Z", + "key" : 1599660000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T15:00:00.000Z", + "key" : 1599663600000, + "doc_count" : 221, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T16:00:00.000Z", + "key" : 1599667200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T17:00:00.000Z", + "key" : 1599670800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T18:00:00.000Z", + "key" : 1599674400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T19:00:00.000Z", + "key" : 1599678000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T20:00:00.000Z", + "key" : 1599681600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T21:00:00.000Z", + "key" : 1599685200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T22:00:00.000Z", + "key" : 1599688800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T23:00:00.000Z", + "key" : 1599692400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T00:00:00.000Z", + "key" : 1599696000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T01:00:00.000Z", + "key" : 1599699600000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T02:00:00.000Z", + "key" : 1599703200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T03:00:00.000Z", + "key" : 1599706800000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T04:00:00.000Z", + "key" : 1599710400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T05:00:00.000Z", + "key" : 1599714000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T06:00:00.000Z", + "key" : 1599717600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T07:00:00.000Z", + "key" : 1599721200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T08:00:00.000Z", + "key" : 1599724800000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T09:00:00.000Z", + "key" : 1599728400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T10:00:00.000Z", + "key" : 1599732000000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T11:00:00.000Z", + "key" : 1599735600000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T12:00:00.000Z", + "key" : 1599739200000, + "doc_count" : 220, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T13:00:00.000Z", + "key" : 1599742800000, + "doc_count" : 250, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T14:00:00.000Z", + "key" : 1599746400000, + "doc_count" : 228, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T15:00:00.000Z", + "key" : 1599750000000, + "doc_count" : 262, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T16:00:00.000Z", + "key" : 1599753600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T17:00:00.000Z", + "key" : 1599757200000, + "doc_count" : 234, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T18:00:00.000Z", + "key" : 1599760800000, + "doc_count" : 264, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T19:00:00.000Z", + "key" : 1599764400000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T20:00:00.000Z", + "key" : 1599768000000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T21:00:00.000Z", + "key" : 1599771600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T22:00:00.000Z", + "key" : 1599775200000, + "doc_count" : 172, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T23:00:00.000Z", + "key" : 1599778800000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T00:00:00.000Z", + "key" : 1599782400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T01:00:00.000Z", + "key" : 1599786000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T02:00:00.000Z", + "key" : 1599789600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T03:00:00.000Z", + "key" : 1599793200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T04:00:00.000Z", + "key" : 1599796800000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T05:00:00.000Z", + "key" : 1599800400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T06:00:00.000Z", + "key" : 1599804000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T07:00:00.000Z", + "key" : 1599807600000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T08:00:00.000Z", + "key" : 1599811200000, + "doc_count" : 292, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T09:00:00.000Z", + "key" : 1599814800000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T10:00:00.000Z", + "key" : 1599818400000, + "doc_count" : 218, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T11:00:00.000Z", + "key" : 1599822000000, + "doc_count" : 252, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T12:00:00.000Z", + "key" : 1599825600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T13:00:00.000Z", + "key" : 1599829200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T14:00:00.000Z", + "key" : 1599832800000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T15:00:00.000Z", + "key" : 1599836400000, + "doc_count" : 336, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T16:00:00.000Z", + "key" : 1599840000000, + "doc_count" : 212, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T17:00:00.000Z", + "key" : 1599843600000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T18:00:00.000Z", + "key" : 1599847200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T19:00:00.000Z", + "key" : 1599850800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T20:00:00.000Z", + "key" : 1599854400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T21:00:00.000Z", + "key" : 1599858000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T22:00:00.000Z", + "key" : 1599861600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T23:00:00.000Z", + "key" : 1599865200000, + "doc_count" : 226, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T00:00:00.000Z", + "key" : 1599868800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T01:00:00.000Z", + "key" : 1599872400000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T02:00:00.000Z", + "key" : 1599876000000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T03:00:00.000Z", + "key" : 1599879600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T04:00:00.000Z", + "key" : 1599883200000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T05:00:00.000Z", + "key" : 1599886800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T06:00:00.000Z", + "key" : 1599890400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T07:00:00.000Z", + "key" : 1599894000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T08:00:00.000Z", + "key" : 1599897600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T09:00:00.000Z", + "key" : 1599901200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T10:00:00.000Z", + "key" : 1599904800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T11:00:00.000Z", + "key" : 1599908400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T12:00:00.000Z", + "key" : 1599912000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T13:00:00.000Z", + "key" : 1599915600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T14:00:00.000Z", + "key" : 1599919200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T15:00:00.000Z", + "key" : 1599922800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T16:00:00.000Z", + "key" : 1599926400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T17:00:00.000Z", + "key" : 1599930000000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T18:00:00.000Z", + "key" : 1599933600000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T19:00:00.000Z", + "key" : 1599937200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T20:00:00.000Z", + "key" : 1599940800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T21:00:00.000Z", + "key" : 1599944400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T22:00:00.000Z", + "key" : 1599948000000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T23:00:00.000Z", + "key" : 1599951600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T00:00:00.000Z", + "key" : 1599955200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T01:00:00.000Z", + "key" : 1599958800000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T02:00:00.000Z", + "key" : 1599962400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T03:00:00.000Z", + "key" : 1599966000000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T04:00:00.000Z", + "key" : 1599969600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T05:00:00.000Z", + "key" : 1599973200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T06:00:00.000Z", + "key" : 1599976800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T07:00:00.000Z", + "key" : 1599980400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T08:00:00.000Z", + "key" : 1599984000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T09:00:00.000Z", + "key" : 1599987600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T10:00:00.000Z", + "key" : 1599991200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T11:00:00.000Z", + "key" : 1599994800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T12:00:00.000Z", + "key" : 1599998400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T13:00:00.000Z", + "key" : 1600002000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T14:00:00.000Z", + "key" : 1600005600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T15:00:00.000Z", + "key" : 1600009200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T16:00:00.000Z", + "key" : 1600012800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T17:00:00.000Z", + "key" : 1600016400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T18:00:00.000Z", + "key" : 1600020000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T19:00:00.000Z", + "key" : 1600023600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T20:00:00.000Z", + "key" : 1600027200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T21:00:00.000Z", + "key" : 1600030800000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T22:00:00.000Z", + "key" : 1600034400000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T23:00:00.000Z", + "key" : 1600038000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T00:00:00.000Z", + "key" : 1600041600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T01:00:00.000Z", + "key" : 1600045200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T02:00:00.000Z", + "key" : 1600048800000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T03:00:00.000Z", + "key" : 1600052400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T04:00:00.000Z", + "key" : 1600056000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T05:00:00.000Z", + "key" : 1600059600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T06:00:00.000Z", + "key" : 1600063200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T07:00:00.000Z", + "key" : 1600066800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T08:00:00.000Z", + "key" : 1600070400000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T09:00:00.000Z", + "key" : 1600074000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T10:00:00.000Z", + "key" : 1600077600000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T11:00:00.000Z", + "key" : 1600081200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T12:00:00.000Z", + "key" : 1600084800000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T13:00:00.000Z", + "key" : 1600088400000, + "doc_count" : 214, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T14:00:00.000Z", + "key" : 1600092000000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T15:00:00.000Z", + "key" : 1600095600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T16:00:00.000Z", + "key" : 1600099200000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T17:00:00.000Z", + "key" : 1600102800000, + "doc_count" : 245, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T18:00:00.000Z", + "key" : 1600106400000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T19:00:00.000Z", + "key" : 1600110000000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T20:00:00.000Z", + "key" : 1600113600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T21:00:00.000Z", + "key" : 1600117200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T22:00:00.000Z", + "key" : 1600120800000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T23:00:00.000Z", + "key" : 1600124400000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T00:00:00.000Z", + "key" : 1600128000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T01:00:00.000Z", + "key" : 1600131600000, + "doc_count" : 215, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T02:00:00.000Z", + "key" : 1600135200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T03:00:00.000Z", + "key" : 1600138800000, + "doc_count" : 230, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T04:00:00.000Z", + "key" : 1600142400000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T05:00:00.000Z", + "key" : 1600146000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T06:00:00.000Z", + "key" : 1600149600000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T07:00:00.000Z", + "key" : 1600153200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T08:00:00.000Z", + "key" : 1600156800000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T09:00:00.000Z", + "key" : 1600160400000, + "doc_count" : 251, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T10:00:00.000Z", + "key" : 1600164000000, + "doc_count" : 155, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T11:00:00.000Z", + "key" : 1600167600000, + "doc_count" : 160, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T12:00:00.000Z", + "key" : 1600171200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T13:00:00.000Z", + "key" : 1600174800000, + "doc_count" : 225, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T14:00:00.000Z", + "key" : 1600178400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T15:00:00.000Z", + "key" : 1600182000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T16:00:00.000Z", + "key" : 1600185600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T17:00:00.000Z", + "key" : 1600189200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T18:00:00.000Z", + "key" : 1600192800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T19:00:00.000Z", + "key" : 1600196400000, + "doc_count" : 219, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T20:00:00.000Z", + "key" : 1600200000000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T21:00:00.000Z", + "key" : 1600203600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T22:00:00.000Z", + "key" : 1600207200000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T23:00:00.000Z", + "key" : 1600210800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T00:00:00.000Z", + "key" : 1600214400000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T01:00:00.000Z", + "key" : 1600218000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T02:00:00.000Z", + "key" : 1600221600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T03:00:00.000Z", + "key" : 1600225200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T04:00:00.000Z", + "key" : 1600228800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T05:00:00.000Z", + "key" : 1600232400000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T06:00:00.000Z", + "key" : 1600236000000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T07:00:00.000Z", + "key" : 1600239600000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T08:00:00.000Z", + "key" : 1600243200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T09:00:00.000Z", + "key" : 1600246800000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T10:00:00.000Z", + "key" : 1600250400000, + "doc_count" : 223, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T11:00:00.000Z", + "key" : 1600254000000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T12:00:00.000Z", + "key" : 1600257600000, + "doc_count" : 233, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T13:00:00.000Z", + "key" : 1600261200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T14:00:00.000Z", + "key" : 1600264800000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T15:00:00.000Z", + "key" : 1600268400000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T16:00:00.000Z", + "key" : 1600272000000, + "doc_count" : 438, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T17:00:00.000Z", + "key" : 1600275600000, + "doc_count" : 256, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T18:00:00.000Z", + "key" : 1600279200000, + "doc_count" : 382, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T19:00:00.000Z", + "key" : 1600282800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T20:00:00.000Z", + "key" : 1600286400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T21:00:00.000Z", + "key" : 1600290000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T22:00:00.000Z", + "key" : 1600293600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T23:00:00.000Z", + "key" : 1600297200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T00:00:00.000Z", + "key" : 1600300800000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T01:00:00.000Z", + "key" : 1600304400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T02:00:00.000Z", + "key" : 1600308000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T03:00:00.000Z", + "key" : 1600311600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T04:00:00.000Z", + "key" : 1600315200000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T05:00:00.000Z", + "key" : 1600318800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T06:00:00.000Z", + "key" : 1600322400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T07:00:00.000Z", + "key" : 1600326000000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T08:00:00.000Z", + "key" : 1600329600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T09:00:00.000Z", + "key" : 1600333200000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T10:00:00.000Z", + "key" : 1600336800000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T11:00:00.000Z", + "key" : 1600340400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T12:00:00.000Z", + "key" : 1600344000000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T13:00:00.000Z", + "key" : 1600347600000, + "doc_count" : 211, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T14:00:00.000Z", + "key" : 1600351200000, + "doc_count" : 273, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T15:00:00.000Z", + "key" : 1600354800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T16:00:00.000Z", + "key" : 1600358400000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T17:00:00.000Z", + "key" : 1600362000000, + "doc_count" : 242, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T18:00:00.000Z", + "key" : 1600365600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T19:00:00.000Z", + "key" : 1600369200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T20:00:00.000Z", + "key" : 1600372800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T21:00:00.000Z", + "key" : 1600376400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T22:00:00.000Z", + "key" : 1600380000000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T23:00:00.000Z", + "key" : 1600383600000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T00:00:00.000Z", + "key" : 1600387200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T01:00:00.000Z", + "key" : 1600390800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T02:00:00.000Z", + "key" : 1600394400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T03:00:00.000Z", + "key" : 1600398000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T04:00:00.000Z", + "key" : 1600401600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T05:00:00.000Z", + "key" : 1600405200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T06:00:00.000Z", + "key" : 1600408800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T07:00:00.000Z", + "key" : 1600412400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T08:00:00.000Z", + "key" : 1600416000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T09:00:00.000Z", + "key" : 1600419600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T10:00:00.000Z", + "key" : 1600423200000, + "doc_count" : 211, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T11:00:00.000Z", + "key" : 1600426800000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T12:00:00.000Z", + "key" : 1600430400000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T13:00:00.000Z", + "key" : 1600434000000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T14:00:00.000Z", + "key" : 1600437600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T15:00:00.000Z", + "key" : 1600441200000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T16:00:00.000Z", + "key" : 1600444800000, + "doc_count" : 226, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T17:00:00.000Z", + "key" : 1600448400000, + "doc_count" : 258, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T18:00:00.000Z", + "key" : 1600452000000, + "doc_count" : 216, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T19:00:00.000Z", + "key" : 1600455600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T20:00:00.000Z", + "key" : 1600459200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T21:00:00.000Z", + "key" : 1600462800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T22:00:00.000Z", + "key" : 1600466400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T23:00:00.000Z", + "key" : 1600470000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T00:00:00.000Z", + "key" : 1600473600000, + "doc_count" : 222, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T01:00:00.000Z", + "key" : 1600477200000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T02:00:00.000Z", + "key" : 1600480800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T03:00:00.000Z", + "key" : 1600484400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T04:00:00.000Z", + "key" : 1600488000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T05:00:00.000Z", + "key" : 1600491600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T06:00:00.000Z", + "key" : 1600495200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T07:00:00.000Z", + "key" : 1600498800000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T08:00:00.000Z", + "key" : 1600502400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T09:00:00.000Z", + "key" : 1600506000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T10:00:00.000Z", + "key" : 1600509600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T11:00:00.000Z", + "key" : 1600513200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T12:00:00.000Z", + "key" : 1600516800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T13:00:00.000Z", + "key" : 1600520400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T14:00:00.000Z", + "key" : 1600524000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T15:00:00.000Z", + "key" : 1600527600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T16:00:00.000Z", + "key" : 1600531200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T17:00:00.000Z", + "key" : 1600534800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T18:00:00.000Z", + "key" : 1600538400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T19:00:00.000Z", + "key" : 1600542000000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T20:00:00.000Z", + "key" : 1600545600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T21:00:00.000Z", + "key" : 1600549200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T22:00:00.000Z", + "key" : 1600552800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T23:00:00.000Z", + "key" : 1600556400000, + "doc_count" : 172, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T00:00:00.000Z", + "key" : 1600560000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T01:00:00.000Z", + "key" : 1600563600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T02:00:00.000Z", + "key" : 1600567200000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T03:00:00.000Z", + "key" : 1600570800000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T04:00:00.000Z", + "key" : 1600574400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T05:00:00.000Z", + "key" : 1600578000000, + "doc_count" : 170, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T06:00:00.000Z", + "key" : 1600581600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T07:00:00.000Z", + "key" : 1600585200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T08:00:00.000Z", + "key" : 1600588800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T09:00:00.000Z", + "key" : 1600592400000, + "doc_count" : 215, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T10:00:00.000Z", + "key" : 1600596000000, + "doc_count" : 232, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T11:00:00.000Z", + "key" : 1600599600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T12:00:00.000Z", + "key" : 1600603200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T13:00:00.000Z", + "key" : 1600606800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T14:00:00.000Z", + "key" : 1600610400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T15:00:00.000Z", + "key" : 1600614000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T16:00:00.000Z", + "key" : 1600617600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T17:00:00.000Z", + "key" : 1600621200000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T18:00:00.000Z", + "key" : 1600624800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T19:00:00.000Z", + "key" : 1600628400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T20:00:00.000Z", + "key" : 1600632000000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T21:00:00.000Z", + "key" : 1600635600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T22:00:00.000Z", + "key" : 1600639200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T23:00:00.000Z", + "key" : 1600642800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T00:00:00.000Z", + "key" : 1600646400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T01:00:00.000Z", + "key" : 1600650000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T02:00:00.000Z", + "key" : 1600653600000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T03:00:00.000Z", + "key" : 1600657200000, + "doc_count" : 232, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T04:00:00.000Z", + "key" : 1600660800000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T05:00:00.000Z", + "key" : 1600664400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T06:00:00.000Z", + "key" : 1600668000000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T07:00:00.000Z", + "key" : 1600671600000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T08:00:00.000Z", + "key" : 1600675200000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T09:00:00.000Z", + "key" : 1600678800000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T10:00:00.000Z", + "key" : 1600682400000, + "doc_count" : 214, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T11:00:00.000Z", + "key" : 1600686000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T12:00:00.000Z", + "key" : 1600689600000, + "doc_count" : 463, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T13:00:00.000Z", + "key" : 1600693200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T14:00:00.000Z", + "key" : 1600696800000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T15:00:00.000Z", + "key" : 1600700400000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T16:00:00.000Z", + "key" : 1600704000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T17:00:00.000Z", + "key" : 1600707600000, + "doc_count" : 239, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T18:00:00.000Z", + "key" : 1600711200000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T19:00:00.000Z", + "key" : 1600714800000, + "doc_count" : 576, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T20:00:00.000Z", + "key" : 1600718400000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T21:00:00.000Z", + "key" : 1600722000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T22:00:00.000Z", + "key" : 1600725600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T23:00:00.000Z", + "key" : 1600729200000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T00:00:00.000Z", + "key" : 1600732800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T01:00:00.000Z", + "key" : 1600736400000, + "doc_count" : 170, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T02:00:00.000Z", + "key" : 1600740000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T03:00:00.000Z", + "key" : 1600743600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T04:00:00.000Z", + "key" : 1600747200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T05:00:00.000Z", + "key" : 1600750800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T06:00:00.000Z", + "key" : 1600754400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T07:00:00.000Z", + "key" : 1600758000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T08:00:00.000Z", + "key" : 1600761600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T09:00:00.000Z", + "key" : 1600765200000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T10:00:00.000Z", + "key" : 1600768800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T11:00:00.000Z", + "key" : 1600772400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T12:00:00.000Z", + "key" : 1600776000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T13:00:00.000Z", + "key" : 1600779600000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T14:00:00.000Z", + "key" : 1600783200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T15:00:00.000Z", + "key" : 1600786800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T16:00:00.000Z", + "key" : 1600790400000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T17:00:00.000Z", + "key" : 1600794000000, + "doc_count" : 244, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T18:00:00.000Z", + "key" : 1600797600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T19:00:00.000Z", + "key" : 1600801200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T20:00:00.000Z", + "key" : 1600804800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T21:00:00.000Z", + "key" : 1600808400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T22:00:00.000Z", + "key" : 1600812000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T23:00:00.000Z", + "key" : 1600815600000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T00:00:00.000Z", + "key" : 1600819200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T01:00:00.000Z", + "key" : 1600822800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T02:00:00.000Z", + "key" : 1600826400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T03:00:00.000Z", + "key" : 1600830000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T04:00:00.000Z", + "key" : 1600833600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T05:00:00.000Z", + "key" : 1600837200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T06:00:00.000Z", + "key" : 1600840800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T07:00:00.000Z", + "key" : 1600844400000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T08:00:00.000Z", + "key" : 1600848000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T09:00:00.000Z", + "key" : 1600851600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T10:00:00.000Z", + "key" : 1600855200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T11:00:00.000Z", + "key" : 1600858800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T12:00:00.000Z", + "key" : 1600862400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T13:00:00.000Z", + "key" : 1600866000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T14:00:00.000Z", + "key" : 1600869600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T15:00:00.000Z", + "key" : 1600873200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T16:00:00.000Z", + "key" : 1600876800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T17:00:00.000Z", + "key" : 1600880400000, + "doc_count" : 233, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T18:00:00.000Z", + "key" : 1600884000000, + "doc_count" : 243, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T19:00:00.000Z", + "key" : 1600887600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T20:00:00.000Z", + "key" : 1600891200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T21:00:00.000Z", + "key" : 1600894800000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T22:00:00.000Z", + "key" : 1600898400000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T23:00:00.000Z", + "key" : 1600902000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T00:00:00.000Z", + "key" : 1600905600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T01:00:00.000Z", + "key" : 1600909200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T02:00:00.000Z", + "key" : 1600912800000, + "doc_count" : 210, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T03:00:00.000Z", + "key" : 1600916400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T04:00:00.000Z", + "key" : 1600920000000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T05:00:00.000Z", + "key" : 1600923600000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T06:00:00.000Z", + "key" : 1600927200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T07:00:00.000Z", + "key" : 1600930800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T08:00:00.000Z", + "key" : 1600934400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T09:00:00.000Z", + "key" : 1600938000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T10:00:00.000Z", + "key" : 1600941600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T11:00:00.000Z", + "key" : 1600945200000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T12:00:00.000Z", + "key" : 1600948800000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T13:00:00.000Z", + "key" : 1600952400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T14:00:00.000Z", + "key" : 1600956000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T15:00:00.000Z", + "key" : 1600959600000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T16:00:00.000Z", + "key" : 1600963200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T17:00:00.000Z", + "key" : 1600966800000, + "doc_count" : 228, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T18:00:00.000Z", + "key" : 1600970400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T19:00:00.000Z", + "key" : 1600974000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T20:00:00.000Z", + "key" : 1600977600000, + "doc_count" : 216, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T21:00:00.000Z", + "key" : 1600981200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T22:00:00.000Z", + "key" : 1600984800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T23:00:00.000Z", + "key" : 1600988400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T00:00:00.000Z", + "key" : 1600992000000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T01:00:00.000Z", + "key" : 1600995600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T02:00:00.000Z", + "key" : 1600999200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T03:00:00.000Z", + "key" : 1601002800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T04:00:00.000Z", + "key" : 1601006400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T05:00:00.000Z", + "key" : 1601010000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T06:00:00.000Z", + "key" : 1601013600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T07:00:00.000Z", + "key" : 1601017200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T08:00:00.000Z", + "key" : 1601020800000, + "doc_count" : 250, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T09:00:00.000Z", + "key" : 1601024400000, + "doc_count" : 250, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T10:00:00.000Z", + "key" : 1601028000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T11:00:00.000Z", + "key" : 1601031600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T12:00:00.000Z", + "key" : 1601035200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T13:00:00.000Z", + "key" : 1601038800000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T14:00:00.000Z", + "key" : 1601042400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T15:00:00.000Z", + "key" : 1601046000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T16:00:00.000Z", + "key" : 1601049600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T17:00:00.000Z", + "key" : 1601053200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T18:00:00.000Z", + "key" : 1601056800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T19:00:00.000Z", + "key" : 1601060400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T20:00:00.000Z", + "key" : 1601064000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T21:00:00.000Z", + "key" : 1601067600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T22:00:00.000Z", + "key" : 1601071200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T23:00:00.000Z", + "key" : 1601074800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T00:00:00.000Z", + "key" : 1601078400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T01:00:00.000Z", + "key" : 1601082000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T02:00:00.000Z", + "key" : 1601085600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T03:00:00.000Z", + "key" : 1601089200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T04:00:00.000Z", + "key" : 1601092800000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T05:00:00.000Z", + "key" : 1601096400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T06:00:00.000Z", + "key" : 1601100000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T07:00:00.000Z", + "key" : 1601103600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T08:00:00.000Z", + "key" : 1601107200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T09:00:00.000Z", + "key" : 1601110800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T10:00:00.000Z", + "key" : 1601114400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T11:00:00.000Z", + "key" : 1601118000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T12:00:00.000Z", + "key" : 1601121600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T13:00:00.000Z", + "key" : 1601125200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T14:00:00.000Z", + "key" : 1601128800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T15:00:00.000Z", + "key" : 1601132400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T16:00:00.000Z", + "key" : 1601136000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T17:00:00.000Z", + "key" : 1601139600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T18:00:00.000Z", + "key" : 1601143200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T19:00:00.000Z", + "key" : 1601146800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T20:00:00.000Z", + "key" : 1601150400000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T21:00:00.000Z", + "key" : 1601154000000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T22:00:00.000Z", + "key" : 1601157600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T23:00:00.000Z", + "key" : 1601161200000, + "doc_count" : 173, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T00:00:00.000Z", + "key" : 1601164800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T01:00:00.000Z", + "key" : 1601168400000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T02:00:00.000Z", + "key" : 1601172000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T03:00:00.000Z", + "key" : 1601175600000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T04:00:00.000Z", + "key" : 1601179200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T05:00:00.000Z", + "key" : 1601182800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T06:00:00.000Z", + "key" : 1601186400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T07:00:00.000Z", + "key" : 1601190000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T08:00:00.000Z", + "key" : 1601193600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T09:00:00.000Z", + "key" : 1601197200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T10:00:00.000Z", + "key" : 1601200800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T11:00:00.000Z", + "key" : 1601204400000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T12:00:00.000Z", + "key" : 1601208000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T13:00:00.000Z", + "key" : 1601211600000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T14:00:00.000Z", + "key" : 1601215200000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T15:00:00.000Z", + "key" : 1601218800000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T16:00:00.000Z", + "key" : 1601222400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T17:00:00.000Z", + "key" : 1601226000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T18:00:00.000Z", + "key" : 1601229600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T19:00:00.000Z", + "key" : 1601233200000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T20:00:00.000Z", + "key" : 1601236800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T21:00:00.000Z", + "key" : 1601240400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T22:00:00.000Z", + "key" : 1601244000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T23:00:00.000Z", + "key" : 1601247600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T00:00:00.000Z", + "key" : 1601251200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T01:00:00.000Z", + "key" : 1601254800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T02:00:00.000Z", + "key" : 1601258400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T03:00:00.000Z", + "key" : 1601262000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T04:00:00.000Z", + "key" : 1601265600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T05:00:00.000Z", + "key" : 1601269200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T06:00:00.000Z", + "key" : 1601272800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T07:00:00.000Z", + "key" : 1601276400000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T08:00:00.000Z", + "key" : 1601280000000, + "doc_count" : 244, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T09:00:00.000Z", + "key" : 1601283600000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T10:00:00.000Z", + "key" : 1601287200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T11:00:00.000Z", + "key" : 1601290800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T12:00:00.000Z", + "key" : 1601294400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T13:00:00.000Z", + "key" : 1601298000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T14:00:00.000Z", + "key" : 1601301600000, + "doc_count" : 225, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T15:00:00.000Z", + "key" : 1601305200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T16:00:00.000Z", + "key" : 1601308800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T17:00:00.000Z", + "key" : 1601312400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T18:00:00.000Z", + "key" : 1601316000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T19:00:00.000Z", + "key" : 1601319600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T20:00:00.000Z", + "key" : 1601323200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T21:00:00.000Z", + "key" : 1601326800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T22:00:00.000Z", + "key" : 1601330400000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T23:00:00.000Z", + "key" : 1601334000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T00:00:00.000Z", + "key" : 1601337600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T01:00:00.000Z", + "key" : 1601341200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T02:00:00.000Z", + "key" : 1601344800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T03:00:00.000Z", + "key" : 1601348400000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T04:00:00.000Z", + "key" : 1601352000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T05:00:00.000Z", + "key" : 1601355600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T06:00:00.000Z", + "key" : 1601359200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T07:00:00.000Z", + "key" : 1601362800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T08:00:00.000Z", + "key" : 1601366400000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T09:00:00.000Z", + "key" : 1601370000000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T10:00:00.000Z", + "key" : 1601373600000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T11:00:00.000Z", + "key" : 1601377200000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T12:00:00.000Z", + "key" : 1601380800000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T13:00:00.000Z", + "key" : 1601384400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T14:00:00.000Z", + "key" : 1601388000000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T15:00:00.000Z", + "key" : 1601391600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T16:00:00.000Z", + "key" : 1601395200000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T17:00:00.000Z", + "key" : 1601398800000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T18:00:00.000Z", + "key" : 1601402400000, + "doc_count" : 232, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T19:00:00.000Z", + "key" : 1601406000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T20:00:00.000Z", + "key" : 1601409600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T21:00:00.000Z", + "key" : 1601413200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T22:00:00.000Z", + "key" : 1601416800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T23:00:00.000Z", + "key" : 1601420400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T00:00:00.000Z", + "key" : 1601424000000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T01:00:00.000Z", + "key" : 1601427600000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T02:00:00.000Z", + "key" : 1601431200000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T03:00:00.000Z", + "key" : 1601434800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T04:00:00.000Z", + "key" : 1601438400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T05:00:00.000Z", + "key" : 1601442000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T06:00:00.000Z", + "key" : 1601445600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T07:00:00.000Z", + "key" : 1601449200000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T08:00:00.000Z", + "key" : 1601452800000, + "doc_count" : 481, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T09:00:00.000Z", + "key" : 1601456400000, + "doc_count" : 216, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T10:00:00.000Z", + "key" : 1601460000000, + "doc_count" : 204, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T11:00:00.000Z", + "key" : 1601463600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T12:00:00.000Z", + "key" : 1601467200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T13:00:00.000Z", + "key" : 1601470800000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T14:00:00.000Z", + "key" : 1601474400000, + "doc_count" : 227, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T15:00:00.000Z", + "key" : 1601478000000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T16:00:00.000Z", + "key" : 1601481600000, + "doc_count" : 233, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T17:00:00.000Z", + "key" : 1601485200000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T18:00:00.000Z", + "key" : 1601488800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T19:00:00.000Z", + "key" : 1601492400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T20:00:00.000Z", + "key" : 1601496000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T21:00:00.000Z", + "key" : 1601499600000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T22:00:00.000Z", + "key" : 1601503200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T23:00:00.000Z", + "key" : 1601506800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + } + ] + }, + "average" : { + "value" : 2 + } + } +} diff --git a/services/api/src/models/mockHitDataNew-project-b.json b/services/api/src/models/mockHitDataNew-project-b.json new file mode 100644 index 0000000000..7209e19e80 --- /dev/null +++ b/services/api/src/models/mockHitDataNew-project-b.json @@ -0,0 +1,5787 @@ +{ + "took" : 262, + "timed_out" : false, + "_shards" : { + "total" : 4, + "successful" : 4, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 1440, + "relation" : "gte" + }, + "max_score" : 1.0000149, + "hits" : [] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-09-01T00:00:00.000Z", + "key" : 1598918400000, + "doc_count" : 119, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T01:00:00.000Z", + "key" : 1598922000000, + "doc_count" : 114, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T02:00:00.000Z", + "key" : 1598925600000, + "doc_count" : 127, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T03:00:00.000Z", + "key" : 1598929200000, + "doc_count" : 116, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T04:00:00.000Z", + "key" : 1598932800000, + "doc_count" : 144, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T05:00:00.000Z", + "key" : 1598936400000, + "doc_count" : 121, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T06:00:00.000Z", + "key" : 1598940000000, + "doc_count" : 114, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T07:00:00.000Z", + "key" : 1598943600000, + "doc_count" : 121, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T08:00:00.000Z", + "key" : 1598947200000, + "doc_count" : 126, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T09:00:00.000Z", + "key" : 1598950800000, + "doc_count" : 136, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T10:00:00.000Z", + "key" : 1598954400000, + "doc_count" : 121, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T11:00:00.000Z", + "key" : 1598958000000, + "doc_count" : 118, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T12:00:00.000Z", + "key" : 1598961600000, + "doc_count" : 452, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T13:00:00.000Z", + "key" : 1598965200000, + "doc_count" : 133, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T14:00:00.000Z", + "key" : 1598968800000, + "doc_count" : 121, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T15:00:00.000Z", + "key" : 1598972400000, + "doc_count" : 123, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T16:00:00.000Z", + "key" : 1598976000000, + "doc_count" : 160, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T17:00:00.000Z", + "key" : 1598979600000, + "doc_count" : 150, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T18:00:00.000Z", + "key" : 1598983200000, + "doc_count" : 123, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T19:00:00.000Z", + "key" : 1598986800000, + "doc_count" : 119, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T20:00:00.000Z", + "key" : 1598990400000, + "doc_count" : 117, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T21:00:00.000Z", + "key" : 1598994000000, + "doc_count" : 151, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T22:00:00.000Z", + "key" : 1598997600000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-01T23:00:00.000Z", + "key" : 1599001200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T00:00:00.000Z", + "key" : 1599004800000, + "doc_count" : 169, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T01:00:00.000Z", + "key" : 1599008400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T02:00:00.000Z", + "key" : 1599012000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T03:00:00.000Z", + "key" : 1599015600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T04:00:00.000Z", + "key" : 1599019200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T05:00:00.000Z", + "key" : 1599022800000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T06:00:00.000Z", + "key" : 1599026400000, + "doc_count" : 168, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T07:00:00.000Z", + "key" : 1599030000000, + "doc_count" : 134, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T08:00:00.000Z", + "key" : 1599033600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T09:00:00.000Z", + "key" : 1599037200000, + "doc_count" : 290, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T10:00:00.000Z", + "key" : 1599040800000, + "doc_count" : 827, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T11:00:00.000Z", + "key" : 1599044400000, + "doc_count" : 409, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T12:00:00.000Z", + "key" : 1599048000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T13:00:00.000Z", + "key" : 1599051600000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T14:00:00.000Z", + "key" : 1599055200000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T15:00:00.000Z", + "key" : 1599058800000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T16:00:00.000Z", + "key" : 1599062400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T17:00:00.000Z", + "key" : 1599066000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T18:00:00.000Z", + "key" : 1599069600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T19:00:00.000Z", + "key" : 1599073200000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T20:00:00.000Z", + "key" : 1599076800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T21:00:00.000Z", + "key" : 1599080400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T22:00:00.000Z", + "key" : 1599084000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-02T23:00:00.000Z", + "key" : 1599087600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T00:00:00.000Z", + "key" : 1599091200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T01:00:00.000Z", + "key" : 1599094800000, + "doc_count" : 172, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T02:00:00.000Z", + "key" : 1599098400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T03:00:00.000Z", + "key" : 1599102000000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T04:00:00.000Z", + "key" : 1599105600000, + "doc_count" : 173, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T05:00:00.000Z", + "key" : 1599109200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T06:00:00.000Z", + "key" : 1599112800000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T07:00:00.000Z", + "key" : 1599116400000, + "doc_count" : 230, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T08:00:00.000Z", + "key" : 1599120000000, + "doc_count" : 244, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T09:00:00.000Z", + "key" : 1599123600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T10:00:00.000Z", + "key" : 1599127200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T11:00:00.000Z", + "key" : 1599130800000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T12:00:00.000Z", + "key" : 1599134400000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T13:00:00.000Z", + "key" : 1599138000000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T14:00:00.000Z", + "key" : 1599141600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T15:00:00.000Z", + "key" : 1599145200000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T16:00:00.000Z", + "key" : 1599148800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T17:00:00.000Z", + "key" : 1599152400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T18:00:00.000Z", + "key" : 1599156000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T19:00:00.000Z", + "key" : 1599159600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T20:00:00.000Z", + "key" : 1599163200000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T21:00:00.000Z", + "key" : 1599166800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T22:00:00.000Z", + "key" : 1599170400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-03T23:00:00.000Z", + "key" : 1599174000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T00:00:00.000Z", + "key" : 1599177600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T01:00:00.000Z", + "key" : 1599181200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T02:00:00.000Z", + "key" : 1599184800000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T03:00:00.000Z", + "key" : 1599188400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T04:00:00.000Z", + "key" : 1599192000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T05:00:00.000Z", + "key" : 1599195600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T06:00:00.000Z", + "key" : 1599199200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T07:00:00.000Z", + "key" : 1599202800000, + "doc_count" : 316, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T08:00:00.000Z", + "key" : 1599206400000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T09:00:00.000Z", + "key" : 1599210000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T10:00:00.000Z", + "key" : 1599213600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T11:00:00.000Z", + "key" : 1599217200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T12:00:00.000Z", + "key" : 1599220800000, + "doc_count" : 280, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T13:00:00.000Z", + "key" : 1599224400000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T14:00:00.000Z", + "key" : 1599228000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T15:00:00.000Z", + "key" : 1599231600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T16:00:00.000Z", + "key" : 1599235200000, + "doc_count" : 219, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T17:00:00.000Z", + "key" : 1599238800000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T18:00:00.000Z", + "key" : 1599242400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T19:00:00.000Z", + "key" : 1599246000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T20:00:00.000Z", + "key" : 1599249600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T21:00:00.000Z", + "key" : 1599253200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T22:00:00.000Z", + "key" : 1599256800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-04T23:00:00.000Z", + "key" : 1599260400000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T00:00:00.000Z", + "key" : 1599264000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T01:00:00.000Z", + "key" : 1599267600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T02:00:00.000Z", + "key" : 1599271200000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T03:00:00.000Z", + "key" : 1599274800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T04:00:00.000Z", + "key" : 1599278400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T05:00:00.000Z", + "key" : 1599282000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T06:00:00.000Z", + "key" : 1599285600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T07:00:00.000Z", + "key" : 1599289200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T08:00:00.000Z", + "key" : 1599292800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T09:00:00.000Z", + "key" : 1599296400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T10:00:00.000Z", + "key" : 1599300000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T11:00:00.000Z", + "key" : 1599303600000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T12:00:00.000Z", + "key" : 1599307200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T13:00:00.000Z", + "key" : 1599310800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T14:00:00.000Z", + "key" : 1599314400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T15:00:00.000Z", + "key" : 1599318000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T16:00:00.000Z", + "key" : 1599321600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T17:00:00.000Z", + "key" : 1599325200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T18:00:00.000Z", + "key" : 1599328800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T19:00:00.000Z", + "key" : 1599332400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T20:00:00.000Z", + "key" : 1599336000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T21:00:00.000Z", + "key" : 1599339600000, + "doc_count" : 160, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T22:00:00.000Z", + "key" : 1599343200000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-05T23:00:00.000Z", + "key" : 1599346800000, + "doc_count" : 161, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T00:00:00.000Z", + "key" : 1599350400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T01:00:00.000Z", + "key" : 1599354000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T02:00:00.000Z", + "key" : 1599357600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T03:00:00.000Z", + "key" : 1599361200000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T04:00:00.000Z", + "key" : 1599364800000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T05:00:00.000Z", + "key" : 1599368400000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T06:00:00.000Z", + "key" : 1599372000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T07:00:00.000Z", + "key" : 1599375600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T08:00:00.000Z", + "key" : 1599379200000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T09:00:00.000Z", + "key" : 1599382800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T10:00:00.000Z", + "key" : 1599386400000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T11:00:00.000Z", + "key" : 1599390000000, + "doc_count" : 214, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T12:00:00.000Z", + "key" : 1599393600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T13:00:00.000Z", + "key" : 1599397200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T14:00:00.000Z", + "key" : 1599400800000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T15:00:00.000Z", + "key" : 1599404400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T16:00:00.000Z", + "key" : 1599408000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T17:00:00.000Z", + "key" : 1599411600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T18:00:00.000Z", + "key" : 1599415200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T19:00:00.000Z", + "key" : 1599418800000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T20:00:00.000Z", + "key" : 1599422400000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T21:00:00.000Z", + "key" : 1599426000000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T22:00:00.000Z", + "key" : 1599429600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-06T23:00:00.000Z", + "key" : 1599433200000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T00:00:00.000Z", + "key" : 1599436800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T01:00:00.000Z", + "key" : 1599440400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T02:00:00.000Z", + "key" : 1599444000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T03:00:00.000Z", + "key" : 1599447600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T04:00:00.000Z", + "key" : 1599451200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T05:00:00.000Z", + "key" : 1599454800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T06:00:00.000Z", + "key" : 1599458400000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T07:00:00.000Z", + "key" : 1599462000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T08:00:00.000Z", + "key" : 1599465600000, + "doc_count" : 227, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T09:00:00.000Z", + "key" : 1599469200000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T10:00:00.000Z", + "key" : 1599472800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T11:00:00.000Z", + "key" : 1599476400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T12:00:00.000Z", + "key" : 1599480000000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T13:00:00.000Z", + "key" : 1599483600000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T14:00:00.000Z", + "key" : 1599487200000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T15:00:00.000Z", + "key" : 1599490800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T16:00:00.000Z", + "key" : 1599494400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T17:00:00.000Z", + "key" : 1599498000000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T18:00:00.000Z", + "key" : 1599501600000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T19:00:00.000Z", + "key" : 1599505200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T20:00:00.000Z", + "key" : 1599508800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T21:00:00.000Z", + "key" : 1599512400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T22:00:00.000Z", + "key" : 1599516000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-07T23:00:00.000Z", + "key" : 1599519600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T00:00:00.000Z", + "key" : 1599523200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T01:00:00.000Z", + "key" : 1599526800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T02:00:00.000Z", + "key" : 1599530400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T03:00:00.000Z", + "key" : 1599534000000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T04:00:00.000Z", + "key" : 1599537600000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T05:00:00.000Z", + "key" : 1599541200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T06:00:00.000Z", + "key" : 1599544800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T07:00:00.000Z", + "key" : 1599548400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T08:00:00.000Z", + "key" : 1599552000000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T09:00:00.000Z", + "key" : 1599555600000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T10:00:00.000Z", + "key" : 1599559200000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T11:00:00.000Z", + "key" : 1599562800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T12:00:00.000Z", + "key" : 1599566400000, + "doc_count" : 221, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T13:00:00.000Z", + "key" : 1599570000000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T14:00:00.000Z", + "key" : 1599573600000, + "doc_count" : 210, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T15:00:00.000Z", + "key" : 1599577200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T16:00:00.000Z", + "key" : 1599580800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T17:00:00.000Z", + "key" : 1599584400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T18:00:00.000Z", + "key" : 1599588000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T19:00:00.000Z", + "key" : 1599591600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T20:00:00.000Z", + "key" : 1599595200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T21:00:00.000Z", + "key" : 1599598800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T22:00:00.000Z", + "key" : 1599602400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-08T23:00:00.000Z", + "key" : 1599606000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T00:00:00.000Z", + "key" : 1599609600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T01:00:00.000Z", + "key" : 1599613200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T02:00:00.000Z", + "key" : 1599616800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T03:00:00.000Z", + "key" : 1599620400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T04:00:00.000Z", + "key" : 1599624000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T05:00:00.000Z", + "key" : 1599627600000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T06:00:00.000Z", + "key" : 1599631200000, + "doc_count" : 221, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T07:00:00.000Z", + "key" : 1599634800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T08:00:00.000Z", + "key" : 1599638400000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T09:00:00.000Z", + "key" : 1599642000000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T10:00:00.000Z", + "key" : 1599645600000, + "doc_count" : 230, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T11:00:00.000Z", + "key" : 1599649200000, + "doc_count" : 392, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T12:00:00.000Z", + "key" : 1599652800000, + "doc_count" : 258, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T13:00:00.000Z", + "key" : 1599656400000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T14:00:00.000Z", + "key" : 1599660000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T15:00:00.000Z", + "key" : 1599663600000, + "doc_count" : 221, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T16:00:00.000Z", + "key" : 1599667200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T17:00:00.000Z", + "key" : 1599670800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T18:00:00.000Z", + "key" : 1599674400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T19:00:00.000Z", + "key" : 1599678000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T20:00:00.000Z", + "key" : 1599681600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T21:00:00.000Z", + "key" : 1599685200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T22:00:00.000Z", + "key" : 1599688800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-09T23:00:00.000Z", + "key" : 1599692400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T00:00:00.000Z", + "key" : 1599696000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T01:00:00.000Z", + "key" : 1599699600000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T02:00:00.000Z", + "key" : 1599703200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T03:00:00.000Z", + "key" : 1599706800000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T04:00:00.000Z", + "key" : 1599710400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T05:00:00.000Z", + "key" : 1599714000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T06:00:00.000Z", + "key" : 1599717600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T07:00:00.000Z", + "key" : 1599721200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T08:00:00.000Z", + "key" : 1599724800000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T09:00:00.000Z", + "key" : 1599728400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T10:00:00.000Z", + "key" : 1599732000000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T11:00:00.000Z", + "key" : 1599735600000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T12:00:00.000Z", + "key" : 1599739200000, + "doc_count" : 220, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T13:00:00.000Z", + "key" : 1599742800000, + "doc_count" : 250, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T14:00:00.000Z", + "key" : 1599746400000, + "doc_count" : 228, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T15:00:00.000Z", + "key" : 1599750000000, + "doc_count" : 262, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T16:00:00.000Z", + "key" : 1599753600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T17:00:00.000Z", + "key" : 1599757200000, + "doc_count" : 234, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T18:00:00.000Z", + "key" : 1599760800000, + "doc_count" : 264, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T19:00:00.000Z", + "key" : 1599764400000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T20:00:00.000Z", + "key" : 1599768000000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T21:00:00.000Z", + "key" : 1599771600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T22:00:00.000Z", + "key" : 1599775200000, + "doc_count" : 172, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-10T23:00:00.000Z", + "key" : 1599778800000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T00:00:00.000Z", + "key" : 1599782400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T01:00:00.000Z", + "key" : 1599786000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T02:00:00.000Z", + "key" : 1599789600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T03:00:00.000Z", + "key" : 1599793200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T04:00:00.000Z", + "key" : 1599796800000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T05:00:00.000Z", + "key" : 1599800400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T06:00:00.000Z", + "key" : 1599804000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T07:00:00.000Z", + "key" : 1599807600000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T08:00:00.000Z", + "key" : 1599811200000, + "doc_count" : 292, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T09:00:00.000Z", + "key" : 1599814800000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T10:00:00.000Z", + "key" : 1599818400000, + "doc_count" : 218, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T11:00:00.000Z", + "key" : 1599822000000, + "doc_count" : 252, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T12:00:00.000Z", + "key" : 1599825600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T13:00:00.000Z", + "key" : 1599829200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T14:00:00.000Z", + "key" : 1599832800000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T15:00:00.000Z", + "key" : 1599836400000, + "doc_count" : 336, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T16:00:00.000Z", + "key" : 1599840000000, + "doc_count" : 212, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T17:00:00.000Z", + "key" : 1599843600000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T18:00:00.000Z", + "key" : 1599847200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T19:00:00.000Z", + "key" : 1599850800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T20:00:00.000Z", + "key" : 1599854400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T21:00:00.000Z", + "key" : 1599858000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T22:00:00.000Z", + "key" : 1599861600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-11T23:00:00.000Z", + "key" : 1599865200000, + "doc_count" : 226, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T00:00:00.000Z", + "key" : 1599868800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T01:00:00.000Z", + "key" : 1599872400000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T02:00:00.000Z", + "key" : 1599876000000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T03:00:00.000Z", + "key" : 1599879600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T04:00:00.000Z", + "key" : 1599883200000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T05:00:00.000Z", + "key" : 1599886800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T06:00:00.000Z", + "key" : 1599890400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T07:00:00.000Z", + "key" : 1599894000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T08:00:00.000Z", + "key" : 1599897600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T09:00:00.000Z", + "key" : 1599901200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T10:00:00.000Z", + "key" : 1599904800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T11:00:00.000Z", + "key" : 1599908400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T12:00:00.000Z", + "key" : 1599912000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T13:00:00.000Z", + "key" : 1599915600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T14:00:00.000Z", + "key" : 1599919200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T15:00:00.000Z", + "key" : 1599922800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T16:00:00.000Z", + "key" : 1599926400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T17:00:00.000Z", + "key" : 1599930000000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T18:00:00.000Z", + "key" : 1599933600000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T19:00:00.000Z", + "key" : 1599937200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T20:00:00.000Z", + "key" : 1599940800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T21:00:00.000Z", + "key" : 1599944400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T22:00:00.000Z", + "key" : 1599948000000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-12T23:00:00.000Z", + "key" : 1599951600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T00:00:00.000Z", + "key" : 1599955200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T01:00:00.000Z", + "key" : 1599958800000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T02:00:00.000Z", + "key" : 1599962400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T03:00:00.000Z", + "key" : 1599966000000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T04:00:00.000Z", + "key" : 1599969600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T05:00:00.000Z", + "key" : 1599973200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T06:00:00.000Z", + "key" : 1599976800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T07:00:00.000Z", + "key" : 1599980400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T08:00:00.000Z", + "key" : 1599984000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T09:00:00.000Z", + "key" : 1599987600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T10:00:00.000Z", + "key" : 1599991200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T11:00:00.000Z", + "key" : 1599994800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T12:00:00.000Z", + "key" : 1599998400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T13:00:00.000Z", + "key" : 1600002000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T14:00:00.000Z", + "key" : 1600005600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T15:00:00.000Z", + "key" : 1600009200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T16:00:00.000Z", + "key" : 1600012800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T17:00:00.000Z", + "key" : 1600016400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T18:00:00.000Z", + "key" : 1600020000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T19:00:00.000Z", + "key" : 1600023600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T20:00:00.000Z", + "key" : 1600027200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T21:00:00.000Z", + "key" : 1600030800000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T22:00:00.000Z", + "key" : 1600034400000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-13T23:00:00.000Z", + "key" : 1600038000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T00:00:00.000Z", + "key" : 1600041600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T01:00:00.000Z", + "key" : 1600045200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T02:00:00.000Z", + "key" : 1600048800000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T03:00:00.000Z", + "key" : 1600052400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T04:00:00.000Z", + "key" : 1600056000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T05:00:00.000Z", + "key" : 1600059600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T06:00:00.000Z", + "key" : 1600063200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T07:00:00.000Z", + "key" : 1600066800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T08:00:00.000Z", + "key" : 1600070400000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T09:00:00.000Z", + "key" : 1600074000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T10:00:00.000Z", + "key" : 1600077600000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T11:00:00.000Z", + "key" : 1600081200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T12:00:00.000Z", + "key" : 1600084800000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T13:00:00.000Z", + "key" : 1600088400000, + "doc_count" : 214, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T14:00:00.000Z", + "key" : 1600092000000, + "doc_count" : 205, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T15:00:00.000Z", + "key" : 1600095600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T16:00:00.000Z", + "key" : 1600099200000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T17:00:00.000Z", + "key" : 1600102800000, + "doc_count" : 245, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T18:00:00.000Z", + "key" : 1600106400000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T19:00:00.000Z", + "key" : 1600110000000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T20:00:00.000Z", + "key" : 1600113600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T21:00:00.000Z", + "key" : 1600117200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T22:00:00.000Z", + "key" : 1600120800000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-14T23:00:00.000Z", + "key" : 1600124400000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T00:00:00.000Z", + "key" : 1600128000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T01:00:00.000Z", + "key" : 1600131600000, + "doc_count" : 215, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T02:00:00.000Z", + "key" : 1600135200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T03:00:00.000Z", + "key" : 1600138800000, + "doc_count" : 230, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T04:00:00.000Z", + "key" : 1600142400000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T05:00:00.000Z", + "key" : 1600146000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T06:00:00.000Z", + "key" : 1600149600000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T07:00:00.000Z", + "key" : 1600153200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T08:00:00.000Z", + "key" : 1600156800000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T09:00:00.000Z", + "key" : 1600160400000, + "doc_count" : 251, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T10:00:00.000Z", + "key" : 1600164000000, + "doc_count" : 155, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T11:00:00.000Z", + "key" : 1600167600000, + "doc_count" : 160, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T12:00:00.000Z", + "key" : 1600171200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T13:00:00.000Z", + "key" : 1600174800000, + "doc_count" : 225, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T14:00:00.000Z", + "key" : 1600178400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T15:00:00.000Z", + "key" : 1600182000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T16:00:00.000Z", + "key" : 1600185600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T17:00:00.000Z", + "key" : 1600189200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T18:00:00.000Z", + "key" : 1600192800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T19:00:00.000Z", + "key" : 1600196400000, + "doc_count" : 219, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T20:00:00.000Z", + "key" : 1600200000000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T21:00:00.000Z", + "key" : 1600203600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T22:00:00.000Z", + "key" : 1600207200000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-15T23:00:00.000Z", + "key" : 1600210800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T00:00:00.000Z", + "key" : 1600214400000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T01:00:00.000Z", + "key" : 1600218000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T02:00:00.000Z", + "key" : 1600221600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T03:00:00.000Z", + "key" : 1600225200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T04:00:00.000Z", + "key" : 1600228800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T05:00:00.000Z", + "key" : 1600232400000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T06:00:00.000Z", + "key" : 1600236000000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T07:00:00.000Z", + "key" : 1600239600000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T08:00:00.000Z", + "key" : 1600243200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T09:00:00.000Z", + "key" : 1600246800000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T10:00:00.000Z", + "key" : 1600250400000, + "doc_count" : 223, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T11:00:00.000Z", + "key" : 1600254000000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T12:00:00.000Z", + "key" : 1600257600000, + "doc_count" : 233, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T13:00:00.000Z", + "key" : 1600261200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T14:00:00.000Z", + "key" : 1600264800000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T15:00:00.000Z", + "key" : 1600268400000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T16:00:00.000Z", + "key" : 1600272000000, + "doc_count" : 438, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T17:00:00.000Z", + "key" : 1600275600000, + "doc_count" : 256, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T18:00:00.000Z", + "key" : 1600279200000, + "doc_count" : 382, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T19:00:00.000Z", + "key" : 1600282800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T20:00:00.000Z", + "key" : 1600286400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T21:00:00.000Z", + "key" : 1600290000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T22:00:00.000Z", + "key" : 1600293600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-16T23:00:00.000Z", + "key" : 1600297200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T00:00:00.000Z", + "key" : 1600300800000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T01:00:00.000Z", + "key" : 1600304400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T02:00:00.000Z", + "key" : 1600308000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T03:00:00.000Z", + "key" : 1600311600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T04:00:00.000Z", + "key" : 1600315200000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T05:00:00.000Z", + "key" : 1600318800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T06:00:00.000Z", + "key" : 1600322400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T07:00:00.000Z", + "key" : 1600326000000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T08:00:00.000Z", + "key" : 1600329600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T09:00:00.000Z", + "key" : 1600333200000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T10:00:00.000Z", + "key" : 1600336800000, + "doc_count" : 202, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T11:00:00.000Z", + "key" : 1600340400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T12:00:00.000Z", + "key" : 1600344000000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T13:00:00.000Z", + "key" : 1600347600000, + "doc_count" : 211, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T14:00:00.000Z", + "key" : 1600351200000, + "doc_count" : 273, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T15:00:00.000Z", + "key" : 1600354800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T16:00:00.000Z", + "key" : 1600358400000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T17:00:00.000Z", + "key" : 1600362000000, + "doc_count" : 242, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T18:00:00.000Z", + "key" : 1600365600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T19:00:00.000Z", + "key" : 1600369200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T20:00:00.000Z", + "key" : 1600372800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T21:00:00.000Z", + "key" : 1600376400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T22:00:00.000Z", + "key" : 1600380000000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-17T23:00:00.000Z", + "key" : 1600383600000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T00:00:00.000Z", + "key" : 1600387200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T01:00:00.000Z", + "key" : 1600390800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T02:00:00.000Z", + "key" : 1600394400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T03:00:00.000Z", + "key" : 1600398000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T04:00:00.000Z", + "key" : 1600401600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T05:00:00.000Z", + "key" : 1600405200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T06:00:00.000Z", + "key" : 1600408800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T07:00:00.000Z", + "key" : 1600412400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T08:00:00.000Z", + "key" : 1600416000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T09:00:00.000Z", + "key" : 1600419600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T10:00:00.000Z", + "key" : 1600423200000, + "doc_count" : 211, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T11:00:00.000Z", + "key" : 1600426800000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T12:00:00.000Z", + "key" : 1600430400000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T13:00:00.000Z", + "key" : 1600434000000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T14:00:00.000Z", + "key" : 1600437600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T15:00:00.000Z", + "key" : 1600441200000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T16:00:00.000Z", + "key" : 1600444800000, + "doc_count" : 226, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T17:00:00.000Z", + "key" : 1600448400000, + "doc_count" : 258, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T18:00:00.000Z", + "key" : 1600452000000, + "doc_count" : 216, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T19:00:00.000Z", + "key" : 1600455600000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T20:00:00.000Z", + "key" : 1600459200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T21:00:00.000Z", + "key" : 1600462800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T22:00:00.000Z", + "key" : 1600466400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-18T23:00:00.000Z", + "key" : 1600470000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T00:00:00.000Z", + "key" : 1600473600000, + "doc_count" : 222, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T01:00:00.000Z", + "key" : 1600477200000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T02:00:00.000Z", + "key" : 1600480800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T03:00:00.000Z", + "key" : 1600484400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T04:00:00.000Z", + "key" : 1600488000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T05:00:00.000Z", + "key" : 1600491600000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T06:00:00.000Z", + "key" : 1600495200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T07:00:00.000Z", + "key" : 1600498800000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T08:00:00.000Z", + "key" : 1600502400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T09:00:00.000Z", + "key" : 1600506000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T10:00:00.000Z", + "key" : 1600509600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T11:00:00.000Z", + "key" : 1600513200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T12:00:00.000Z", + "key" : 1600516800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T13:00:00.000Z", + "key" : 1600520400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T14:00:00.000Z", + "key" : 1600524000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T15:00:00.000Z", + "key" : 1600527600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T16:00:00.000Z", + "key" : 1600531200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T17:00:00.000Z", + "key" : 1600534800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T18:00:00.000Z", + "key" : 1600538400000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T19:00:00.000Z", + "key" : 1600542000000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T20:00:00.000Z", + "key" : 1600545600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T21:00:00.000Z", + "key" : 1600549200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T22:00:00.000Z", + "key" : 1600552800000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-19T23:00:00.000Z", + "key" : 1600556400000, + "doc_count" : 172, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T00:00:00.000Z", + "key" : 1600560000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T01:00:00.000Z", + "key" : 1600563600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T02:00:00.000Z", + "key" : 1600567200000, + "doc_count" : 196, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T03:00:00.000Z", + "key" : 1600570800000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T04:00:00.000Z", + "key" : 1600574400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T05:00:00.000Z", + "key" : 1600578000000, + "doc_count" : 170, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T06:00:00.000Z", + "key" : 1600581600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T07:00:00.000Z", + "key" : 1600585200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T08:00:00.000Z", + "key" : 1600588800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T09:00:00.000Z", + "key" : 1600592400000, + "doc_count" : 215, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T10:00:00.000Z", + "key" : 1600596000000, + "doc_count" : 232, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T11:00:00.000Z", + "key" : 1600599600000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T12:00:00.000Z", + "key" : 1600603200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T13:00:00.000Z", + "key" : 1600606800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T14:00:00.000Z", + "key" : 1600610400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T15:00:00.000Z", + "key" : 1600614000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T16:00:00.000Z", + "key" : 1600617600000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T17:00:00.000Z", + "key" : 1600621200000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T18:00:00.000Z", + "key" : 1600624800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T19:00:00.000Z", + "key" : 1600628400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T20:00:00.000Z", + "key" : 1600632000000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T21:00:00.000Z", + "key" : 1600635600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T22:00:00.000Z", + "key" : 1600639200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-20T23:00:00.000Z", + "key" : 1600642800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T00:00:00.000Z", + "key" : 1600646400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T01:00:00.000Z", + "key" : 1600650000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T02:00:00.000Z", + "key" : 1600653600000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T03:00:00.000Z", + "key" : 1600657200000, + "doc_count" : 232, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T04:00:00.000Z", + "key" : 1600660800000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T05:00:00.000Z", + "key" : 1600664400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T06:00:00.000Z", + "key" : 1600668000000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T07:00:00.000Z", + "key" : 1600671600000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T08:00:00.000Z", + "key" : 1600675200000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T09:00:00.000Z", + "key" : 1600678800000, + "doc_count" : 209, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T10:00:00.000Z", + "key" : 1600682400000, + "doc_count" : 214, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T11:00:00.000Z", + "key" : 1600686000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T12:00:00.000Z", + "key" : 1600689600000, + "doc_count" : 463, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T13:00:00.000Z", + "key" : 1600693200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T14:00:00.000Z", + "key" : 1600696800000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T15:00:00.000Z", + "key" : 1600700400000, + "doc_count" : 199, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T16:00:00.000Z", + "key" : 1600704000000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T17:00:00.000Z", + "key" : 1600707600000, + "doc_count" : 239, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T18:00:00.000Z", + "key" : 1600711200000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T19:00:00.000Z", + "key" : 1600714800000, + "doc_count" : 576, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T20:00:00.000Z", + "key" : 1600718400000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T21:00:00.000Z", + "key" : 1600722000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T22:00:00.000Z", + "key" : 1600725600000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-21T23:00:00.000Z", + "key" : 1600729200000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T00:00:00.000Z", + "key" : 1600732800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T01:00:00.000Z", + "key" : 1600736400000, + "doc_count" : 170, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T02:00:00.000Z", + "key" : 1600740000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T03:00:00.000Z", + "key" : 1600743600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T04:00:00.000Z", + "key" : 1600747200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T05:00:00.000Z", + "key" : 1600750800000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T06:00:00.000Z", + "key" : 1600754400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T07:00:00.000Z", + "key" : 1600758000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T08:00:00.000Z", + "key" : 1600761600000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T09:00:00.000Z", + "key" : 1600765200000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T10:00:00.000Z", + "key" : 1600768800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T11:00:00.000Z", + "key" : 1600772400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T12:00:00.000Z", + "key" : 1600776000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T13:00:00.000Z", + "key" : 1600779600000, + "doc_count" : 213, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T14:00:00.000Z", + "key" : 1600783200000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T15:00:00.000Z", + "key" : 1600786800000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T16:00:00.000Z", + "key" : 1600790400000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T17:00:00.000Z", + "key" : 1600794000000, + "doc_count" : 244, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T18:00:00.000Z", + "key" : 1600797600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T19:00:00.000Z", + "key" : 1600801200000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T20:00:00.000Z", + "key" : 1600804800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T21:00:00.000Z", + "key" : 1600808400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T22:00:00.000Z", + "key" : 1600812000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-22T23:00:00.000Z", + "key" : 1600815600000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T00:00:00.000Z", + "key" : 1600819200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T01:00:00.000Z", + "key" : 1600822800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T02:00:00.000Z", + "key" : 1600826400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T03:00:00.000Z", + "key" : 1600830000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T04:00:00.000Z", + "key" : 1600833600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T05:00:00.000Z", + "key" : 1600837200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T06:00:00.000Z", + "key" : 1600840800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T07:00:00.000Z", + "key" : 1600844400000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T08:00:00.000Z", + "key" : 1600848000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T09:00:00.000Z", + "key" : 1600851600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T10:00:00.000Z", + "key" : 1600855200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T11:00:00.000Z", + "key" : 1600858800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T12:00:00.000Z", + "key" : 1600862400000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T13:00:00.000Z", + "key" : 1600866000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T14:00:00.000Z", + "key" : 1600869600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T15:00:00.000Z", + "key" : 1600873200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T16:00:00.000Z", + "key" : 1600876800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T17:00:00.000Z", + "key" : 1600880400000, + "doc_count" : 233, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T18:00:00.000Z", + "key" : 1600884000000, + "doc_count" : 243, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T19:00:00.000Z", + "key" : 1600887600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T20:00:00.000Z", + "key" : 1600891200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T21:00:00.000Z", + "key" : 1600894800000, + "doc_count" : 203, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T22:00:00.000Z", + "key" : 1600898400000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-23T23:00:00.000Z", + "key" : 1600902000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T00:00:00.000Z", + "key" : 1600905600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T01:00:00.000Z", + "key" : 1600909200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T02:00:00.000Z", + "key" : 1600912800000, + "doc_count" : 210, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T03:00:00.000Z", + "key" : 1600916400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T04:00:00.000Z", + "key" : 1600920000000, + "doc_count" : 190, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T05:00:00.000Z", + "key" : 1600923600000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T06:00:00.000Z", + "key" : 1600927200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T07:00:00.000Z", + "key" : 1600930800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T08:00:00.000Z", + "key" : 1600934400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T09:00:00.000Z", + "key" : 1600938000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T10:00:00.000Z", + "key" : 1600941600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T11:00:00.000Z", + "key" : 1600945200000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T12:00:00.000Z", + "key" : 1600948800000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T13:00:00.000Z", + "key" : 1600952400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T14:00:00.000Z", + "key" : 1600956000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T15:00:00.000Z", + "key" : 1600959600000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T16:00:00.000Z", + "key" : 1600963200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T17:00:00.000Z", + "key" : 1600966800000, + "doc_count" : 228, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T18:00:00.000Z", + "key" : 1600970400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T19:00:00.000Z", + "key" : 1600974000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T20:00:00.000Z", + "key" : 1600977600000, + "doc_count" : 216, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T21:00:00.000Z", + "key" : 1600981200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T22:00:00.000Z", + "key" : 1600984800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-24T23:00:00.000Z", + "key" : 1600988400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T00:00:00.000Z", + "key" : 1600992000000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T01:00:00.000Z", + "key" : 1600995600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T02:00:00.000Z", + "key" : 1600999200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T03:00:00.000Z", + "key" : 1601002800000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T04:00:00.000Z", + "key" : 1601006400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T05:00:00.000Z", + "key" : 1601010000000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T06:00:00.000Z", + "key" : 1601013600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T07:00:00.000Z", + "key" : 1601017200000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T08:00:00.000Z", + "key" : 1601020800000, + "doc_count" : 250, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T09:00:00.000Z", + "key" : 1601024400000, + "doc_count" : 250, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T10:00:00.000Z", + "key" : 1601028000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T11:00:00.000Z", + "key" : 1601031600000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T12:00:00.000Z", + "key" : 1601035200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T13:00:00.000Z", + "key" : 1601038800000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T14:00:00.000Z", + "key" : 1601042400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T15:00:00.000Z", + "key" : 1601046000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T16:00:00.000Z", + "key" : 1601049600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T17:00:00.000Z", + "key" : 1601053200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T18:00:00.000Z", + "key" : 1601056800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T19:00:00.000Z", + "key" : 1601060400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T20:00:00.000Z", + "key" : 1601064000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T21:00:00.000Z", + "key" : 1601067600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T22:00:00.000Z", + "key" : 1601071200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-25T23:00:00.000Z", + "key" : 1601074800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T00:00:00.000Z", + "key" : 1601078400000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T01:00:00.000Z", + "key" : 1601082000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T02:00:00.000Z", + "key" : 1601085600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T03:00:00.000Z", + "key" : 1601089200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T04:00:00.000Z", + "key" : 1601092800000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T05:00:00.000Z", + "key" : 1601096400000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T06:00:00.000Z", + "key" : 1601100000000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T07:00:00.000Z", + "key" : 1601103600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T08:00:00.000Z", + "key" : 1601107200000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T09:00:00.000Z", + "key" : 1601110800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T10:00:00.000Z", + "key" : 1601114400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T11:00:00.000Z", + "key" : 1601118000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T12:00:00.000Z", + "key" : 1601121600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T13:00:00.000Z", + "key" : 1601125200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T14:00:00.000Z", + "key" : 1601128800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T15:00:00.000Z", + "key" : 1601132400000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T16:00:00.000Z", + "key" : 1601136000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T17:00:00.000Z", + "key" : 1601139600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T18:00:00.000Z", + "key" : 1601143200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T19:00:00.000Z", + "key" : 1601146800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T20:00:00.000Z", + "key" : 1601150400000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T21:00:00.000Z", + "key" : 1601154000000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T22:00:00.000Z", + "key" : 1601157600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-26T23:00:00.000Z", + "key" : 1601161200000, + "doc_count" : 173, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T00:00:00.000Z", + "key" : 1601164800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T01:00:00.000Z", + "key" : 1601168400000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T02:00:00.000Z", + "key" : 1601172000000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T03:00:00.000Z", + "key" : 1601175600000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T04:00:00.000Z", + "key" : 1601179200000, + "doc_count" : 188, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T05:00:00.000Z", + "key" : 1601182800000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T06:00:00.000Z", + "key" : 1601186400000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T07:00:00.000Z", + "key" : 1601190000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T08:00:00.000Z", + "key" : 1601193600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T09:00:00.000Z", + "key" : 1601197200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T10:00:00.000Z", + "key" : 1601200800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T11:00:00.000Z", + "key" : 1601204400000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T12:00:00.000Z", + "key" : 1601208000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T13:00:00.000Z", + "key" : 1601211600000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T14:00:00.000Z", + "key" : 1601215200000, + "doc_count" : 192, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T15:00:00.000Z", + "key" : 1601218800000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T16:00:00.000Z", + "key" : 1601222400000, + "doc_count" : 176, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T17:00:00.000Z", + "key" : 1601226000000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T18:00:00.000Z", + "key" : 1601229600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T19:00:00.000Z", + "key" : 1601233200000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T20:00:00.000Z", + "key" : 1601236800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T21:00:00.000Z", + "key" : 1601240400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T22:00:00.000Z", + "key" : 1601244000000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-27T23:00:00.000Z", + "key" : 1601247600000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T00:00:00.000Z", + "key" : 1601251200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T01:00:00.000Z", + "key" : 1601254800000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T02:00:00.000Z", + "key" : 1601258400000, + "doc_count" : 189, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T03:00:00.000Z", + "key" : 1601262000000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T04:00:00.000Z", + "key" : 1601265600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T05:00:00.000Z", + "key" : 1601269200000, + "doc_count" : 178, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T06:00:00.000Z", + "key" : 1601272800000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T07:00:00.000Z", + "key" : 1601276400000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T08:00:00.000Z", + "key" : 1601280000000, + "doc_count" : 244, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T09:00:00.000Z", + "key" : 1601283600000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T10:00:00.000Z", + "key" : 1601287200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T11:00:00.000Z", + "key" : 1601290800000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T12:00:00.000Z", + "key" : 1601294400000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T13:00:00.000Z", + "key" : 1601298000000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T14:00:00.000Z", + "key" : 1601301600000, + "doc_count" : 225, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T15:00:00.000Z", + "key" : 1601305200000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T16:00:00.000Z", + "key" : 1601308800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T17:00:00.000Z", + "key" : 1601312400000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T18:00:00.000Z", + "key" : 1601316000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T19:00:00.000Z", + "key" : 1601319600000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T20:00:00.000Z", + "key" : 1601323200000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T21:00:00.000Z", + "key" : 1601326800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T22:00:00.000Z", + "key" : 1601330400000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-28T23:00:00.000Z", + "key" : 1601334000000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T00:00:00.000Z", + "key" : 1601337600000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T01:00:00.000Z", + "key" : 1601341200000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T02:00:00.000Z", + "key" : 1601344800000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T03:00:00.000Z", + "key" : 1601348400000, + "doc_count" : 174, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T04:00:00.000Z", + "key" : 1601352000000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T05:00:00.000Z", + "key" : 1601355600000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T06:00:00.000Z", + "key" : 1601359200000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T07:00:00.000Z", + "key" : 1601362800000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T08:00:00.000Z", + "key" : 1601366400000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T09:00:00.000Z", + "key" : 1601370000000, + "doc_count" : 175, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T10:00:00.000Z", + "key" : 1601373600000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T11:00:00.000Z", + "key" : 1601377200000, + "doc_count" : 194, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T12:00:00.000Z", + "key" : 1601380800000, + "doc_count" : 207, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T13:00:00.000Z", + "key" : 1601384400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T14:00:00.000Z", + "key" : 1601388000000, + "doc_count" : 197, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T15:00:00.000Z", + "key" : 1601391600000, + "doc_count" : 183, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T16:00:00.000Z", + "key" : 1601395200000, + "doc_count" : 200, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T17:00:00.000Z", + "key" : 1601398800000, + "doc_count" : 260, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T18:00:00.000Z", + "key" : 1601402400000, + "doc_count" : 232, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T19:00:00.000Z", + "key" : 1601406000000, + "doc_count" : 191, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T20:00:00.000Z", + "key" : 1601409600000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T21:00:00.000Z", + "key" : 1601413200000, + "doc_count" : 180, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T22:00:00.000Z", + "key" : 1601416800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-29T23:00:00.000Z", + "key" : 1601420400000, + "doc_count" : 186, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T00:00:00.000Z", + "key" : 1601424000000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T01:00:00.000Z", + "key" : 1601427600000, + "doc_count" : 177, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T02:00:00.000Z", + "key" : 1601431200000, + "doc_count" : 224, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T03:00:00.000Z", + "key" : 1601434800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T04:00:00.000Z", + "key" : 1601438400000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T05:00:00.000Z", + "key" : 1601442000000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T06:00:00.000Z", + "key" : 1601445600000, + "doc_count" : 185, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T07:00:00.000Z", + "key" : 1601449200000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T08:00:00.000Z", + "key" : 1601452800000, + "doc_count" : 481, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T09:00:00.000Z", + "key" : 1601456400000, + "doc_count" : 216, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T10:00:00.000Z", + "key" : 1601460000000, + "doc_count" : 204, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T11:00:00.000Z", + "key" : 1601463600000, + "doc_count" : 193, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T12:00:00.000Z", + "key" : 1601467200000, + "doc_count" : 182, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T13:00:00.000Z", + "key" : 1601470800000, + "doc_count" : 206, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T14:00:00.000Z", + "key" : 1601474400000, + "doc_count" : 227, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T15:00:00.000Z", + "key" : 1601478000000, + "doc_count" : 198, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T16:00:00.000Z", + "key" : 1601481600000, + "doc_count" : 233, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T17:00:00.000Z", + "key" : 1601485200000, + "doc_count" : 201, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T18:00:00.000Z", + "key" : 1601488800000, + "doc_count" : 181, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T19:00:00.000Z", + "key" : 1601492400000, + "doc_count" : 187, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T20:00:00.000Z", + "key" : 1601496000000, + "doc_count" : 195, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T21:00:00.000Z", + "key" : 1601499600000, + "doc_count" : 208, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T22:00:00.000Z", + "key" : 1601503200000, + "doc_count" : 179, + "count" : { + "value" : 2 + } + }, + { + "key_as_string" : "2020-09-30T23:00:00.000Z", + "key" : 1601506800000, + "doc_count" : 184, + "count" : { + "value" : 2 + } + } + ] + }, + "average" : { + "value" : 2 + } + } +} diff --git a/services/api/src/models/mockHitDataNew-project-c.json b/services/api/src/models/mockHitDataNew-project-c.json new file mode 100644 index 0000000000..16ebbd5674 --- /dev/null +++ b/services/api/src/models/mockHitDataNew-project-c.json @@ -0,0 +1,5787 @@ +{ + "took" : 262, + "timed_out" : false, + "_shards" : { + "total" : 4, + "successful" : 4, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 6960, + "relation" : "gte" + }, + "max_score" : 1.0000149, + "hits" : [] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-09-01T00:00:00.000Z", + "key" : 1598918400000, + "doc_count" : 119, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T01:00:00.000Z", + "key" : 1598922000000, + "doc_count" : 114, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T02:00:00.000Z", + "key" : 1598925600000, + "doc_count" : 127, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T03:00:00.000Z", + "key" : 1598929200000, + "doc_count" : 116, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T04:00:00.000Z", + "key" : 1598932800000, + "doc_count" : 144, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T05:00:00.000Z", + "key" : 1598936400000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T06:00:00.000Z", + "key" : 1598940000000, + "doc_count" : 114, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T07:00:00.000Z", + "key" : 1598943600000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T08:00:00.000Z", + "key" : 1598947200000, + "doc_count" : 126, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T09:00:00.000Z", + "key" : 1598950800000, + "doc_count" : 136, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T10:00:00.000Z", + "key" : 1598954400000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T11:00:00.000Z", + "key" : 1598958000000, + "doc_count" : 118, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T12:00:00.000Z", + "key" : 1598961600000, + "doc_count" : 452, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T13:00:00.000Z", + "key" : 1598965200000, + "doc_count" : 133, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T14:00:00.000Z", + "key" : 1598968800000, + "doc_count" : 121, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T15:00:00.000Z", + "key" : 1598972400000, + "doc_count" : 123, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T16:00:00.000Z", + "key" : 1598976000000, + "doc_count" : 160, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T17:00:00.000Z", + "key" : 1598979600000, + "doc_count" : 150, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T18:00:00.000Z", + "key" : 1598983200000, + "doc_count" : 123, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T19:00:00.000Z", + "key" : 1598986800000, + "doc_count" : 119, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T20:00:00.000Z", + "key" : 1598990400000, + "doc_count" : 117, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T21:00:00.000Z", + "key" : 1598994000000, + "doc_count" : 151, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T22:00:00.000Z", + "key" : 1598997600000, + "doc_count" : 205, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-01T23:00:00.000Z", + "key" : 1599001200000, + "doc_count" : 187, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-09-02T00:00:00.000Z", + "key" : 1599004800000, + "doc_count" : 169, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T01:00:00.000Z", + "key" : 1599008400000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T02:00:00.000Z", + "key" : 1599012000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T03:00:00.000Z", + "key" : 1599015600000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T04:00:00.000Z", + "key" : 1599019200000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T05:00:00.000Z", + "key" : 1599022800000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T06:00:00.000Z", + "key" : 1599026400000, + "doc_count" : 168, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T07:00:00.000Z", + "key" : 1599030000000, + "doc_count" : 134, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T08:00:00.000Z", + "key" : 1599033600000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T09:00:00.000Z", + "key" : 1599037200000, + "doc_count" : 290, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T10:00:00.000Z", + "key" : 1599040800000, + "doc_count" : 827, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T11:00:00.000Z", + "key" : 1599044400000, + "doc_count" : 409, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T12:00:00.000Z", + "key" : 1599048000000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T13:00:00.000Z", + "key" : 1599051600000, + "doc_count" : 208, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T14:00:00.000Z", + "key" : 1599055200000, + "doc_count" : 213, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T15:00:00.000Z", + "key" : 1599058800000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T16:00:00.000Z", + "key" : 1599062400000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T17:00:00.000Z", + "key" : 1599066000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T18:00:00.000Z", + "key" : 1599069600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T19:00:00.000Z", + "key" : 1599073200000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T20:00:00.000Z", + "key" : 1599076800000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T21:00:00.000Z", + "key" : 1599080400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T22:00:00.000Z", + "key" : 1599084000000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-02T23:00:00.000Z", + "key" : 1599087600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T00:00:00.000Z", + "key" : 1599091200000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T01:00:00.000Z", + "key" : 1599094800000, + "doc_count" : 172, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T02:00:00.000Z", + "key" : 1599098400000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T03:00:00.000Z", + "key" : 1599102000000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T04:00:00.000Z", + "key" : 1599105600000, + "doc_count" : 173, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T05:00:00.000Z", + "key" : 1599109200000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T06:00:00.000Z", + "key" : 1599112800000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T07:00:00.000Z", + "key" : 1599116400000, + "doc_count" : 230, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T08:00:00.000Z", + "key" : 1599120000000, + "doc_count" : 244, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T09:00:00.000Z", + "key" : 1599123600000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T10:00:00.000Z", + "key" : 1599127200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T11:00:00.000Z", + "key" : 1599130800000, + "doc_count" : 202, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T12:00:00.000Z", + "key" : 1599134400000, + "doc_count" : 202, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T13:00:00.000Z", + "key" : 1599138000000, + "doc_count" : 201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T14:00:00.000Z", + "key" : 1599141600000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T15:00:00.000Z", + "key" : 1599145200000, + "doc_count" : 199, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T16:00:00.000Z", + "key" : 1599148800000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T17:00:00.000Z", + "key" : 1599152400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T18:00:00.000Z", + "key" : 1599156000000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T19:00:00.000Z", + "key" : 1599159600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T20:00:00.000Z", + "key" : 1599163200000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T21:00:00.000Z", + "key" : 1599166800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T22:00:00.000Z", + "key" : 1599170400000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-03T23:00:00.000Z", + "key" : 1599174000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T00:00:00.000Z", + "key" : 1599177600000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T01:00:00.000Z", + "key" : 1599181200000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T02:00:00.000Z", + "key" : 1599184800000, + "doc_count" : 174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T03:00:00.000Z", + "key" : 1599188400000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T04:00:00.000Z", + "key" : 1599192000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T05:00:00.000Z", + "key" : 1599195600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T06:00:00.000Z", + "key" : 1599199200000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T07:00:00.000Z", + "key" : 1599202800000, + "doc_count" : 316, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T08:00:00.000Z", + "key" : 1599206400000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T09:00:00.000Z", + "key" : 1599210000000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T10:00:00.000Z", + "key" : 1599213600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T11:00:00.000Z", + "key" : 1599217200000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T12:00:00.000Z", + "key" : 1599220800000, + "doc_count" : 280, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T13:00:00.000Z", + "key" : 1599224400000, + "doc_count" : 203, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T14:00:00.000Z", + "key" : 1599228000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T15:00:00.000Z", + "key" : 1599231600000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T16:00:00.000Z", + "key" : 1599235200000, + "doc_count" : 219, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T17:00:00.000Z", + "key" : 1599238800000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T18:00:00.000Z", + "key" : 1599242400000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T19:00:00.000Z", + "key" : 1599246000000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T20:00:00.000Z", + "key" : 1599249600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T21:00:00.000Z", + "key" : 1599253200000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T22:00:00.000Z", + "key" : 1599256800000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-04T23:00:00.000Z", + "key" : 1599260400000, + "doc_count" : 174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T00:00:00.000Z", + "key" : 1599264000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T01:00:00.000Z", + "key" : 1599267600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T02:00:00.000Z", + "key" : 1599271200000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T03:00:00.000Z", + "key" : 1599274800000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T04:00:00.000Z", + "key" : 1599278400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T05:00:00.000Z", + "key" : 1599282000000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T06:00:00.000Z", + "key" : 1599285600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T07:00:00.000Z", + "key" : 1599289200000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T08:00:00.000Z", + "key" : 1599292800000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T09:00:00.000Z", + "key" : 1599296400000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T10:00:00.000Z", + "key" : 1599300000000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T11:00:00.000Z", + "key" : 1599303600000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T12:00:00.000Z", + "key" : 1599307200000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T13:00:00.000Z", + "key" : 1599310800000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T14:00:00.000Z", + "key" : 1599314400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T15:00:00.000Z", + "key" : 1599318000000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T16:00:00.000Z", + "key" : 1599321600000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T17:00:00.000Z", + "key" : 1599325200000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T18:00:00.000Z", + "key" : 1599328800000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T19:00:00.000Z", + "key" : 1599332400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T20:00:00.000Z", + "key" : 1599336000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T21:00:00.000Z", + "key" : 1599339600000, + "doc_count" : 160, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T22:00:00.000Z", + "key" : 1599343200000, + "doc_count" : 213, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-05T23:00:00.000Z", + "key" : 1599346800000, + "doc_count" : 161, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T00:00:00.000Z", + "key" : 1599350400000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T01:00:00.000Z", + "key" : 1599354000000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T02:00:00.000Z", + "key" : 1599357600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T03:00:00.000Z", + "key" : 1599361200000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T04:00:00.000Z", + "key" : 1599364800000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T05:00:00.000Z", + "key" : 1599368400000, + "doc_count" : 174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T06:00:00.000Z", + "key" : 1599372000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T07:00:00.000Z", + "key" : 1599375600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T08:00:00.000Z", + "key" : 1599379200000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T09:00:00.000Z", + "key" : 1599382800000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T10:00:00.000Z", + "key" : 1599386400000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T11:00:00.000Z", + "key" : 1599390000000, + "doc_count" : 214, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T12:00:00.000Z", + "key" : 1599393600000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T13:00:00.000Z", + "key" : 1599397200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T14:00:00.000Z", + "key" : 1599400800000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T15:00:00.000Z", + "key" : 1599404400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T16:00:00.000Z", + "key" : 1599408000000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T17:00:00.000Z", + "key" : 1599411600000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T18:00:00.000Z", + "key" : 1599415200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T19:00:00.000Z", + "key" : 1599418800000, + "doc_count" : 200, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T20:00:00.000Z", + "key" : 1599422400000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T21:00:00.000Z", + "key" : 1599426000000, + "doc_count" : 200, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T22:00:00.000Z", + "key" : 1599429600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-06T23:00:00.000Z", + "key" : 1599433200000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T00:00:00.000Z", + "key" : 1599436800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T01:00:00.000Z", + "key" : 1599440400000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T02:00:00.000Z", + "key" : 1599444000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T03:00:00.000Z", + "key" : 1599447600000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T04:00:00.000Z", + "key" : 1599451200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T05:00:00.000Z", + "key" : 1599454800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T06:00:00.000Z", + "key" : 1599458400000, + "doc_count" : 200, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T07:00:00.000Z", + "key" : 1599462000000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T08:00:00.000Z", + "key" : 1599465600000, + "doc_count" : 227, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T09:00:00.000Z", + "key" : 1599469200000, + "doc_count" : 198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T10:00:00.000Z", + "key" : 1599472800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T11:00:00.000Z", + "key" : 1599476400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T12:00:00.000Z", + "key" : 1599480000000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T13:00:00.000Z", + "key" : 1599483600000, + "doc_count" : 200, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T14:00:00.000Z", + "key" : 1599487200000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T15:00:00.000Z", + "key" : 1599490800000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T16:00:00.000Z", + "key" : 1599494400000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T17:00:00.000Z", + "key" : 1599498000000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T18:00:00.000Z", + "key" : 1599501600000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T19:00:00.000Z", + "key" : 1599505200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T20:00:00.000Z", + "key" : 1599508800000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T21:00:00.000Z", + "key" : 1599512400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T22:00:00.000Z", + "key" : 1599516000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-07T23:00:00.000Z", + "key" : 1599519600000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T00:00:00.000Z", + "key" : 1599523200000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T01:00:00.000Z", + "key" : 1599526800000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T02:00:00.000Z", + "key" : 1599530400000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T03:00:00.000Z", + "key" : 1599534000000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T04:00:00.000Z", + "key" : 1599537600000, + "doc_count" : 199, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T05:00:00.000Z", + "key" : 1599541200000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T06:00:00.000Z", + "key" : 1599544800000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T07:00:00.000Z", + "key" : 1599548400000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T08:00:00.000Z", + "key" : 1599552000000, + "doc_count" : 224, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T09:00:00.000Z", + "key" : 1599555600000, + "doc_count" : 207, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T10:00:00.000Z", + "key" : 1599559200000, + "doc_count" : 196, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T11:00:00.000Z", + "key" : 1599562800000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T12:00:00.000Z", + "key" : 1599566400000, + "doc_count" : 221, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T13:00:00.000Z", + "key" : 1599570000000, + "doc_count" : 205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T14:00:00.000Z", + "key" : 1599573600000, + "doc_count" : 210, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T15:00:00.000Z", + "key" : 1599577200000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T16:00:00.000Z", + "key" : 1599580800000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T17:00:00.000Z", + "key" : 1599584400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T18:00:00.000Z", + "key" : 1599588000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T19:00:00.000Z", + "key" : 1599591600000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T20:00:00.000Z", + "key" : 1599595200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T21:00:00.000Z", + "key" : 1599598800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T22:00:00.000Z", + "key" : 1599602400000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-08T23:00:00.000Z", + "key" : 1599606000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T00:00:00.000Z", + "key" : 1599609600000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T01:00:00.000Z", + "key" : 1599613200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T02:00:00.000Z", + "key" : 1599616800000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T03:00:00.000Z", + "key" : 1599620400000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T04:00:00.000Z", + "key" : 1599624000000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T05:00:00.000Z", + "key" : 1599627600000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T06:00:00.000Z", + "key" : 1599631200000, + "doc_count" : 221, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T07:00:00.000Z", + "key" : 1599634800000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T08:00:00.000Z", + "key" : 1599638400000, + "doc_count" : 196, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T09:00:00.000Z", + "key" : 1599642000000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T10:00:00.000Z", + "key" : 1599645600000, + "doc_count" : 230, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T11:00:00.000Z", + "key" : 1599649200000, + "doc_count" : 392, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T12:00:00.000Z", + "key" : 1599652800000, + "doc_count" : 258, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T13:00:00.000Z", + "key" : 1599656400000, + "doc_count" : 203, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T14:00:00.000Z", + "key" : 1599660000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T15:00:00.000Z", + "key" : 1599663600000, + "doc_count" : 221, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T16:00:00.000Z", + "key" : 1599667200000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T17:00:00.000Z", + "key" : 1599670800000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T18:00:00.000Z", + "key" : 1599674400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T19:00:00.000Z", + "key" : 1599678000000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T20:00:00.000Z", + "key" : 1599681600000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T21:00:00.000Z", + "key" : 1599685200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T22:00:00.000Z", + "key" : 1599688800000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-09T23:00:00.000Z", + "key" : 1599692400000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T00:00:00.000Z", + "key" : 1599696000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T01:00:00.000Z", + "key" : 1599699600000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T02:00:00.000Z", + "key" : 1599703200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T03:00:00.000Z", + "key" : 1599706800000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T04:00:00.000Z", + "key" : 1599710400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T05:00:00.000Z", + "key" : 1599714000000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T06:00:00.000Z", + "key" : 1599717600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T07:00:00.000Z", + "key" : 1599721200000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T08:00:00.000Z", + "key" : 1599724800000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T09:00:00.000Z", + "key" : 1599728400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T10:00:00.000Z", + "key" : 1599732000000, + "doc_count" : 224, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T11:00:00.000Z", + "key" : 1599735600000, + "doc_count" : 202, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T12:00:00.000Z", + "key" : 1599739200000, + "doc_count" : 220, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T13:00:00.000Z", + "key" : 1599742800000, + "doc_count" : 250, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T14:00:00.000Z", + "key" : 1599746400000, + "doc_count" : 228, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T15:00:00.000Z", + "key" : 1599750000000, + "doc_count" : 262, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T16:00:00.000Z", + "key" : 1599753600000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T17:00:00.000Z", + "key" : 1599757200000, + "doc_count" : 234, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T18:00:00.000Z", + "key" : 1599760800000, + "doc_count" : 264, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T19:00:00.000Z", + "key" : 1599764400000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T20:00:00.000Z", + "key" : 1599768000000, + "doc_count" : 205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T21:00:00.000Z", + "key" : 1599771600000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T22:00:00.000Z", + "key" : 1599775200000, + "doc_count" : 172, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-10T23:00:00.000Z", + "key" : 1599778800000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T00:00:00.000Z", + "key" : 1599782400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T01:00:00.000Z", + "key" : 1599786000000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T02:00:00.000Z", + "key" : 1599789600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T03:00:00.000Z", + "key" : 1599793200000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T04:00:00.000Z", + "key" : 1599796800000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T05:00:00.000Z", + "key" : 1599800400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T06:00:00.000Z", + "key" : 1599804000000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T07:00:00.000Z", + "key" : 1599807600000, + "doc_count" : 207, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T08:00:00.000Z", + "key" : 1599811200000, + "doc_count" : 292, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T09:00:00.000Z", + "key" : 1599814800000, + "doc_count" : 206, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T10:00:00.000Z", + "key" : 1599818400000, + "doc_count" : 218, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T11:00:00.000Z", + "key" : 1599822000000, + "doc_count" : 252, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T12:00:00.000Z", + "key" : 1599825600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T13:00:00.000Z", + "key" : 1599829200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T14:00:00.000Z", + "key" : 1599832800000, + "doc_count" : 201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T15:00:00.000Z", + "key" : 1599836400000, + "doc_count" : 336, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T16:00:00.000Z", + "key" : 1599840000000, + "doc_count" : 212, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T17:00:00.000Z", + "key" : 1599843600000, + "doc_count" : 199, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T18:00:00.000Z", + "key" : 1599847200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T19:00:00.000Z", + "key" : 1599850800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T20:00:00.000Z", + "key" : 1599854400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T21:00:00.000Z", + "key" : 1599858000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T22:00:00.000Z", + "key" : 1599861600000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-11T23:00:00.000Z", + "key" : 1599865200000, + "doc_count" : 226, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T00:00:00.000Z", + "key" : 1599868800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T01:00:00.000Z", + "key" : 1599872400000, + "doc_count" : 198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T02:00:00.000Z", + "key" : 1599876000000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T03:00:00.000Z", + "key" : 1599879600000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T04:00:00.000Z", + "key" : 1599883200000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T05:00:00.000Z", + "key" : 1599886800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T06:00:00.000Z", + "key" : 1599890400000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T07:00:00.000Z", + "key" : 1599894000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T08:00:00.000Z", + "key" : 1599897600000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T09:00:00.000Z", + "key" : 1599901200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T10:00:00.000Z", + "key" : 1599904800000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T11:00:00.000Z", + "key" : 1599908400000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T12:00:00.000Z", + "key" : 1599912000000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T13:00:00.000Z", + "key" : 1599915600000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T14:00:00.000Z", + "key" : 1599919200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T15:00:00.000Z", + "key" : 1599922800000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T16:00:00.000Z", + "key" : 1599926400000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T17:00:00.000Z", + "key" : 1599930000000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T18:00:00.000Z", + "key" : 1599933600000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T19:00:00.000Z", + "key" : 1599937200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T20:00:00.000Z", + "key" : 1599940800000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T21:00:00.000Z", + "key" : 1599944400000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T22:00:00.000Z", + "key" : 1599948000000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-12T23:00:00.000Z", + "key" : 1599951600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T00:00:00.000Z", + "key" : 1599955200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T01:00:00.000Z", + "key" : 1599958800000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T02:00:00.000Z", + "key" : 1599962400000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T03:00:00.000Z", + "key" : 1599966000000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T04:00:00.000Z", + "key" : 1599969600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T05:00:00.000Z", + "key" : 1599973200000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T06:00:00.000Z", + "key" : 1599976800000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T07:00:00.000Z", + "key" : 1599980400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T08:00:00.000Z", + "key" : 1599984000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T09:00:00.000Z", + "key" : 1599987600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T10:00:00.000Z", + "key" : 1599991200000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T11:00:00.000Z", + "key" : 1599994800000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T12:00:00.000Z", + "key" : 1599998400000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T13:00:00.000Z", + "key" : 1600002000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T14:00:00.000Z", + "key" : 1600005600000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T15:00:00.000Z", + "key" : 1600009200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T16:00:00.000Z", + "key" : 1600012800000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T17:00:00.000Z", + "key" : 1600016400000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T18:00:00.000Z", + "key" : 1600020000000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T19:00:00.000Z", + "key" : 1600023600000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T20:00:00.000Z", + "key" : 1600027200000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T21:00:00.000Z", + "key" : 1600030800000, + "doc_count" : 201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T22:00:00.000Z", + "key" : 1600034400000, + "doc_count" : 205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-13T23:00:00.000Z", + "key" : 1600038000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T00:00:00.000Z", + "key" : 1600041600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T01:00:00.000Z", + "key" : 1600045200000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T02:00:00.000Z", + "key" : 1600048800000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T03:00:00.000Z", + "key" : 1600052400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T04:00:00.000Z", + "key" : 1600056000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T05:00:00.000Z", + "key" : 1600059600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T06:00:00.000Z", + "key" : 1600063200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T07:00:00.000Z", + "key" : 1600066800000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T08:00:00.000Z", + "key" : 1600070400000, + "doc_count" : 260, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T09:00:00.000Z", + "key" : 1600074000000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T10:00:00.000Z", + "key" : 1600077600000, + "doc_count" : 200, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T11:00:00.000Z", + "key" : 1600081200000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T12:00:00.000Z", + "key" : 1600084800000, + "doc_count" : 200, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T13:00:00.000Z", + "key" : 1600088400000, + "doc_count" : 214, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T14:00:00.000Z", + "key" : 1600092000000, + "doc_count" : 205, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T15:00:00.000Z", + "key" : 1600095600000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T16:00:00.000Z", + "key" : 1600099200000, + "doc_count" : 209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T17:00:00.000Z", + "key" : 1600102800000, + "doc_count" : 245, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T18:00:00.000Z", + "key" : 1600106400000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T19:00:00.000Z", + "key" : 1600110000000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T20:00:00.000Z", + "key" : 1600113600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T21:00:00.000Z", + "key" : 1600117200000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T22:00:00.000Z", + "key" : 1600120800000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-14T23:00:00.000Z", + "key" : 1600124400000, + "doc_count" : 198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T00:00:00.000Z", + "key" : 1600128000000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T01:00:00.000Z", + "key" : 1600131600000, + "doc_count" : 215, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T02:00:00.000Z", + "key" : 1600135200000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T03:00:00.000Z", + "key" : 1600138800000, + "doc_count" : 230, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T04:00:00.000Z", + "key" : 1600142400000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T05:00:00.000Z", + "key" : 1600146000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T06:00:00.000Z", + "key" : 1600149600000, + "doc_count" : 203, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T07:00:00.000Z", + "key" : 1600153200000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T08:00:00.000Z", + "key" : 1600156800000, + "doc_count" : 203, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T09:00:00.000Z", + "key" : 1600160400000, + "doc_count" : 251, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T10:00:00.000Z", + "key" : 1600164000000, + "doc_count" : 155, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T11:00:00.000Z", + "key" : 1600167600000, + "doc_count" : 160, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T12:00:00.000Z", + "key" : 1600171200000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T13:00:00.000Z", + "key" : 1600174800000, + "doc_count" : 225, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T14:00:00.000Z", + "key" : 1600178400000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T15:00:00.000Z", + "key" : 1600182000000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T16:00:00.000Z", + "key" : 1600185600000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T17:00:00.000Z", + "key" : 1600189200000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T18:00:00.000Z", + "key" : 1600192800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T19:00:00.000Z", + "key" : 1600196400000, + "doc_count" : 219, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T20:00:00.000Z", + "key" : 1600200000000, + "doc_count" : 209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T21:00:00.000Z", + "key" : 1600203600000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T22:00:00.000Z", + "key" : 1600207200000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-15T23:00:00.000Z", + "key" : 1600210800000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T00:00:00.000Z", + "key" : 1600214400000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T01:00:00.000Z", + "key" : 1600218000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T02:00:00.000Z", + "key" : 1600221600000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T03:00:00.000Z", + "key" : 1600225200000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T04:00:00.000Z", + "key" : 1600228800000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T05:00:00.000Z", + "key" : 1600232400000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T06:00:00.000Z", + "key" : 1600236000000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T07:00:00.000Z", + "key" : 1600239600000, + "doc_count" : 201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T08:00:00.000Z", + "key" : 1600243200000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T09:00:00.000Z", + "key" : 1600246800000, + "doc_count" : 203, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T10:00:00.000Z", + "key" : 1600250400000, + "doc_count" : 223, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T11:00:00.000Z", + "key" : 1600254000000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T12:00:00.000Z", + "key" : 1600257600000, + "doc_count" : 233, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T13:00:00.000Z", + "key" : 1600261200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T14:00:00.000Z", + "key" : 1600264800000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T15:00:00.000Z", + "key" : 1600268400000, + "doc_count" : 213, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T16:00:00.000Z", + "key" : 1600272000000, + "doc_count" : 438, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T17:00:00.000Z", + "key" : 1600275600000, + "doc_count" : 256, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T18:00:00.000Z", + "key" : 1600279200000, + "doc_count" : 382, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T19:00:00.000Z", + "key" : 1600282800000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T20:00:00.000Z", + "key" : 1600286400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T21:00:00.000Z", + "key" : 1600290000000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T22:00:00.000Z", + "key" : 1600293600000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-16T23:00:00.000Z", + "key" : 1600297200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T00:00:00.000Z", + "key" : 1600300800000, + "doc_count" : 209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T01:00:00.000Z", + "key" : 1600304400000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T02:00:00.000Z", + "key" : 1600308000000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T03:00:00.000Z", + "key" : 1600311600000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T04:00:00.000Z", + "key" : 1600315200000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T05:00:00.000Z", + "key" : 1600318800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T06:00:00.000Z", + "key" : 1600322400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T07:00:00.000Z", + "key" : 1600326000000, + "doc_count" : 208, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T08:00:00.000Z", + "key" : 1600329600000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T09:00:00.000Z", + "key" : 1600333200000, + "doc_count" : 198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T10:00:00.000Z", + "key" : 1600336800000, + "doc_count" : 202, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T11:00:00.000Z", + "key" : 1600340400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T12:00:00.000Z", + "key" : 1600344000000, + "doc_count" : 198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T13:00:00.000Z", + "key" : 1600347600000, + "doc_count" : 211, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T14:00:00.000Z", + "key" : 1600351200000, + "doc_count" : 273, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T15:00:00.000Z", + "key" : 1600354800000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T16:00:00.000Z", + "key" : 1600358400000, + "doc_count" : 260, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T17:00:00.000Z", + "key" : 1600362000000, + "doc_count" : 242, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T18:00:00.000Z", + "key" : 1600365600000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T19:00:00.000Z", + "key" : 1600369200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T20:00:00.000Z", + "key" : 1600372800000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T21:00:00.000Z", + "key" : 1600376400000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T22:00:00.000Z", + "key" : 1600380000000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-17T23:00:00.000Z", + "key" : 1600383600000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T00:00:00.000Z", + "key" : 1600387200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T01:00:00.000Z", + "key" : 1600390800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T02:00:00.000Z", + "key" : 1600394400000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T03:00:00.000Z", + "key" : 1600398000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T04:00:00.000Z", + "key" : 1600401600000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T05:00:00.000Z", + "key" : 1600405200000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T06:00:00.000Z", + "key" : 1600408800000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T07:00:00.000Z", + "key" : 1600412400000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T08:00:00.000Z", + "key" : 1600416000000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T09:00:00.000Z", + "key" : 1600419600000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T10:00:00.000Z", + "key" : 1600423200000, + "doc_count" : 211, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T11:00:00.000Z", + "key" : 1600426800000, + "doc_count" : 201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T12:00:00.000Z", + "key" : 1600430400000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T13:00:00.000Z", + "key" : 1600434000000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T14:00:00.000Z", + "key" : 1600437600000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T15:00:00.000Z", + "key" : 1600441200000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T16:00:00.000Z", + "key" : 1600444800000, + "doc_count" : 226, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T17:00:00.000Z", + "key" : 1600448400000, + "doc_count" : 258, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T18:00:00.000Z", + "key" : 1600452000000, + "doc_count" : 216, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T19:00:00.000Z", + "key" : 1600455600000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T20:00:00.000Z", + "key" : 1600459200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T21:00:00.000Z", + "key" : 1600462800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T22:00:00.000Z", + "key" : 1600466400000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-18T23:00:00.000Z", + "key" : 1600470000000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T00:00:00.000Z", + "key" : 1600473600000, + "doc_count" : 222, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T01:00:00.000Z", + "key" : 1600477200000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T02:00:00.000Z", + "key" : 1600480800000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T03:00:00.000Z", + "key" : 1600484400000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T04:00:00.000Z", + "key" : 1600488000000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T05:00:00.000Z", + "key" : 1600491600000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T06:00:00.000Z", + "key" : 1600495200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T07:00:00.000Z", + "key" : 1600498800000, + "doc_count" : 174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T08:00:00.000Z", + "key" : 1600502400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T09:00:00.000Z", + "key" : 1600506000000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T10:00:00.000Z", + "key" : 1600509600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T11:00:00.000Z", + "key" : 1600513200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T12:00:00.000Z", + "key" : 1600516800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T13:00:00.000Z", + "key" : 1600520400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T14:00:00.000Z", + "key" : 1600524000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T15:00:00.000Z", + "key" : 1600527600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T16:00:00.000Z", + "key" : 1600531200000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T17:00:00.000Z", + "key" : 1600534800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T18:00:00.000Z", + "key" : 1600538400000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T19:00:00.000Z", + "key" : 1600542000000, + "doc_count" : 196, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T20:00:00.000Z", + "key" : 1600545600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T21:00:00.000Z", + "key" : 1600549200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T22:00:00.000Z", + "key" : 1600552800000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-19T23:00:00.000Z", + "key" : 1600556400000, + "doc_count" : 172, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T00:00:00.000Z", + "key" : 1600560000000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T01:00:00.000Z", + "key" : 1600563600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T02:00:00.000Z", + "key" : 1600567200000, + "doc_count" : 196, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T03:00:00.000Z", + "key" : 1600570800000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T04:00:00.000Z", + "key" : 1600574400000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T05:00:00.000Z", + "key" : 1600578000000, + "doc_count" : 170, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T06:00:00.000Z", + "key" : 1600581600000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T07:00:00.000Z", + "key" : 1600585200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T08:00:00.000Z", + "key" : 1600588800000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T09:00:00.000Z", + "key" : 1600592400000, + "doc_count" : 215, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T10:00:00.000Z", + "key" : 1600596000000, + "doc_count" : 232, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T11:00:00.000Z", + "key" : 1600599600000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T12:00:00.000Z", + "key" : 1600603200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T13:00:00.000Z", + "key" : 1600606800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T14:00:00.000Z", + "key" : 1600610400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T15:00:00.000Z", + "key" : 1600614000000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T16:00:00.000Z", + "key" : 1600617600000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T17:00:00.000Z", + "key" : 1600621200000, + "doc_count" : 174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T18:00:00.000Z", + "key" : 1600624800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T19:00:00.000Z", + "key" : 1600628400000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T20:00:00.000Z", + "key" : 1600632000000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T21:00:00.000Z", + "key" : 1600635600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T22:00:00.000Z", + "key" : 1600639200000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-20T23:00:00.000Z", + "key" : 1600642800000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T00:00:00.000Z", + "key" : 1600646400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T01:00:00.000Z", + "key" : 1600650000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T02:00:00.000Z", + "key" : 1600653600000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T03:00:00.000Z", + "key" : 1600657200000, + "doc_count" : 232, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T04:00:00.000Z", + "key" : 1600660800000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T05:00:00.000Z", + "key" : 1600664400000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T06:00:00.000Z", + "key" : 1600668000000, + "doc_count" : 198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T07:00:00.000Z", + "key" : 1600671600000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T08:00:00.000Z", + "key" : 1600675200000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T09:00:00.000Z", + "key" : 1600678800000, + "doc_count" : 209, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T10:00:00.000Z", + "key" : 1600682400000, + "doc_count" : 214, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T11:00:00.000Z", + "key" : 1600686000000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T12:00:00.000Z", + "key" : 1600689600000, + "doc_count" : 463, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T13:00:00.000Z", + "key" : 1600693200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T14:00:00.000Z", + "key" : 1600696800000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T15:00:00.000Z", + "key" : 1600700400000, + "doc_count" : 199, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T16:00:00.000Z", + "key" : 1600704000000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T17:00:00.000Z", + "key" : 1600707600000, + "doc_count" : 239, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T18:00:00.000Z", + "key" : 1600711200000, + "doc_count" : 260, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T19:00:00.000Z", + "key" : 1600714800000, + "doc_count" : 576, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T20:00:00.000Z", + "key" : 1600718400000, + "doc_count" : 206, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T21:00:00.000Z", + "key" : 1600722000000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T22:00:00.000Z", + "key" : 1600725600000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-21T23:00:00.000Z", + "key" : 1600729200000, + "doc_count" : 174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T00:00:00.000Z", + "key" : 1600732800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T01:00:00.000Z", + "key" : 1600736400000, + "doc_count" : 170, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T02:00:00.000Z", + "key" : 1600740000000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T03:00:00.000Z", + "key" : 1600743600000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T04:00:00.000Z", + "key" : 1600747200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T05:00:00.000Z", + "key" : 1600750800000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T06:00:00.000Z", + "key" : 1600754400000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T07:00:00.000Z", + "key" : 1600758000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T08:00:00.000Z", + "key" : 1600761600000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T09:00:00.000Z", + "key" : 1600765200000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T10:00:00.000Z", + "key" : 1600768800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T11:00:00.000Z", + "key" : 1600772400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T12:00:00.000Z", + "key" : 1600776000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T13:00:00.000Z", + "key" : 1600779600000, + "doc_count" : 213, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T14:00:00.000Z", + "key" : 1600783200000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T15:00:00.000Z", + "key" : 1600786800000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T16:00:00.000Z", + "key" : 1600790400000, + "doc_count" : 206, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T17:00:00.000Z", + "key" : 1600794000000, + "doc_count" : 244, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T18:00:00.000Z", + "key" : 1600797600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T19:00:00.000Z", + "key" : 1600801200000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T20:00:00.000Z", + "key" : 1600804800000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T21:00:00.000Z", + "key" : 1600808400000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T22:00:00.000Z", + "key" : 1600812000000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-22T23:00:00.000Z", + "key" : 1600815600000, + "doc_count" : 224, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T00:00:00.000Z", + "key" : 1600819200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T01:00:00.000Z", + "key" : 1600822800000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T02:00:00.000Z", + "key" : 1600826400000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T03:00:00.000Z", + "key" : 1600830000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T04:00:00.000Z", + "key" : 1600833600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T05:00:00.000Z", + "key" : 1600837200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T06:00:00.000Z", + "key" : 1600840800000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T07:00:00.000Z", + "key" : 1600844400000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T08:00:00.000Z", + "key" : 1600848000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T09:00:00.000Z", + "key" : 1600851600000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T10:00:00.000Z", + "key" : 1600855200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T11:00:00.000Z", + "key" : 1600858800000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T12:00:00.000Z", + "key" : 1600862400000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T13:00:00.000Z", + "key" : 1600866000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T14:00:00.000Z", + "key" : 1600869600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T15:00:00.000Z", + "key" : 1600873200000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T16:00:00.000Z", + "key" : 1600876800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T17:00:00.000Z", + "key" : 1600880400000, + "doc_count" : 233, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T18:00:00.000Z", + "key" : 1600884000000, + "doc_count" : 243, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T19:00:00.000Z", + "key" : 1600887600000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T20:00:00.000Z", + "key" : 1600891200000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T21:00:00.000Z", + "key" : 1600894800000, + "doc_count" : 203, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T22:00:00.000Z", + "key" : 1600898400000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-23T23:00:00.000Z", + "key" : 1600902000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T00:00:00.000Z", + "key" : 1600905600000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T01:00:00.000Z", + "key" : 1600909200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T02:00:00.000Z", + "key" : 1600912800000, + "doc_count" : 210, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T03:00:00.000Z", + "key" : 1600916400000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T04:00:00.000Z", + "key" : 1600920000000, + "doc_count" : 190, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T05:00:00.000Z", + "key" : 1600923600000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T06:00:00.000Z", + "key" : 1600927200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T07:00:00.000Z", + "key" : 1600930800000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T08:00:00.000Z", + "key" : 1600934400000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T09:00:00.000Z", + "key" : 1600938000000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T10:00:00.000Z", + "key" : 1600941600000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T11:00:00.000Z", + "key" : 1600945200000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T12:00:00.000Z", + "key" : 1600948800000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T13:00:00.000Z", + "key" : 1600952400000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T14:00:00.000Z", + "key" : 1600956000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T15:00:00.000Z", + "key" : 1600959600000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T16:00:00.000Z", + "key" : 1600963200000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T17:00:00.000Z", + "key" : 1600966800000, + "doc_count" : 228, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T18:00:00.000Z", + "key" : 1600970400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T19:00:00.000Z", + "key" : 1600974000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T20:00:00.000Z", + "key" : 1600977600000, + "doc_count" : 216, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T21:00:00.000Z", + "key" : 1600981200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T22:00:00.000Z", + "key" : 1600984800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-24T23:00:00.000Z", + "key" : 1600988400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T00:00:00.000Z", + "key" : 1600992000000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T01:00:00.000Z", + "key" : 1600995600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T02:00:00.000Z", + "key" : 1600999200000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T03:00:00.000Z", + "key" : 1601002800000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T04:00:00.000Z", + "key" : 1601006400000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T05:00:00.000Z", + "key" : 1601010000000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T06:00:00.000Z", + "key" : 1601013600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T07:00:00.000Z", + "key" : 1601017200000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T08:00:00.000Z", + "key" : 1601020800000, + "doc_count" : 250, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T09:00:00.000Z", + "key" : 1601024400000, + "doc_count" : 250, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T10:00:00.000Z", + "key" : 1601028000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T11:00:00.000Z", + "key" : 1601031600000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T12:00:00.000Z", + "key" : 1601035200000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T13:00:00.000Z", + "key" : 1601038800000, + "doc_count" : 208, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T14:00:00.000Z", + "key" : 1601042400000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T15:00:00.000Z", + "key" : 1601046000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T16:00:00.000Z", + "key" : 1601049600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T17:00:00.000Z", + "key" : 1601053200000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T18:00:00.000Z", + "key" : 1601056800000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T19:00:00.000Z", + "key" : 1601060400000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T20:00:00.000Z", + "key" : 1601064000000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T21:00:00.000Z", + "key" : 1601067600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T22:00:00.000Z", + "key" : 1601071200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-25T23:00:00.000Z", + "key" : 1601074800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T00:00:00.000Z", + "key" : 1601078400000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T01:00:00.000Z", + "key" : 1601082000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T02:00:00.000Z", + "key" : 1601085600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T03:00:00.000Z", + "key" : 1601089200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T04:00:00.000Z", + "key" : 1601092800000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T05:00:00.000Z", + "key" : 1601096400000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T06:00:00.000Z", + "key" : 1601100000000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T07:00:00.000Z", + "key" : 1601103600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T08:00:00.000Z", + "key" : 1601107200000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T09:00:00.000Z", + "key" : 1601110800000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T10:00:00.000Z", + "key" : 1601114400000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T11:00:00.000Z", + "key" : 1601118000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T12:00:00.000Z", + "key" : 1601121600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T13:00:00.000Z", + "key" : 1601125200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T14:00:00.000Z", + "key" : 1601128800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T15:00:00.000Z", + "key" : 1601132400000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T16:00:00.000Z", + "key" : 1601136000000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T17:00:00.000Z", + "key" : 1601139600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T18:00:00.000Z", + "key" : 1601143200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T19:00:00.000Z", + "key" : 1601146800000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T20:00:00.000Z", + "key" : 1601150400000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T21:00:00.000Z", + "key" : 1601154000000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T22:00:00.000Z", + "key" : 1601157600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-26T23:00:00.000Z", + "key" : 1601161200000, + "doc_count" : 173, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T00:00:00.000Z", + "key" : 1601164800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T01:00:00.000Z", + "key" : 1601168400000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T02:00:00.000Z", + "key" : 1601172000000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T03:00:00.000Z", + "key" : 1601175600000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T04:00:00.000Z", + "key" : 1601179200000, + "doc_count" : 188, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T05:00:00.000Z", + "key" : 1601182800000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T06:00:00.000Z", + "key" : 1601186400000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T07:00:00.000Z", + "key" : 1601190000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T08:00:00.000Z", + "key" : 1601193600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T09:00:00.000Z", + "key" : 1601197200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T10:00:00.000Z", + "key" : 1601200800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T11:00:00.000Z", + "key" : 1601204400000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T12:00:00.000Z", + "key" : 1601208000000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T13:00:00.000Z", + "key" : 1601211600000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T14:00:00.000Z", + "key" : 1601215200000, + "doc_count" : 192, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T15:00:00.000Z", + "key" : 1601218800000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T16:00:00.000Z", + "key" : 1601222400000, + "doc_count" : 176, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T17:00:00.000Z", + "key" : 1601226000000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T18:00:00.000Z", + "key" : 1601229600000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T19:00:00.000Z", + "key" : 1601233200000, + "doc_count" : 207, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T20:00:00.000Z", + "key" : 1601236800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T21:00:00.000Z", + "key" : 1601240400000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T22:00:00.000Z", + "key" : 1601244000000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-27T23:00:00.000Z", + "key" : 1601247600000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T00:00:00.000Z", + "key" : 1601251200000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T01:00:00.000Z", + "key" : 1601254800000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T02:00:00.000Z", + "key" : 1601258400000, + "doc_count" : 189, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T03:00:00.000Z", + "key" : 1601262000000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T04:00:00.000Z", + "key" : 1601265600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T05:00:00.000Z", + "key" : 1601269200000, + "doc_count" : 178, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T06:00:00.000Z", + "key" : 1601272800000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T07:00:00.000Z", + "key" : 1601276400000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T08:00:00.000Z", + "key" : 1601280000000, + "doc_count" : 244, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T09:00:00.000Z", + "key" : 1601283600000, + "doc_count" : 201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T10:00:00.000Z", + "key" : 1601287200000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T11:00:00.000Z", + "key" : 1601290800000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T12:00:00.000Z", + "key" : 1601294400000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T13:00:00.000Z", + "key" : 1601298000000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T14:00:00.000Z", + "key" : 1601301600000, + "doc_count" : 225, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T15:00:00.000Z", + "key" : 1601305200000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T16:00:00.000Z", + "key" : 1601308800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T17:00:00.000Z", + "key" : 1601312400000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T18:00:00.000Z", + "key" : 1601316000000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T19:00:00.000Z", + "key" : 1601319600000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T20:00:00.000Z", + "key" : 1601323200000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T21:00:00.000Z", + "key" : 1601326800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T22:00:00.000Z", + "key" : 1601330400000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-28T23:00:00.000Z", + "key" : 1601334000000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T00:00:00.000Z", + "key" : 1601337600000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T01:00:00.000Z", + "key" : 1601341200000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T02:00:00.000Z", + "key" : 1601344800000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T03:00:00.000Z", + "key" : 1601348400000, + "doc_count" : 174, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T04:00:00.000Z", + "key" : 1601352000000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T05:00:00.000Z", + "key" : 1601355600000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T06:00:00.000Z", + "key" : 1601359200000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T07:00:00.000Z", + "key" : 1601362800000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T08:00:00.000Z", + "key" : 1601366400000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T09:00:00.000Z", + "key" : 1601370000000, + "doc_count" : 175, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T10:00:00.000Z", + "key" : 1601373600000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T11:00:00.000Z", + "key" : 1601377200000, + "doc_count" : 194, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T12:00:00.000Z", + "key" : 1601380800000, + "doc_count" : 207, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T13:00:00.000Z", + "key" : 1601384400000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T14:00:00.000Z", + "key" : 1601388000000, + "doc_count" : 197, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T15:00:00.000Z", + "key" : 1601391600000, + "doc_count" : 183, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T16:00:00.000Z", + "key" : 1601395200000, + "doc_count" : 200, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T17:00:00.000Z", + "key" : 1601398800000, + "doc_count" : 260, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T18:00:00.000Z", + "key" : 1601402400000, + "doc_count" : 232, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T19:00:00.000Z", + "key" : 1601406000000, + "doc_count" : 191, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T20:00:00.000Z", + "key" : 1601409600000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T21:00:00.000Z", + "key" : 1601413200000, + "doc_count" : 180, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T22:00:00.000Z", + "key" : 1601416800000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-29T23:00:00.000Z", + "key" : 1601420400000, + "doc_count" : 186, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T00:00:00.000Z", + "key" : 1601424000000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T01:00:00.000Z", + "key" : 1601427600000, + "doc_count" : 177, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T02:00:00.000Z", + "key" : 1601431200000, + "doc_count" : 224, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T03:00:00.000Z", + "key" : 1601434800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T04:00:00.000Z", + "key" : 1601438400000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T05:00:00.000Z", + "key" : 1601442000000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T06:00:00.000Z", + "key" : 1601445600000, + "doc_count" : 185, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T07:00:00.000Z", + "key" : 1601449200000, + "doc_count" : 206, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T08:00:00.000Z", + "key" : 1601452800000, + "doc_count" : 481, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T09:00:00.000Z", + "key" : 1601456400000, + "doc_count" : 216, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T10:00:00.000Z", + "key" : 1601460000000, + "doc_count" : 204, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T11:00:00.000Z", + "key" : 1601463600000, + "doc_count" : 193, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T12:00:00.000Z", + "key" : 1601467200000, + "doc_count" : 182, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T13:00:00.000Z", + "key" : 1601470800000, + "doc_count" : 206, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T14:00:00.000Z", + "key" : 1601474400000, + "doc_count" : 227, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T15:00:00.000Z", + "key" : 1601478000000, + "doc_count" : 198, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T16:00:00.000Z", + "key" : 1601481600000, + "doc_count" : 233, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T17:00:00.000Z", + "key" : 1601485200000, + "doc_count" : 201, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T18:00:00.000Z", + "key" : 1601488800000, + "doc_count" : 181, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T19:00:00.000Z", + "key" : 1601492400000, + "doc_count" : 187, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T20:00:00.000Z", + "key" : 1601496000000, + "doc_count" : 195, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T21:00:00.000Z", + "key" : 1601499600000, + "doc_count" : 208, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T22:00:00.000Z", + "key" : 1601503200000, + "doc_count" : 179, + "count" : { + "value" : 10 + } + }, + { + "key_as_string" : "2020-09-30T23:00:00.000Z", + "key" : 1601506800000, + "doc_count" : 184, + "count" : { + "value" : 10 + } + } + ] + }, + "average" : { + "value" : 10 + } + } +} diff --git a/services/api/src/models/new.json b/services/api/src/models/new.json new file mode 100644 index 0000000000..107f48826e --- /dev/null +++ b/services/api/src/models/new.json @@ -0,0 +1,5979 @@ +{ + "took" : 5, + "timed_out" : false, + "_shards" : { + "total" : 1, + "successful" : 1, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 0, + "relation" : "eq" + }, + "max_score" : null, + "hits" : [ ] + }, + "aggregations" : { + "hourly" : { + "buckets" : [ + { + "key_as_string" : "2020-10-01T00:00:00.000Z", + "key" : 1601510400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T01:00:00.000Z", + "key" : 1601514000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T02:00:00.000Z", + "key" : 1601517600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T03:00:00.000Z", + "key" : 1601521200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T04:00:00.000Z", + "key" : 1601524800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T05:00:00.000Z", + "key" : 1601528400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T06:00:00.000Z", + "key" : 1601532000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T07:00:00.000Z", + "key" : 1601535600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T08:00:00.000Z", + "key" : 1601539200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T09:00:00.000Z", + "key" : 1601542800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T10:00:00.000Z", + "key" : 1601546400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T11:00:00.000Z", + "key" : 1601550000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T12:00:00.000Z", + "key" : 1601553600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T13:00:00.000Z", + "key" : 1601557200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T14:00:00.000Z", + "key" : 1601560800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T15:00:00.000Z", + "key" : 1601564400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T16:00:00.000Z", + "key" : 1601568000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T17:00:00.000Z", + "key" : 1601571600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T18:00:00.000Z", + "key" : 1601575200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T19:00:00.000Z", + "key" : 1601578800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T20:00:00.000Z", + "key" : 1601582400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T21:00:00.000Z", + "key" : 1601586000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T22:00:00.000Z", + "key" : 1601589600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-01T23:00:00.000Z", + "key" : 1601593200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T00:00:00.000Z", + "key" : 1601596800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T01:00:00.000Z", + "key" : 1601600400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T02:00:00.000Z", + "key" : 1601604000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T03:00:00.000Z", + "key" : 1601607600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T04:00:00.000Z", + "key" : 1601611200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T05:00:00.000Z", + "key" : 1601614800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T06:00:00.000Z", + "key" : 1601618400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T07:00:00.000Z", + "key" : 1601622000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T08:00:00.000Z", + "key" : 1601625600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T09:00:00.000Z", + "key" : 1601629200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T10:00:00.000Z", + "key" : 1601632800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T11:00:00.000Z", + "key" : 1601636400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T12:00:00.000Z", + "key" : 1601640000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T13:00:00.000Z", + "key" : 1601643600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T14:00:00.000Z", + "key" : 1601647200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T15:00:00.000Z", + "key" : 1601650800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T16:00:00.000Z", + "key" : 1601654400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T17:00:00.000Z", + "key" : 1601658000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T18:00:00.000Z", + "key" : 1601661600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T19:00:00.000Z", + "key" : 1601665200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T20:00:00.000Z", + "key" : 1601668800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T21:00:00.000Z", + "key" : 1601672400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T22:00:00.000Z", + "key" : 1601676000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-02T23:00:00.000Z", + "key" : 1601679600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T00:00:00.000Z", + "key" : 1601683200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T01:00:00.000Z", + "key" : 1601686800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T02:00:00.000Z", + "key" : 1601690400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T03:00:00.000Z", + "key" : 1601694000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T04:00:00.000Z", + "key" : 1601697600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T05:00:00.000Z", + "key" : 1601701200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T06:00:00.000Z", + "key" : 1601704800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T07:00:00.000Z", + "key" : 1601708400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T08:00:00.000Z", + "key" : 1601712000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T09:00:00.000Z", + "key" : 1601715600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T10:00:00.000Z", + "key" : 1601719200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T11:00:00.000Z", + "key" : 1601722800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T12:00:00.000Z", + "key" : 1601726400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T13:00:00.000Z", + "key" : 1601730000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T14:00:00.000Z", + "key" : 1601733600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T15:00:00.000Z", + "key" : 1601737200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T16:00:00.000Z", + "key" : 1601740800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T17:00:00.000Z", + "key" : 1601744400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T18:00:00.000Z", + "key" : 1601748000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T19:00:00.000Z", + "key" : 1601751600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T20:00:00.000Z", + "key" : 1601755200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T21:00:00.000Z", + "key" : 1601758800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T22:00:00.000Z", + "key" : 1601762400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-03T23:00:00.000Z", + "key" : 1601766000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T00:00:00.000Z", + "key" : 1601769600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T01:00:00.000Z", + "key" : 1601773200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T02:00:00.000Z", + "key" : 1601776800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T03:00:00.000Z", + "key" : 1601780400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T04:00:00.000Z", + "key" : 1601784000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T05:00:00.000Z", + "key" : 1601787600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T06:00:00.000Z", + "key" : 1601791200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T07:00:00.000Z", + "key" : 1601794800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T08:00:00.000Z", + "key" : 1601798400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T09:00:00.000Z", + "key" : 1601802000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T10:00:00.000Z", + "key" : 1601805600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T11:00:00.000Z", + "key" : 1601809200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T12:00:00.000Z", + "key" : 1601812800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T13:00:00.000Z", + "key" : 1601816400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T14:00:00.000Z", + "key" : 1601820000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T15:00:00.000Z", + "key" : 1601823600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T16:00:00.000Z", + "key" : 1601827200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T17:00:00.000Z", + "key" : 1601830800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T18:00:00.000Z", + "key" : 1601834400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T19:00:00.000Z", + "key" : 1601838000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T20:00:00.000Z", + "key" : 1601841600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T21:00:00.000Z", + "key" : 1601845200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T22:00:00.000Z", + "key" : 1601848800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-04T23:00:00.000Z", + "key" : 1601852400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T00:00:00.000Z", + "key" : 1601856000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T01:00:00.000Z", + "key" : 1601859600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T02:00:00.000Z", + "key" : 1601863200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T03:00:00.000Z", + "key" : 1601866800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T04:00:00.000Z", + "key" : 1601870400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T05:00:00.000Z", + "key" : 1601874000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T06:00:00.000Z", + "key" : 1601877600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T07:00:00.000Z", + "key" : 1601881200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T08:00:00.000Z", + "key" : 1601884800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T09:00:00.000Z", + "key" : 1601888400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T10:00:00.000Z", + "key" : 1601892000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T11:00:00.000Z", + "key" : 1601895600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T12:00:00.000Z", + "key" : 1601899200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T13:00:00.000Z", + "key" : 1601902800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T14:00:00.000Z", + "key" : 1601906400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T15:00:00.000Z", + "key" : 1601910000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T16:00:00.000Z", + "key" : 1601913600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T17:00:00.000Z", + "key" : 1601917200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T18:00:00.000Z", + "key" : 1601920800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T19:00:00.000Z", + "key" : 1601924400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T20:00:00.000Z", + "key" : 1601928000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T21:00:00.000Z", + "key" : 1601931600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T22:00:00.000Z", + "key" : 1601935200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-05T23:00:00.000Z", + "key" : 1601938800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T00:00:00.000Z", + "key" : 1601942400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T01:00:00.000Z", + "key" : 1601946000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T02:00:00.000Z", + "key" : 1601949600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T03:00:00.000Z", + "key" : 1601953200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T04:00:00.000Z", + "key" : 1601956800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T05:00:00.000Z", + "key" : 1601960400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T06:00:00.000Z", + "key" : 1601964000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T07:00:00.000Z", + "key" : 1601967600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T08:00:00.000Z", + "key" : 1601971200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T09:00:00.000Z", + "key" : 1601974800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T10:00:00.000Z", + "key" : 1601978400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T11:00:00.000Z", + "key" : 1601982000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T12:00:00.000Z", + "key" : 1601985600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T13:00:00.000Z", + "key" : 1601989200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T14:00:00.000Z", + "key" : 1601992800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T15:00:00.000Z", + "key" : 1601996400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T16:00:00.000Z", + "key" : 1602000000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T17:00:00.000Z", + "key" : 1602003600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T18:00:00.000Z", + "key" : 1602007200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T19:00:00.000Z", + "key" : 1602010800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T20:00:00.000Z", + "key" : 1602014400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T21:00:00.000Z", + "key" : 1602018000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T22:00:00.000Z", + "key" : 1602021600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-06T23:00:00.000Z", + "key" : 1602025200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T00:00:00.000Z", + "key" : 1602028800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T01:00:00.000Z", + "key" : 1602032400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T02:00:00.000Z", + "key" : 1602036000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T03:00:00.000Z", + "key" : 1602039600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T04:00:00.000Z", + "key" : 1602043200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T05:00:00.000Z", + "key" : 1602046800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T06:00:00.000Z", + "key" : 1602050400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T07:00:00.000Z", + "key" : 1602054000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T08:00:00.000Z", + "key" : 1602057600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T09:00:00.000Z", + "key" : 1602061200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T10:00:00.000Z", + "key" : 1602064800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T11:00:00.000Z", + "key" : 1602068400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T12:00:00.000Z", + "key" : 1602072000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T13:00:00.000Z", + "key" : 1602075600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T14:00:00.000Z", + "key" : 1602079200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T15:00:00.000Z", + "key" : 1602082800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T16:00:00.000Z", + "key" : 1602086400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T17:00:00.000Z", + "key" : 1602090000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T18:00:00.000Z", + "key" : 1602093600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T19:00:00.000Z", + "key" : 1602097200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T20:00:00.000Z", + "key" : 1602100800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T21:00:00.000Z", + "key" : 1602104400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T22:00:00.000Z", + "key" : 1602108000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-07T23:00:00.000Z", + "key" : 1602111600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T00:00:00.000Z", + "key" : 1602115200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T01:00:00.000Z", + "key" : 1602118800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T02:00:00.000Z", + "key" : 1602122400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T03:00:00.000Z", + "key" : 1602126000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T04:00:00.000Z", + "key" : 1602129600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T05:00:00.000Z", + "key" : 1602133200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T06:00:00.000Z", + "key" : 1602136800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T07:00:00.000Z", + "key" : 1602140400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T08:00:00.000Z", + "key" : 1602144000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T09:00:00.000Z", + "key" : 1602147600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T10:00:00.000Z", + "key" : 1602151200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T11:00:00.000Z", + "key" : 1602154800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T12:00:00.000Z", + "key" : 1602158400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T13:00:00.000Z", + "key" : 1602162000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T14:00:00.000Z", + "key" : 1602165600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T15:00:00.000Z", + "key" : 1602169200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T16:00:00.000Z", + "key" : 1602172800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T17:00:00.000Z", + "key" : 1602176400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T18:00:00.000Z", + "key" : 1602180000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T19:00:00.000Z", + "key" : 1602183600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T20:00:00.000Z", + "key" : 1602187200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T21:00:00.000Z", + "key" : 1602190800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T22:00:00.000Z", + "key" : 1602194400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-08T23:00:00.000Z", + "key" : 1602198000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T00:00:00.000Z", + "key" : 1602201600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T01:00:00.000Z", + "key" : 1602205200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T02:00:00.000Z", + "key" : 1602208800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T03:00:00.000Z", + "key" : 1602212400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T04:00:00.000Z", + "key" : 1602216000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T05:00:00.000Z", + "key" : 1602219600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T06:00:00.000Z", + "key" : 1602223200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T07:00:00.000Z", + "key" : 1602226800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T08:00:00.000Z", + "key" : 1602230400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T09:00:00.000Z", + "key" : 1602234000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T10:00:00.000Z", + "key" : 1602237600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T11:00:00.000Z", + "key" : 1602241200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T12:00:00.000Z", + "key" : 1602244800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T13:00:00.000Z", + "key" : 1602248400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T14:00:00.000Z", + "key" : 1602252000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T15:00:00.000Z", + "key" : 1602255600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T16:00:00.000Z", + "key" : 1602259200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T17:00:00.000Z", + "key" : 1602262800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T18:00:00.000Z", + "key" : 1602266400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T19:00:00.000Z", + "key" : 1602270000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T20:00:00.000Z", + "key" : 1602273600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T21:00:00.000Z", + "key" : 1602277200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T22:00:00.000Z", + "key" : 1602280800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-09T23:00:00.000Z", + "key" : 1602284400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T00:00:00.000Z", + "key" : 1602288000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T01:00:00.000Z", + "key" : 1602291600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T02:00:00.000Z", + "key" : 1602295200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T03:00:00.000Z", + "key" : 1602298800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T04:00:00.000Z", + "key" : 1602302400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T05:00:00.000Z", + "key" : 1602306000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T06:00:00.000Z", + "key" : 1602309600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T07:00:00.000Z", + "key" : 1602313200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T08:00:00.000Z", + "key" : 1602316800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T09:00:00.000Z", + "key" : 1602320400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T10:00:00.000Z", + "key" : 1602324000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T11:00:00.000Z", + "key" : 1602327600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T12:00:00.000Z", + "key" : 1602331200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T13:00:00.000Z", + "key" : 1602334800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T14:00:00.000Z", + "key" : 1602338400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T15:00:00.000Z", + "key" : 1602342000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T16:00:00.000Z", + "key" : 1602345600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T17:00:00.000Z", + "key" : 1602349200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T18:00:00.000Z", + "key" : 1602352800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T19:00:00.000Z", + "key" : 1602356400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T20:00:00.000Z", + "key" : 1602360000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T21:00:00.000Z", + "key" : 1602363600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T22:00:00.000Z", + "key" : 1602367200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-10T23:00:00.000Z", + "key" : 1602370800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T00:00:00.000Z", + "key" : 1602374400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T01:00:00.000Z", + "key" : 1602378000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T02:00:00.000Z", + "key" : 1602381600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T03:00:00.000Z", + "key" : 1602385200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T04:00:00.000Z", + "key" : 1602388800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T05:00:00.000Z", + "key" : 1602392400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T06:00:00.000Z", + "key" : 1602396000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T07:00:00.000Z", + "key" : 1602399600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T08:00:00.000Z", + "key" : 1602403200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T09:00:00.000Z", + "key" : 1602406800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T10:00:00.000Z", + "key" : 1602410400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T11:00:00.000Z", + "key" : 1602414000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T12:00:00.000Z", + "key" : 1602417600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T13:00:00.000Z", + "key" : 1602421200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T14:00:00.000Z", + "key" : 1602424800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T15:00:00.000Z", + "key" : 1602428400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T16:00:00.000Z", + "key" : 1602432000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T17:00:00.000Z", + "key" : 1602435600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T18:00:00.000Z", + "key" : 1602439200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T19:00:00.000Z", + "key" : 1602442800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T20:00:00.000Z", + "key" : 1602446400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T21:00:00.000Z", + "key" : 1602450000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T22:00:00.000Z", + "key" : 1602453600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-11T23:00:00.000Z", + "key" : 1602457200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T00:00:00.000Z", + "key" : 1602460800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T01:00:00.000Z", + "key" : 1602464400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T02:00:00.000Z", + "key" : 1602468000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T03:00:00.000Z", + "key" : 1602471600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T04:00:00.000Z", + "key" : 1602475200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T05:00:00.000Z", + "key" : 1602478800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T06:00:00.000Z", + "key" : 1602482400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T07:00:00.000Z", + "key" : 1602486000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T08:00:00.000Z", + "key" : 1602489600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T09:00:00.000Z", + "key" : 1602493200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T10:00:00.000Z", + "key" : 1602496800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T11:00:00.000Z", + "key" : 1602500400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T12:00:00.000Z", + "key" : 1602504000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T13:00:00.000Z", + "key" : 1602507600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T14:00:00.000Z", + "key" : 1602511200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T15:00:00.000Z", + "key" : 1602514800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T16:00:00.000Z", + "key" : 1602518400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T17:00:00.000Z", + "key" : 1602522000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T18:00:00.000Z", + "key" : 1602525600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T19:00:00.000Z", + "key" : 1602529200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T20:00:00.000Z", + "key" : 1602532800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T21:00:00.000Z", + "key" : 1602536400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T22:00:00.000Z", + "key" : 1602540000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-12T23:00:00.000Z", + "key" : 1602543600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T00:00:00.000Z", + "key" : 1602547200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T01:00:00.000Z", + "key" : 1602550800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T02:00:00.000Z", + "key" : 1602554400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T03:00:00.000Z", + "key" : 1602558000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T04:00:00.000Z", + "key" : 1602561600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T05:00:00.000Z", + "key" : 1602565200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T06:00:00.000Z", + "key" : 1602568800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T07:00:00.000Z", + "key" : 1602572400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T08:00:00.000Z", + "key" : 1602576000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T09:00:00.000Z", + "key" : 1602579600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T10:00:00.000Z", + "key" : 1602583200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T11:00:00.000Z", + "key" : 1602586800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T12:00:00.000Z", + "key" : 1602590400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T13:00:00.000Z", + "key" : 1602594000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T14:00:00.000Z", + "key" : 1602597600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T15:00:00.000Z", + "key" : 1602601200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T16:00:00.000Z", + "key" : 1602604800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T17:00:00.000Z", + "key" : 1602608400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T18:00:00.000Z", + "key" : 1602612000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T19:00:00.000Z", + "key" : 1602615600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T20:00:00.000Z", + "key" : 1602619200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T21:00:00.000Z", + "key" : 1602622800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T22:00:00.000Z", + "key" : 1602626400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-13T23:00:00.000Z", + "key" : 1602630000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T00:00:00.000Z", + "key" : 1602633600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T01:00:00.000Z", + "key" : 1602637200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T02:00:00.000Z", + "key" : 1602640800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T03:00:00.000Z", + "key" : 1602644400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T04:00:00.000Z", + "key" : 1602648000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T05:00:00.000Z", + "key" : 1602651600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T06:00:00.000Z", + "key" : 1602655200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T07:00:00.000Z", + "key" : 1602658800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T08:00:00.000Z", + "key" : 1602662400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T09:00:00.000Z", + "key" : 1602666000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T10:00:00.000Z", + "key" : 1602669600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T11:00:00.000Z", + "key" : 1602673200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T12:00:00.000Z", + "key" : 1602676800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T13:00:00.000Z", + "key" : 1602680400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T14:00:00.000Z", + "key" : 1602684000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T15:00:00.000Z", + "key" : 1602687600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T16:00:00.000Z", + "key" : 1602691200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T17:00:00.000Z", + "key" : 1602694800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T18:00:00.000Z", + "key" : 1602698400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T19:00:00.000Z", + "key" : 1602702000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T20:00:00.000Z", + "key" : 1602705600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T21:00:00.000Z", + "key" : 1602709200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T22:00:00.000Z", + "key" : 1602712800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-14T23:00:00.000Z", + "key" : 1602716400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T00:00:00.000Z", + "key" : 1602720000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T01:00:00.000Z", + "key" : 1602723600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T02:00:00.000Z", + "key" : 1602727200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T03:00:00.000Z", + "key" : 1602730800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T04:00:00.000Z", + "key" : 1602734400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T05:00:00.000Z", + "key" : 1602738000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T06:00:00.000Z", + "key" : 1602741600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T07:00:00.000Z", + "key" : 1602745200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T08:00:00.000Z", + "key" : 1602748800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T09:00:00.000Z", + "key" : 1602752400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T10:00:00.000Z", + "key" : 1602756000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T11:00:00.000Z", + "key" : 1602759600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T12:00:00.000Z", + "key" : 1602763200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T13:00:00.000Z", + "key" : 1602766800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T14:00:00.000Z", + "key" : 1602770400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T15:00:00.000Z", + "key" : 1602774000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T16:00:00.000Z", + "key" : 1602777600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T17:00:00.000Z", + "key" : 1602781200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T18:00:00.000Z", + "key" : 1602784800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T19:00:00.000Z", + "key" : 1602788400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T20:00:00.000Z", + "key" : 1602792000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T21:00:00.000Z", + "key" : 1602795600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T22:00:00.000Z", + "key" : 1602799200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-15T23:00:00.000Z", + "key" : 1602802800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T00:00:00.000Z", + "key" : 1602806400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T01:00:00.000Z", + "key" : 1602810000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T02:00:00.000Z", + "key" : 1602813600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T03:00:00.000Z", + "key" : 1602817200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T04:00:00.000Z", + "key" : 1602820800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T05:00:00.000Z", + "key" : 1602824400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T06:00:00.000Z", + "key" : 1602828000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T07:00:00.000Z", + "key" : 1602831600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T08:00:00.000Z", + "key" : 1602835200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T09:00:00.000Z", + "key" : 1602838800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T10:00:00.000Z", + "key" : 1602842400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T11:00:00.000Z", + "key" : 1602846000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T12:00:00.000Z", + "key" : 1602849600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T13:00:00.000Z", + "key" : 1602853200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T14:00:00.000Z", + "key" : 1602856800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T15:00:00.000Z", + "key" : 1602860400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T16:00:00.000Z", + "key" : 1602864000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T17:00:00.000Z", + "key" : 1602867600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T18:00:00.000Z", + "key" : 1602871200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T19:00:00.000Z", + "key" : 1602874800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T20:00:00.000Z", + "key" : 1602878400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T21:00:00.000Z", + "key" : 1602882000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T22:00:00.000Z", + "key" : 1602885600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-16T23:00:00.000Z", + "key" : 1602889200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T00:00:00.000Z", + "key" : 1602892800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T01:00:00.000Z", + "key" : 1602896400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T02:00:00.000Z", + "key" : 1602900000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T03:00:00.000Z", + "key" : 1602903600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T04:00:00.000Z", + "key" : 1602907200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T05:00:00.000Z", + "key" : 1602910800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T06:00:00.000Z", + "key" : 1602914400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T07:00:00.000Z", + "key" : 1602918000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T08:00:00.000Z", + "key" : 1602921600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T09:00:00.000Z", + "key" : 1602925200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T10:00:00.000Z", + "key" : 1602928800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T11:00:00.000Z", + "key" : 1602932400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T12:00:00.000Z", + "key" : 1602936000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T13:00:00.000Z", + "key" : 1602939600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T14:00:00.000Z", + "key" : 1602943200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T15:00:00.000Z", + "key" : 1602946800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T16:00:00.000Z", + "key" : 1602950400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T17:00:00.000Z", + "key" : 1602954000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T18:00:00.000Z", + "key" : 1602957600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T19:00:00.000Z", + "key" : 1602961200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T20:00:00.000Z", + "key" : 1602964800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T21:00:00.000Z", + "key" : 1602968400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T22:00:00.000Z", + "key" : 1602972000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-17T23:00:00.000Z", + "key" : 1602975600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T00:00:00.000Z", + "key" : 1602979200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T01:00:00.000Z", + "key" : 1602982800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T02:00:00.000Z", + "key" : 1602986400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T03:00:00.000Z", + "key" : 1602990000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T04:00:00.000Z", + "key" : 1602993600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T05:00:00.000Z", + "key" : 1602997200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T06:00:00.000Z", + "key" : 1603000800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T07:00:00.000Z", + "key" : 1603004400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T08:00:00.000Z", + "key" : 1603008000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T09:00:00.000Z", + "key" : 1603011600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T10:00:00.000Z", + "key" : 1603015200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T11:00:00.000Z", + "key" : 1603018800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T12:00:00.000Z", + "key" : 1603022400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T13:00:00.000Z", + "key" : 1603026000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T14:00:00.000Z", + "key" : 1603029600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T15:00:00.000Z", + "key" : 1603033200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T16:00:00.000Z", + "key" : 1603036800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T17:00:00.000Z", + "key" : 1603040400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T18:00:00.000Z", + "key" : 1603044000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T19:00:00.000Z", + "key" : 1603047600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T20:00:00.000Z", + "key" : 1603051200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T21:00:00.000Z", + "key" : 1603054800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T22:00:00.000Z", + "key" : 1603058400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-18T23:00:00.000Z", + "key" : 1603062000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T00:00:00.000Z", + "key" : 1603065600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T01:00:00.000Z", + "key" : 1603069200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T02:00:00.000Z", + "key" : 1603072800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T03:00:00.000Z", + "key" : 1603076400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T04:00:00.000Z", + "key" : 1603080000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T05:00:00.000Z", + "key" : 1603083600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T06:00:00.000Z", + "key" : 1603087200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T07:00:00.000Z", + "key" : 1603090800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T08:00:00.000Z", + "key" : 1603094400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T09:00:00.000Z", + "key" : 1603098000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T10:00:00.000Z", + "key" : 1603101600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T11:00:00.000Z", + "key" : 1603105200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T12:00:00.000Z", + "key" : 1603108800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T13:00:00.000Z", + "key" : 1603112400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T14:00:00.000Z", + "key" : 1603116000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T15:00:00.000Z", + "key" : 1603119600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T16:00:00.000Z", + "key" : 1603123200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T17:00:00.000Z", + "key" : 1603126800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T18:00:00.000Z", + "key" : 1603130400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T19:00:00.000Z", + "key" : 1603134000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T20:00:00.000Z", + "key" : 1603137600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T21:00:00.000Z", + "key" : 1603141200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T22:00:00.000Z", + "key" : 1603144800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-19T23:00:00.000Z", + "key" : 1603148400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T00:00:00.000Z", + "key" : 1603152000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T01:00:00.000Z", + "key" : 1603155600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T02:00:00.000Z", + "key" : 1603159200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T03:00:00.000Z", + "key" : 1603162800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T04:00:00.000Z", + "key" : 1603166400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T05:00:00.000Z", + "key" : 1603170000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T06:00:00.000Z", + "key" : 1603173600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T07:00:00.000Z", + "key" : 1603177200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T08:00:00.000Z", + "key" : 1603180800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T09:00:00.000Z", + "key" : 1603184400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T10:00:00.000Z", + "key" : 1603188000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T11:00:00.000Z", + "key" : 1603191600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T12:00:00.000Z", + "key" : 1603195200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T13:00:00.000Z", + "key" : 1603198800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T14:00:00.000Z", + "key" : 1603202400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T15:00:00.000Z", + "key" : 1603206000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T16:00:00.000Z", + "key" : 1603209600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T17:00:00.000Z", + "key" : 1603213200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T18:00:00.000Z", + "key" : 1603216800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T19:00:00.000Z", + "key" : 1603220400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T20:00:00.000Z", + "key" : 1603224000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T21:00:00.000Z", + "key" : 1603227600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T22:00:00.000Z", + "key" : 1603231200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-20T23:00:00.000Z", + "key" : 1603234800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T00:00:00.000Z", + "key" : 1603238400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T01:00:00.000Z", + "key" : 1603242000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T02:00:00.000Z", + "key" : 1603245600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T03:00:00.000Z", + "key" : 1603249200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T04:00:00.000Z", + "key" : 1603252800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T05:00:00.000Z", + "key" : 1603256400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T06:00:00.000Z", + "key" : 1603260000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T07:00:00.000Z", + "key" : 1603263600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T08:00:00.000Z", + "key" : 1603267200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T09:00:00.000Z", + "key" : 1603270800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T10:00:00.000Z", + "key" : 1603274400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T11:00:00.000Z", + "key" : 1603278000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T12:00:00.000Z", + "key" : 1603281600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T13:00:00.000Z", + "key" : 1603285200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T14:00:00.000Z", + "key" : 1603288800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T15:00:00.000Z", + "key" : 1603292400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T16:00:00.000Z", + "key" : 1603296000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T17:00:00.000Z", + "key" : 1603299600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T18:00:00.000Z", + "key" : 1603303200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T19:00:00.000Z", + "key" : 1603306800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T20:00:00.000Z", + "key" : 1603310400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T21:00:00.000Z", + "key" : 1603314000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T22:00:00.000Z", + "key" : 1603317600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-21T23:00:00.000Z", + "key" : 1603321200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T00:00:00.000Z", + "key" : 1603324800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T01:00:00.000Z", + "key" : 1603328400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T02:00:00.000Z", + "key" : 1603332000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T03:00:00.000Z", + "key" : 1603335600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T04:00:00.000Z", + "key" : 1603339200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T05:00:00.000Z", + "key" : 1603342800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T06:00:00.000Z", + "key" : 1603346400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T07:00:00.000Z", + "key" : 1603350000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T08:00:00.000Z", + "key" : 1603353600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T09:00:00.000Z", + "key" : 1603357200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T10:00:00.000Z", + "key" : 1603360800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T11:00:00.000Z", + "key" : 1603364400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T12:00:00.000Z", + "key" : 1603368000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T13:00:00.000Z", + "key" : 1603371600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T14:00:00.000Z", + "key" : 1603375200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T15:00:00.000Z", + "key" : 1603378800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T16:00:00.000Z", + "key" : 1603382400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T17:00:00.000Z", + "key" : 1603386000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T18:00:00.000Z", + "key" : 1603389600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T19:00:00.000Z", + "key" : 1603393200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T20:00:00.000Z", + "key" : 1603396800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T21:00:00.000Z", + "key" : 1603400400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T22:00:00.000Z", + "key" : 1603404000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-22T23:00:00.000Z", + "key" : 1603407600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T00:00:00.000Z", + "key" : 1603411200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T01:00:00.000Z", + "key" : 1603414800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T02:00:00.000Z", + "key" : 1603418400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T03:00:00.000Z", + "key" : 1603422000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T04:00:00.000Z", + "key" : 1603425600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T05:00:00.000Z", + "key" : 1603429200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T06:00:00.000Z", + "key" : 1603432800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T07:00:00.000Z", + "key" : 1603436400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T08:00:00.000Z", + "key" : 1603440000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T09:00:00.000Z", + "key" : 1603443600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T10:00:00.000Z", + "key" : 1603447200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T11:00:00.000Z", + "key" : 1603450800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T12:00:00.000Z", + "key" : 1603454400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T13:00:00.000Z", + "key" : 1603458000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T14:00:00.000Z", + "key" : 1603461600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T15:00:00.000Z", + "key" : 1603465200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T16:00:00.000Z", + "key" : 1603468800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T17:00:00.000Z", + "key" : 1603472400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T18:00:00.000Z", + "key" : 1603476000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T19:00:00.000Z", + "key" : 1603479600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T20:00:00.000Z", + "key" : 1603483200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T21:00:00.000Z", + "key" : 1603486800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T22:00:00.000Z", + "key" : 1603490400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-23T23:00:00.000Z", + "key" : 1603494000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T00:00:00.000Z", + "key" : 1603497600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T01:00:00.000Z", + "key" : 1603501200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T02:00:00.000Z", + "key" : 1603504800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T03:00:00.000Z", + "key" : 1603508400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T04:00:00.000Z", + "key" : 1603512000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T05:00:00.000Z", + "key" : 1603515600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T06:00:00.000Z", + "key" : 1603519200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T07:00:00.000Z", + "key" : 1603522800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T08:00:00.000Z", + "key" : 1603526400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T09:00:00.000Z", + "key" : 1603530000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T10:00:00.000Z", + "key" : 1603533600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T11:00:00.000Z", + "key" : 1603537200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T12:00:00.000Z", + "key" : 1603540800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T13:00:00.000Z", + "key" : 1603544400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T14:00:00.000Z", + "key" : 1603548000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T15:00:00.000Z", + "key" : 1603551600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T16:00:00.000Z", + "key" : 1603555200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T17:00:00.000Z", + "key" : 1603558800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T18:00:00.000Z", + "key" : 1603562400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T19:00:00.000Z", + "key" : 1603566000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T20:00:00.000Z", + "key" : 1603569600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T21:00:00.000Z", + "key" : 1603573200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T22:00:00.000Z", + "key" : 1603576800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-24T23:00:00.000Z", + "key" : 1603580400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T00:00:00.000Z", + "key" : 1603584000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T01:00:00.000Z", + "key" : 1603587600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T02:00:00.000Z", + "key" : 1603591200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T03:00:00.000Z", + "key" : 1603594800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T04:00:00.000Z", + "key" : 1603598400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T05:00:00.000Z", + "key" : 1603602000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T06:00:00.000Z", + "key" : 1603605600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T07:00:00.000Z", + "key" : 1603609200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T08:00:00.000Z", + "key" : 1603612800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T09:00:00.000Z", + "key" : 1603616400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T10:00:00.000Z", + "key" : 1603620000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T11:00:00.000Z", + "key" : 1603623600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T12:00:00.000Z", + "key" : 1603627200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T13:00:00.000Z", + "key" : 1603630800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T14:00:00.000Z", + "key" : 1603634400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T15:00:00.000Z", + "key" : 1603638000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T16:00:00.000Z", + "key" : 1603641600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T17:00:00.000Z", + "key" : 1603645200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T18:00:00.000Z", + "key" : 1603648800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T19:00:00.000Z", + "key" : 1603652400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T20:00:00.000Z", + "key" : 1603656000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T21:00:00.000Z", + "key" : 1603659600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T22:00:00.000Z", + "key" : 1603663200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-25T23:00:00.000Z", + "key" : 1603666800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T00:00:00.000Z", + "key" : 1603670400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T01:00:00.000Z", + "key" : 1603674000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T02:00:00.000Z", + "key" : 1603677600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T03:00:00.000Z", + "key" : 1603681200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T04:00:00.000Z", + "key" : 1603684800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T05:00:00.000Z", + "key" : 1603688400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T06:00:00.000Z", + "key" : 1603692000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T07:00:00.000Z", + "key" : 1603695600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T08:00:00.000Z", + "key" : 1603699200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T09:00:00.000Z", + "key" : 1603702800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T10:00:00.000Z", + "key" : 1603706400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T11:00:00.000Z", + "key" : 1603710000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T12:00:00.000Z", + "key" : 1603713600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T13:00:00.000Z", + "key" : 1603717200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T14:00:00.000Z", + "key" : 1603720800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T15:00:00.000Z", + "key" : 1603724400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T16:00:00.000Z", + "key" : 1603728000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T17:00:00.000Z", + "key" : 1603731600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T18:00:00.000Z", + "key" : 1603735200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T19:00:00.000Z", + "key" : 1603738800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T20:00:00.000Z", + "key" : 1603742400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T21:00:00.000Z", + "key" : 1603746000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T22:00:00.000Z", + "key" : 1603749600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-26T23:00:00.000Z", + "key" : 1603753200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T00:00:00.000Z", + "key" : 1603756800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T01:00:00.000Z", + "key" : 1603760400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T02:00:00.000Z", + "key" : 1603764000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T03:00:00.000Z", + "key" : 1603767600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T04:00:00.000Z", + "key" : 1603771200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T05:00:00.000Z", + "key" : 1603774800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T06:00:00.000Z", + "key" : 1603778400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T07:00:00.000Z", + "key" : 1603782000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T08:00:00.000Z", + "key" : 1603785600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T09:00:00.000Z", + "key" : 1603789200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T10:00:00.000Z", + "key" : 1603792800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T11:00:00.000Z", + "key" : 1603796400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T12:00:00.000Z", + "key" : 1603800000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T13:00:00.000Z", + "key" : 1603803600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T14:00:00.000Z", + "key" : 1603807200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T15:00:00.000Z", + "key" : 1603810800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T16:00:00.000Z", + "key" : 1603814400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T17:00:00.000Z", + "key" : 1603818000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T18:00:00.000Z", + "key" : 1603821600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T19:00:00.000Z", + "key" : 1603825200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T20:00:00.000Z", + "key" : 1603828800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T21:00:00.000Z", + "key" : 1603832400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T22:00:00.000Z", + "key" : 1603836000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-27T23:00:00.000Z", + "key" : 1603839600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T00:00:00.000Z", + "key" : 1603843200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T01:00:00.000Z", + "key" : 1603846800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T02:00:00.000Z", + "key" : 1603850400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T03:00:00.000Z", + "key" : 1603854000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T04:00:00.000Z", + "key" : 1603857600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T05:00:00.000Z", + "key" : 1603861200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T06:00:00.000Z", + "key" : 1603864800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T07:00:00.000Z", + "key" : 1603868400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T08:00:00.000Z", + "key" : 1603872000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T09:00:00.000Z", + "key" : 1603875600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T10:00:00.000Z", + "key" : 1603879200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T11:00:00.000Z", + "key" : 1603882800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T12:00:00.000Z", + "key" : 1603886400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T13:00:00.000Z", + "key" : 1603890000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T14:00:00.000Z", + "key" : 1603893600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T15:00:00.000Z", + "key" : 1603897200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T16:00:00.000Z", + "key" : 1603900800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T17:00:00.000Z", + "key" : 1603904400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T18:00:00.000Z", + "key" : 1603908000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T19:00:00.000Z", + "key" : 1603911600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T20:00:00.000Z", + "key" : 1603915200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T21:00:00.000Z", + "key" : 1603918800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T22:00:00.000Z", + "key" : 1603922400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-28T23:00:00.000Z", + "key" : 1603926000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T00:00:00.000Z", + "key" : 1603929600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T01:00:00.000Z", + "key" : 1603933200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T02:00:00.000Z", + "key" : 1603936800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T03:00:00.000Z", + "key" : 1603940400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T04:00:00.000Z", + "key" : 1603944000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T05:00:00.000Z", + "key" : 1603947600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T06:00:00.000Z", + "key" : 1603951200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T07:00:00.000Z", + "key" : 1603954800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T08:00:00.000Z", + "key" : 1603958400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T09:00:00.000Z", + "key" : 1603962000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T10:00:00.000Z", + "key" : 1603965600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T11:00:00.000Z", + "key" : 1603969200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T12:00:00.000Z", + "key" : 1603972800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T13:00:00.000Z", + "key" : 1603976400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T14:00:00.000Z", + "key" : 1603980000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T15:00:00.000Z", + "key" : 1603983600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T16:00:00.000Z", + "key" : 1603987200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T17:00:00.000Z", + "key" : 1603990800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T18:00:00.000Z", + "key" : 1603994400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T19:00:00.000Z", + "key" : 1603998000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T20:00:00.000Z", + "key" : 1604001600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T21:00:00.000Z", + "key" : 1604005200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T22:00:00.000Z", + "key" : 1604008800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-29T23:00:00.000Z", + "key" : 1604012400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T00:00:00.000Z", + "key" : 1604016000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T01:00:00.000Z", + "key" : 1604019600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T02:00:00.000Z", + "key" : 1604023200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T03:00:00.000Z", + "key" : 1604026800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T04:00:00.000Z", + "key" : 1604030400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T05:00:00.000Z", + "key" : 1604034000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T06:00:00.000Z", + "key" : 1604037600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T07:00:00.000Z", + "key" : 1604041200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T08:00:00.000Z", + "key" : 1604044800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T09:00:00.000Z", + "key" : 1604048400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T10:00:00.000Z", + "key" : 1604052000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T11:00:00.000Z", + "key" : 1604055600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T12:00:00.000Z", + "key" : 1604059200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T13:00:00.000Z", + "key" : 1604062800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T14:00:00.000Z", + "key" : 1604066400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T15:00:00.000Z", + "key" : 1604070000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T16:00:00.000Z", + "key" : 1604073600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T17:00:00.000Z", + "key" : 1604077200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T18:00:00.000Z", + "key" : 1604080800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T19:00:00.000Z", + "key" : 1604084400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T20:00:00.000Z", + "key" : 1604088000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T21:00:00.000Z", + "key" : 1604091600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T22:00:00.000Z", + "key" : 1604095200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-30T23:00:00.000Z", + "key" : 1604098800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T00:00:00.000Z", + "key" : 1604102400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T01:00:00.000Z", + "key" : 1604106000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T02:00:00.000Z", + "key" : 1604109600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T03:00:00.000Z", + "key" : 1604113200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T04:00:00.000Z", + "key" : 1604116800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T05:00:00.000Z", + "key" : 1604120400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T06:00:00.000Z", + "key" : 1604124000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T07:00:00.000Z", + "key" : 1604127600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T08:00:00.000Z", + "key" : 1604131200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T09:00:00.000Z", + "key" : 1604134800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T10:00:00.000Z", + "key" : 1604138400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T11:00:00.000Z", + "key" : 1604142000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T12:00:00.000Z", + "key" : 1604145600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T13:00:00.000Z", + "key" : 1604149200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T14:00:00.000Z", + "key" : 1604152800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T15:00:00.000Z", + "key" : 1604156400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T16:00:00.000Z", + "key" : 1604160000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T17:00:00.000Z", + "key" : 1604163600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T18:00:00.000Z", + "key" : 1604167200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T19:00:00.000Z", + "key" : 1604170800000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T20:00:00.000Z", + "key" : 1604174400000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T21:00:00.000Z", + "key" : 1604178000000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T22:00:00.000Z", + "key" : 1604181600000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + }, + { + "key_as_string" : "2020-10-31T23:00:00.000Z", + "key" : 1604185200000, + "doc_count" : 0, + "count" : { + "value" : 0 + } + } + ] + }, + "average" : { + "value" : null + } + } +} diff --git a/services/api/src/resolvers.js b/services/api/src/resolvers.js index c00cdcbeac..850ddc766f 100644 --- a/services/api/src/resolvers.js +++ b/services/api/src/resolvers.js @@ -75,6 +75,7 @@ const { getEnvironmentByName, getEnvironmentById, getEnvironmentByOpenshiftProjectName, + getEnvironmentByKubernetesNamespaceName, getEnvironmentHoursMonthByEnvironmentId, getEnvironmentStorageByEnvironmentId, getEnvironmentStorageMonthByEnvironmentId, @@ -221,6 +222,7 @@ const resolvers = { Project: { notifications: getNotificationsByProjectId, openshift: getOpenshiftByProjectId, + kubernetes: getOpenshiftByProjectId, environments: getEnvironmentsByProjectId, envVariables: getEnvVarsByProjectId, groups: getGroupsByProjectId, @@ -299,12 +301,14 @@ const resolvers = { environmentByName: getEnvironmentByName, environmentById: getEnvironmentById, environmentByOpenshiftProjectName: getEnvironmentByOpenshiftProjectName, + environmentByKubernetesNamespaceName: getEnvironmentByKubernetesNamespaceName, userCanSshToEnvironment, deploymentByRemoteId: getDeploymentByRemoteId, taskByRemoteId: getTaskByRemoteId, taskById: getTaskById, allProjects: getAllProjects, allOpenshifts: getAllOpenshifts, + allKubernetes: getAllOpenshifts, allEnvironments: getAllEnvironments, allProblems: getAllProblems, allGroups: getAllGroups, @@ -353,6 +357,10 @@ const resolvers = { updateOpenshift, deleteOpenshift, deleteAllOpenshifts, + addKubernetes: addOpenshift, + updateKubernetes: updateOpenshift, + deleteKubernetes: deleteOpenshift, + deleteAllKubernetes: deleteAllOpenshifts, addProject, updateProject, deleteProject, diff --git a/services/api/src/resources/billing/billingCalculations.test.ts b/services/api/src/resources/billing/billingCalculations.test.ts index 22c8f0e622..c2896f7e5a 100644 --- a/services/api/src/resources/billing/billingCalculations.test.ts +++ b/services/api/src/resources/billing/billingCalculations.test.ts @@ -702,16 +702,10 @@ const monthNames = [ 'December', ]; -const hitsCostTestString = (group: ITestBillingGroup) => +const hitsCostTestString = (group: ITestBillingGroup, cost) => `Given ${group.projects.length} project(s) with ${ group.projects[0].availability - } availability and hits [${group.projects - .map(project => project.hits) - .join()}], during ${ - monthNames[group.projects[0].month - 1] - } the cost should be ${group.expectations.hits} #hits #${group.currency} #${ - group.name - }: `; + } availability and hits [${group.projects.map(project => project.hits).join()}], during ${monthNames[group.projects[0].month - 1]} the cost should be ${group.expectations.hits} | calculated: ${cost} #hits #${group.currency} #${group.name}:`; const storageCostTestString = (group: ITestBillingGroup) => `Given the total storage of ${ @@ -776,9 +770,9 @@ describe('Billing Calculations #only-billing-calculations', () => { describe('Hit Costs - Customers billed in US Dollars (USD) #Hits #USD', () => { // scenarios and expectation mockData.billingGroups.filter(currencyFilter(CURRENCIES.USD)).map(group => { - it(hitsCostTestString(group), () => { - // Act - const { cost } = hitsCost(group); + // Act + const { cost } = hitsCost(group); + it(hitsCostTestString(group, cost), () => { // Assert expect(cost).toBe(group.expectations.hits); }); @@ -788,9 +782,9 @@ describe('Billing Calculations #only-billing-calculations', () => { describe('Hit Costs - POLY #Hits #POLY', () => { // scenarios and expectation mockData.billingGroups.filter(availabilityFilter(AVAILABILITY.POLYSITE)).map(group => { - it(hitsCostTestString(group), () => { - // Act - const { cost } = hitsCost(group); + // Act + const { cost } = hitsCost(group); + it(hitsCostTestString(group, cost), () => { // Assert expect(cost).toBe(group.expectations.hits); }); @@ -800,9 +794,9 @@ describe('Billing Calculations #only-billing-calculations', () => { describe('Hit Costs - Customers billed in Pounds (GBP) #Hits #GBP', () => { // scenarios and expectation mockData.billingGroups.filter(currencyFilter(CURRENCIES.GBP)).map(group => { - it(hitsCostTestString(group), () => { - // Act - const { cost } = hitsCost(group); + // Act + const { cost } = hitsCost(group); + it(hitsCostTestString(group, cost), () => { // Assert expect(cost).toBe(group.expectations.hits); }); diff --git a/services/api/src/resources/billing/helpers.ts b/services/api/src/resources/billing/helpers.ts index dae6034cc7..2561895957 100644 --- a/services/api/src/resources/billing/helpers.ts +++ b/services/api/src/resources/billing/helpers.ts @@ -29,8 +29,8 @@ export const projectWithBillingDataFn = ( yearMonth: string, environmentModel: ReturnType ) => async project => { - const { id } = project; - const envs = await environmentModel.projectEnvironmentsWithData(id, yearMonth); + const { id, name } = project; + const envs = await environmentModel.projectEnvironmentsWithData(id, name, yearMonth); const projectData = calculateProjectEnvironmentsTotalsToBill(envs); return { ...project, ...projectData, environments: envs }; }; diff --git a/services/api/src/resources/deployment/resolvers.ts b/services/api/src/resources/deployment/resolvers.ts index 8f99d0dc76..f13b5d461f 100644 --- a/services/api/src/resources/deployment/resolvers.ts +++ b/services/api/src/resources/deployment/resolvers.ts @@ -583,9 +583,10 @@ export const deployEnvironmentBranch: ResolverFn = async ( meta, `*[${deployData.projectName}]* Error deploying \`${ deployData.branchName - }\`: ${error.message}`, + }\`: ${error}`, ); - return `Error: ${error.message}`; + console.log(error); + return `Error: ${error}`; } } }; diff --git a/services/api/src/resources/environment/helpers.ts b/services/api/src/resources/environment/helpers.ts index 998f3d1b43..6f76b44172 100644 --- a/services/api/src/resources/environment/helpers.ts +++ b/services/api/src/resources/environment/helpers.ts @@ -6,15 +6,26 @@ import { Sql } from './sql'; import { Helpers as projectHelpers } from '../project/helpers'; export const Helpers = (sqlClient: MariaClient) => { + const aliasOpenshiftToK8s = (environments: any[]) => { + return environments.map(environment => { + return { + ...environment, + kubernetesNamespaceName: environment.openshiftProjectName, + } + }); + }; + const getEnvironmentById = async (environmentID: number) => { const rows = await query( sqlClient, Sql.selectEnvironmentById(environmentID), ); - return R.prop(0, rows); + const withK8s = aliasOpenshiftToK8s(rows); + return R.prop(0, withK8s); }; return { + aliasOpenshiftToK8s, getEnvironmentById, getEnvironmentsByEnvironmentInput: async environmentInput => { const notEmpty = R.complement(R.anyPass([R.isNil, R.isEmpty])); diff --git a/services/api/src/resources/environment/resolvers.ts b/services/api/src/resources/environment/resolvers.ts index 113b110dce..0a9fcdb5a5 100644 --- a/services/api/src/resources/environment/resolvers.ts +++ b/services/api/src/resources/environment/resolvers.ts @@ -3,6 +3,7 @@ import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; import { createRemoveTask } from '@lagoon/commons/dist/tasks'; import { ResolverFn } from '../'; import { isPatchEmpty, prepare, query, whereAnd } from '../../util/db'; +import convertDateToMYSQLDateTimeFormat from '../../util/convertDateToMYSQLDateTimeFormat' import { Helpers } from './helpers'; import { Sql } from './sql'; import { Sql as projectSql } from '../project/sql'; @@ -36,7 +37,8 @@ export const getEnvironmentByName: ResolverFn = async ( const prep = prepare(sqlClient, str); const rows = await query(sqlClient, prep(args)); - const environment = rows[0]; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + const environment = withK8s[0]; if (!environment) { return null; @@ -64,8 +66,7 @@ export const getEnvironmentById = async ( project: environment.project, }); - const rows = await query(sqlClient, Sql.selectEnvironmentById(args.id)); - return rows[0]; + return environment; }; export const getEnvironmentsByProjectId: ResolverFn = async ( @@ -101,8 +102,9 @@ export const getEnvironmentsByProjectId: ResolverFn = async ( ); const rows = await query(sqlClient, prep({ pid, type: args.type })); + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); - return rows; + return withK8s; }; export const getEnvironmentByDeploymentId: ResolverFn = async ( @@ -123,8 +125,8 @@ export const getEnvironmentByDeploymentId: ResolverFn = async ( ); const rows = await query(sqlClient, prep({ deployment_id })); - - const environment = rows[0]; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + const environment = withK8s[0]; if (!environment) { return null; @@ -155,8 +157,8 @@ export const getEnvironmentByTaskId: ResolverFn = async ( ); const rows = await query(sqlClient, prep({ task_id })); - - const environment = rows[0]; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + const environment = withK8s[0]; if (!environment) { return null; @@ -187,8 +189,8 @@ export const getEnvironmentByBackupId: ResolverFn = async ( ); const rows = await query(sqlClient, prep({ backup_id })); - - const environment = rows[0]; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + const environment = withK8s[0]; if (!environment) { return null; @@ -243,13 +245,14 @@ export const getEnvironmentHoursMonthByEnvironmentId: ResolverFn = async ( }; export const getEnvironmentHitsMonthByEnvironmentId: ResolverFn = async ( - { openshiftProjectName }, + { id, openshiftProjectName }, args, - { models, hasPermission }, + { sqlClient, models, hasPermission }, ) => { await hasPermission('environment', 'storage'); - return models.EnvironmentModel.environmentHitsMonthByEnvironmentId(openshiftProjectName, args.month); + const { name: projectName } = await projectHelpers(sqlClient).getProjectByEnvironmentId(id); + return models.EnvironmentModel.environmentHitsMonthByEnvironmentId(projectName, openshiftProjectName, args.month); }; export const getEnvironmentServicesByEnvironmentId: ResolverFn = async ( @@ -285,8 +288,8 @@ export const getEnvironmentByOpenshiftProjectName: ResolverFn = async ( const prep = prepare(sqlClient, str); const rows = await query(sqlClient, prep(args)); - - const environment = rows[0]; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + const environment = withK8s[0]; if (!environment) { return null; @@ -299,6 +302,15 @@ export const getEnvironmentByOpenshiftProjectName: ResolverFn = async ( return environment; }; +export const getEnvironmentByKubernetesNamespaceName: ResolverFn = async ( + root, + args, + ctx, +) => getEnvironmentByOpenshiftProjectName(root, { + ...args, + openshiftProjectName: args.kubernetesNamespaceName +}, ctx); + export const addOrUpdateEnvironment: ResolverFn = async ( root, { input: unformattedInput }, @@ -313,6 +325,10 @@ export const addOrUpdateEnvironment: ResolverFn = async ( )(unformattedInput); const pid = input.project.toString(); + const openshiftProjectName = input.kubernetesNamespaceName || input.openshiftProjectName; + if (!openshiftProjectName) { + throw new Error('Must provide kubernetesNamespaceName or openshiftProjectName'); + } await hasPermission('environment', `addOrUpdate:${input.environmentType}`, { project: pid, @@ -335,26 +351,36 @@ export const addOrUpdateEnvironment: ResolverFn = async ( `, ); - const rows = await query(sqlClient, prep(input)); - const environment = R.path([0, 0], rows); + const rows = await query(sqlClient, prep({ + ...input, + openshiftProjectName, + })); + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s([R.path([0, 0], rows)]); + const environment = withK8s[0]; return environment; }; export const addOrUpdateEnvironmentStorage: ResolverFn = async ( root, - { input }, + { input: unformattedInput }, { sqlClient, hasPermission }, ) => { await hasPermission('environment', 'storage'); + const input = { + ...unformattedInput, + updated: unformattedInput.updated ? unformattedInput.updated: convertDateToMYSQLDateTimeFormat(new Date().toISOString()) + }; + const prep = prepare( sqlClient, ` CALL CreateOrUpdateEnvironmentStorage( :environment, :persistent_storage_claim, - :bytes_used + :bytes_used, + :updated ); `, ); @@ -499,6 +525,7 @@ export const updateEnvironment: ResolverFn = async ( const id = input.id; const curEnv = await Helpers(sqlClient).getEnvironmentById(id); + const openshiftProjectName = input.patch.kubernetesNamespaceName || input.patch.openshiftProjectName; await hasPermission('environment', `update:${curEnv.environmentType}`, { project: curEnv.project, @@ -515,11 +542,27 @@ export const updateEnvironment: ResolverFn = async ( project: newProject, }); - await query(sqlClient, Sql.updateEnvironment(input)); + await query(sqlClient, Sql.updateEnvironment({ + id, + patch: { + project: input.patch.project, + deployType: input.patch.deployType, + deployBaseRef: input.patch.deployBaseRef, + deployHeadRef: input.patch.deployHeadRef, + deployTitle: input.patch.deployTitle, + environmentType: input.patch.environmentType, + openshiftProjectName, + route: input.patch.route, + routes: input.patch.routes, + monitoringUrls: input.patch.monitoringUrls, + autoIdle: input.patch.autoIdle, + } + })); const rows = await query(sqlClient, Sql.selectEnvironmentById(id)); + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); - return R.prop(0, rows); + return R.prop(0, withK8s); }; export const getAllEnvironments: ResolverFn = async ( @@ -543,8 +586,8 @@ export const getAllEnvironments: ResolverFn = async ( const prep = prepare(sqlClient, `SELECT * FROM environment ${where}${order}`); const rows = await query(sqlClient, prep(args)); - - return rows; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + return withK8s; }; export const deleteAllEnvironments: ResolverFn = async ( @@ -586,6 +629,7 @@ export const userCanSshToEnvironment: ResolverFn = async ( args, { sqlClient, hasPermission }, ) => { + const openshiftProjectName = args.kubernetesNamespaceName || args.openshiftProjectName; const str = ` SELECT e.* @@ -597,9 +641,9 @@ export const userCanSshToEnvironment: ResolverFn = async ( const prep = prepare(sqlClient, str); - const rows = await query(sqlClient, prep(args)); - - const environment = rows[0]; + const rows = await query(sqlClient, prep({ openshiftProjectName })); + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + const environment = withK8s[0]; if (!environment) { return null; diff --git a/services/api/src/resources/environment/sql.ts b/services/api/src/resources/environment/sql.ts index 8c524cf853..444dd28d21 100644 --- a/services/api/src/resources/environment/sql.ts +++ b/services/api/src/resources/environment/sql.ts @@ -1,11 +1,17 @@ const { knex } = require('../../util/db'); export const Sql = { - updateEnvironment: ({ id, patch }: { id: number, patch: { [key: string]: any } }) => - knex('environment') - .where('id', '=', id) - .update(patch) - .toString(), + updateEnvironment: ({ id, patch }: { id: number, patch: { [key: string]: any } }) => { + const updatePatch = { + ...patch, + updated: knex.fn.now(), + }; + + return knex('environment') + .where('id', '=', id) + .update(updatePatch) + .toString(); + }, selectEnvironmentById: (id: number) => knex('environment') .where('id', '=', id) diff --git a/services/api/src/resources/problem/resolvers.ts b/services/api/src/resources/problem/resolvers.ts index b7aa959af3..c448c01db7 100644 --- a/services/api/src/resources/problem/resolvers.ts +++ b/services/api/src/resources/problem/resolvers.ts @@ -199,7 +199,7 @@ export const addProblemHarborScanMatch = async ( description, defaultLagoonProject, defaultLagoonEnvironment, - defaultLagoonServiceName, + defaultLagoonService, regex }, }, @@ -219,7 +219,7 @@ export const addProblemHarborScanMatch = async ( description, default_lagoon_project: defaultLagoonProject, default_lagoon_environment: defaultLagoonEnvironment, - default_lagoon_service_name: defaultLagoonServiceName, + default_lagoon_service_name: defaultLagoonService, regex } ), diff --git a/services/api/src/resources/problem/sql.ts b/services/api/src/resources/problem/sql.ts index 65e1a79081..8a50e1b59f 100644 --- a/services/api/src/resources/problem/sql.ts +++ b/services/api/src/resources/problem/sql.ts @@ -24,7 +24,7 @@ const standardProblemHarborScanMatchReturn = { description: 'description', default_lagoon_project: 'defaultLagoonProject', default_lagoon_environment: 'defaultLagoonEnvironment', - default_lagoon_service_name: 'defaultLagoonServiceName', + default_lagoon_service: 'defaultLagoonServiceName', regex: 'regex' }; @@ -38,7 +38,7 @@ export const Sql = { let q = knex('environment_problem as p') .join('environment as e', {environment: 'e.id'}, '=', {environment: 'p.environment'}) .where('p.deleted', '=', '0000-00-00 00:00:00') - .select('p.*', {environment: 'e.id'}, { name: 'e.name', project: 'e.project', + .select('p.*', {service: 'p.lagoon_service'}, {environment: 'e.id'}, { name: 'e.name', project: 'e.project', environmentType: 'e.environment_type', openshiftProjectName: 'e.openshift_project_name'}); if (environmentType.length > 0) { diff --git a/services/api/src/resources/project/harborSetup.ts b/services/api/src/resources/project/harborSetup.ts index bb00050412..5b783741c8 100644 --- a/services/api/src/resources/project/harborSetup.ts +++ b/services/api/src/resources/project/harborSetup.ts @@ -6,7 +6,7 @@ import { Sql as PSql } from './sql'; import { Sql } from '../env-variables/sql'; import { isPatchEmpty, prepare, query, whereAnd } from '../../util/db'; -const defaultHarborUrl = R.propOr('http://172.17.0.1:8084', 'HARBOR_URL', process.env); +const defaultHarborUrl = R.propOr('http://harbor-harbor-core.harbor.svc.cluster.local:80', 'HARBOR_URL', process.env); const lagoonHarborRoute = R.compose( R.defaultTo(defaultHarborUrl), @@ -45,7 +45,7 @@ async function createHarborProject(sqlClient: MariaClient, harborClient, lagoonP } catch (err) { if (err.statusCode == 409) { // 409 means project already exists - logger.info(`Unable to create the harbor project "${lagoonProjectName}", as it already exists in harbor, continuing with existing project`) + logger.info(`Unable to create the harbor project "${lagoonProjectName}", as it already exists in harbor; continuing with existing project`) } else { logger.error(`Unable to create the harbor project "${lagoonProjectName}", error: ${err}`) return "" @@ -54,8 +54,30 @@ async function createHarborProject(sqlClient: MariaClient, harborClient, lagoonP // Get new harbor project's id try { - const res = await harborClient.get(`projects?name=${lagoonProjectName}`) - var harborProjectID = res.body[0].project_id + // Grab paginated project list results + const pageSize = 100 + let results = [] + let res = await harborClient.get(`projects?name=${lagoonProjectName}&page_size=${pageSize}`) + + if (parseInt(res.headers['x-total-count']) > pageSize) { + let i = 1 + while (res.body != null) { + results = results.concat(res.body) + i++ + res = await harborClient.get(`projects?name=${lagoonProjectName}&page_size=${pageSize}&page=${i}`) + } + } else { + results = res.body + } + + // Search array of objects for correct project + for (let proj of results) { + if (proj.name == lagoonProjectName) { + var harborProjectID = proj.project_id + break + } + } + logger.debug(`Harbor project id for ${lagoonProjectName} is: ${harborProjectID}`) } catch (err) { if (err.statusCode == 404) { diff --git a/services/api/src/resources/project/helpers.ts b/services/api/src/resources/project/helpers.ts index 985f7eb128..95f6e50745 100644 --- a/services/api/src/resources/project/helpers.ts +++ b/services/api/src/resources/project/helpers.ts @@ -5,9 +5,20 @@ const { query } = require('../../util/db'); const { Sql } = require('./sql'); export const Helpers = (sqlClient: MariaClient) => { + const aliasOpenshiftToK8s = (projects: any[]) => { + return projects.map(project => { + return { + ...project, + kubernetes: project.openshift, + kubernetesNamespacePattern: project.openshiftProjectPattern, + } + }); + }; + const getProjectById = async (id: number) => { const rows = await query(sqlClient, Sql.selectProject(id)); - return R.prop(0, rows); + const withK8s = aliasOpenshiftToK8s(rows); + return R.prop(0, withK8s); }; const getProjectByName = async (name: string) => { @@ -24,6 +35,7 @@ export const Helpers = (sqlClient: MariaClient) => { query(sqlClient, Sql.selectProjectsByIds(projectIds)); return { + aliasOpenshiftToK8s, getProjectById, getProjectsByIds, getProjectByEnvironmentId, diff --git a/services/api/src/resources/project/resolvers.ts b/services/api/src/resources/project/resolvers.ts index a9b145ba4a..ca16101459 100644 --- a/services/api/src/resources/project/resolvers.ts +++ b/services/api/src/resources/project/resolvers.ts @@ -62,6 +62,7 @@ export const getAllProjects: ResolverFn = async ( const prep = prepare(sqlClient, `SELECT * FROM project ${where}${order}`); const rows = await query(sqlClient, prep(args)); + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); // This resolver is used for the main UI page and is quite slow. Since we've // already authorized the user has access to all the projects we are @@ -71,7 +72,7 @@ export const getAllProjects: ResolverFn = async ( // // @TODO: When this performance issue is fixed for real, remove this hack as // it hardcodes a "everyone can view environments" authz rule. - return rows.map(row => ({ ...row, environmentAuthz: true })); + return withK8s.map(row => ({ ...row, environmentAuthz: true })); }; export const getProjectByEnvironmentId: ResolverFn = async ( @@ -94,8 +95,9 @@ export const getProjectByEnvironmentId: ResolverFn = async ( ); const rows = await query(sqlClient, prep({ eid })); + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); - const project = rows[0]; + const project = withK8s[0]; await hasPermission('project', 'view', { project: project.id, @@ -130,8 +132,9 @@ export const getProjectByGitUrl: ResolverFn = async ( const prep = prepare(sqlClient, str); const rows = await query(sqlClient, prep(args)); + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); - const project = rows[0]; + const project = withK8s[0]; await hasPermission('project', 'view', { project: project.id, @@ -166,7 +169,8 @@ export const getProjectByName: ResolverFn = async ( const prep = prepare(sqlClient, str); const rows = await query(sqlClient, prep(args)); - const project = rows[0]; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s(rows); + const project = withK8s[0]; if (!project) { return null; @@ -248,7 +252,7 @@ export const getProjectsByMetadata: ResolverFn = async ( const prep = prepare(sqlClient, `SELECT * FROM project ${where}`); const rows = await query(sqlClient, prep(queryArgs)); - return rows; + return Helpers(sqlClient).aliasOpenshiftToK8s(rows); }; export const addProject = async ( @@ -271,6 +275,10 @@ export const addProject = async ( if (!isValidGitUrl(input.gitUrl)) { throw new Error('The provided gitUrl is invalid.',); } + const openshift = input.kubernetes || input.openshift; + if (!openshift) { + throw new Error('Must provide keycloak or openshift field'); + } let keyPair: any = {}; try { @@ -291,6 +299,8 @@ export const addProject = async ( throw new Error(`There was an error with the privateKey: ${err.message}`); } + const openshiftProjectPattern = input.kubernetesNamespacePattern || input.openshiftProjectPattern; + const prep = prepare( sqlClient, `CALL CreateProject( @@ -302,32 +312,32 @@ export const addProject = async ( ${input.subfolder ? ':subfolder' : 'NULL'}, :openshift, ${ - input.openshiftProjectPattern ? ':openshift_project_pattern' : 'NULL' + openshiftProjectPattern ? ':openshift_project_pattern' : 'NULL' }, ${ input.activeSystemsDeploy ? ':active_systems_deploy' - : '"lagoon_openshiftBuildDeploy"' + : '"lagoon_controllerBuildDeploy"' }, ${ input.activeSystemsPromote ? ':active_systems_promote' - : '"lagoon_openshiftBuildDeploy"' + : '"lagoon_controllerBuildDeploy"' }, ${ input.activeSystemsRemove ? ':active_systems_remove' - : '"lagoon_openshiftRemove"' + : '"lagoon_controllerRemove"' }, ${ input.activeSystemsTask ? ':active_systems_task' - : '"lagoon_openshiftJob"' + : '"lagoon_controllerJob"' }, ${ input.activeSystemsMisc ? ':active_systems_misc' - : '"lagoon_openshiftMisc"' + : '"lagoon_controllerMisc"' }, ${input.branches ? ':branches' : '"true"'}, ${input.pullrequests ? ':pullrequests' : '"true"'}, @@ -339,7 +349,7 @@ export const addProject = async ( ${input.standbyAlias ? ':standby_alias' : '"lagoon-standby"'}, ${input.autoIdle ? ':auto_idle' : '1'}, ${input.storageCalc ? ':storage_calc' : '1'}, - ${input.factsUi ? ':facts_ui' : '0' }, + ${input.factsUi ? ':facts_ui' : '0' }, ${input.problemsUi ? ':problems_ui' : '0'}, ${ input.developmentEnvironmentsLimit @@ -352,9 +362,13 @@ export const addProject = async ( const rows = await query(sqlClient, prep({ ...input, + openshift, + openshiftProjectPattern, privateKey: keyPair.private, })); - const project = R.path([0, 0], rows) as any; + const withK8s = Helpers(sqlClient).aliasOpenshiftToK8s([R.path([0, 0], rows)]); + const project = withK8s[0]; + // Create a default group for this project let group; @@ -505,6 +519,7 @@ export const updateProject: ResolverFn = async ( activeSystemsRemove, activeSystemsTask, activeSystemsMisc, + activeSystemsPromote, branches, productionEnvironment, productionRoutes, @@ -517,8 +532,6 @@ export const updateProject: ResolverFn = async ( problemsUi, factsUi, pullrequests, - openshift, - openshiftProjectPattern, developmentEnvironmentsLimit, }, }, @@ -549,6 +562,9 @@ export const updateProject: ResolverFn = async ( throw new Error('The provided gitUrl is invalid.',); } + const openshift = patch.kubernetes || patch.openshift; + const openshiftProjectPattern = patch.kubernetesNamespacePattern || patch.openshiftProjectPattern; + const oldProject = await Helpers(sqlClient).getProjectById(id); // TODO If the privateKey changes, automatically remove the old one from the @@ -595,6 +611,7 @@ export const updateProject: ResolverFn = async ( activeSystemsRemove, activeSystemsTask, activeSystemsMisc, + activeSystemsPromote, branches, productionEnvironment, productionRoutes, diff --git a/services/api/src/typeDefs.js b/services/api/src/typeDefs.js index c6bec8c5a0..e30f5f9b2e 100644 --- a/services/api/src/typeDefs.js +++ b/services/api/src/typeDefs.js @@ -212,11 +212,11 @@ const typeDefs = gql` source: String! description: String! } - + input AddFactsInput { facts: [AddFactInput]! } - + input UpdateFactInputValue { environment: Int! name: String! @@ -224,7 +224,7 @@ const typeDefs = gql` source: String! description: String } - + input UpdateFactInput { environment: Int! patch: UpdateFactInputValue! @@ -234,7 +234,7 @@ const typeDefs = gql` environment: Int! name: String! } - + input DeleteFactsFromSourceInput { environment: Int! source: String! @@ -316,6 +316,19 @@ const typeDefs = gql` monitoringConfig: JSON } + type Kubernetes { + id: Int + name: String + consoleUrl: String + token: String + routerPattern: String + projectUser: String + sshHost: String + sshPort: String + created: String + monitoringConfig: JSON + } + type NotificationMicrosoftTeams { id: Int name: String @@ -402,27 +415,27 @@ const typeDefs = gql` notifications(type: NotificationType, contentType: NotificationContentType, notificationSeverityThreshold: ProblemSeverityRating): [Notification] """ Which internal Lagoon System is responsible for deploying - Currently only 'lagoon_openshiftBuildDeploy' exists + Currently only 'lagoon_controllerBuildDeploy' exists """ activeSystemsDeploy: String """ Which internal Lagoon System is responsible for promoting - Currently only 'lagoon_openshiftBuildDeploy' exists + Currently only 'lagoon_controllerBuildDeploy' exists """ activeSystemsPromote: String """ Which internal Lagoon System is responsible for promoting - Currently only 'lagoon_openshiftRemove' exists + Currently only 'lagoon_controllerRemove' exists """ activeSystemsRemove: String """ Which internal Lagoon System is responsible for tasks - 'lagoon_openshiftJob' or 'lagoon_kubernetesJob' + Currently only 'lagoon_controllerJob' exists """ activeSystemsTask: String """ Which internal Lagoon System is responsible for miscellaneous tasks - 'lagoon_openshiftMisc' or 'lagoon_kubernetesMisc' + Currently only 'lagoon_controllerMisc' exists """ activeSystemsMisc: String """ @@ -492,6 +505,14 @@ const typeDefs = gql` """ openshiftProjectPattern: String """ + Reference to Kubernetes Object this Project should be deployed to + """ + kubernetes: Kubernetes + """ + Pattern of Kubernetes Namespace that should be generated, default: \`$\{project}-$\{environmentname}\` + """ + kubernetesNamespacePattern: String + """ How many environments can be deployed at one timeout """ developmentEnvironmentsLimit: Int @@ -575,6 +596,10 @@ const typeDefs = gql` """ openshiftProjectName: String """ + Name of the Kubernetes Namespace this environment is deployed into + """ + kubernetesNamespaceName: String + """ Unix Timestamp of the last time this environment has been updated """ updated: String @@ -767,8 +792,15 @@ const typeDefs = gql` environmentByOpenshiftProjectName( openshiftProjectName: String! ): Environment + """ + Returns Environment Object by a given kubernetesNamespaceName + """ + environmentByKubernetesNamespaceName( + kubernetesNamespaceName: String! + ): Environment userCanSshToEnvironment( openshiftProjectName: String + kubernetesNamespaceName: String ): Environment deploymentByRemoteId(id: String): Deployment taskByRemoteId(id: String): Task @@ -786,6 +818,10 @@ const typeDefs = gql` """ allOpenshifts: [Openshift] """ + Returns all Kubernetes Objects + """ + allKubernetes: [Kubernetes] + """ Returns all Environments matching given filter (all if no filter defined) """ allEnvironments(createdAfter: String, type: EnvType, order: EnvOrderType): [Environment] @@ -865,8 +901,10 @@ const typeDefs = gql` name: String! gitUrl: String! subfolder: String - openshift: Int! + openshift: Int openshiftProjectPattern: String + kubernetes: Int + kubernetesNamespacePattern: String activeSystemsDeploy: String activeSystemsPromote: String activeSystemsRemove: String @@ -898,13 +936,18 @@ const typeDefs = gql` deployHeadRef: String deployTitle: String environmentType: EnvType! - openshiftProjectName: String! + openshiftProjectName: String + kubernetesNamespaceName: String } input AddOrUpdateEnvironmentStorageInput { environment: Int! persistentStorageClaim: String! bytesUsed: Int! + """ + Date in format 'YYYY-MM-DD' + """ + updated: String } input AddBackupInput { @@ -1021,10 +1064,26 @@ const typeDefs = gql` monitoringConfig: JSON } + input AddKubernetesInput { + id: Int + name: String! + consoleUrl: String! + token: String + routerPattern: String + projectUser: String + sshHost: String + sshPort: String + monitoringConfig: JSON + } + input DeleteOpenshiftInput { name: String! } + input DeleteKubernetesInput { + name: String! + } + input AddNotificationMicrosoftTeamsInput { name: String! webhook: String! @@ -1114,6 +1173,7 @@ const typeDefs = gql` activeSystemsRemove: String activeSystemsTask: String activeSystemsMisc: String + activeSystemsPromote: String branches: String productionEnvironment: String productionRoutes: String @@ -1126,6 +1186,8 @@ const typeDefs = gql` pullrequests: String openshift: Int openshiftProjectPattern: String + kubernetes: Int + kubernetesNamespacePattern: String developmentEnvironmentsLimit: Int problemsUi: Int factsUi: Int @@ -1152,6 +1214,22 @@ const typeDefs = gql` patch: UpdateOpenshiftPatchInput! } + input UpdateKubernetesPatchInput { + name: String + consoleUrl: String + token: String + routerPattern: String + projectUser: String + sshHost: String + sshPort: String + monitoringConfig: JSON + } + + input UpdateKubernetesInput { + id: Int! + patch: UpdateKubernetesPatchInput! + } + input UpdateNotificationMicrosoftTeamsPatchInput { name: String webhook: String @@ -1212,10 +1290,15 @@ const typeDefs = gql` deployTitle: String environmentType: EnvType openshiftProjectName: String + kubernetesNamespaceName: String route: String routes: String monitoringUrls: String autoIdle: Int + """ + Timestamp in format 'YYYY-MM-DD hh:mm:ss' + """ + created: String } input UpdateEnvironmentInput { @@ -1485,6 +1568,10 @@ const typeDefs = gql` updateOpenshift(input: UpdateOpenshiftInput!): Openshift deleteOpenshift(input: DeleteOpenshiftInput!): String deleteAllOpenshifts: String + addKubernetes(input: AddKubernetesInput!): Kubernetes + updateKubernetes(input: UpdateKubernetesInput!): Kubernetes + deleteKubernetes(input: DeleteKubernetesInput!): String + deleteAllKubernetes: String addProject(input: AddProjectInput!): Project updateProject(input: UpdateProjectInput!): Project deleteProject(input: DeleteProjectInput!): String diff --git a/services/auth-server/.lagoon.app.yml b/services/auth-server/.lagoon.app.yml deleted file mode 100644 index 41c2e1a4bc..0000000000 --- a/services/auth-server/.lagoon.app.yml +++ /dev/null @@ -1,130 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 3000 - protocol: TCP - readinessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 15 - timeoutSeconds: 1 - env: - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: KEYCLOAK_AUTH_SERVER_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: keycloak-auth-server-client-secret - key: KEYCLOAK_AUTH_SERVER_CLIENT_SECRET - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 3000-tcp - port: 3000 - protocol: TCP - targetPort: 3000 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} \ No newline at end of file diff --git a/services/auth-server/Dockerfile b/services/auth-server/Dockerfile index 54b1488d31..ce253c9bf4 100644 --- a/services/auth-server/Dockerfile +++ b/services/auth-server/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/auto-idler/.lagoon.yml b/services/auto-idler/.lagoon.yml deleted file mode 100644 index 0384f6bad7..0000000000 --- a/services/auto-idler/.lagoon.yml +++ /dev/null @@ -1,182 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-cli -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: |- - 30 * * * * /idle-clis.sh - 0 */4 * * * /idle-services.sh -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - volumes: - - name: lagoon-sshkey - secret: - defaultMode: 420 - secretName: lagoon-sshkey - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - ## LAGOON_GIT_SHA is injected directly and not loaded via `lagoon-env` config - ## This will cause the cli to redeploy on every deployment, even the files have not changed - - name: LAGOON_GIT_SHA - value: ${LAGOON_GIT_SHA} - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - volumeMounts: - - mountPath: /var/run/secrets/lagoon/sshkey/ - name: lagoon-sshkey - readOnly: true - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange -- apiVersion: batch/v1beta1 - kind: CronJob - metadata: - name: cronjob-idle-clis - spec: - schedule: "*/15 * * * *" - suspend: true # we're running cronjobs now via the lagoon cronjob system - concurrencyPolicy: Forbid - jobTemplate: - spec: - template: - metadata: - annotations: - alpha.image.policy.openshift.io/resolve-names: "*" - labels: - cronjob: idle-clis - parent: cronjob-idle-clis - spec: - containers: - - name: idle-clis - image: ${REGISTRY}/${OPENSHIFT_PROJECT}/${SERVICE_NAME}:latest - command: - - /lagoon/cronjob.sh - - "/idle-clis.sh" - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - restartPolicy: OnFailure -- apiVersion: batch/v1beta1 - kind: CronJob - metadata: - name: cronjob-idle-services - spec: - schedule: "*/30 * * * *" - suspend: true # we're running cronjobs now via the lagoon cronjob system - concurrencyPolicy: Forbid - jobTemplate: - spec: - template: - metadata: - annotations: - alpha.image.policy.openshift.io/resolve-names: "*" - labels: - cronjob: idle-services - parent: cronjob-idle-services - spec: - containers: - - name: idle-services - image: ${REGISTRY}/${OPENSHIFT_PROJECT}/${SERVICE_NAME}:latest - command: - - /lagoon/cronjob.sh - - "/idle-services.sh" - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - restartPolicy: OnFailure \ No newline at end of file diff --git a/services/auto-idler/Dockerfile b/services/auto-idler/Dockerfile index 667e78cf0e..b6be58e761 100644 --- a/services/auto-idler/Dockerfile +++ b/services/auto-idler/Dockerfile @@ -1,6 +1,8 @@ ARG IMAGE_REPO FROM ${IMAGE_REPO:-lagoon}/oc +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION ENV LAGOON=auto-idler RUN apk add --no-cache tini jq bash curl py3-jwt diff --git a/services/backup-handler/.lagoon.app.yml b/services/backup-handler/.lagoon.app.yml deleted file mode 100644 index daeb3f26c9..0000000000 --- a/services/backup-handler/.lagoon.app.yml +++ /dev/null @@ -1,147 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 3000 - protocol: TCP - readinessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 15 - timeoutSeconds: 1 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 3000-tcp - port: 3000 - protocol: TCP - targetPort: 3000 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: Route - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - host: ${SERVICE_ROUTER_URL} - port: - targetPort: 3000-tcp - to: - kind: Service - name: ${SERVICE_NAME} \ No newline at end of file diff --git a/services/backup-handler/Dockerfile b/services/backup-handler/Dockerfile index 87b9c62158..2ed89ec658 100644 --- a/services/backup-handler/Dockerfile +++ b/services/backup-handler/Dockerfile @@ -1,6 +1,7 @@ # build the binary ARG GO_VERSION -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM golang:${GO_VERSION:-1.13.8} AS builder # bring in all the packages # COPY main.go /go/src/github.com/amazeeio/lagoon/services/backup-handler/ @@ -17,7 +18,10 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o backup-handler . # put the binary into container # use the commons image to get entrypoints -FROM ${IMAGE_REPO:-lagoon}/commons +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION WORKDIR /app/ diff --git a/services/backup-handler/internal/handler/main.go b/services/backup-handler/internal/handler/main.go index 73250ca575..2af3ba17a2 100644 --- a/services/backup-handler/internal/handler/main.go +++ b/services/backup-handler/internal/handler/main.go @@ -196,7 +196,7 @@ func ProcessBackups(backupData Backups, backupsEnv api.Environment) []Webhook { var addBackups []Webhook for _, snapshotData := range backupData.Snapshots { // we want to check that we match the name to the project/environment properly and capture any prebackuppods too - matched, _ := regexp.MatchString("^"+backupData.Name+"-mariadb$|^"+backupData.Name+"-.*-prebackuppod$|^"+backupData.Name+"$", snapshotData.Hostname) + matched, _ := regexp.MatchString("^"+backupData.Name+"-mariadb$|^"+backupData.Name+"-mariadb-single$|^"+backupData.Name+"-.*-prebackuppod$|^"+backupData.Name+"$", snapshotData.Hostname) if matched { // if the snapshot id is not in already in the api, then we want to add this backup to the webhooks queue // this results in far less messages being sent to the queue as only new snapshots will be added diff --git a/services/broker-single/Dockerfile b/services/broker-single/Dockerfile index 263ce3806d..6a310f254a 100644 --- a/services/broker-single/Dockerfile +++ b/services/broker-single/Dockerfile @@ -1,2 +1,5 @@ ARG IMAGE_REPO FROM ${IMAGE_REPO:-lagoon}/rabbitmq + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION \ No newline at end of file diff --git a/services/broker/.lagoon.app.yml b/services/broker/.lagoon.app.yml deleted file mode 100644 index 403f715140..0000000000 --- a/services/broker/.lagoon.app.yml +++ /dev/null @@ -1,141 +0,0 @@ ---- -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: ServiceAccount - metadata: - name: ${SERVICE_NAME}-sa -- apiVersion: v1 - kind: RoleBinding - metadata: - name: ${SERVICE_NAME}-view - roleRef: - kind: Role - name: view - subjects: - - kind: ServiceAccount - name: ${SERVICE_NAME}-sa -- apiVersion: apps/v1beta1 - kind: StatefulSet - metadata: - name: ${SERVICE_NAME} - spec: - serviceName: ${SERVICE_NAME}-headless - replicas: 3 - selector: - matchLabels: - service: ${SERVICE_NAME} - template: - metadata: - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - service: ${SERVICE_NAME} - spec: - serviceAccountName: ${SERVICE_NAME}-sa - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - name: ${SERVICE_NAME} - command: - - sh - args: - - /cluster-rabbit.sh - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - ports: - - containerPort: 4369 - protocol: TCP - - containerPort: 15672 - protocol: TCP - - containerPort: 5672 - protocol: TCP - readinessProbe: - tcpSocket: - port: 5672 - initialDelaySeconds: 15 - timeoutSeconds: 1 - volumeMounts: - - name: ${SERVICE_NAME} - mountPath: /var/lib/rabbitmq - env: - - name: RABBITMQ_DEFAULT_USER - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_DEFAULT_PASS - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: RABBITMQ_USE_LONGNAME - value: "true" - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - volumeClaimTemplates: - - metadata: - name: ${SERVICE_NAME} - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 5Gi - updateStrategy: - type: RollingUpdate diff --git a/services/broker/Dockerfile b/services/broker/Dockerfile index ea40fe5bd7..a0872e0ec7 100644 --- a/services/broker/Dockerfile +++ b/services/broker/Dockerfile @@ -1,3 +1,6 @@ ARG IMAGE_REPO FROM ${IMAGE_REPO:-lagoon}/rabbitmq-cluster + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION ENV RABBITMQ_DEFAULT_HA_PATTERN='^lagoon-' diff --git a/services/controllerhandler/.lagoon.app.yml b/services/controllerhandler/.lagoon.app.yml deleted file mode 100644 index 24648a20d7..0000000000 --- a/services/controllerhandler/.lagoon.app.yml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} \ No newline at end of file diff --git a/services/controllerhandler/Dockerfile b/services/controllerhandler/Dockerfile index f860f00c88..2c6b949456 100644 --- a/services/controllerhandler/Dockerfile +++ b/services/controllerhandler/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/controllerhandler/src/index.ts b/services/controllerhandler/src/index.ts index 5908ec461d..81ee15325e 100644 --- a/services/controllerhandler/src/index.ts +++ b/services/controllerhandler/src/index.ts @@ -12,6 +12,7 @@ import { import { getOpenShiftInfoForProject, getEnvironmentByName, + getEnvironmentById, updateEnvironment, updateDeployment, getDeploymentByName, @@ -71,6 +72,33 @@ const updateLagoonTask = async (meta) => { } } +const getProjectEnvironment = async function(projectEnv: any) { + const { + meta + } = projectEnv; + + let environment; + let project; + + const projectBuildResult = await getOpenShiftInfoForProject(meta.project); + project = projectBuildResult.project + // check if the payload has an environment id defined to get the environment information + if (meta.environmentId != null) { + const environmentResult = await getEnvironmentById(meta.environmentId); + environment = environmentResult.environmentById + } else { + // if no id, use the name that was provided instead + const environmentResult = await getEnvironmentByName(meta.environment, project.id); + environment = environmentResult.environmentByName + } + + var projectEnvironmentData: any = { + project: project, + environment: environment, + } + return projectEnvironmentData; +} + const messageConsumer = async function(msg) { const { type, @@ -78,6 +106,8 @@ const messageConsumer = async function(msg) { meta, } = JSON.parse(msg.content.toString()); + let environment; + let project; switch (type) { case 'build': @@ -88,22 +118,31 @@ const messageConsumer = async function(msg) { let deploymentId; try { // try get the ID from our build UID - const deployment = await getDeploymentByRemoteId(meta.remoteId); - if (!deployment.deploymentByRemoteId) { - // otherwise find it using the build name + if (meta.remoteId != null) { + // otherwise, get the build directly by the remote id + // and fall back again to checking by namespace and build name if that fails + const deployment = await getDeploymentByRemoteId(meta.remoteId); + if (!deployment.deploymentByRemoteId) { + // otherwise find it using the build name + const deploymentResult = await getDeploymentByName(namespace, meta.buildName); + deploymentId = deploymentResult.environment.deployments[0].id; + } else { + deploymentId = deployment.deploymentByRemoteId.id + } + } else { + // if there is no remoteId in the message, then we are probably cancelling a build that + // was not actually ever started in a lagoon cluster + // so get the deployment id based on namespace and build name const deploymentResult = await getDeploymentByName(namespace, meta.buildName); deploymentId = deploymentResult.environment.deployments[0].id; - } else { - deploymentId = deployment.deploymentByRemoteId.id } - }catch(error) { + } catch(error) { logger.warn(`Error while fetching deployment openshiftproject: ${namespace}: ${error}`) throw(error) } const convertDateFormat = R.init; const dateOrNull = R.unless(R.isNil, convertDateFormat) as any; - await updateDeployment(deploymentId, { remoteId: meta.remoteId, status: meta.buildPhase.toUpperCase(), @@ -114,17 +153,15 @@ const messageConsumer = async function(msg) { logger.error(`Could not update deployment ${meta.project} ${meta.Buildname}. Message: ${error}`); } - - let environment; - let project; try { - const projectResult = await getOpenShiftInfoForProject(meta.project); - project = projectResult.project - - const environmentResult = await getEnvironmentByName(meta.environment, project.id) - environment = environmentResult.environmentByName + const projectEnv = await getProjectEnvironment({meta}); + project = projectEnv.project + environment = projectEnv.environment } catch (err) { - logger.warn(`${namespace} ${meta.buildName}: Error while getting project or environment information, Error: ${err}. Continuing without update`) + // if the project or environment can't be determined, give up trying to do anything for it + logger.error(`${namespace} ${meta.buildName}: Error while getting project or environment information, Error: ${err}. Giving up updating environment`) + // break so the controllerhandler doesn't stop processing + break; } try { @@ -153,10 +190,14 @@ const messageConsumer = async function(msg) { project: ${project.id} }` ); + } catch (err) { + logger.warn(`${namespace} ${meta.buildName}: Error while updating routes in API, Error: ${err}. Continuing without update`) + } + try { // update the environment with the services available await setEnvironmentServices(environment.id, meta.services); } catch (err) { - logger.warn(`${namespace} ${meta.buildName}: Error while updating routes in API, Error: ${err}. Continuing without update`) + logger.warn(`${namespace} ${meta.buildName}: Error while updating services in API, Error: ${err}. Continuing without update`) } } break; @@ -164,11 +205,23 @@ const messageConsumer = async function(msg) { logger.verbose(`Received remove task for ${namespace}`); // Update GraphQL API that the Environment has been deleted try { - await deleteEnvironment(meta.environment, meta.project, false); + const projectEnv = await getProjectEnvironment({meta}); + project = projectEnv.project + environment = projectEnv.environment + } catch (err) { + // if the project or environment can't be determined, give up trying to do anything for it + logger.error(`${namespace} ${meta.buildName}: Error while getting project or environment information, Error: ${err}. Giving up removing environment`) + // break so the controllerhandler doesn't stop processing + break; + } + try { + await deleteEnvironment(environment.name, meta.project, false); logger.info( - `${meta.project}: Deleted Environment '${meta.environment}' in API` + `${meta.project}: Deleted Environment '${environment.name}' in API` ); - meta.openshiftProject = meta.environment + // @TODO: looking at `meta.openshiftProject`, this seems to only be used by logs2email, logs2rocketchat, and logs2microsoftteams + // when notification system is re-written, this can also be removed as it seems kind of a silly name + meta.openshiftProject = environment.name meta.openshiftProjectName = namespace meta.projectName = meta.project sendToLagoonLogs( @@ -177,7 +230,7 @@ const messageConsumer = async function(msg) { '', 'task:remove-kubernetes:finished', meta, - `*[${meta.project}]* remove \`${meta.environment}\`` + `*[${meta.project}]* remove \`${environment.name}\`` ); } catch (err) { logger.warn(`${namespace}: Error while deleting environment, Error: ${err}. Continuing without update`) @@ -187,6 +240,16 @@ const messageConsumer = async function(msg) { logger.verbose( `Received task result for ${meta.task.name} from ${meta.project} - ${meta.environment} - ${meta.jobStatus}` ); + try { + const projectEnv = await getProjectEnvironment({meta}); + project = projectEnv.project + environment = projectEnv.environment + } catch (err) { + // if the project or environment can't be determined, give up trying to do anything for it + logger.error(`${namespace} ${meta.buildName}: Error while getting project or environment information, Error: ${err}. Giving up updating task result`) + // break so the controllerhandler doesn't stop processing + break; + } // if we want to be able to do something else when a task result comes through, // we can use the task key switch (meta.key) { @@ -196,9 +259,6 @@ const messageConsumer = async function(msg) { switch (meta.jobStatus) { case "succeeded": try { - // get the project ID - const projectResult = await getOpenShiftInfoForProject(meta.project); - const project = projectResult.project // since the advanceddata contains a base64 encoded value, we have to decode it first var decodedData = new Buffer(meta.advancedData, 'base64').toString('ascii') const taskResult = JSON.parse(decodedData) diff --git a/services/drush-alias/.lagoon.app.yml b/services/drush-alias/.lagoon.app.yml deleted file mode 100644 index 7b42c56750..0000000000 --- a/services/drush-alias/.lagoon.app.yml +++ /dev/null @@ -1,137 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-nginx -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 8080 - protocol: TCP - readinessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 15 - timeoutSeconds: 1 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 8080-tcp - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: Route - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - host: ${SERVICE_ROUTER_URL} - port: - targetPort: 8080-tcp - to: - kind: Service - name: ${SERVICE_NAME} diff --git a/services/drush-alias/Dockerfile b/services/drush-alias/Dockerfile index bd3c957a8f..97d03ab1ae 100644 --- a/services/drush-alias/Dockerfile +++ b/services/drush-alias/Dockerfile @@ -1,4 +1,9 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeiolagoon}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/nginx:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + ADD nginx.conf /etc/nginx/conf.d/app.conf ADD web/ /app/ \ No newline at end of file diff --git a/services/drush-alias/web/aliases.drushrc.php.stub b/services/drush-alias/web/aliases.drushrc.php.stub index d11e18cb4b..cf50529843 100644 --- a/services/drush-alias/web/aliases.drushrc.php.stub +++ b/services/drush-alias/web/aliases.drushrc.php.stub @@ -207,7 +207,7 @@ if (getenv('LAGOON_OVERRIDE_JWT_TOKEN')) { } else { // if ssh takes too long to get a token, timeout with the same ssh port timeout used to check the port status // this could be because the API is unavailable - exec("timeout $ssh_port_timeout ssh -p $ssh_port -o ConnectTimeout=5 -o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no lagoon@$ssh_host token 2>&1", $token_array, $rc); + exec("timeout $ssh_port_timeout ssh -p $ssh_port -o ConnectTimeout=5 -o LogLevel=FATAL -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no lagoon@$ssh_host token 2>&1", $token_array, $rc); if ($rc !== 0) { drush_log("Could not load API JWT Token, error was: '" . implode(",", $token_array), 'warning'); return; @@ -320,7 +320,7 @@ $aliases = array_reduce($environments, function ($carry, $environment) use ($def 'remote-user' => "$environment->openshiftProjectName", 'root' => "$drupal_path", 'backup-dir' => '/tmp', - 'ssh-options' => "-o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $ssh_port", + 'ssh-options' => "-o LogLevel=FATAL -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $ssh_port", ] + $defaults; } if ($environment->name == $standbyProductionEnvironment && $standbyProductionEnvironment != NULL) { @@ -329,7 +329,7 @@ $aliases = array_reduce($environments, function ($carry, $environment) use ($def 'remote-user' => "$environment->openshiftProjectName", 'root' => "$drupal_path", 'backup-dir' => '/tmp', - 'ssh-options' => "-o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $ssh_port", + 'ssh-options' => "-o LogLevel=FATAL -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $ssh_port", ] + $defaults; } $alias[$site_name] = [ @@ -337,7 +337,7 @@ $aliases = array_reduce($environments, function ($carry, $environment) use ($def 'remote-user' => "$environment->openshiftProjectName", 'root' => "$drupal_path", 'backup-dir' => '/tmp', - 'ssh-options' => "-o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $ssh_port", + 'ssh-options' => "-o LogLevel=FATAL -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $ssh_port", ] + $defaults; return $carry + $alias; diff --git a/services/harbor-core/0015_1.10.0_schema.up.sql b/services/harbor-core/0015_1.10.0_schema.up.sql deleted file mode 100644 index d8e8666bbf..0000000000 --- a/services/harbor-core/0015_1.10.0_schema.up.sql +++ /dev/null @@ -1,71 +0,0 @@ -/*Table for keeping the plug scanner registration*/ -CREATE TABLE scanner_registration -( - id SERIAL PRIMARY KEY NOT NULL, - uuid VARCHAR(64) UNIQUE NOT NULL, - url VARCHAR(256) UNIQUE NOT NULL, - name VARCHAR(128) UNIQUE NOT NULL, - description VARCHAR(1024) NULL, - auth VARCHAR(16) NOT NULL, - access_cred VARCHAR(512) NULL, - disabled BOOLEAN NOT NULL DEFAULT FALSE, - is_default BOOLEAN NOT NULL DEFAULT FALSE, - use_internal_addr BOOLEAN NOT NULL DEFAULT FALSE, - immutable BOOLEAN NOT NULL DEFAULT FALSE, - skip_cert_verify BOOLEAN NOT NULL DEFAULT FALSE, - create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP -); - -/*Table for keeping the scan report. The report details are stored as JSON*/ -CREATE TABLE scan_report -( - id SERIAL PRIMARY KEY NOT NULL, - uuid VARCHAR(64) UNIQUE NOT NULL, - digest VARCHAR(256) NOT NULL, - registration_uuid VARCHAR(64) NOT NULL, - mime_type VARCHAR(256) NOT NULL, - job_id VARCHAR(64), - track_id VARCHAR(64), - requester VARCHAR(64), - status VARCHAR(1024) NOT NULL, - status_code INTEGER DEFAULT 0, - status_rev BIGINT DEFAULT 0, - report JSON, - start_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - end_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - UNIQUE(digest, registration_uuid, mime_type) -); - -/** Add table for immutable tag **/ -CREATE TABLE immutable_tag_rule -( - id SERIAL PRIMARY KEY NOT NULL, - project_id int NOT NULL, - tag_filter text, - disabled BOOLEAN NOT NULL DEFAULT FALSE, - creation_time timestamp default CURRENT_TIMESTAMP, - UNIQUE(project_id, tag_filter) -); - -ALTER TABLE robot ADD COLUMN visible boolean DEFAULT true NOT NULL; - -/** Drop the unused vul related tables **/ -DROP INDEX IF EXISTS idx_status; -DROP INDEX IF EXISTS idx_digest; -DROP INDEX IF EXISTS idx_uuid; -DROP INDEX IF EXISTS idx_repository_tag; -DROP TRIGGER IF EXISTS img_scan_job_update_time_at_modtime ON img_scan_job; -DROP TABLE IF EXISTS img_scan_job; - -DROP TRIGGER IF EXISTS TRIGGER ON img_scan_overview; -DROP TABLE IF EXISTS img_scan_overview; - -DROP TABLE IF EXISTS clair_vuln_timestamp; - -/* Add limited guest role */ -INSERT INTO role (role_code, name) VALUES ('LRS', 'limitedGuest'); - -/* Add revision and status code columns for admin job table */ -ALTER TABLE admin_job ADD COLUMN revision BIGINT DEFAULT 0; -ALTER TABLE admin_job ADD COLUMN status_code INTEGER DEFAULT 0; \ No newline at end of file diff --git a/services/harbor-core/Dockerfile b/services/harbor-core/Dockerfile deleted file mode 100644 index 79ad00756e..0000000000 --- a/services/harbor-core/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM goharbor/harbor-core:v1.10.2 -LABEL maintainer="amazee.io" - -COPY entrypoint.sh / -COPY 0015_1.10.0_schema.up.sql /harbor/migrations/postgresql/ - -USER root - -RUN chmod +rx /entrypoint.sh - -USER 10000 - -ENTRYPOINT /entrypoint.sh \ No newline at end of file diff --git a/services/harbor-core/ci-secret.key b/services/harbor-core/ci-secret.key deleted file mode 100644 index b05256dd87..0000000000 --- a/services/harbor-core/ci-secret.key +++ /dev/null @@ -1 +0,0 @@ -not-a-secure-key \ No newline at end of file diff --git a/services/harbor-core/ci_tls.crt b/services/harbor-core/ci_tls.crt deleted file mode 100644 index e66b9e7f4d..0000000000 --- a/services/harbor-core/ci_tls.crt +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIE0zCCArugAwIBAgIJAPY/OzLMeVq2MA0GCSqGSIb3DQEBCwUAMAAwHhcNMTkw -NDE4MDIyNzM3WhcNMjkwNDE1MDIyNzM3WjAAMIICIjANBgkqhkiG9w0BAQEFAAOC -Ag8AMIICCgKCAgEA3xlUJs2b/aI2NLoy4OIQ+dn/yMb/O99iKDRyZKpH8rSOmS+o -F9unmSAzL65XA/v6nY0OLI/dASDjkqkBpIdTGzogR5f8UiB6osuEY7V71XZdzWLr -PjnJq6ZLAaoKmwG80W5+Wd6V8PygOx52mkr1w7IWKz+1ZLI5izbppon7XVGVRaAT -RvNZDiJ6CeJpcJ5H723lkf5RvJWatZLCYIYDbRfTiKsyQ/SlRcv5BVfHg/LJSH9Q -LGRhPMARldl9wyZCwZZDHxheI4a+26aa8MY3u9st/l0/Oo6VCTGpMiEhiGF2LVjp -UWq/+BP4SFEvJfq/DuinI139W/5aZZ7/HwRPlmYU6pXTRLyIg7jd+19fJwR7X37q -w0o8t06FhjmrCzaYCUjoReqDmHaNmZN/ddvG7jZWBu+jNh0YavsyQyCIVmv6yqSc -jPiD9uivxqTwjJidIBRfuUrz3aERQ7cQgf0qhqjIzflzHbFKhILocBWq7zyNl9hr -vUGT/WZcw0t/OtM72SPaplmTgVbbQRxf2VHzyptGIvtydlXK8thxOMpXo4e+Sl8d -1gdQcC4oisN9F29oNs8P5yFQP//xYuv8C607nCj1DzrId5avG/NVfKB/fbDKEFgN -2WhHInTzPLEcjF4fErcUAEuWW0buX/6FHCG3iTtrqyD92KTVDfN1J56rrcsCAwEA -AaNQME4wHQYDVR0OBBYEFFhNhTo4UAC2PUsf8jYaWj160vGEMB8GA1UdIwQYMBaA -FFhNhTo4UAC2PUsf8jYaWj160vGEMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEL -BQADggIBAMAsEtVlELMwdtcifHeOT0kOmf5wo9In/eFSgscCzBMDaRx2B3q36AoS -Il7XWAZpevaR7W7yeARKaAshBLhygUqLD0zWbKlSN9Hprd1wdpM0ffyPpN5dxOYA -er04y12GRnCbMYqi4cvztP4TinXqq2yHSYhLbO9qkI5gbWVxkRuIcMKvixddllNY -Q3obJaDDHmovM3+g/G+1YFgt4qES38XnJ7BrSshHnn5EIQh286xfJriyrK2hHbLJ -qz0YuF6G3DXPeWGgXvj0Hipc0f8UDZkKkk/eGEI6vEkytyvoepoZI2XbAf/ZMy5n -KwuhEn4hhkFMwWaSWp/h0QdMCaxk4BVSOqmNVaLSB7+FjsIj4CasFotYiyJ2gpRB -Nf8QaS4bz0Tn1eBbC8ksj+e3ZWeX2b5wVMjql9jTt2X1ICs8KKe3vEBkjqT2AUi2 -52TtKzm73aWrz/GPy/Q2LCor3Fh9FGVSBOBBDXGy6MJpNHJnYVH9EENFGOh85ol1 -2pADOBB5vAU/kLB5LHPj2kue/FMiHaNnrSYIGrMlBSX2jj9EYa1uuUH+pd4MBj1F -5uH8ORiaQ6ht2+WHklxic1Rj5yTYQwVlH70CBOn+qVEdo63yQwzAMJKFIwlGUQEX -jiljgc86q4cZtUTFrcwMidbk+8Q6+JbDVg7HV/+pnC+wnv197kwe ------END CERTIFICATE----- \ No newline at end of file diff --git a/services/harbor-core/ci_tls.key b/services/harbor-core/ci_tls.key deleted file mode 100644 index 7cd7eabc08..0000000000 --- a/services/harbor-core/ci_tls.key +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKQIBAAKCAgEA3xlUJs2b/aI2NLoy4OIQ+dn/yMb/O99iKDRyZKpH8rSOmS+o -F9unmSAzL65XA/v6nY0OLI/dASDjkqkBpIdTGzogR5f8UiB6osuEY7V71XZdzWLr -PjnJq6ZLAaoKmwG80W5+Wd6V8PygOx52mkr1w7IWKz+1ZLI5izbppon7XVGVRaAT -RvNZDiJ6CeJpcJ5H723lkf5RvJWatZLCYIYDbRfTiKsyQ/SlRcv5BVfHg/LJSH9Q -LGRhPMARldl9wyZCwZZDHxheI4a+26aa8MY3u9st/l0/Oo6VCTGpMiEhiGF2LVjp -UWq/+BP4SFEvJfq/DuinI139W/5aZZ7/HwRPlmYU6pXTRLyIg7jd+19fJwR7X37q -w0o8t06FhjmrCzaYCUjoReqDmHaNmZN/ddvG7jZWBu+jNh0YavsyQyCIVmv6yqSc -jPiD9uivxqTwjJidIBRfuUrz3aERQ7cQgf0qhqjIzflzHbFKhILocBWq7zyNl9hr -vUGT/WZcw0t/OtM72SPaplmTgVbbQRxf2VHzyptGIvtydlXK8thxOMpXo4e+Sl8d -1gdQcC4oisN9F29oNs8P5yFQP//xYuv8C607nCj1DzrId5avG/NVfKB/fbDKEFgN -2WhHInTzPLEcjF4fErcUAEuWW0buX/6FHCG3iTtrqyD92KTVDfN1J56rrcsCAwEA -AQKCAgEAk8q8s4PrvYby79UVlWJNKqceykwBkxE1fjrYORWQ2hiAirxGV5+8lDT/ -k6ujm1EWwb5K0HxxRKkb+PEa1HqNNHE6JxNpJKK9exDlYAQ+x7dFBqVr/2nazmo4 -MB8MLYlmIztWWoSYwe8o2mEg4q+bxYs5Imdu7AkhE7dJ63hm23gLMfeMLalRqopu -XBPwE5nXP6aGuUNHtG1K8tQJDlZY+LEbAeOfReNQhT9NdRukYSW579vfKblJrSvz -ulg89sVm3cWEK5pB6rj9wJbK94voKftVqbbuBwWjd1a9pibKhwVBe2L2FWhpSZc5 -F/coC7njTaYT6tr91y5VhhJhIZQCf/vv4Zl5XhFHs5VTZNbM/OfqyFQLYXVJO48K -F7tmazAEQQBQwVZqH9C9NQdzPHWmc38Okhtc1wzaqn/rg9+1sgAMD8hWCtQJUe97 -b9ymh5A0Z4QXKpyFT0b+pXcD1jRha07UtkX+/zLJ9HpAXcUmzkG+j5CXNpnxsIq5 -fJFeq3hBj9w6n4h+50M4W0Fse5YoEUsc3B0fz8BlQBb+YJLFLNH34MH8p1l0ZDYJ -yae0psxlBijg4OPZ+WCBa+jtFW4LiWgEcxwgz8w+hEOAQr2a1Dc7w8jd+Y4IK8Um -lTVs5dbp4mOmPMlRv/GM7kDudFqbMg3YFwXg3QbquVqLZzEzjVkCggEBAPJKZbCW -YfLejkS/fkRyV3VIb54mKwQHoMWub88tPgGuXzjsJyd5QTQ58PpUjXrLHmn8lS2+ -viE8GJylKwN1yMlZw40+kZhpHUpCWx/2ZKjAqvqA9OOKo2fv6Hd/wOAnU4CtioC1 -pri7lKFYXoP8DtQVwHYvIzCRqDnhc4mwJDqzTC9xduI+svxzl4xH82fx0jrPiFY+ -/wOdXjyfIPjyhHC4jPTWbairwXS9dBjSl128aIRT580/yXE/SYAugg05jKtg5zQA -So13MTezXRHXdO0di3tEMHGREEkFpeVnnPQvCCedK0DV36iNwiWc8pwdfLMVneTt -DKwZedCx+o/7ev0CggEBAOu48DGEJJJzHxVR5mY1K2AlZyYtpTOWehK1zX74JvM3 -YxN4nd+Zx5n9uSPmmKzqF3TU+44RVtdJK6ejoFE8dMDTNWaSLW/ZDmN1nT0njvOn -IWJn59ynOChWWKZgXZ/9UqGR7Pt6OxSkkex9c/fYBsMX/xusdXQigeogl0iOYVFW -gXIiiLRLHpHJsK/uNxIizj0hTYYn7uD7PRENwFRcCYf8J1eUFbd6DuCVWeQCKWgf -Nd2tSWoi0Vylj4uUX8Iw0tjLNMD5CREJEk4GSv4EDSmvUdv1LiBKJCL2lEcgoPeC -oOD2iCc5KqgnmQraRilFFk8RVXA9PWZGY3C0b6TVmmcCggEANZO2AOKALlCAbTtb -FI+kP08RP4t5H58AMjZsiweaGo0QiWnPDq+Fd6MIYpKn5mtcAlvUMRVovbioSJtN -c6psB/pNf8JCN82mqHEb7WlywM46AMLbZCWYFLe8VBBv+iE4GdBGPEfu4hK4vyTn -YZAvRz64HGo4Adlztbjg76V/nWtggW05uLXcpm55KJAQhv+2WULjBw9PHOGDoSwf -Am2+U567rLht70prsQDj10laJ2QuSHS1YXGlfeFcw3eFUp9TN+JpvdoCol2lCIgl -IHjgZj6ORWfCvpoxW7RgBuZukqCD0R60HdYtavxN3jtiepsapA83pxO0JapMgZWZ -rpURkQKCAQBOcEv9Liu9T/GX9pjkiezVIZ0hZy8B66DTeQvYpFrRtCyT3h8quNFi -vLtO5v0HDR6hEf5jWAG9wet07U37ulJfl+i9KQdVoLTZA9o+71ryWTsSs+DD3CEj -yxfUxVxiULmeaiChzhq608h7GYPthUU6xlFttAWhj5oLfqzYyAg6OL76a+Nxm02g -1ayl3m8U6eAXF23kpoUm+HNpqVnGuJmzVoUA75YKZ+NreEdhSBbfPwN9sJwtZUil -u7H4kHcM95Ix8eysCjKqKIqezBlITbDTnjNvLjcbJ5C+0a6lvIXT1vQR5/eGlc9M -BWE360pNkV/LD8mOf9Jepi2Q43oDL9EhAoIBAQDTWImfy0K9gGzA2rPy169mWYQK -OlcnD3+hQq6x51Zn1e/texFeVlhHn4rrnRdCFOAp47uFkJ2m72GCVD74EwQucK9y -AD5jorqgVHqCKZdkHjb2V60Mzm6g3rtL9WJXFVLvNBb/QGB2vgHVOO0zqiqGZj4e -Ex7l2m//5SE4DLtn70J9CgG1HtXCS8dWrGPL1pzDnk8VXtnoXzb0LChLUFEgZRmh -cV6AFHEK2H8wBHviNyehsRQiDkl2AiWOcJNvkzW68ck2nJjRWyPYK1JL3NCKpB3Q -OohrP0fHcWAXMW97wFXZhRfnQfDxxIOlj3McYT0AlanXd0F4NGc2Nvmphx04 ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/services/harbor-core/entrypoint.sh b/services/harbor-core/entrypoint.sh deleted file mode 100644 index d84496e1a9..0000000000 --- a/services/harbor-core/entrypoint.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -set -e - -# if HARBOR_NGINX_ENDPOINT is not defined, we try to load it from LAGOON_ROUTES -if [[ -z ${HARBOR_NGINX_ENDPOINT+x} ]]; then - REGEX="(https?://harbor[0-9A-Za-z\.-]+)" - - if [[ $LAGOON_ROUTES =~ $REGEX ]]; then - export HARBOR_NGINX_ENDPOINT=${BASH_REMATCH[1]} - else - echo "Could not load harbor URL from LAGOON_ROUTES, please define via HARBOR_NGINX_ENDPOINT env variable" - exit 1 - fi -fi - -export EXT_ENDPOINT=$HARBOR_NGINX_ENDPOINT - -exec "/harbor/harbor_core" -#sudo -E -u \#10000 "$@" \ No newline at end of file diff --git a/services/harbor-core/harbor-core.yml b/services/harbor-core/harbor-core.yml deleted file mode 100644 index 8b9626d6c4..0000000000 --- a/services/harbor-core/harbor-core.yml +++ /dev/null @@ -1,314 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harbor-core-template - annotations: - description: "A template for generating Harbor's core service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME} # harbor-core - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - type: Opaque - data: - secretKey: "bm90LWEtc2VjdXJlLWtleQ==" # Used to generate the below TLS certs base64 encrypted `not-a-secure-key` - tls.crt: | - -----BEGIN CERTIFICATE----- - MIIE0zCCArugAwIBAgIJAPY/OzLMeVq2MA0GCSqGSIb3DQEBCwUAMAAwHhcNMTkw - NDE4MDIyNzM3WhcNMjkwNDE1MDIyNzM3WjAAMIICIjANBgkqhkiG9w0BAQEFAAOC - Ag8AMIICCgKCAgEA3xlUJs2b/aI2NLoy4OIQ+dn/yMb/O99iKDRyZKpH8rSOmS+o - F9unmSAzL65XA/v6nY0OLI/dASDjkqkBpIdTGzogR5f8UiB6osuEY7V71XZdzWLr - PjnJq6ZLAaoKmwG80W5+Wd6V8PygOx52mkr1w7IWKz+1ZLI5izbppon7XVGVRaAT - RvNZDiJ6CeJpcJ5H723lkf5RvJWatZLCYIYDbRfTiKsyQ/SlRcv5BVfHg/LJSH9Q - LGRhPMARldl9wyZCwZZDHxheI4a+26aa8MY3u9st/l0/Oo6VCTGpMiEhiGF2LVjp - UWq/+BP4SFEvJfq/DuinI139W/5aZZ7/HwRPlmYU6pXTRLyIg7jd+19fJwR7X37q - w0o8t06FhjmrCzaYCUjoReqDmHaNmZN/ddvG7jZWBu+jNh0YavsyQyCIVmv6yqSc - jPiD9uivxqTwjJidIBRfuUrz3aERQ7cQgf0qhqjIzflzHbFKhILocBWq7zyNl9hr - vUGT/WZcw0t/OtM72SPaplmTgVbbQRxf2VHzyptGIvtydlXK8thxOMpXo4e+Sl8d - 1gdQcC4oisN9F29oNs8P5yFQP//xYuv8C607nCj1DzrId5avG/NVfKB/fbDKEFgN - 2WhHInTzPLEcjF4fErcUAEuWW0buX/6FHCG3iTtrqyD92KTVDfN1J56rrcsCAwEA - AaNQME4wHQYDVR0OBBYEFFhNhTo4UAC2PUsf8jYaWj160vGEMB8GA1UdIwQYMBaA - FFhNhTo4UAC2PUsf8jYaWj160vGEMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEL - BQADggIBAMAsEtVlELMwdtcifHeOT0kOmf5wo9In/eFSgscCzBMDaRx2B3q36AoS - Il7XWAZpevaR7W7yeARKaAshBLhygUqLD0zWbKlSN9Hprd1wdpM0ffyPpN5dxOYA - er04y12GRnCbMYqi4cvztP4TinXqq2yHSYhLbO9qkI5gbWVxkRuIcMKvixddllNY - Q3obJaDDHmovM3+g/G+1YFgt4qES38XnJ7BrSshHnn5EIQh286xfJriyrK2hHbLJ - qz0YuF6G3DXPeWGgXvj0Hipc0f8UDZkKkk/eGEI6vEkytyvoepoZI2XbAf/ZMy5n - KwuhEn4hhkFMwWaSWp/h0QdMCaxk4BVSOqmNVaLSB7+FjsIj4CasFotYiyJ2gpRB - Nf8QaS4bz0Tn1eBbC8ksj+e3ZWeX2b5wVMjql9jTt2X1ICs8KKe3vEBkjqT2AUi2 - 52TtKzm73aWrz/GPy/Q2LCor3Fh9FGVSBOBBDXGy6MJpNHJnYVH9EENFGOh85ol1 - 2pADOBB5vAU/kLB5LHPj2kue/FMiHaNnrSYIGrMlBSX2jj9EYa1uuUH+pd4MBj1F - 5uH8ORiaQ6ht2+WHklxic1Rj5yTYQwVlH70CBOn+qVEdo63yQwzAMJKFIwlGUQEX - jiljgc86q4cZtUTFrcwMidbk+8Q6+JbDVg7HV/+pnC+wnv197kwe - -----END CERTIFICATE----- - tls.key: | - -----BEGIN RSA PRIVATE KEY----- - MIIJKQIBAAKCAgEA3xlUJs2b/aI2NLoy4OIQ+dn/yMb/O99iKDRyZKpH8rSOmS+o - F9unmSAzL65XA/v6nY0OLI/dASDjkqkBpIdTGzogR5f8UiB6osuEY7V71XZdzWLr - PjnJq6ZLAaoKmwG80W5+Wd6V8PygOx52mkr1w7IWKz+1ZLI5izbppon7XVGVRaAT - RvNZDiJ6CeJpcJ5H723lkf5RvJWatZLCYIYDbRfTiKsyQ/SlRcv5BVfHg/LJSH9Q - LGRhPMARldl9wyZCwZZDHxheI4a+26aa8MY3u9st/l0/Oo6VCTGpMiEhiGF2LVjp - UWq/+BP4SFEvJfq/DuinI139W/5aZZ7/HwRPlmYU6pXTRLyIg7jd+19fJwR7X37q - w0o8t06FhjmrCzaYCUjoReqDmHaNmZN/ddvG7jZWBu+jNh0YavsyQyCIVmv6yqSc - jPiD9uivxqTwjJidIBRfuUrz3aERQ7cQgf0qhqjIzflzHbFKhILocBWq7zyNl9hr - vUGT/WZcw0t/OtM72SPaplmTgVbbQRxf2VHzyptGIvtydlXK8thxOMpXo4e+Sl8d - 1gdQcC4oisN9F29oNs8P5yFQP//xYuv8C607nCj1DzrId5avG/NVfKB/fbDKEFgN - 2WhHInTzPLEcjF4fErcUAEuWW0buX/6FHCG3iTtrqyD92KTVDfN1J56rrcsCAwEA - AQKCAgEAk8q8s4PrvYby79UVlWJNKqceykwBkxE1fjrYORWQ2hiAirxGV5+8lDT/ - k6ujm1EWwb5K0HxxRKkb+PEa1HqNNHE6JxNpJKK9exDlYAQ+x7dFBqVr/2nazmo4 - MB8MLYlmIztWWoSYwe8o2mEg4q+bxYs5Imdu7AkhE7dJ63hm23gLMfeMLalRqopu - XBPwE5nXP6aGuUNHtG1K8tQJDlZY+LEbAeOfReNQhT9NdRukYSW579vfKblJrSvz - ulg89sVm3cWEK5pB6rj9wJbK94voKftVqbbuBwWjd1a9pibKhwVBe2L2FWhpSZc5 - F/coC7njTaYT6tr91y5VhhJhIZQCf/vv4Zl5XhFHs5VTZNbM/OfqyFQLYXVJO48K - F7tmazAEQQBQwVZqH9C9NQdzPHWmc38Okhtc1wzaqn/rg9+1sgAMD8hWCtQJUe97 - b9ymh5A0Z4QXKpyFT0b+pXcD1jRha07UtkX+/zLJ9HpAXcUmzkG+j5CXNpnxsIq5 - fJFeq3hBj9w6n4h+50M4W0Fse5YoEUsc3B0fz8BlQBb+YJLFLNH34MH8p1l0ZDYJ - yae0psxlBijg4OPZ+WCBa+jtFW4LiWgEcxwgz8w+hEOAQr2a1Dc7w8jd+Y4IK8Um - lTVs5dbp4mOmPMlRv/GM7kDudFqbMg3YFwXg3QbquVqLZzEzjVkCggEBAPJKZbCW - YfLejkS/fkRyV3VIb54mKwQHoMWub88tPgGuXzjsJyd5QTQ58PpUjXrLHmn8lS2+ - viE8GJylKwN1yMlZw40+kZhpHUpCWx/2ZKjAqvqA9OOKo2fv6Hd/wOAnU4CtioC1 - pri7lKFYXoP8DtQVwHYvIzCRqDnhc4mwJDqzTC9xduI+svxzl4xH82fx0jrPiFY+ - /wOdXjyfIPjyhHC4jPTWbairwXS9dBjSl128aIRT580/yXE/SYAugg05jKtg5zQA - So13MTezXRHXdO0di3tEMHGREEkFpeVnnPQvCCedK0DV36iNwiWc8pwdfLMVneTt - DKwZedCx+o/7ev0CggEBAOu48DGEJJJzHxVR5mY1K2AlZyYtpTOWehK1zX74JvM3 - YxN4nd+Zx5n9uSPmmKzqF3TU+44RVtdJK6ejoFE8dMDTNWaSLW/ZDmN1nT0njvOn - IWJn59ynOChWWKZgXZ/9UqGR7Pt6OxSkkex9c/fYBsMX/xusdXQigeogl0iOYVFW - gXIiiLRLHpHJsK/uNxIizj0hTYYn7uD7PRENwFRcCYf8J1eUFbd6DuCVWeQCKWgf - Nd2tSWoi0Vylj4uUX8Iw0tjLNMD5CREJEk4GSv4EDSmvUdv1LiBKJCL2lEcgoPeC - oOD2iCc5KqgnmQraRilFFk8RVXA9PWZGY3C0b6TVmmcCggEANZO2AOKALlCAbTtb - FI+kP08RP4t5H58AMjZsiweaGo0QiWnPDq+Fd6MIYpKn5mtcAlvUMRVovbioSJtN - c6psB/pNf8JCN82mqHEb7WlywM46AMLbZCWYFLe8VBBv+iE4GdBGPEfu4hK4vyTn - YZAvRz64HGo4Adlztbjg76V/nWtggW05uLXcpm55KJAQhv+2WULjBw9PHOGDoSwf - Am2+U567rLht70prsQDj10laJ2QuSHS1YXGlfeFcw3eFUp9TN+JpvdoCol2lCIgl - IHjgZj6ORWfCvpoxW7RgBuZukqCD0R60HdYtavxN3jtiepsapA83pxO0JapMgZWZ - rpURkQKCAQBOcEv9Liu9T/GX9pjkiezVIZ0hZy8B66DTeQvYpFrRtCyT3h8quNFi - vLtO5v0HDR6hEf5jWAG9wet07U37ulJfl+i9KQdVoLTZA9o+71ryWTsSs+DD3CEj - yxfUxVxiULmeaiChzhq608h7GYPthUU6xlFttAWhj5oLfqzYyAg6OL76a+Nxm02g - 1ayl3m8U6eAXF23kpoUm+HNpqVnGuJmzVoUA75YKZ+NreEdhSBbfPwN9sJwtZUil - u7H4kHcM95Ix8eysCjKqKIqezBlITbDTnjNvLjcbJ5C+0a6lvIXT1vQR5/eGlc9M - BWE360pNkV/LD8mOf9Jepi2Q43oDL9EhAoIBAQDTWImfy0K9gGzA2rPy169mWYQK - OlcnD3+hQq6x51Zn1e/texFeVlhHn4rrnRdCFOAp47uFkJ2m72GCVD74EwQucK9y - AD5jorqgVHqCKZdkHjb2V60Mzm6g3rtL9WJXFVLvNBb/QGB2vgHVOO0zqiqGZj4e - Ex7l2m//5SE4DLtn70J9CgG1HtXCS8dWrGPL1pzDnk8VXtnoXzb0LChLUFEgZRmh - cV6AFHEK2H8wBHviNyehsRQiDkl2AiWOcJNvkzW68ck2nJjRWyPYK1JL3NCKpB3Q - OohrP0fHcWAXMW97wFXZhRfnQfDxxIOlj3McYT0AlanXd0F4NGc2Nvmphx04 - -----END RSA PRIVATE KEY----- -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME}-config # harbor-core-config - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - data: - app.conf: | - appname = Harbor - runmode = dev - enablegzip = true - - [dev] - httpport = 8080 - EnableXSRF = true - XSRFKey = {{ randAlphaNum 40 }} - XSRFExpire = 3600 - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "harbor-database" - POSTGRESQL_PORT: "5432" - POSTGRESQL_USERNAME: "postgres" - POSTGRESQL_DATABASE: "registry" - POSTGRESQL_SSLMODE: "disable" - POSTGRESQL_MAX_IDLE_CONNS: "50" - POSTGRESQL_MAX_OPEN_CONNS: "100" - #EXT_ENDPOINT: "https://harbor-core.us.amazee.io" # Will be generated based on the automatically created route - CORE_URL: "http://harbor-core" - JOBSERVICE_URL: "http://harbor-jobservice" - REGISTRY_URL: "http://harborregistry:5000" - TOKEN_SERVICE_URL: "http://harbor-core/service/token" - WITH_NOTARY: "false" - #NOTARY_URL: "" - CFG_EXPIRATION: "5" - ADMIRAL_URL: "NA" - WITH_CLAIR: "true" - CLAIR_DB_HOST: "harbor-database" - CLAIR_DB_PORT: "5432" - CLAIR_DB_USERNAME: "postgres" - CLAIR_DB: "postgres" - CLAIR_DB_SSLMODE: "disable" - CLAIR_URL: "http://harborclair:6060" - CLAIR_ADAPTER_URL: "http://harborclair:6060" - REGISTRY_STORAGE_PROVIDER_NAME: "s3" - WITH_CHARTMUSEUM: "false" - #CHART_REPOSITORY_URL: "http://harbor-chartmuseum" - LOG_LEVEL: "error" - CONFIG_PATH: "/etc/core/app.conf" - SYNC_QUOTA: "false" - SYNC_REGISTRY: "false" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL: "harbor-redis:6379,100," - _REDIS_URL_REG: "redis://harbor-redis:6379/2" - PORTAL_URL: "http://harbor-portal" - REGISTRYCTL_URL: "http://harborregistry:8080" - CLAIR_HEALTH_CHECK_SERVER_URL: "http://harborclair:6061" - WITH_TRIVY: "true" - TRIVY_ADAPTER_URL: "harbor-trivy:8080" - ROBOT_TOKEN_DURATION: "500" - HTTP_PROXY: "" - HTTPS_PROXY: "" - NO_PROXY: "harbor-core,harbor-jobservice,harbor-database,harborclair,harborclairadapter,harborregistry,harbor-portal,harbor-trivy,127.0.0.1,localhost,.local,.internal" -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # harbor-core - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - ports: - - port: 80 - targetPort: 8080 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: apps/v1 - kind: Deployment - metadata: - name: ${SERVICE_NAME} # harbor-core - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - hostname: ${SERVICE_NAME} # harbor-core - containers: - - name: ${SERVICE_NAME} # harbor-core - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /api/ping - port: 8080 - initialDelaySeconds: 20 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/ping - port: 8080 - initialDelaySeconds: 20 - periodSeconds: 10 - envFrom: - - configMapRef: - name: ${SERVICE_NAME}-config # harbor-core - - configMapRef: - name: "lagoon-env" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: harbor-core-secret - key: HARBOR_CORE_SECRET - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: harbor-jobservice-secret - key: HARBOR_JOBSERVICE_SECRET - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: harbor-admin-password - key: HARBOR_ADMIN_PASSWORD - - name: CLAIR_DB_PASSWORD - valueFrom: - secretKeyRef: - name: clair-db-password - key: CLAIR_DB_PASSWORD - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: postgresql-password - key: POSTGRESQL_PASSWORD - ports: - - containerPort: 8080 - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - - name: psc - mountPath: /etc/core/token - volumes: - - name: config - configMap: - name: harbor-core-config - items: - - key: app.conf - path: app.conf - - name: secret-key - configMap: - name: harbor-core - items: - - key: secretKey - path: key - - name: token-service-private-key - configMap: - name: harbor-core - - name: psc - emptyDir: {} diff --git a/services/harbor-core/harbor-core_ci.conf.yaml b/services/harbor-core/harbor-core_ci.conf.yaml deleted file mode 100644 index 93bcb6c265..0000000000 --- a/services/harbor-core/harbor-core_ci.conf.yaml +++ /dev/null @@ -1,7 +0,0 @@ -appname = Harbor -runmode = dev -enablegzip = true - -[dev] -httpport = 8080 -EnableXSRF = false \ No newline at end of file diff --git a/services/harbor-database/Dockerfile b/services/harbor-database/Dockerfile deleted file mode 100644 index 3d6c236c07..0000000000 --- a/services/harbor-database/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/postgres -LABEL maintainer="amazee.io" - -COPY docker-entrypoint-initdb.d /docker-entrypoint-initdb.d \ No newline at end of file diff --git a/services/harbor-database/docker-entrypoint-initdb.d/initial-registry.sql b/services/harbor-database/docker-entrypoint-initdb.d/initial-registry.sql deleted file mode 100644 index 36e141d89e..0000000000 --- a/services/harbor-database/docker-entrypoint-initdb.d/initial-registry.sql +++ /dev/null @@ -1,4 +0,0 @@ -CREATE DATABASE registry ENCODING 'UTF8'; -\c registry; - -CREATE TABLE schema_migrations(version bigint not null primary key, dirty boolean not null); \ No newline at end of file diff --git a/services/harbor-database/harbor-database.yml b/services/harbor-database/harbor-database.yml deleted file mode 100644 index 4bbed512df..0000000000 --- a/services/harbor-database/harbor-database.yml +++ /dev/null @@ -1,134 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harbor-database-template - annotations: - description: "A template for generating Harbor's database service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # "harbor-database" - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - ports: - - port: 5432 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: apps/v1 - kind: StatefulSet - metadata: - name: ${SERVICE_NAME} # harbor-database - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - serviceName: ${SERVICE_NAME} # harbor-database - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - hostname: ${SERVICE_NAME} # harbor-database - initContainers: - - name: "remove-lost-found" - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - command: ["rm", "-Rf", "/var/lib/postgresql/data/lost+found"] - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: postgresql-password - key: POSTGRESQL_PASSWORD - containers: - - name: ${SERVICE_NAME} # harbor-database - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - readinessProbe: - tcpSocket: - port: 5432 - initialDelaySeconds: 15 - timeoutSeconds: 1 - livenessProbe: - tcpSocket: - port: 5432 - initialDelaySeconds: 120 - periodSeconds: 5 - env: - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: postgresql-password - key: POSTGRESQL_PASSWORD - - name: POSTGRES_USER - value: "postgres" - - name: POSTGRES_DB - value: "postgres" - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: "5Gi" \ No newline at end of file diff --git a/services/harbor-jobservice/Dockerfile b/services/harbor-jobservice/Dockerfile deleted file mode 100644 index 0bb6a56b09..0000000000 --- a/services/harbor-jobservice/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM goharbor/harbor-jobservice:v1.10.2 -LABEL maintainer="amazee.io" \ No newline at end of file diff --git a/services/harbor-jobservice/ci-config.yaml b/services/harbor-jobservice/ci-config.yaml deleted file mode 100644 index 758464d132..0000000000 --- a/services/harbor-jobservice/ci-config.yaml +++ /dev/null @@ -1,21 +0,0 @@ -protocol: "http" -port: 8080 -worker_pool: - workers: 10 - backend: "redis" - redis_pool: - redis_url: "harbor-redis:6379/1" - namespace: "harbor_job_service_namespace" -job_loggers: - - name: "FILE" - level: ERROR - settings: # Customized settings of logger - base_dir: "/tmp" - sweeper: - duration: 14 #days - settings: # Customized settings of sweeper - work_dir: "/tmp" -#Loggers for the job service -loggers: - - name: "STD_OUTPUT" - level: ERROR \ No newline at end of file diff --git a/services/harbor-jobservice/harbor-jobservice.yml b/services/harbor-jobservice/harbor-jobservice.yml deleted file mode 100644 index 29272e16be..0000000000 --- a/services/harbor-jobservice/harbor-jobservice.yml +++ /dev/null @@ -1,181 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harbor-jobservice-template - annotations: - description: "A template for generating Harbor's jobservice service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME} # harbor-jobservice - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - data: - config.yml: | - protocol: "http" - port: 8080 - worker_pool: - workers: 10 - backend: "redis" - redis_pool: - redis_url: "harbor-redis:6379/1" - namespace: "harbor_job_service_namespace" - job_loggers: - - name: "FILE" - level: ERROR - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: 14 #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: ERROR -- apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: ${SERVICE_NAME} # harbor-jobservice - labels: - helm.sh/resource-policy: keep - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # harbor-jobservice - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - ports: - - port: 80 - targetPort: 8080 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: apps/v1 - kind: Deployment - metadata: - name: ${SERVICE_NAME} # harbor-jobservice - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - hostname: ${SERVICE_NAME} # harbor-jobservice - containers: - - name: ${SERVICE_NAME} # harbor-jobservice - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /api/v1/stats - port: 8080 - initialDelaySeconds: 20 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - port: 8080 - initialDelaySeconds: 20 - periodSeconds: 10 - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: harbor-core-secret - key: HARBOR_CORE_SECRET - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: harbor-jobservice-secret - key: HARBOR_JOBSERVICE_SECRET - - name: CORE_URL - value: "http://harbor-core" - - name: REGISTRY_CONTROLLER_URL - value: "http://harborregistry:8080" - - name: LOG_LEVEL - value: debug - - name: HTTP_PROXY - value: "" - - name: HTTPS_PROXY - value: "" - - name: NO_PROXY - value: "harbor-core,harbor-jobservice,harbor-database,harborclair,harborclairadapter,harborregistry,harbor-portal,127.0.0.1,localhost,.local,.internal" - ports: - - containerPort: 8080 - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: - volumes: - - name: jobservice-config - configMap: - name: ${SERVICE_NAME} # harbor-jobservice - - name: job-logs - persistentVolumeClaim: - claimName: ${SERVICE_NAME} # harbor-jobservice diff --git a/services/harbor-nginx/Dockerfile b/services/harbor-nginx/Dockerfile deleted file mode 100644 index 0e671216db..0000000000 --- a/services/harbor-nginx/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM goharbor/nginx-photon:v1.10.0 -LABEL maintainer="amazee.io" - -COPY nginx.conf /etc/nginx/nginx.conf - -USER root - -RUN chown root:root /etc/nginx/nginx.conf && chmod 744 /etc/nginx/nginx.conf && chmod -R g+r /etc/nginx - -USER nginx \ No newline at end of file diff --git a/services/harbor-nginx/ci.nginx.conf b/services/harbor-nginx/ci.nginx.conf deleted file mode 100644 index debbd46b49..0000000000 --- a/services/harbor-nginx/ci.nginx.conf +++ /dev/null @@ -1,122 +0,0 @@ -worker_processes auto; -pid /tmp/nginx.pid; - -events { - worker_connections 1024; - use epoll; - multi_accept on; -} - -http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server harbor-core:8080; - } - - upstream portal { - server harbor-portal:8080; - } - - log_format timed_combined '$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - server { - listen 8080; - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass http://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass http://core/api/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass http://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location ~* /v1(\.\d\d)/(.*)? { - return 404; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass http://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass http://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } -} diff --git a/services/harbor-nginx/harbor-nginx.yml b/services/harbor-nginx/harbor-nginx.yml deleted file mode 100644 index aa20c64d51..0000000000 --- a/services/harbor-nginx/harbor-nginx.yml +++ /dev/null @@ -1,129 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harbor-nginx-template - annotations: - description: "A template for generating Harbor's nginx service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # harbor-nginx - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - type: ClusterIP - ports: - - name: http - port: 80 - targetPort: 8080 - - name: notary - port: 4443 - targetPort: 4443 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: apps/v1 - kind: Deployment - metadata: - name: ${SERVICE_NAME} # harbor-nginx - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - hostname: ${SERVICE_NAME} # harbor-nginx - containers: - - name: ${SERVICE_NAME} # harbor-nginx - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - httpGet: - scheme: HTTP - path: / - port: 8080 - initialDelaySeconds: 1 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: HTTP - path: / - port: 8080 - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 -- apiVersion: route.openshift.io/v1 - kind: Route - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} # harbor-nginx - namespace: ${OPENSHIFT_PROJECT} - spec: - host: ${SERVICE_ROUTER_URL} - path: / - port: - targetPort: http - tls: - insecureEdgeTerminationPolicy: Redirect - termination: edge - to: - kind: Service - name: harbor-nginx - weight: 100 - wildcardPolicy: None \ No newline at end of file diff --git a/services/harbor-nginx/nginx.conf b/services/harbor-nginx/nginx.conf deleted file mode 100644 index dd0562430e..0000000000 --- a/services/harbor-nginx/nginx.conf +++ /dev/null @@ -1,122 +0,0 @@ -worker_processes auto; -pid /tmp/nginx.pid; - -events { - worker_connections 1024; - use epoll; - multi_accept on; -} - -http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server harbor-core; - } - - upstream portal { - server harbor-portal; - } - - log_format timed_combined '$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - server { - listen 8080; - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass http://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass http://core/api/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass http://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location ~* /v1(\.\d\d)/(.*)? { - return 404; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass http://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass http://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings. - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } -} \ No newline at end of file diff --git a/services/harbor-portal/Dockerfile b/services/harbor-portal/Dockerfile deleted file mode 100644 index 57d7ca96ae..0000000000 --- a/services/harbor-portal/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM goharbor/harbor-portal:v1.10.0 -LABEL maintainer="amazee.io" \ No newline at end of file diff --git a/services/harbor-portal/harbor-portal.yml b/services/harbor-portal/harbor-portal.yml deleted file mode 100644 index 0d527f2f4d..0000000000 --- a/services/harbor-portal/harbor-portal.yml +++ /dev/null @@ -1,101 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harbor-portal-template - annotations: - description: "A template for generating Harbor's portal service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # harbor-portal - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - ports: - - port: 80 - targetPort: 8080 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: apps/v1 - kind: Deployment - metadata: - name: ${SERVICE_NAME} # harbor-portal - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - hostname: ${SERVICE_NAME} # harbor-portal - containers: - - name: ${SERVICE_NAME} # harbor-portal - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - httpGet: - path: / - port: 8080 - initialDelaySeconds: 1 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: 8080 - initialDelaySeconds: 1 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "lagoon-env" - ports: - - containerPort: 8080 diff --git a/services/harbor-redis/Dockerfile b/services/harbor-redis/Dockerfile deleted file mode 100644 index 91d5e5da65..0000000000 --- a/services/harbor-redis/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM goharbor/redis-photon:v1.10.0 -LABEL maintainer="amazee.io" \ No newline at end of file diff --git a/services/harbor-redis/harbor-redis.yml b/services/harbor-redis/harbor-redis.yml deleted file mode 100644 index 34fe6081ef..0000000000 --- a/services/harbor-redis/harbor-redis.yml +++ /dev/null @@ -1,110 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harbor-redis-template - annotations: - description: "A template for generating Harbor's redis service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # harbor-redis - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - ports: - - port: 6379 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: apps/v1 - kind: StatefulSet - metadata: - name: ${SERVICE_NAME} # harbor-redis - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - serviceName: ${SERVICE_NAME} # harbor-redis - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - hostname: ${SERVICE_NAME} # harbor-redis - containers: - - name: ${SERVICE_NAME} # harbor-redis - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: - volumeClaimTemplates: - - metadata: - name: data - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: "5Gi" \ No newline at end of file diff --git a/services/harbor-trivy/Dockerfile b/services/harbor-trivy/Dockerfile deleted file mode 100644 index 4e45815911..0000000000 --- a/services/harbor-trivy/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM aquasec/harbor-scanner-trivy:0.11.0 -LABEL maintainer="amazee.io" - -COPY install_cert.sh /home/scanner -COPY entrypoint.sh /home/scanner -USER root -RUN mkdir /home/scanner/.cache \ - && mkdir /home/scanner/.cache/trivy \ - && mkdir /home/scanner/.cache/reports \ - && chown scanner:root -R /home/scanner/.cache \ - && chown scanner:root -R /home/scanner/.cache \ - && chown -R scanner:root /home/scanner \ - && chmod g+rw /home/scanner -USER scanner \ No newline at end of file diff --git a/services/harbor-trivy/entrypoint.sh b/services/harbor-trivy/entrypoint.sh deleted file mode 100755 index e938f09239..0000000000 --- a/services/harbor-trivy/entrypoint.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -e - -/home/scanner/install_cert.sh - -/home/scanner/bin/scanner-trivy \ No newline at end of file diff --git a/services/harbor-trivy/harbor-trivy.yml b/services/harbor-trivy/harbor-trivy.yml deleted file mode 100644 index 8714b07469..0000000000 --- a/services/harbor-trivy/harbor-trivy.yml +++ /dev/null @@ -1,169 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harbor-trivy-template - annotations: - description: "A template for generating Harbor's trivy scanner service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # harbor-trivy - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - ports: - - name: api-server - port: 8080 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: v1 - kind: Secret - metadata: - name: ${SERVICE_NAME} # harbor-trivy - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - type: Opaque - data: - redisURL: cmVkaXM6Ly9oYXJib3ItcmVkaXM6NjM3OS81 # redis://harbor-redis:6379/5 - gitHubToken: "" -- apiVersion: apps/v1 - kind: StatefulSet - metadata: - name: ${SERVICE_NAME} # harbor-trivy - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - containers: - - name: ${SERVICE_NAME} # harbor-trivy - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - envFrom: - - configMapRef: - name: "lagoon-env" - env: - - name: "SCANNER_LOG_LEVEL" - value: "error" - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: "false" - - name: "SCANNER_TRIVY_VULN_TYPE" - value: "os,library" - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: harbor-trivy - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: "false" - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: "false" - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: harbor-trivy - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: harbor-trivy - key: redisURL - ports: - - name: api-server - containerPort: 8080 - volumeMounts: - - mountPath: /tmp - name: tmp-data - - mountPath: /home/scanner/.cache - name: data - volumes: - - name: tmp-data - emptyDir: {} - volumeClaimTemplates: - - metadata: - name: data - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: "5Gi" \ No newline at end of file diff --git a/services/harbor-trivy/install_cert.sh b/services/harbor-trivy/install_cert.sh deleted file mode 100755 index d8f73936f4..0000000000 --- a/services/harbor-trivy/install_cert.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -set -e - -if [ ! -f /home/scanner/ca-bundle.crt.original ]; then - cp /etc/pki/tls/certs/ca-bundle.crt /home/scanner/ca-bundle.crt.original -else - echo "Cert bundle copy operation failed. Exiting!!" - exit 0 -fi - -cp /home/scanner/ca-bundle.crt.original /etc/pki/tls/certs/ca-bundle.crt - -if [ -f /harbor_cust_cert ]; then - if grep -q "Photon" /etc/lsb-release; then - echo "Appending trust CA to ca-bundle ..." - for z in /harbor_cust_cert/*; do - case ${z} in - *.crt | *.ca | *.ca-bundle | *.pem) - if [ -d "$z" ]; then - echo "$z is dirictory, skip it ..." - else - cat $z >> /etc/pki/tls/certs/ca-bundle.crt - echo " $z Appended ..." - fi - ;; - *) echo "$z is Not ca file ..." ;; - esac - done - echo "CA appending is Done." - else - echo "Current OS is not Photon, skip appending ca bundle" - fi -fi \ No newline at end of file diff --git a/services/harborregistry/Dockerfile b/services/harborregistry/Dockerfile deleted file mode 100644 index 5676b790e2..0000000000 --- a/services/harborregistry/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.10.0 - -COPY entrypoint.sh /home/harbor/ -COPY --chown=harbor:root install_cert.sh /home/harbor/ - -ENV HARBOR_REGISTRY_STORAGE_AMAZON_ENDPOINT="https://s3.amazonaws.com" - -USER root - -RUN chmod -R g+w /etc/pki/tls/certs \ -&& chgrp -R root /etc/pki/tls/certs \ -&& chmod -R g+w /var/lib/registry \ -&& chmod -R g+w /etc/registry \ -&& chgrp -R root /home/harbor \ -&& chmod -R g+w /home/harbor \ -&& if [ -f /storage ]; then chmod -R g+w /storage; fi - -USER 10000 \ No newline at end of file diff --git a/services/harborregistry/entrypoint.sh b/services/harborregistry/entrypoint.sh deleted file mode 100755 index fa0c7e7482..0000000000 --- a/services/harborregistry/entrypoint.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -# The directory /var/lib/registry is within the container, and used to store image in CI testing. -# So for now we need to chown to it to avoid failure in CI. -#if [ -d /var/lib/registry ]; then -# chown 10000:10000 -R /var/lib/registry -#fi -# -#if [ -d /storage ]; then -# if ! stat -c '%u:%g' /storage | grep -q '10000:10000' ; then -# # 10000 is the id of harbor user/group. -# # Usually NFS Server does not allow changing owner of the export directory, -# # so need to skip this step and requires NFS Server admin to set its owner to 10000. -# chown 10000:10000 -R /storage -# fi -#fi - -if [[ -f "/etc/registry/pre_config.yml" ]]; then - - # if HARBOR_NGINX_ENDPOINT is not defined, we try to load it from LAGOON_ROUTES - if [[ -z ${HARBOR_NGINX_ENDPOINT+x} ]]; then - REGEX="(https?://harbor[0-9A-Za-z\.-]+)" - - if [[ $LAGOON_ROUTES =~ $REGEX ]]; then - export HARBOR_NGINX_ENDPOINT=${BASH_REMATCH[1]} - else - echo "Could not load harbor URL from LAGOON_ROUTES, please define via HARBOR_NGINX_ENDPOINT env variable" - exit 1 - fi - fi - - sed -e "s|\$HARBOR_NGINX_ENDPOINT|$HARBOR_NGINX_ENDPOINT|g" -e "s|\$HARBOR_REGISTRY_STORAGE_AMAZON_REGION|$HARBOR_REGISTRY_STORAGE_AMAZON_REGION|g" -e "s|\$HARBOR_REGISTRY_STORAGE_AMAZON_BUCKET|$HARBOR_REGISTRY_STORAGE_AMAZON_BUCKET|g" -e "s|\$HARBOR_REGISTRY_STORAGE_AMAZON_ENDPOINT|$HARBOR_REGISTRY_STORAGE_AMAZON_ENDPOINT|g" /etc/registry/pre_config.yml > /etc/registry/config.yml -fi - -/home/harbor/install_cert.sh - -case "$1" in - *.yaml|*.yml) set -- registry serve "$@" ;; - serve|garbage-collect|help|-*) set -- registry "$@" ;; -esac - -exec "$@" -#sudo -E -u \#10000 "$@" diff --git a/services/harborregistry/harborregistry.yml b/services/harborregistry/harborregistry.yml deleted file mode 100644 index fac0886b4e..0000000000 --- a/services/harborregistry/harborregistry.yml +++ /dev/null @@ -1,266 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - name: harborregistry-template - annotations: - description: "A template for generating Harbor's registry service" -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: HARBORREGISTRY_SERVICE_IMAGE - description: Pullable image of registry service - required: true - - name: HARBORREGISTRYCTL_SERVICE_IMAGE - description: Pullable image of registryctl service - required: true - - name: HARBORREGISTRY_SERVICE_NAME - description: Pullable image of registry service - value: harborregistry - - name: HARBORREGISTRYCTL_SERVICE_NAME - description: Pullable image of registryctl service - value: harborregistryctl -objects: -- apiVersion: v1 - kind: Secret - metadata: - name: ${SERVICE_NAME} # harborregistry - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - type: Opaque - data: - REGISTRY_REDIS_PASSWORD: "" - #REGISTRY_STORAGE_S3_ACCESSKEY: "" # Will be stored in the Lagoon API - #REGISTRY_STORAGE_S3_SECRETKEY: "" # Will be stored in the Lagoon API -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME} # harborregistry - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - data: - config.yml: | - version: 0.1 - log: - level: error - fields: - service: registry - storage: - s3: - region: $HARBOR_REGISTRY_STORAGE_AMAZON_REGION - bucket: $HARBOR_REGISTRY_STORAGE_AMAZON_BUCKET - regionendpoint: $HARBOR_REGISTRY_STORAGE_AMAZON_ENDPOINT - cache: - layerinfo: redis - maintenance: - uploadpurging: - enabled: false - delete: - enabled: true - redirect: - disable: false - redis: - addr: "harbor-redis:6379" - db: 2 - http: - addr: :5000 - relativeurls: true - # set via environment variable - # secret: placeholder - debug: - addr: localhost:5001 - auth: - token: - issuer: harbor-token-issuer - realm: "$HARBOR_NGINX_ENDPOINT/service/token" - rootcertbundle: /etc/registry/root.crt - service: harbor-registry - validation: - disabled: true - notifications: - endpoints: - - name: harbor - disabled: false - url: http://harbor-core/service/notifications - timeout: 3000ms - threshold: 5 - backoff: 1s - ignoredmediatypes: - - application/vnd.docker.image.rootfs.diff.tar.gzip - - application/vnd.docker.image.rootfs.foreign.diff.tar.gzip - - application/vnd.oci.image.layer.v1.tar - - application/vnd.oci.image.layer.v1.tar+gzip - - application/vnd.oci.image.layer.v1.tar+zstd - - application/vnd.oci.image.layer.nondistributable.v1.tar - - application/vnd.oci.image.layer.nondistributable.v1.tar+gzip - - application/vnd.oci.image.layer.nondistributable.v1.tar+zstd - - application/octet-stream - ctl-config.yml: | - --- - protocol: "http" - port: 8080 - log_level: error -- apiVersion: v1 - kind: Service - metadata: - name: ${SERVICE_NAME} # harborregistry - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - ports: - - name: registry - port: 5000 - - name: controller - port: 8080 - selector: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} -- apiVersion: apps/v1 - kind: Deployment - metadata: - name: ${SERVICE_NAME} # harborregistry - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - replicas: 1 - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - containers: - - name: ${HARBORREGISTRY_SERVICE_NAME} - image: ${HARBORREGISTRY_SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - httpGet: - path: / - port: 5000 - initialDelaySeconds: 1 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: 5000 - initialDelaySeconds: 1 - periodSeconds: 10 - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: ${SERVICE_NAME} # harborregistry - - configMapRef: - name: "lagoon-env" - ports: - - containerPort: 5000 - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: /storage - subPath: - - name: registry-root-certificate - mountPath: /etc/registry/root.crt - subPath: tls.crt - - name: registry-config - mountPath: /etc/registry/pre_config.yml - subPath: config.yml - - name: ${HARBORREGISTRYCTL_SERVICE_NAME} - image: ${HARBORREGISTRYCTL_SERVICE_IMAGE} - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /api/health - port: 8080 - initialDelaySeconds: 1 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - port: 8080 - initialDelaySeconds: 1 - periodSeconds: 10 - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: ${SERVICE_NAME} # harborregistry - - configMapRef: - name: "lagoon-env" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: harbor-core-secret - key: HARBOR_CORE_SECRET - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: harbor-jobservice-secret - key: HARBOR_JOBSERVICE_SECRET - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: harborregistry-secret - key: HARBOR_REGISTRY_SECRET - ports: - - containerPort: 8080 - volumeMounts: - - name: registry-data - mountPath: /storage - subPath: - - name: registry-config - mountPath: /etc/registry/pre_config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - volumes: - - name: registry-root-certificate - configMap: - name: harbor-core - - name: registry-config - configMap: - name: "harborregistry" - - name: registry-data - emptyDir: {} diff --git a/services/harborregistry/install_cert.sh b/services/harborregistry/install_cert.sh deleted file mode 100755 index 5c838d69ec..0000000000 --- a/services/harborregistry/install_cert.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -set -e - -if [ ! -f /home/harbor/ca-bundle.crt.original ]; then - cp /etc/pki/tls/certs/ca-bundle.crt /home/harbor/ca-bundle.crt.original -else - echo "Cert bundle copy operation failed. Exiting!!" - exit 0 -fi - -cp /home/harbor/ca-bundle.crt.original /etc/pki/tls/certs/ca-bundle.crt - -if [ -f /harbor_cust_cert ]; then - if grep -q "Photon" /etc/lsb-release; then - echo "Appending trust CA to ca-bundle ..." - for z in /harbor_cust_cert/*; do - case ${z} in - *.crt | *.ca | *.ca-bundle | *.pem) - if [ -d "$z" ]; then - echo "$z is dirictory, skip it ..." - else - cat $z >> /etc/pki/tls/certs/ca-bundle.crt - echo " $z Appended ..." - fi - ;; - *) echo "$z is Not ca file ..." ;; - esac - done - echo "CA appending is Done." - else - echo "Current OS is not Photon, skip appending ca bundle" - fi -fi \ No newline at end of file diff --git a/services/harborregistry/registry_ci.cfg.yaml b/services/harborregistry/registry_ci.cfg.yaml deleted file mode 100644 index 7adcb2d493..0000000000 --- a/services/harborregistry/registry_ci.cfg.yaml +++ /dev/null @@ -1,62 +0,0 @@ -version: 0.1 -log: - level: debug - fields: - service: registry -storage: - s3: - accesskey: minio - secretkey: minio123 - region: us-east-1 - bucket: harbor-images - regionendpoint: http://172.17.0.1:9000 - encrypt: false - secure: false - v4auth: true - chunksize: 5242880 - rootdirectory: / - cache: - layerinfo: redis - maintenance: - uploadpurging: - enabled: false - delete: - enabled: true - redirect: - disable: false -redis: - addr: "harbor-redis:6379" - db: 2 -http: - addr: :5000 - relativeurls: true - # set via environment variable - # secret: placeholder - debug: - addr: localhost:5001 -auth: - token: - issuer: harbor-token-issuer - realm: "http://172.17.0.1:8084/service/token" - rootcertbundle: /etc/registry/root.crt - service: harbor-registry -validation: - disabled: true -notifications: - endpoints: - - name: harbor - disabled: false - url: http://harbor-core:8080/service/notifications - timeout: 3000ms - threshold: 5 - backoff: 1s - ignoredmediatypes: - - application/vnd.docker.image.rootfs.diff.tar.gzip - - application/vnd.docker.image.rootfs.foreign.diff.tar.gzip - - application/vnd.oci.image.layer.v1.tar - - application/vnd.oci.image.layer.v1.tar+gzip - - application/vnd.oci.image.layer.v1.tar+zstd - - application/vnd.oci.image.layer.nondistributable.v1.tar - - application/vnd.oci.image.layer.nondistributable.v1.tar+gzip - - application/vnd.oci.image.layer.nondistributable.v1.tar+zstd - - application/octet-stream \ No newline at end of file diff --git a/services/harborregistryctl/Dockerfile b/services/harborregistryctl/Dockerfile deleted file mode 100644 index a0fce4bf33..0000000000 --- a/services/harborregistryctl/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM goharbor/harbor-registryctl:v1.10.0 - -COPY --chown=harbor:root start.sh /home/harbor/ -COPY --chown=harbor:root install_cert.sh /home/harbor/ - -USER root - -RUN chmod -R g+w /etc/pki/tls/certs \ -&& chgrp -R root /etc/pki/tls/certs \ -&& chmod -R g+w /var/lib/registry \ -&& chmod -R g+w /etc/registry \ -&& chgrp -R root /home/harbor \ -&& chmod -R g+w /home/harbor \ -&& if [ -f /storage ]; then chmod -R g+w /storage; fi - -USER 10000 \ No newline at end of file diff --git a/services/harborregistryctl/harborregistry.yml b/services/harborregistryctl/harborregistry.yml deleted file mode 120000 index f321f698f4..0000000000 --- a/services/harborregistryctl/harborregistry.yml +++ /dev/null @@ -1 +0,0 @@ -../harborregistry/harborregistry.yml \ No newline at end of file diff --git a/services/harborregistryctl/install_cert.sh b/services/harborregistryctl/install_cert.sh deleted file mode 100755 index e510b785dd..0000000000 --- a/services/harborregistryctl/install_cert.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -set -e - -if [ ! -f /home/harbor/ca-bundle.crt.original ]; then - cp /etc/pki/tls/certs/ca-bundle.crt /home/harbor/ca-bundle.crt.original -else - exit 0 -fi - -cp /home/harbor/ca-bundle.crt.original /etc/pki/tls/certs/ca-bundle.crt - -if [ -f /harbor_cust_cert ]; then - if grep -q "Photon" /etc/lsb-release; then - echo "Appending trust CA to ca-bundle ..." - for z in /harbor_cust_cert/*; do - case ${z} in - *.crt | *.ca | *.ca-bundle | *.pem) - if [ -d "$z" ]; then - echo "$z is dirictory, skip it ..." - else - cat $z >> /etc/pki/tls/certs/ca-bundle.crt - echo " $z Appended ..." - fi - ;; - *) echo "$z is Not ca file ..." ;; - esac - done - echo "CA appending is Done." - else - echo "Current OS is not Photon, skip appending ca bundle" - fi -fi \ No newline at end of file diff --git a/services/harborregistryctl/registryctl_ci.cfg.yaml b/services/harborregistryctl/registryctl_ci.cfg.yaml deleted file mode 100644 index 2cd83dd518..0000000000 --- a/services/harborregistryctl/registryctl_ci.cfg.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -protocol: "http" -port: 8080 -log_level: debug \ No newline at end of file diff --git a/services/harborregistryctl/start.sh b/services/harborregistryctl/start.sh deleted file mode 100755 index 00ede0dc86..0000000000 --- a/services/harborregistryctl/start.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -# The directory /var/lib/registry is within the container, and used to store image in CI testing. -# So for now we need to chown to it to avoid failure in CI. -#if [ -d /var/lib/registry ]; then -# chown 10000:10000 -R /var/lib/registry -#fi - -#if [ -d /storage ]; then -# if ! stat -c '%u:%g' /storage | grep -q '10000:10000' ; then -# # 10000 is the id of harbor user/group. -# # Usually NFS Server does not allow changing owner of the export directory, -# # so need to skip this step and requires NFS Server admin to set its owner to 10000. -# chown 10000:10000 -R /storage -# fi -#fi - -if [[ -f "/etc/registry/pre_config.yml" ]]; then - - # if HARBOR_NGINX_ENDPOINT is not defined, we try to load it from LAGOON_ROUTES - if [[ -z ${HARBOR_NGINX_ENDPOINT+x} ]]; then - REGEX="(https?://harbor[0-9A-Za-z\.-]+)" - - if [[ $LAGOON_ROUTES =~ $REGEX ]]; then - export HARBOR_NGINX_ENDPOINT=${BASH_REMATCH[1]} - else - echo "Could not load harbor URL from LAGOON_ROUTES, please define via HARBOR_NGINX_ENDPOINT env variable" - exit 1 - fi - fi - - sed -e "s|\$HARBOR_NGINX_ENDPOINT|$HARBOR_NGINX_ENDPOINT|g" -e "s|\$HARBOR_REGISTRY_STORAGE_AMAZON_REGION|$HARBOR_REGISTRY_STORAGE_AMAZON_REGION|g" -e "s|\$HARBOR_REGISTRY_STORAGE_AMAZON_BUCKET|$HARBOR_REGISTRY_STORAGE_AMAZON_BUCKET|g" /etc/registry/pre_config.yml > /etc/registry/config.yml -fi - -/home/harbor/install_cert.sh - -exec "/home/harbor/harbor_registryctl" "-c" "/etc/registryctl/config.yml" \ No newline at end of file diff --git a/services/keycloak-db/.lagoon.app.yml b/services/keycloak-db/.lagoon.app.yml deleted file mode 100644 index dc3871d3a4..0000000000 --- a/services/keycloak-db/.lagoon.app.yml +++ /dev/null @@ -1,151 +0,0 @@ ---- -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-mariadb -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneline of Cronjobs - value: "" - - name: PERSISTENT_STORAGE_SIZE - description: Size of the Storage to request - value: "5Gi" - - name: ENVIRONMENT_TYPE - description: production level of this environment - value: 'production' -objects: -- apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - annotations: - appuio.ch/backup: "false" - name: ${SERVICE_NAME}-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: ${PERSISTENT_STORAGE_SIZE} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 3306-tcp - port: 3306 - protocol: TCP - targetPort: 3306 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - annotations: - appuio.ch/backupcommand: /bin/sh -c "mysqldump --max-allowed-packet=500M --events --routines --quick --add-locks --no-autocommit --single-transaction --all-databases" - backup.appuio.ch/file-extension: .${SERVICE_NAME}.sql - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - volumes: - - name: ${SERVICE_NAME}-data - persistentVolumeClaim: - claimName: ${SERVICE_NAME}-data - priorityClassName: lagoon-priority-${ENVIRONMENT_TYPE} - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 3306 - protocol: TCP - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 15 - timeoutSeconds: 1 - livenessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 120 - periodSeconds: 5 - volumeMounts: - - name: ${SERVICE_NAME}-data - mountPath: /var/lib/mysql - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: keycloak-db-password - key: KEYCLOAK_DB_PASSWORD - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange diff --git a/services/keycloak-db/Dockerfile b/services/keycloak-db/Dockerfile index 017ef41f79..4796935785 100644 --- a/services/keycloak-db/Dockerfile +++ b/services/keycloak-db/Dockerfile @@ -1,5 +1,9 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/mariadb +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/mariadb:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION ENV MARIADB_DATABASE=keycloak \ MARIADB_USER=keycloak \ diff --git a/services/keycloak/.lagoon.app.yml b/services/keycloak/.lagoon.app.yml deleted file mode 100644 index f8d374dcdc..0000000000 --- a/services/keycloak/.lagoon.app.yml +++ /dev/null @@ -1,195 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-keycloak -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: '' - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: 'Rolling' - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: '' -objects: - - apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 8080 - protocol: TCP - readinessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 180 - timeoutSeconds: 1 - livenessProbe: - httpGet: - port: 8080 - initialDelaySeconds: 240 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: KEYCLOAK_LAGOON_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: keycloak-lagoon-admin-password - key: KEYCLOAK_LAGOON_ADMIN_PASSWORD - - name: KEYCLOAK_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: keycloak-admin-password - key: KEYCLOAK_ADMIN_PASSWORD - - name: KEYCLOAK_API_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: keycloak-api-client-secret - key: KEYCLOAK_API_CLIENT_SECRET - - name: KEYCLOAK_AUTH_SERVER_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: keycloak-auth-server-client-secret - key: KEYCLOAK_AUTH_SERVER_CLIENT_SECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: JGROUPS_DISCOVERY_PROTOCOL - value: dns.DNS_PING - - name: JGROUPS_DISCOVERY_PROPERTIES - value: dns_query=${SERVICE_NAME}-headless - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: keycloak-db-password - key: KEYCLOAK_DB_PASSWORD - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} - - apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 8080-tcp - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} - - apiVersion: v1 - kind: Route - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - host: ${SERVICE_ROUTER_URL} - tls: - insecureEdgeTerminationPolicy: Redirect - termination: edge - port: - targetPort: 8080-tcp - to: - kind: Service - name: ${SERVICE_NAME} - - apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME}-headless - spec: - clusterIP: None - ports: - - name: 7600-tcp - port: 7600 - protocol: TCP - targetPort: 7600 - selector: - service: ${SERVICE_NAME} - sessionAffinity: None - type: ClusterIP - status: - loadBalancer: {} diff --git a/services/keycloak/Dockerfile b/services/keycloak/Dockerfile index b632c3a8d7..aaaa86c90f 100644 --- a/services/keycloak/Dockerfile +++ b/services/keycloak/Dockerfile @@ -1,7 +1,11 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM jboss/keycloak:7.0.1 +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + USER root RUN microdnf install -y nc python2 \ diff --git a/services/logs-collector/.lagoon.yml b/services/logs-collector/.lagoon.yml deleted file mode 100644 index 4e0cfe6367..0000000000 --- a/services/logs-collector/.lagoon.yml +++ /dev/null @@ -1,292 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-remote-openshift-template-logs-collector -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true -objects: -- apiVersion: extensions/v1beta1 - kind: DaemonSet - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - selector: - matchLabels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - containers: - - env: - - name: K8S_HOST_URL - value: https://kubernetes.default.svc.cluster.local - - name: ES_HOST - value: none - - name: ES_PORT - value: "9200" - - name: ES_CLIENT_CERT - value: /etc/fluent/keys/cert - - name: ES_CLIENT_KEY - value: /etc/fluent/keys/key - - name: ES_CA - value: /etc/fluent/keys/ca - - name: OPS_HOST - value: none - - name: OPS_PORT - value: "9200" - - name: OPS_CLIENT_CERT - value: /etc/fluent/keys/cert - - name: OPS_CLIENT_KEY - value: /etc/fluent/keys/key - - name: OPS_CA - value: /etc/fluent/keys/ca - - name: ES_COPY - value: "false" - - name: JOURNAL_SOURCE - - name: JOURNAL_READ_FROM_HEAD - - name: BUFFER_QUEUE_LIMIT - value: "32" - - name: BUFFER_SIZE_LIMIT - value: 8m - - name: FLUENTD_CPU_LIMIT - valueFrom: - resourceFieldRef: - containerName: ${SERVICE_NAME} - divisor: "0" - resource: limits.cpu - - name: FLUENTD_MEMORY_LIMIT - valueFrom: - resourceFieldRef: - containerName: ${SERVICE_NAME} - divisor: "0" - resource: limits.memory - - name: FILE_BUFFER_LIMIT - value: 256Mi - - name: LOGS_FORWARDER_SHARED_KEY - value: secret - envFrom: - - configMapRef: - name: lagoon-env - image: registry.access.redhat.com/openshift3/logging-fluentd:v3.6 - name: ${SERVICE_NAME} - resources: - limits: - memory: 512Mi - requests: - cpu: 100m - memory: 512Mi - securityContext: - privileged: true - volumeMounts: - - mountPath: /run/log/journal - name: runlogjournal - - mountPath: /var/log - name: varlog - - mountPath: /var/lib/docker/containers - name: varlibdockercontainers - readOnly: true - - mountPath: /etc/fluent/configs.d/user - name: config - readOnly: true - - mountPath: /etc/docker-hostname - name: dockerhostname - readOnly: true - - mountPath: /etc/localtime - name: localtime - readOnly: true - - mountPath: /etc/sysconfig/docker - name: dockercfg - readOnly: true - - mountPath: /etc/docker - name: dockerdaemoncfg - readOnly: true - - mountPath: /var/lib/fluentd - name: filebufferstorage - - mountPath: /fluentd/ssl/ - name: ca-cert - restartPolicy: Always - serviceAccount: logs-collector - serviceAccountName: logs-collector - tolerations: - - effect: NoSchedule - key: autoscaled - operator: Equal - value: 'true' - - effect: NoSchedule - key: appuio.ch/autoscaled - operator: Equal - value: 'true' - - effect: NoSchedule - key: lagoon/build - operator: Exists - volumes: - - hostPath: - path: /run/log/journal - name: runlogjournal - - hostPath: - path: /var/log - name: varlog - - hostPath: - path: /var/lib/docker/containers - name: varlibdockercontainers - - configMap: - defaultMode: 420 - name: ${SERVICE_NAME}-config - name: config - - hostPath: - path: /etc/hostname - name: dockerhostname - - hostPath: - path: /etc/localtime - name: localtime - - hostPath: - path: /etc/sysconfig/docker - name: dockercfg - - hostPath: - path: /etc/docker - name: dockerdaemoncfg - - hostPath: - path: /var/lib/fluentd - name: filebufferstorage - - configMap: - items: - - key: LOGS_FORWARDER_CA_CERT - path: ca_cert.pem - name: ${SERVICE_NAME}-config - name: ca-cert - templateGeneration: 1 - updateStrategy: - rollingUpdate: - maxUnavailable: 1 - type: RollingUpdate -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME}-config - data: - fluent.conf: | - # This file is the fluentd configuration entrypoint. Edit with care. - - #@include configs.d/openshift/system.conf - - - log_level info - - - ## sources - ## ordered so that syslog always runs last... - #@include configs.d/dynamic/input-docker-*.conf - - - @type tail - @label @INGRESS - path "/var/log/containers/*.log" - pos_file "/var/log/es-containers.log.pos" - time_format %Y-%m-%dT%H:%M:%S.%N%Z - tag kubernetes.* - format json - keep_time_key true - read_from_head "true" - exclude_path ["/var/log/containers/logs-collector*", "/var/log/containers/logs-forwarder*"] - - - @include configs.d/dynamic/input-syslog-*.conf - @include configs.d/openshift/input-post-*.conf - ## - - - secure-forward.conf: | - - @type secure_forward - self_hostname "#{ENV['HOSTNAME']}" - secure true - shared_key "#{ENV['LOGS_FORWARDER_SHARED_KEY']}" - ca_cert_path "/fluentd/ssl/ca_cert.pem" - - host logs-forwarder - port 24284 - - - flush_interval 1s - - LOGS_FORWARDER_CA_CERT: |- - -----BEGIN CERTIFICATE----- - MIIDIDCCAggCAQEwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCVVMxCzAJBgNV - BAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRkwFwYDVQQDDBBTZWN1cmVG - b3J3YXJkIENBMB4XDTcwMDEwMTAwMDAwMFoXDTIzMDUzMTE4MTQyOVowTTELMAkG - A1UEBhMCVVMxCzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRkw - FwYDVQQDDBBTZWN1cmVGb3J3YXJkIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A - MIIBCgKCAQEA60S/3/jRlMoNEwnCPsa++7vuQ5wScEPkCikTmisH400LUHG+yl4L - pxp3yYJqSfUougyDE3D9Tm/1toexrZJS0uLotNxdsbwcJfJaAdO5T5auhWkxzwQp - RCALXgOI+JdIIkj6qSuX3HJIqKOnWRzr8H/0tBM0z2sVT86VG8f4VPgMhfKfN3dg - XiZjM70BZfw5lq3QIbyyP7zjdN8h0rgleC3VpyKl9pU3T0aXsSFfREqst9M6kvbY - ls0kciEdAaN/KZxb11gAZpBFe4pDYTR77ux3QSuZFpqWx0y2ZKbD8OYKDows+khB - BQc1hIhmQoGc9Y9q37x7KW9q0RShnitulQIDAQABoxAwDjAMBgNVHRMEBTADAQH/ - MA0GCSqGSIb3DQEBCwUAA4IBAQA+K6qyduJPWAuBa+o0IzSvgHvnoEw6CsiZ7V9G - qKlUNkT7nf8lrPAA5mVC+B3vt/dM91+X3zDTzY/DUHK+tRyNs3S0JvMTym4JuZ/F - mUOpRzna+75//8YwUVto9CnE/0Ae+j+6A0WUzxOQ0SD5Z77h1gQHOw9OKnZoyGJy - T1UbP15BHknWLLXRZkeFK+GD+QZ7vZCWdCkjv29Yz3n5dTFRp5UhguuS6W0FY/8R - E0okMYItqUUI5HdZK+2QsdOOk+RyU+gG0+2sLQV3FS4g7BMz5eUR4UBB3trU9x6b - 3RRMk1JALaQKR59kFLGtQeNpz5LGfJufgfCvRptdNo3S/mQZ - -----END CERTIFICATE----- \ No newline at end of file diff --git a/services/logs-concentrator/Dockerfile b/services/logs-concentrator/Dockerfile index 189d07d4d3..070d383197 100644 --- a/services/logs-concentrator/Dockerfile +++ b/services/logs-concentrator/Dockerfile @@ -1,6 +1,9 @@ FROM fluent/fluentd:v1.11-1 LABEL maintainer="support@amazee.io" +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + USER root RUN apk add --no-cache --update --virtual .build-deps \ diff --git a/services/logs-db-curator/.lagoon.app.yml b/services/logs-db-curator/.lagoon.app.yml deleted file mode 100644 index f169e56165..0000000000 --- a/services/logs-db-curator/.lagoon.app.yml +++ /dev/null @@ -1,92 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-cli -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: CRONJOBS - value: | - 01 0 * * * /lagoon/cronjob.sh "/usr/bin/curator --config /curator/curator.yml /curator/actions.yml" - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange diff --git a/services/logs-db-curator/Dockerfile b/services/logs-db-curator/Dockerfile index 70e8fa62ab..bb69d62c63 100644 --- a/services/logs-db-curator/Dockerfile +++ b/services/logs-db-curator/Dockerfile @@ -1,6 +1,9 @@ ARG IMAGE_REPO FROM ${IMAGE_REPO:-lagoon}/curator +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + COPY actions.yml curator.yml /curator/ COPY 90-generate-http-auth.sh /lagoon/entrypoints/ diff --git a/services/logs-db-ui/.lagoon.yml b/services/logs-db-ui/.lagoon.yml deleted file mode 100644 index f1204a9da4..0000000000 --- a/services/logs-db-ui/.lagoon.yml +++ /dev/null @@ -1,126 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-kibana -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 5601 - protocol: TCP - readinessProbe: - tcpSocket: - port: 5601 - initialDelaySeconds: 20 - livenessProbe: - tcpSocket: - port: 5601 - initialDelaySeconds: 120 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: LOGSDB_KIBANASERVER_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_KIBANASERVER_PASSWORD - name: logs-db-kibanaserver-password - - name: KEYCLOAK_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: keycloak-admin-password - key: KEYCLOAK_ADMIN_PASSWORD - - name: OPENDISTRO_SECURITY_COOKIE_PASSWORD - valueFrom: - secretKeyRef: - name: opendistro-security-cookie-password - key: OPENDISTRO_SECURITY_COOKIE_PASSWORD - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} diff --git a/services/logs-db-ui/Dockerfile b/services/logs-db-ui/Dockerfile deleted file mode 100644 index 7c9f8e3186..0000000000 --- a/services/logs-db-ui/Dockerfile +++ /dev/null @@ -1,68 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/kibana:7 - -ENV NODE_OPTIONS="--max-old-space-size=2048" \ - LOGSDB_KIBANASERVER_PASSWORD=kibanaserver \ - LOGSDB_ADMIN_PASSWORD=admin \ - ELASTICSEARCH_HOSTS=http://logs-db-service:9200 \ - OPENDISTRO_SECURITY_OPENID_CLIENT_SECRET=xxxx \ - KEYCLOAK_ADMIN_USER=admin \ - KEYCLOAK_ADMIN_PASSWORD=admin - -RUN echo $'\n\ -xpack.monitoring.enabled: true\n\ -xpack.graph.enabled: true\n\ -xpack.ml.enabled: false\n\ -xpack.apm.enabled: false\n\ -xpack.security.enabled: false\n\ -xpack.watcher.enabled: false\n\ -xpack.spaces.enabled: false\n\ -xpack.infra.enabled: false \n\ -xpack.uptime.enabled: false\n\ -xpack.reporting.enabled: false\n\ -\n\ -# Configure the Kibana internal server user\n\ -elasticsearch.username: "kibanaserver"\n\ -elasticsearch.password: "${LOGSDB_KIBANASERVER_PASSWORD}"\n\ -\n\ -# Disable SSL verification because we use self-signed demo certificates\n\ -elasticsearch.ssl.verificationMode: none\n\ -\n\ -# Whitelist the opendistro_security Multi Tenancy Header\n\ -elasticsearch.requestHeadersWhitelist: [ "Authorization", "securitytenant" ]\n\ -\n\ -# Enable multitenancy\n\ -opendistro_security.multitenancy.enabled: true\n\ -# Disable opendistro_security global tenant\n\ -opendistro_security.multitenancy.tenants.enable_global: false\n\ -opendistro_security.multitenancy.tenants.enable_private: false\n\ -# v14 and above: Enable OpenID authentication\n\ -opendistro_security.auth.type: "openid"\n\ -\n\ -# the IdP metadata endpoint\n\ -opendistro_security.openid.connect_url: "${KEYCLOAK_URL:-}/auth/realms/lagoon/.well-known/openid-configuration"\n\ -\n\ -# the ID of the OpenID Connect client in your IdP\n\ -opendistro_security.openid.client_id: "lagoon-opendistro-security"\n\ -\n\ -# the client secret of the OpenID Connect client\n\ -opendistro_security.openid.client_secret: "${OPENDISTRO_SECURITY_OPENID_CLIENT_SECRET}"\n\ -\n\ -# the URL of kibana which us used as the redirect URL for openid -opendistro_security.openid.base_redirect_url: "${LOGSDB_UI_URL:-http://0.0.0.0:5601}"\n\ -\n\ -# optional: the scope of the identity token\n\ -opendistro_security.openid.scope: "profile email"\n\ -\n\ -opendistro_security.cookie.password: "${OPENDISTRO_SECURITY_COOKIE_PASSWORD:-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"\n\ -\n\ -' >> config/kibana.yml - -RUN bin/kibana-plugin --allow-root install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/kibana-plugins/opendistro-security/opendistro_security_kibana_plugin-1.6.0.0.zip - -COPY entrypoints/80-keycloak-url.bash /lagoon/entrypoints/ -COPY entrypoints/81-logs-db-ui-url.bash /lagoon/entrypoints/ -COPY entrypoints/90-keycloak-client-secret.bash /lagoon/entrypoints/ - -RUN fix-permissions config/kibana.yml - diff --git a/services/logs-db-ui/entrypoints/80-keycloak-url.bash b/services/logs-db-ui/entrypoints/80-keycloak-url.bash deleted file mode 100644 index 70d08eb472..0000000000 --- a/services/logs-db-ui/entrypoints/80-keycloak-url.bash +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - - -# if KEYCLOAK_URL is not defined, we try to load it from LAGOON_ROUTES -if [[ -z ${KEYCLOAK_URL+x} ]]; then - REGEX="(https?://keycloak[0-9A-Za-z\.-]+)" - - if [[ $LAGOON_ROUTES =~ $REGEX ]]; then - export KEYCLOAK_URL=${BASH_REMATCH[1]} - else - echo "Could not load keycloak URL from LAGOON_ROUTES, please define via KEYCLOAK_URL env variable" - exit 1 - fi -fi - diff --git a/services/logs-db-ui/entrypoints/81-logs-db-ui-url.bash b/services/logs-db-ui/entrypoints/81-logs-db-ui-url.bash deleted file mode 100644 index a0fba71c6f..0000000000 --- a/services/logs-db-ui/entrypoints/81-logs-db-ui-url.bash +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - - -# if LOGSDB_UI_URL is not defined, we try to load it from LAGOON_ROUTES -if [[ -z ${LOGSDB_UI_URL+x} ]]; then - REGEX="(https?://logs-db-ui[0-9A-Za-z\.-]+)" - - if [[ $LAGOON_ROUTES =~ $REGEX ]]; then - export LOGSDB_UI_URL=${BASH_REMATCH[1]} - else - echo "Could not load logs-db-ui URL from LAGOON_ROUTES, please define via LOGSDB_UI_URL env variable" - exit 1 - fi -fi - diff --git a/services/logs-db-ui/entrypoints/90-keycloak-client-secret.bash b/services/logs-db-ui/entrypoints/90-keycloak-client-secret.bash deleted file mode 100644 index 9c21e9a58d..0000000000 --- a/services/logs-db-ui/entrypoints/90-keycloak-client-secret.bash +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -set -o pipefail - -function is_keycloak_running { - local http_code=$(curl -s -o /dev/null -w "%{http_code}" $KEYCLOAK_URL/auth/admin/realms) - if [[ $http_code -eq 401 ]]; then - return 0 - else - return 1 - fi -} - -until is_keycloak_running; do - echo Keycloak still not running, waiting 5 seconds - sleep 5 -done - -load_client_secret() ( - # Load Client Secret for our client from Keycloak - echo " 1. Loading token" - TOKEN=$(set -eo pipefail; curl -f -s -k "$KEYCLOAK_URL/auth/realms/master/protocol/openid-connect/token" -H "Content-Type: application/x-www-form-urlencoded" -d "username=$KEYCLOAK_ADMIN_USER" -d "password=$KEYCLOAK_ADMIN_PASSWORD" -d 'grant_type=password' -d 'client_id=admin-cli'|python -c 'import sys, json; print json.load(sys.stdin)["access_token"]') - [ $? -ne 0 ] && exit 1 - echo " 2. Loading clientid" - CLIENT_ID=$(set -eo pipefail; curl -f -s -k "$KEYCLOAK_URL/auth/admin/realms/lagoon/clients?clientId=lagoon-opendistro-security&viewableOnly=true" -H "Accept: application/json" -H "Authorization: Bearer $TOKEN" |python -c 'import sys, json; print json.load(sys.stdin)[0]["id"]') - [ $? -ne 0 ] && exit 1 - echo " 3. Loading client secret" - export OPENDISTRO_SECURITY_OPENID_CLIENT_SECRET=$(set -eo pipefail; curl -f -s -k "$KEYCLOAK_URL/auth/admin/realms/lagoon/clients/$CLIENT_ID/client-secret" -H "Accept: application/json" -H "Authorization: Bearer $TOKEN" |python -c 'import sys, json; print json.load(sys.stdin)["value"]') - echo " 4. Injecting client secret into kibana config" - ep config/kibana.yml -) - -function fail { - echo $1 >&2 - exit 1 -} - -function retry { - local n=1 - local max=5 - local delay=15 - - while true; do - "$@" && break || { - if [[ $n -lt $max ]]; then - ((n++)) - echo "Loading Keycloak Client Secret for OpenDistroSecurity failed. Attempt $n/$max:" - sleep $delay; - else - fail "Loading Keycloak Client Secret for OpenDistroSecurity has failed after $n attempts." - fi - } - done -} - -echo "Loading Keycloak Client Secret for OpenDistroSecurity..." - -retry load_client_secret - -echo "Successfully loaded Keycloak Client Secret for OpenDistroSecurity" \ No newline at end of file diff --git a/services/logs-db/.lagoon.cluster.yml b/services/logs-db/.lagoon.cluster.yml deleted file mode 100644 index 1d87e86abe..0000000000 --- a/services/logs-db/.lagoon.cluster.yml +++ /dev/null @@ -1,242 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-elasticsearch-cluster -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: apps/v1beta1 - kind: StatefulSet - metadata: - name: ${SERVICE_NAME} - spec: - serviceName: ${SERVICE_NAME} - replicas: 3 - selector: - matchLabels: - service: ${SERVICE_NAME} - template: - metadata: - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - service: ${SERVICE_NAME} - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: lagoon-elasticsearch - operator: NotIn - values: - - forbidden - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - name: ${SERVICE_NAME} - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - ports: - - containerPort: 9200 - protocol: TCP - - containerPort: 9300 - protocol: TCP - readinessProbe: - tcpSocket: - port: 9200 - initialDelaySeconds: 20 - livenessProbe: - tcpSocket: - port: 9200 - initialDelaySeconds: 360 - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /usr/share/elasticsearch/data - name: ${SERVICE_NAME} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: DISCOVERY_ZEN_MINIMUM_MASTER_NODES - value: '2' - - name: CRONJOBS - value: ${CRONJOBS} - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: LOGSDB_KIBANASERVER_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_KIBANASERVER_PASSWORD - name: logs-db-kibanaserver-password - updateStrategy: - type: RollingUpdate - volumeClaimTemplates: - - metadata: - name: ${SERVICE_NAME} - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100G - storageClassName: lagoon-elasticsearch -- apiVersion: apps/v1beta1 - kind: StatefulSet - metadata: - name: ${SERVICE_NAME}-archive - spec: - serviceName: ${SERVICE_NAME} - replicas: 3 - selector: - matchLabels: - service: ${SERVICE_NAME} - boxtype: archive - template: - metadata: - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - service: ${SERVICE_NAME} - boxtype: archive - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: lagoon-logs-db-archive - operator: NotIn - values: - - forbidden - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - - key: boxtype - operator: In - values: - - archive - topologyKey: kubernetes.io/hostname - containers: - - name: ${SERVICE_NAME} - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - ports: - - containerPort: 9200 - protocol: TCP - - containerPort: 9300 - protocol: TCP - readinessProbe: - tcpSocket: - port: 9200 - initialDelaySeconds: 20 - livenessProbe: - tcpSocket: - port: 9200 - initialDelaySeconds: 120 - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /usr/share/elasticsearch/data - name: ${SERVICE_NAME}-archive - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: DISCOVERY_ZEN_MINIMUM_MASTER_NODES - value: '2' - - name: BOX_TYPE - value: archive - - name: NODE_MASTER - value: 'false' - - name: CRONJOBS - value: ${CRONJOBS} - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: LOGSDB_KIBANASERVER_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_KIBANASERVER_PASSWORD - name: logs-db-kibanaserver-password - updateStrategy: - type: RollingUpdate - volumeClaimTemplates: - - metadata: - name: ${SERVICE_NAME}-archive - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1000Gi - storageClassName: lagoon-logs-db-archive \ No newline at end of file diff --git a/services/logs-db/.lagoon.single.yml b/services/logs-db/.lagoon.single.yml deleted file mode 100644 index 7a15279dab..0000000000 --- a/services/logs-db/.lagoon.single.yml +++ /dev/null @@ -1,113 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-elasticsearch -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Recreate" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 9200 - protocol: TCP - readinessProbe: - tcpSocket: - port: 9200 - initialDelaySeconds: 20 - livenessProbe: - tcpSocket: - port: 9200 - initialDelaySeconds: 120 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: LOGSDB_KIBANASERVER_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_KIBANASERVER_PASSWORD - name: logs-db-kibanaserver-password - resources: - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /usr/share/elasticsearch/data - name: ${SERVICE_NAME} - volumes: - - name: ${SERVICE_NAME} - persistentVolumeClaim: - claimName: ${SERVICE_NAME} - test: false - triggers: - - type: ConfigChange - status: {} \ No newline at end of file diff --git a/services/logs-db/Dockerfile b/services/logs-db/Dockerfile deleted file mode 100644 index 870ac74fd1..0000000000 --- a/services/logs-db/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/elasticsearch:7 - -RUN bin/elasticsearch-plugin install -b https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-security/opendistro_security-1.6.0.0.zip \ - && bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-sql/opendistro_sql-1.6.0.0.zip \ - && bin/elasticsearch-plugin install -b repository-s3 \ - && bin/elasticsearch-plugin install -b repository-azure \ - && chmod a+x /usr/share/elasticsearch/plugins/opendistro_security/tools/install_demo_configuration.sh \ - && /usr/share/elasticsearch/plugins/opendistro_security/tools/install_demo_configuration.sh -y \ - && sed -i 's/opendistro_security.ssl.http.*//' config/elasticsearch.yml \ - && sed -i 's/opendistro_security.audit.type: internal_elasticsearch//' config/elasticsearch.yml \ - && echo "opendistro_security.roles_mapping_resolution: BOTH" >> config/elasticsearch.yml \ - && echo "xpack.monitoring.collection.enabled: true" >> config/elasticsearch.yml \ - && echo "xpack.monitoring.history.duration: 1d" >> config/elasticsearch.yml \ - && echo "node.attr.box_type: \${BOX_TYPE}" >> config/elasticsearch.yml \ - && chmod +x plugins/opendistro_security/tools/hash.sh - -ENV LOGSDB_ADMIN_PASSWORD=admin \ - LOGSDB_KIBANASERVER_PASSWORD=kibanaserver \ - BOX_TYPE=live \ - NODE_ML=false \ - XPACK_ML_ENABLED=false \ - XPACK_WATCHER_ENABLED=false \ - JAVA_HOME=/usr/share/elasticsearch/jdk - -COPY opendistro_security/roles_mapping.yml plugins/opendistro_security/securityconfig/roles_mapping.yml -COPY opendistro_security/internal_users.yml plugins/opendistro_security/securityconfig/internal_users.yml -COPY opendistro_security/config.yml plugins/opendistro_security/securityconfig/config.yml -RUN fix-permissions plugins/opendistro_security/securityconfig - -COPY entrypoints/80-keycloak-url.bash /lagoon/entrypoints/ - -COPY start.sh /start.sh - -CMD ["/start.sh"] diff --git a/services/logs-db/entrypoints/80-keycloak-url.bash b/services/logs-db/entrypoints/80-keycloak-url.bash deleted file mode 100644 index 70d08eb472..0000000000 --- a/services/logs-db/entrypoints/80-keycloak-url.bash +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - - -# if KEYCLOAK_URL is not defined, we try to load it from LAGOON_ROUTES -if [[ -z ${KEYCLOAK_URL+x} ]]; then - REGEX="(https?://keycloak[0-9A-Za-z\.-]+)" - - if [[ $LAGOON_ROUTES =~ $REGEX ]]; then - export KEYCLOAK_URL=${BASH_REMATCH[1]} - else - echo "Could not load keycloak URL from LAGOON_ROUTES, please define via KEYCLOAK_URL env variable" - exit 1 - fi -fi - diff --git a/services/logs-db/opendistro_security/config.yml b/services/logs-db/opendistro_security/config.yml deleted file mode 100644 index e5628f151c..0000000000 --- a/services/logs-db/opendistro_security/config.yml +++ /dev/null @@ -1,43 +0,0 @@ -# This is the main Open Distro Security configuration file where authentication -# and authorization is defined. - -_meta: - type: "config" - config_version: 2 - -config: - dynamic: - kibana: - multitenancy_enabled: true - do_not_fail_on_forbidden: true - multi_rolespan_enabled: true - http: - anonymous_auth_enabled: false - xff: - enabled: false - internalProxies: '192\.168\.0\.10|192\.168\.0\.11' # regex pattern - remoteIpHeader: 'x-forwarded-for' - authc: - basic_internal_auth_domain: - http_enabled: true - transport_enabled: true - order: 0 - http_authenticator: - type: basic - challenge: false - authentication_backend: - type: intern - openid_auth_domain: - http_enabled: true - transport_enabled: true - order: 1 - http_authenticator: - type: openid - challenge: false - config: - subject_key: preferred_username - roles_key: groups - openid_connect_url: ${KEYCLOAK_URL}/auth/realms/lagoon/.well-known/openid-configuration - authentication_backend: - type: noop - authz: {} \ No newline at end of file diff --git a/services/logs-db/opendistro_security/internal_users.yml b/services/logs-db/opendistro_security/internal_users.yml deleted file mode 100644 index 63b94cc95a..0000000000 --- a/services/logs-db/opendistro_security/internal_users.yml +++ /dev/null @@ -1,18 +0,0 @@ -# This is the internal user database -# The hash value is a bcrypt hash and can be generated with plugin/tools/hash.sh - -_meta: - type: "internalusers" - config_version: 2 - -#password is: {admin-password} -admin: - reserved: true - hash: {admin-hash} - backend_roles: - - admin - -#password is: {kibanaserver-password} -kibanaserver: - reserved: true - hash: {kibanaserver-hash} \ No newline at end of file diff --git a/services/logs-db/opendistro_security/roles_mapping.yml b/services/logs-db/opendistro_security/roles_mapping.yml deleted file mode 100644 index 9d03844222..0000000000 --- a/services/logs-db/opendistro_security/roles_mapping.yml +++ /dev/null @@ -1,21 +0,0 @@ -# In this file users, backendroles and hosts can be mapped to Search Guard roles. -# Permissions for Search Guard roles are configured in sg_roles.yml - -_meta: - type: "rolesmapping" - config_version: 2 - -# this gives access to opendistro-security management -all_access: - backend_roles: - - admin - - platform-owner - -kibana_server: - reserved: true - users: - - kibanaserver - -kibana_user: - users: - - '*' \ No newline at end of file diff --git a/services/logs-db/start.sh b/services/logs-db/start.sh deleted file mode 100755 index 9ff0f064b8..0000000000 --- a/services/logs-db/start.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -m -e - -# Create hashes for the passwords -LOGSDB_ADMIN_PASSWORD_HASH=$(plugins/opendistro_security/tools/hash.sh -env LOGSDB_ADMIN_PASSWORD) -LOGSDB_KIBANASERVER_PASSWORD_HASH=$(plugins/opendistro_security/tools/hash.sh -env LOGSDB_KIBANASERVER_PASSWORD) - -# Fill hashes into the yaml file -sed -i 's@{admin-hash}@'"$LOGSDB_ADMIN_PASSWORD_HASH"'@' plugins/opendistro_security/securityconfig/internal_users.yml -sed -i 's@{kibanaserver-hash}@'"$LOGSDB_KIBANASERVER_PASSWORD_HASH"'@' plugins/opendistro_security/securityconfig/internal_users.yml - -# Fill clear text passwords, for easyness -sed -i 's@{admin-password}@'"$LOGSDB_ADMIN_PASSWORD"'@' plugins/opendistro_security/securityconfig/internal_users.yml -sed -i 's@{kibanaserver-password}@'"$LOGSDB_KIBANASERVER_PASSWORD"'@' plugins/opendistro_security/securityconfig/internal_users.yml - - -ep plugins/opendistro_security/securityconfig/config.yml - -set +e - -/usr/local/bin/docker-entrypoint.sh \ No newline at end of file diff --git a/services/logs-dispatcher/Dockerfile b/services/logs-dispatcher/Dockerfile index 7b9f0d7f05..3e6de57443 100644 --- a/services/logs-dispatcher/Dockerfile +++ b/services/logs-dispatcher/Dockerfile @@ -1,11 +1,15 @@ -FROM fluent/fluentd:v1.11-1 +FROM fluent/fluentd:v1.12-1 LABEL maintainer="support@amazee.io" +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + USER root RUN apk add --no-cache --update --virtual .build-deps \ build-base ruby-dev \ && gem install fluent-plugin-cloudwatch-logs \ + && gem install fluent-plugin-datadog \ && gem install fluent-plugin-kubernetes_metadata_filter \ && gem install fluent-plugin-multi-format-parser \ && gem install fluent-plugin-prometheus \ @@ -15,6 +19,8 @@ RUN apk add --no-cache --update --virtual .build-deps \ && gem install fluent-plugin-rewrite-tag-filter \ && gem install fluent-plugin-route \ && gem install fluent-plugin-s3 --no-document \ + && gem install fluent-plugin-splunk-enterprise \ + && gem install fluent-plugin-sumologic_output \ && gem sources --clear-all \ && apk del .build-deps \ && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem \ diff --git a/services/logs-forwarder/.lagoon.multi.yml b/services/logs-forwarder/.lagoon.multi.yml deleted file mode 100644 index ff6ecc392f..0000000000 --- a/services/logs-forwarder/.lagoon.multi.yml +++ /dev/null @@ -1,361 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-fluentd-multi -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: apps/v1beta1 - kind: StatefulSet - metadata: - name: ${SERVICE_NAME} - spec: - serviceName: ${SERVICE_NAME} - replicas: 3 - selector: - matchLabels: - service: ${SERVICE_NAME} - template: - metadata: - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - service: ${SERVICE_NAME} - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: lagoon-logs-forwarder - operator: NotIn - values: - - forbidden - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - name: ${SERVICE_NAME} - image: ${SERVICE_IMAGE} - imagePullPolicy: Always - ports: - - containerPort: 24284 - protocol: TCP - readinessProbe: - tcpSocket: - port: 24284 - initialDelaySeconds: 20 - livenessProbe: - tcpSocket: - port: 24284 - initialDelaySeconds: 120 - env: - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /fluentd/etc/ - name: config - - mountPath: /fluentd/buffer/ - name: ${SERVICE_NAME}-buffer - volumes: - - configMap: - items: - - key: FLUENT_CONF - path: fluent.conf - - key: LOGS_COPY_FORWARDER_EXTERNAL_FLUENTD - path: logs-copy-forward-external-fluentd.conf.disabled - - key: CONTAINER_LOGS_JSON - path: container-logs.json - name: ${SERVICE_NAME}-config - name: config - volumeClaimTemplates: - - metadata: - name: ${SERVICE_NAME}-buffer - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 20G - storageClassName: lagoon-logs-forwarder -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: secure-forward - port: 24284 - protocol: TCP - targetPort: 24284 - - name: http-metrics - port: 24231 - protocol: TCP - targetPort: 24231 - type: NodePort - selector: - service: ${SERVICE_NAME} -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME}-config - data: - FLUENT_CONF: |- - - log_level info - workers 4 - - - - @type forward - @id forward_in - @label @LOGS - tag forward - port 24284 - - self_hostname "#{ENV['HOSTNAME']}" - shared_key "#{ENV['LOGS_FORWARDER_SHARED_KEY']}" - - - ca_cert_path /fluentd/ssl/ca_cert.pem - ca_private_key_path /fluentd/ssl/ca_key.pem - ca_private_key_passphrase "#{ENV['LOGS_FORWARDER_PRIVATE_KEY_PASSPHRASE']}" - - - - - @type prometheus - bind 0.0.0.0 - port 24231 - metrics_path /metrics - - - @type prometheus_output_monitor - interval 10 - - hostname ${hostname} - - - - - - - LOGS_COPY_FORWARDER_EXTERNAL_FLUENTD: |- - - @type forward - @id forward_out - transport tls - tls_cert_path "/fluentd/ssl/ca_cert.pem" - tls_verify_hostname false - - self_hostname "#{ENV['HOSTNAME']}" - shared_key "#{ENV['LOGS_FORWARDER_EXTERNAL_FLUENTD_SHARED_KEY']}" - - - host "#{ENV['LOGS_FORWARDER_EXTERNAL_FLUENTD_HOST']}" - port "#{ENV['LOGS_FORWARDER_EXTERNAL_FLUENTD_PORT']}" - - - @type file - path /fluentd/buffer/external-fluentd - flush_mode interval - flush_interval 1s - chunk_limit_size 256MB - total_limit_size 15GB - flush_thread_count 8 - - - CONTAINER_LOGS_JSON: |- - { - "template" : "container-logs-*", - "version" : 70002, - "settings" : { - "index.refresh_interval" : "5s", - "number_of_shards": 1, - "number_of_replicas": 1, - "index.routing.allocation.require.box_type": "live", - "index.mapping.ignore_malformed": true - }, - "mappings" : { - "dynamic_templates" : [ { - "message_field" : { - "path_match" : "message", - "match_mapping_type" : "string", - "mapping" : { - "type" : "text", - "norms" : false - } - } - }, { - "string_fields" : { - "match" : "*", - "match_mapping_type" : "string", - "mapping" : { - "type" : "text", "norms" : false, - "fields" : { - "keyword" : { "type": "keyword", "ignore_above": 256 } - } - } - } - } ], - "properties" : { - "@timestamp": { "type": "date"}, - "@version": { "type": "keyword"}, - "geoip" : { - "dynamic": true, - "properties" : { - "ip": { "type": "ip" }, - "location" : { "type" : "geo_point" }, - "latitude" : { "type" : "half_float" }, - "longitude" : { "type" : "half_float" } - } - } - } - } - } diff --git a/services/logs-forwarder/.lagoon.single.yml b/services/logs-forwarder/.lagoon.single.yml deleted file mode 100644 index c450fbfabf..0000000000 --- a/services/logs-forwarder/.lagoon.single.yml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-fluentd -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 24284 - protocol: TCP - readinessProbe: - tcpSocket: - port: 24284 - initialDelaySeconds: 20 - livenessProbe: - tcpSocket: - port: 24284 - initialDelaySeconds: 120 - env: - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /fluentd/etc/ - name: config - - mountPath: /fluentd/buffer/ - name: buffer - volumes: - - configMap: - items: - - key: FLUENT_CONF - path: fluent.conf - - key: LOGS_COPY_FORWARDER_EXTERNAL_FLUENTD - path: logs-copy-forward-external-fluentd.conf.disabled - - key: CONTAINER_LOGS_JSON - path: container-logs.json - name: ${SERVICE_NAME}-config - name: config - - emptyDir: {} - name: buffer - triggers: - - type: ConfigChange -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: secure-forward - port: 24284 - protocol: TCP - targetPort: 24284 - - name: http-metrics - port: 24231 - protocol: TCP - targetPort: 24231 - type: NodePort - selector: - service: ${SERVICE_NAME} -- apiVersion: v1 - kind: ConfigMap - metadata: - name: ${SERVICE_NAME}-config - data: - FLUENT_CONF: |- - - log_level info - workers 4 - - - - @type forward - @id forward_in - @label @LOGS - tag forward - port 24284 - - self_hostname "#{ENV['HOSTNAME']}" - shared_key "#{ENV['LOGS_FORWARDER_SHARED_KEY']}" - - - ca_cert_path /fluentd/ssl/ca_cert.pem - ca_private_key_path /fluentd/ssl/ca_key.pem - ca_private_key_passphrase "#{ENV['LOGS_FORWARDER_PRIVATE_KEY_PASSPHRASE']}" - - - - - @type prometheus - bind 0.0.0.0 - port 24231 - metrics_path /metrics - - - @type prometheus_output_monitor - interval 10 - - hostname ${hostname} - - - - - - - LOGS_COPY_FORWARDER_EXTERNAL_FLUENTD: |- - - @type forward - @id forward_out - transport tls - tls_cert_path "/fluentd/ssl/ca_cert.pem" - tls_verify_hostname false - - self_hostname "#{ENV['HOSTNAME']}" - shared_key "#{ENV['FLUENTD_FORWARD_EXTERNAL_SHARED_KEY']}" - - - host "#{ENV['FLUENTD_FORWARD_EXTERNAL_HOST']}" - port "#{ENV['FLUENTD_FORWARD_EXTERNAL_PORT']}" - - - @type file - path /fluentd/buffer/external-fluentd - flush_mode interval - flush_interval 1s - chunk_limit_size 256MB - total_limit_size 15GB - flush_thread_count 8 - - - CONTAINER_LOGS_JSON: |- - { - "template" : "container-logs-*", - "version" : 70002, - "settings" : { - "index.refresh_interval" : "5s", - "number_of_shards": 1, - "number_of_replicas": 1, - "index.routing.allocation.require.box_type": "live", - "index.mapping.ignore_malformed": true - }, - "mappings" : { - "dynamic_templates" : [ { - "message_field" : { - "path_match" : "message", - "match_mapping_type" : "string", - "mapping" : { - "type" : "text", - "norms" : false - } - } - }, { - "string_fields" : { - "match" : "*", - "match_mapping_type" : "string", - "mapping" : { - "type" : "text", "norms" : false, - "fields" : { - "keyword" : { "type": "keyword", "ignore_above": 256 } - } - } - } - } ], - "properties" : { - "@timestamp": { "type": "date"}, - "@version": { "type": "keyword"}, - "geoip" : { - "dynamic": true, - "properties" : { - "ip": { "type": "ip" }, - "location" : { "type" : "geo_point" }, - "latitude" : { "type" : "half_float" }, - "longitude" : { "type" : "half_float" } - } - } - } - } - } diff --git a/services/logs-forwarder/Dockerfile b/services/logs-forwarder/Dockerfile deleted file mode 100644 index 379d3a8d94..0000000000 --- a/services/logs-forwarder/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -FROM fluent/fluentd:v0.12 -# Note; we are _NOT_ running fluentd v0.12 -# One of the gem commands below is upgrading fluentd to the newest version - -USER root - -RUN apk add --no-cache tini \ - && apk add --update --virtual .build-deps \ - sudo build-base ruby-dev \ - && gem install \ - fluent-plugin-elasticsearch \ - fluent-plugin-secure-forward \ - fluent-plugin-record-modifier \ - fluent-plugin-prometheus \ - && gem sources --clear-all \ - && apk del .build-deps \ - && rm -rf /var/cache/apk/* \ - /home/fluent/.gem/ruby/2.3.0/cache/*.gem - -COPY entrypoint.sh /bin/ -COPY ca_cert.pem ca_key.pem /fluentd/ssl/ - -RUN find "/fluentd" -exec chgrp 0 {} \; -RUN find "/fluentd" -exec chmod g+rw {} \; -RUN find "/fluentd" -type d -exec chmod g+x {} + - -ENV LOGS_FORWARDER_SHARED_KEY=secret \ - LOGS_FORWARDER_TARGET_SHARED_KEY=secret \ - LOGS_FORWARDER_PRIVATE_KEY_PASSPHRASE=amazing1 \ - ELASTICSEARCH_HOST=logs-db-service \ - ELASTICSEARCH_HOST_PORT=9200 - -ENTRYPOINT ["/sbin/tini", "--", "/bin/entrypoint.sh"] -CMD ["sh", "-c", "exec fluentd -c /fluentd/etc/fluent.conf -p /fluentd/plugins $FLUENTD_OPT"] diff --git a/services/logs-forwarder/ca_cert.pem b/services/logs-forwarder/ca_cert.pem deleted file mode 100644 index 6ff51b8fb7..0000000000 --- a/services/logs-forwarder/ca_cert.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDIDCCAggCAQEwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCVVMxCzAJBgNV -BAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRkwFwYDVQQDDBBTZWN1cmVG -b3J3YXJkIENBMB4XDTcwMDEwMTAwMDAwMFoXDTIzMDUzMTE4MTQyOVowTTELMAkG -A1UEBhMCVVMxCzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRkw -FwYDVQQDDBBTZWN1cmVGb3J3YXJkIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEA60S/3/jRlMoNEwnCPsa++7vuQ5wScEPkCikTmisH400LUHG+yl4L -pxp3yYJqSfUougyDE3D9Tm/1toexrZJS0uLotNxdsbwcJfJaAdO5T5auhWkxzwQp -RCALXgOI+JdIIkj6qSuX3HJIqKOnWRzr8H/0tBM0z2sVT86VG8f4VPgMhfKfN3dg -XiZjM70BZfw5lq3QIbyyP7zjdN8h0rgleC3VpyKl9pU3T0aXsSFfREqst9M6kvbY -ls0kciEdAaN/KZxb11gAZpBFe4pDYTR77ux3QSuZFpqWx0y2ZKbD8OYKDows+khB -BQc1hIhmQoGc9Y9q37x7KW9q0RShnitulQIDAQABoxAwDjAMBgNVHRMEBTADAQH/ -MA0GCSqGSIb3DQEBCwUAA4IBAQA+K6qyduJPWAuBa+o0IzSvgHvnoEw6CsiZ7V9G -qKlUNkT7nf8lrPAA5mVC+B3vt/dM91+X3zDTzY/DUHK+tRyNs3S0JvMTym4JuZ/F -mUOpRzna+75//8YwUVto9CnE/0Ae+j+6A0WUzxOQ0SD5Z77h1gQHOw9OKnZoyGJy -T1UbP15BHknWLLXRZkeFK+GD+QZ7vZCWdCkjv29Yz3n5dTFRp5UhguuS6W0FY/8R -E0okMYItqUUI5HdZK+2QsdOOk+RyU+gG0+2sLQV3FS4g7BMz5eUR4UBB3trU9x6b -3RRMk1JALaQKR59kFLGtQeNpz5LGfJufgfCvRptdNo3S/mQZ ------END CERTIFICATE----- \ No newline at end of file diff --git a/services/logs-forwarder/ca_key.pem b/services/logs-forwarder/ca_key.pem deleted file mode 100644 index f9d859b2bf..0000000000 --- a/services/logs-forwarder/ca_key.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,521127E3EAEFF3D17444685300173DFF - -rCU605eIzXyhonVbQgylk5lJMsiOv9EdM9FtLepGjuA49rG9DnLLgUivl3U2Lwjl -8RKqAnxX1BwTRooGnR9REjV5aUV35IzDUv4EFldHnOqPMN2dM0rQuLJd04uvVtD0 -yZhc3PbFiLU4rcSsBda9XYtbr/anruvT6+WVzLVh3rTdF/n1qERvoUI0RFAAzs6x -5B4OlCW2bFsENE6TJQw8IMrh+ERVhs0tWbeHufdsP2a71RrdIda9u6icVQNuEtE4 -yqjT5ww7K3luLgG7OGC9IpJSypVRWRnjPHq9aA0+K7ZP/WIOW+ZnwA1q/KlFHqX8 -uOCn46vIWvgsDFNeFHmVJ2Fr3ty5W8LPZw77FQuIkOvw8Fj3iUl+Z4PfAHWIXxLM -UB8rchuDqEWCgK2vuQzCZDIEYc+3GRn3XcL29Ic69DbpHa/dn9vybEzY8ANMadh5 -b5fb1IzJJIaJfUjRpSZ+53JRZo6uK0FM6XEIpkBv3KcsiXbJj2xDMw0kpkDAyKUn -8P6MgxPAZpOn7mX9fCOKFoz6qudWm0Gg+1DLxUN3XUqWarYkBHWA9FoKaWRgTcCj -UHKMlaXcUHLt8Bd43f91B9+H3takywlIAlgQA7tEimcfiWKDOpdsdkoXKADMaKqI -tpBtrSO5hxO4GzVU8OmubGigGLQgPrFkAddqrAq5IjaW38R8i4xYBPOEsN4vbSEZ -KGpyLIgkA1RaUYpGgTHecCa2V4zgn/qRsxjzHBt8y1cpZPSjSrn7Mm9MC53fhUvZ -PzRzySnc42jBFUaNMSKKUI2XIYYd3qrff1xlCNEuFRyw0RbJ0RVnjmCtWbRz/3Ag -jVhbx50YXu8KdpMVUaB1Hsq7NiMyRJSpL29cxmakFTmIgb3sE3TzWqxNnmbgbO7B -j3ftKJ/RT/fUKIHgEiRTcOTVGeZuB1JCX6CcPGlgaq7WzLtaSmUxPwRjSH52VfZb -V1z9MuqSbSjaLA55Wwt9U98YWErwXv5LSgTTT/FD4rAREW0qgRLdN9ruJDTNIWpQ -4u4CDcrkR5ojzniwFwxuiVSfU0EbHflFTaXe3YPPNsaysWFbycknpzC4kJPEZJxS -96ATV6FVYnz2sEBNncAjJFjqPLieKKJS69cUZUxO2icSkgNk6hzTCxDQKZsTpMiP -/P7gTWf6eoREphAkyhATsRhmbjfcoWA+EndszvXvdYE8svg/5jPQV4cRCtxGFW+o -tqxVEvVmh0VrgN2aClWJ0ldh4RITYBsnsKrPB3R4K9m8og/DVyLHVXL8dnVcx7tP -YOuHhgyFGH/dQXAjSCBwmTmExr7A3hHBxDrdDoxjc5i76RC0yfwoMJcWQW8HYx5c -CIAD4+biKC3HdWbyu4myAmqpg0V1yyIjMEpw2RO4gkMBk1ZHxAz/5ZqjN2U0BjpC -9WoRdFN5AAxm8KrCGDLOee1+jkdUjf4JYNOMQr7m/8X7faEK6Dh8J8NJlSIBeMb6 -qalWCu1g8kWGZdOvMyPtu2ZCOBTEvwVQL5acIG8i3Bw7l0epA6OIF43zfQ4nfWW0 -nBcAjjexVvEXVwHiJBhinlwP9lpGBZLpo5/2ClFCJqgSTPG+cKfFQAlhUosp03i0 ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/services/logs-forwarder/entrypoint.sh b/services/logs-forwarder/entrypoint.sh deleted file mode 100755 index 6f36a2410c..0000000000 --- a/services/logs-forwarder/entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# If $FLUENT_FORWARD_EXTERNAL_ENABLED is set, we enable the forward external config -if [ "$LOGS_FORWARDER_EXTERNAL_FLUENTD_ENABLED" == "true" ] && [ -f /fluentd/etc/logs-copy-forward-external-fluentd.conf.disabled ]; then - - # check that all env variables are set that we will need. - if [ -z $LOGS_FORWARDER_EXTERNAL_FLUENTD_SHARED_KEY ]; then echo "LOGS_FORWARDER_EXTERNAL_FLUENTD_SHARED_KEY is not set, but needed for FLUENT_FORWARD_EXTERNAL_ENABLED"; exit 1; fi - if [ -z $LOGS_FORWARDER_EXTERNAL_FLUENTD_HOST ]; then echo "LOGS_FORWARDER_EXTERNAL_FLUENTD_HOST is not set, but needed for FLUENT_FORWARD_EXTERNAL_ENABLED"; exit 1; fi - if [ -z $LOGS_FORWARDER_EXTERNAL_FLUENTD_PORT ]; then echo "LOGS_FORWARDER_EXTERNAL_FLUENTD_PORT is not set, but needed for FLUENT_FORWARD_EXTERNAL_ENABLED"; exit 1; fi - - mkdir -p /fluentd/conf.d/ - - cp /fluentd/etc/logs-copy-forward-external-fluentd.conf.disabled /fluentd/conf.d/logs-copy-forward-external-fluentd.conf -fi - -exec "$@" diff --git a/services/logs-tee/Dockerfile b/services/logs-tee/Dockerfile index 812a8cf7c5..3d320f0cf3 100644 --- a/services/logs-tee/Dockerfile +++ b/services/logs-tee/Dockerfile @@ -1,7 +1,9 @@ -ARG ALPINE_VERSION -FROM alpine:${ALPINE_VERSION} +FROM alpine:3.12 LABEL maintainer="support@amazee.io" +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + RUN addgroup -g 1000 -S socat && \ adduser -u 1000 -S socat -G socat && \ apk add --no-cache socat bash diff --git a/services/logs2email/.lagoon.app.yml b/services/logs2email/.lagoon.app.yml deleted file mode 100644 index 9023aabf5e..0000000000 --- a/services/logs2email/.lagoon.app.yml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} diff --git a/services/logs2email/Dockerfile b/services/logs2email/Dockerfile index 7b7019b019..db745c1d04 100644 --- a/services/logs2email/Dockerfile +++ b/services/logs2email/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION COPY entrypoints/50-ssmtp.sh /lagoon/entrypoints/ COPY ssmtp.conf /etc/ssmtp/ssmtp.conf diff --git a/services/logs2logs-db/.lagoon.yml b/services/logs2logs-db/.lagoon.yml deleted file mode 100644 index 12fa0ddcba..0000000000 --- a/services/logs2logs-db/.lagoon.yml +++ /dev/null @@ -1,198 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-logstash -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 3 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 9600 - protocol: TCP - readinessProbe: - httpGet: - port: 9600 - initialDelaySeconds: 20 - livenessProbe: - httpGet: - port: 9600 - initialDelaySeconds: 120 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: CRONJOBS - value: ${CRONJOBS} - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: RABBITMQ_USER - valueFrom: - secretKeyRef: - key: RABBITMQ_USERNAME - name: rabbitmq-username - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - key: RABBITMQ_PASSWORD - name: rabbitmq-password - - name: LOGSDB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: XPACK_MANAGEMENT_ELASTICSEARCH_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: XPACK_MONITORING_ELASTICSEARCH_PASSWORD - valueFrom: - secretKeyRef: - key: LOGSDB_ADMIN_PASSWORD - name: logs-db-admin-password - - name: LOGSTASH_USERNAME - valueFrom: - secretKeyRef: - name: logstash-username - key: LOGSTASH_USERNAME - - name: LOGSTASH_PASSWORD - valueFrom: - secretKeyRef: - name: logstash-password - key: LOGSTASH_PASSWORD - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: logstash-mgmt - port: 9600 - protocol: TCP - targetPort: 9600 - - name: udp-input-module - port: 5140 - protocol: UDP - targetPort: 5140 - - name: tcp-input-module - port: 28777 - protocol: TCP - targetPort: 28777 - selector: - service: ${SERVICE_NAME} -- apiVersion: v1 - kind: Service - metadata: - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME}-lumberjack - spec: - ports: - - name: lumberjack-input-module - port: 5044 - protocol: TCP - targetPort: 5044 - selector: - service: ${SERVICE_NAME} - type: NodePort -- apiVersion: v1 - kind: Service - metadata: - name: router-logs - spec: - externalName: ${SERVICE_NAME}.${OPENSHIFT_PROJECT}.svc.cluster.local - sessionAffinity: None - type: ExternalName -- apiVersion: v1 - kind: Service - metadata: - name: application-logs - spec: - externalName: ${SERVICE_NAME}.${OPENSHIFT_PROJECT}.svc.cluster.local - sessionAffinity: None - type: ExternalName diff --git a/services/logs2logs-db/Dockerfile b/services/logs2logs-db/Dockerfile index 63655e5b6f..afa3fe412d 100644 --- a/services/logs2logs-db/Dockerfile +++ b/services/logs2logs-db/Dockerfile @@ -1,5 +1,9 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/logstash:7 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/logstash-7:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION RUN bin/logstash-plugin install logstash-input-lumberjack diff --git a/services/logs2microsoftteams/.lagoon.app.yml b/services/logs2microsoftteams/.lagoon.app.yml deleted file mode 100644 index 9023aabf5e..0000000000 --- a/services/logs2microsoftteams/.lagoon.app.yml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} diff --git a/services/logs2microsoftteams/Dockerfile b/services/logs2microsoftteams/Dockerfile index f58da6d5c9..ba1e814239 100644 --- a/services/logs2microsoftteams/Dockerfile +++ b/services/logs2microsoftteams/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/logs2rocketchat/.lagoon.app.yml b/services/logs2rocketchat/.lagoon.app.yml deleted file mode 100644 index 9023aabf5e..0000000000 --- a/services/logs2rocketchat/.lagoon.app.yml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} diff --git a/services/logs2rocketchat/Dockerfile b/services/logs2rocketchat/Dockerfile index c2fde9d7c7..8e1ea68cdf 100644 --- a/services/logs2rocketchat/Dockerfile +++ b/services/logs2rocketchat/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/logs2slack/.lagoon.app.yml b/services/logs2slack/.lagoon.app.yml deleted file mode 100644 index 9023aabf5e..0000000000 --- a/services/logs2slack/.lagoon.app.yml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} diff --git a/services/logs2slack/Dockerfile b/services/logs2slack/Dockerfile index 757f8c6242..0a2fabffd2 100644 --- a/services/logs2slack/Dockerfile +++ b/services/logs2slack/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/ssh/.lagoon.app.yml b/services/ssh/.lagoon.app.yml deleted file mode 100644 index 75d134bb4f..0000000000 --- a/services/ssh/.lagoon.app.yml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-ssh -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 2020 - name: ssh - protocol: TCP - readinessProbe: - tcpSocket: - port: ssh - initialDelaySeconds: 15 - timeoutSeconds: 1 - livenessProbe: - tcpSocket: - port: ssh - timeoutSeconds: 1 - initialDelaySeconds: 120 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - - name: API_DB_PASSWORD - valueFrom: - secretKeyRef: - name: api-db-password - key: API_DB_PASSWORD - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: ssh-tcp - port: 2020 - protocol: TCP - targetPort: ssh - selector: - service: ${SERVICE_NAME} - type: NodePort - status: - loadBalancer: {} \ No newline at end of file diff --git a/services/ssh/Dockerfile b/services/ssh/Dockerfile index 2673e3f32b..1ef2882838 100644 --- a/services/ssh/Dockerfile +++ b/services/ssh/Dockerfile @@ -1,7 +1,11 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons FROM ubuntu:18.04 +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + LABEL maintainer="amazee.io" # Copy commons files diff --git a/services/ssh/home/rsh.sh b/services/ssh/home/rsh.sh index bca59a114c..cb39b35c43 100755 --- a/services/ssh/home/rsh.sh +++ b/services/ssh/home/rsh.sh @@ -16,6 +16,12 @@ USER_SSH_KEY=$2 REQUESTED_PROJECT=$3 shift 3 +# get the value from an envvar override (can be added to the ssh deployment) +# default to false so we don't hold up the ssh for a long time +WAIT_TO_UNIDLE_SERVICES=${WAIT_TO_UNIDLE_SERVICES:-false} +# set a timeout of 600 for waiting for a pod to start (the waits are 1 second interval, so 10 minutes timeout) +SSH_CHECK_TIMEOUT=${SSH_CHECK_TIMEOUT:-600} + # get the graphql endpoint, if set eval "$(grep GRAPHQL_ENDPOINT /authorize.env)" @@ -120,35 +126,133 @@ fi # If there is a deployment for the given service searching for lagoon.sh labels if [[ $($OC get deployment -l "lagoon.sh/service=${SERVICE}" 2> /dev/null) ]]; then + # get any other deployments that may have been idled by the idler and unidle them if required + # this only needs to be done for kubernetes + # we do this first to give the services a bit of time to unidle before starting the one that was requested + DEPLOYMENTS=$($OC get deployments -l "idling.amazee.io/watch=true" -o name) + if [ ! -z "${DEPLOYMENTS}" ]; then + # loop over the deployments and unidle them + for DEP in ${DEPLOYMENTS} + do + # if the deployment is idled, unidle it :) + DEP_JSON=$($OC get ${DEP} -o json) + if [ $(echo "$DEP_JSON" | jq -r '.status.replicas // 0') == "0" ]; then + REPLICAS=$(echo "$DEP_JSON" | jq -r '.metadata.annotations."idling.amazee.io/unidle-replicas" // 1') + if [ ! -z "$REPLICAS" ]; then + REPLICAS=1 + fi + $OC scale --replicas=${REPLICAS} ${DEP} >/dev/null 2>&1 + fi + done + # then if we have to wait for them to start, do that here + for DEP in ${DEPLOYMENTS} + do + # for unidling an entire environment and waiting for the number of `readyReplicas` + # to be 1 for each deployment, could add considerable delays for the ssh connection to establish. + # WAIT_TO_UNIDLE_SERVICES will default to false so that it just scales the deployments + # and won't wait for them to be ready, but if set to true, it will wait for `readyReplicas` to be 1 + if [[ "$WAIT_TO_UNIDLE_SERVICES" =~ [Tt][Rr][Uu][Ee] ]]; then + SSH_CHECK_COUNTER=0 + until [[ $($OC get ${DEP} -o json | jq -r '.status.readyReplicas // 0') -ne "0" ]] + do + if [ $SSH_CHECK_COUNTER -lt $SSH_CHECK_TIMEOUT ]; then + let SSH_CHECK_COUNTER=SSH_CHECK_COUNTER+1 + sleep 1 + else + echo "Deployment '${DEP}' took too long to start pods" + exit 1 + fi + done + fi + done + fi + # then actually unidle the service that was requested and wait for it to be ready if it wasn't already captured above + # doing this means if the service hasn't been idled with the `idling.amazee.io/watch=true` label + # we can still establish a connection DEPLOYMENT=$($OC get deployment -l "lagoon.sh/service=${SERVICE}" -o name) # If the deployment is scaled to 0, scale to 1 - if [[ $($OC get ${DEPLOYMENT} -o go-template --template='{{.status.replicas}}') == "0" ]]; then - + # .status.replicas doesn't exist on a scaled to 0 deployment in k8s so assume it is 0 if nothing is returned + if [[ $($OC get ${DEPLOYMENT} -o json | jq -r '.status.replicas // 0') == "0" ]]; then $OC scale --replicas=1 ${DEPLOYMENT} >/dev/null 2>&1 - - # Wait until the scaling is done - while [[ ! $($OC get ${DEPLOYMENT} -o go-template --template='{{.status.readyReplicas}}') == "1" ]] - do - sleep 1 - done fi + # Wait until the scaling is done + SSH_CHECK_COUNTER=0 + until [[ $($OC get ${DEPLOYMENT} -o json | jq -r '.status.readyReplicas // 0') -ne "0" ]] + do + if [ $SSH_CHECK_COUNTER -lt $SSH_CHECK_TIMEOUT ]; then + let SSH_CHECK_COUNTER=SSH_CHECK_COUNTER+1 + sleep 1 + else + echo "Pod for ${SERVICE} took too long to start" + exit 1 + fi + done fi # If there is a deployment for the given service search for lagoon labels # @DEPRECATED: Remove with Lagoon 2.0.0 if [[ $($OC get deployment -l lagoon/service=${SERVICE} 2> /dev/null) ]]; then + # get any other deployments that may have been idled by the idler and unidle them if required + # this only needs to be done for kubernetes + # we do this first to give the services a bit of time to unidle before starting the one that was requested + DEPLOYMENTS=$($OC get deployments -l "idling.amazee.io/watch=true" -o name) + if [ ! -z "${DEPLOYMENTS}" ]; then + # loop over the deployments and unidle them + for DEP in ${DEPLOYMENTS} + do + # if the deployment is idled, unidle it :) + DEP_JSON=$($OC get ${DEP} -o json) + if [ $(echo "$DEP_JSON" | jq -r '.status.replicas // 0') == "0" ]; then + REPLICAS=$(echo "$DEP_JSON" | jq -r '.metadata.annotations."idling.amazee.io/unidle-replicas" // 1') + if [ ! -z "$REPLICAS" ]; then + REPLICAS=1 + fi + $OC scale --replicas=${REPLICAS} ${DEP} >/dev/null 2>&1 + fi + done + # then if we have to wait for them to start, do that here + for DEP in ${DEPLOYMENTS} + do + # for unidling an entire environment and waiting for the number of `readyReplicas` + # to be 1 for each deployment, could add considerable delays for the ssh connection to establish. + # WAIT_TO_UNIDLE_SERVICES will default to false so that it just scales the deployments + # and won't wait for them to be ready, but if set to true, it will wait for `readyReplicas` to be 1 + if [[ "$WAIT_TO_UNIDLE_SERVICES" =~ [Tt][Rr][Uu][Ee] ]]; then + SSH_CHECK_COUNTER=0 + until [[ $($OC get ${DEP} -o json | jq -r '.status.readyReplicas // 0') -ne "0" ]] + do + if [ $SSH_CHECK_COUNTER -lt $SSH_CHECK_TIMEOUT ]; then + let SSH_CHECK_COUNTER=SSH_CHECK_COUNTER+1 + sleep 1 + else + echo "Deployment '${DEP}' took too long to start pods" + exit 1 + fi + done + fi + done + fi + # then actually unidle the service that was requested and wait for it to be ready if it wasn't already captured above + # doing this means if the service hasn't been idled with the `idling.amazee.io/watch=true` label + # we can still establish a connection DEPLOYMENT=$($OC get deployment -l lagoon/service=${SERVICE} -o name) # If the deployment is scaled to 0, scale to 1 - if [[ $($OC get ${DEPLOYMENT} -o go-template --template='{{.status.replicas}}') == "0" ]]; then - + # .status.replicas doesn't exist on a scaled to 0 deployment in k8s so assume it is 0 if nothing is returned + if [[ $($OC get ${DEPLOYMENT} -o json | jq -r '.status.replicas // 0') == "0" ]]; then $OC scale --replicas=1 ${DEPLOYMENT} >/dev/null 2>&1 - - # Wait until the scaling is done - while [[ ! $($OC get ${DEPLOYMENT} -o go-template --template='{{.status.readyReplicas}}') == "1" ]] - do - sleep 1 - done fi + # Wait until the scaling is done + SSH_CHECK_COUNTER=0 + until [[ $($OC get ${DEPLOYMENT} -o json | jq -r '.status.readyReplicas // 0') -ne "0" ]] + do + if [ $SSH_CHECK_COUNTER -lt $SSH_CHECK_TIMEOUT ]; then + let SSH_CHECK_COUNTER=SSH_CHECK_COUNTER+1 + sleep 1 + else + echo "Pod for ${SERVICE} took too long to start" + exit 1 + fi + done fi diff --git a/services/storage-calculator/.lagoon.yml b/services/storage-calculator/.lagoon.yml deleted file mode 100644 index 5893255a34..0000000000 --- a/services/storage-calculator/.lagoon.yml +++ /dev/null @@ -1,102 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-cli -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 1 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - volumes: - - name: lagoon-sshkey - secret: - defaultMode: 420 - secretName: lagoon-sshkey - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - ## LAGOON_GIT_SHA is injected directly and not loaded via `lagoon-env` config - ## This will cause the cli to redeploy on every deployment, even the files have not changed - - name: LAGOON_GIT_SHA - value: ${LAGOON_GIT_SHA} - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: "5 */12 * * * /lagoon/cronjob.sh /calculate-storage.sh" - volumeMounts: - - mountPath: /var/run/secrets/lagoon/sshkey/ - name: lagoon-sshkey - readOnly: true - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange \ No newline at end of file diff --git a/services/storage-calculator/Dockerfile b/services/storage-calculator/Dockerfile index 6931b75f05..fc82324bd8 100644 --- a/services/storage-calculator/Dockerfile +++ b/services/storage-calculator/Dockerfile @@ -1,9 +1,13 @@ ARG IMAGE_REPO FROM ${IMAGE_REPO:-lagoon}/oc +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + ENV LAGOON=storage-calculator RUN apk add --no-cache tini jq bash curl py3-jwt +RUN pip install yq COPY create_jwt.py calculate-storage.sh / diff --git a/services/storage-calculator/calculate-storage.sh b/services/storage-calculator/calculate-storage.sh index 8d2f77eb85..fb229f10a4 100755 --- a/services/storage-calculator/calculate-storage.sh +++ b/services/storage-calculator/calculate-storage.sh @@ -1,10 +1,25 @@ #!/bin/bash -API_ADMIN_JWT_TOKEN=$(./create_jwt.py) -BEARER="Authorization: bearer $API_ADMIN_JWT_TOKEN" +# Send a GraphQL query to Lagoon API. +# Accpets query as first param. Usage: +# ALL_ENVIRONMENTS=$(apiQuery "query { +# allProjects { +# name +# } +# }") +apiQuery() { + local api_token=$(./create_jwt.py) + local authz_header="Authorization: bearer $api_token" + + # Convert GraphQL file into single line (but with still \n existing), turn \n into \\n, esapee the Quotes + local query=$(echo $1 | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $0} else {printf "\\n"$0}}') + local result=$(curl -s -XPOST -H 'Content-Type: application/json' -H "$authz_header" "${GRAPHQL_ENDPOINT:-api:3000/graphql}" -d "{\"query\": \"$query\"}") + + echo "$result" +} # Load all projects and their environments -GRAPHQL='query environments { +ALL_ENVIRONMENTS=$(apiQuery 'query { environments:allProjects { name storageCalc @@ -19,11 +34,8 @@ GRAPHQL='query environments { id } } -}' +}') -# Convert GraphQL file into single line (but with still \n existing), turn \n into \\n, esapee the Quotes -query=$(echo $GRAPHQL | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $0} else {printf "\\n"$0}}') -ALL_ENVIRONMENTS=$(curl -s -XPOST -H 'Content-Type: application/json' -H "$BEARER" "${GRAPHQL_ENDPOINT:-api:3000/graphql}" -d "{\"query\": \"$query\"}") echo "$ALL_ENVIRONMENTS" | jq -c '.data.environments[] | select((.environments|length)>=1)' | while read project do @@ -33,7 +45,7 @@ do if [[ $PROJECT_NAME =~ $PROJECT_REGEX ]]; then STORAGE_CALC=$(echo "$project" | jq -r '.storageCalc') echo "$OPENSHIFT_URL: Handling project $PROJECT_NAME" - OPENSHIFT_TOKEN=$(echo "$project" | jq -r '.openshift.token') + OPENSHIFT_TOKEN=$(echo "$project" | jq -r '.openshift.token // empty') # loop through each environment of the current project echo "$project" | jq -c '.environments[]' | while read environment do @@ -46,16 +58,12 @@ do if [[ $STORAGE_CALC != "1" ]]; then echo "$OPENSHIFT_URL - $PROJECT_NAME - $ENVIRONMENT_NAME: storage calculation disabled, skipping" - MUTATION="mutation addOrUpdateEnvironmentStorage { + apiQuery "mutation { addOrUpdateEnvironmentStorage(input:{environment:${ENVIRONMENT_ID}, persistentStorageClaim:\"storage-calc-disabled\", bytesUsed:0}) { id } }" - # Convert GraphQL file into single line (but with still \n existing), turn \n into \\n, esapee the Quotes - query=$(echo $MUTATION | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $0} else {printf "\\n"$0}}') - curl -s -XPOST -H 'Content-Type: application/json' -H "$BEARER" "${GRAPHQL_ENDPOINT:-api:3000/graphql}" -d "{\"query\": \"$query\"}" - continue fi @@ -71,33 +79,35 @@ do echo "$OPENSHIFT_URL - $PROJECT_NAME - $ENVIRONMENT_NAME: creating storage-calc pod" # Cleanup any existing storage-calc deployments - ${OC} delete deploymentconfig/storage-calc >/dev/null 2>&1 + ${OC} delete deployment/storage-calc >/dev/null 2>&1 # Start storage-calc deployment - ${OC} run --generator=deploymentconfig/v1 --image amazeeio/alpine-mysql-client storage-calc -- sh -c "while sleep 3600; do :; done" - ${OC} rollout pause deploymentconfig/storage-calc + deployment_template=$(${OC} create --dry-run=true -o yaml deployment storage-calc --image imagecache.amazeeio.cloud/amazeeio/alpine-mysql-client) + deployment=$(echo "$deployment_template" | yq '.spec.template.spec.containers[0].command = ["sh", "-c", "while sleep 3600; do :; done"]') + echo "$deployment" | ${OC} create -f - + ${OC} rollout pause deployment/storage-calc # Copy environment variable from lagoon-env configmap. - ${OC} set env --from=configmap/lagoon-env deploymentconfig/storage-calc + ${OC} set env --from=configmap/lagoon-env deployment/storage-calc PVCS=($(${OC} get pvc -o name | sed 's/persistentvolumeclaim\///')) for PVC in "${PVCS[@]}" do echo "$OPENSHIFT_URL - $PROJECT_NAME - $ENVIRONMENT_NAME: mounting ${PVC} into storage-calc" - ${OC} set volume deploymentconfig/storage-calc --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --mount-path=/storage/${PVC} + ${OC} set volume deployment/storage-calc --add --name=${PVC} --type=persistentVolumeClaim --claim-name=${PVC} --mount-path=/storage/${PVC} done - ${OC} rollout resume deploymentconfig/storage-calc + ${OC} rollout resume deployment/storage-calc echo "$OPENSHIFT_URL - $PROJECT_NAME - $ENVIRONMENT_NAME: redeploying storage-calc to mount volumes" - ${OC} rollout status deploymentconfig/storage-calc --watch + ${OC} rollout status deployment/storage-calc --watch - POD=$(${OC} get pods -l run=storage-calc -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') + POD=$(${OC} get pods -l app=storage-calc -o json | jq -r '[.items[] | select(.metadata.deletionTimestamp == null) | select(.status.phase == "Running")] | first | .metadata.name // empty') if [[ ! $POD ]]; then echo "No running pod found for storage-calc" # Clean up any failed deployments. - ${OC} delete deploymentconfig/storage-calc >/dev/null 2>&1 + ${OC} delete deployment/storage-calc >/dev/null 2>&1 exit 1 fi @@ -106,16 +116,12 @@ do if [[ ! ${#PVCS[@]} -gt 0 ]]; then echo "$OPENSHIFT_URL - $PROJECT_NAME - $ENVIRONMENT_NAME: no PVCs found writing API with 0 bytes" - MUTATION="mutation addOrUpdateEnvironmentStorage { + apiQuery "mutation { addOrUpdateEnvironmentStorage(input:{environment:${ENVIRONMENT_ID}, persistentStorageClaim:\"none\", bytesUsed:0}) { id } }" - # Convert GraphQL file into single line (but with still \n existing), turn \n into \\n, esapee the Quotes - query=$(echo $MUTATION | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $0} else {printf "\\n"$0}}') - curl -s -XPOST -H 'Content-Type: application/json' -H "$BEARER" "${GRAPHQL_ENDPOINT:-api:3000/graphql}" -d "{\"query\": \"$query\"}" - else for PVC in "${PVCS[@]}" do @@ -123,18 +129,14 @@ do # STORAGE_BYTES=$(echo "${DF}" | grep /storage/${PVC} | awk '{ print $4 }') echo "$OPENSHIFT_URL - $PROJECT_NAME - $ENVIRONMENT_NAME: ${PVC} uses ${STORAGE_BYTES} kilobytes" - MUTATION="mutation addOrUpdateEnvironmentStorage { + apiQuery "mutation { addOrUpdateEnvironmentStorage(input:{environment:${ENVIRONMENT_ID}, persistentStorageClaim:\"${PVC}\", bytesUsed:${STORAGE_BYTES}}) { id } }" - # Convert GraphQL file into single line (but with still \n existing), turn \n into \\n, esapee the Quotes - query=$(echo $MUTATION | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $0} else {printf "\\n"$0}}') - curl -s -XPOST -H 'Content-Type: application/json' -H "$BEARER" "${GRAPHQL_ENDPOINT:-api:3000/graphql}" -d "{\"query\": \"$query\"}" - # Update namespace labels - if [ ! -z "$LAGOON_STORAGE_LABEL_NAMESPACE"]; then + if [ ! -z "$LAGOON_STORAGE_LABEL_NAMESPACE" ]; then ${OC} label namespace $ENVIRONMENT_OPENSHIFT_PROJECTNAME lagoon/storage-${PVC}=${STORAGE_BYTES} --overwrite fi @@ -144,18 +146,14 @@ do if mariadb_size=$(${OC} exec ${POD} -- sh -c "if [ \"\$MARIADB_HOST\" ]; then mysql -N -s -h \$MARIADB_HOST -u\$MARIADB_USERNAME -p\$MARIADB_PASSWORD -P\$MARIADB_PORT -e 'SELECT ROUND(SUM(data_length + index_length) / 1024, 0) FROM information_schema.tables'; else exit 1; fi") && [ "$mariadb_size" ]; then echo "$OPENSHIFT_URL - $PROJECT_NAME - $ENVIRONMENT_NAME: Database uses ${mariadb_size} kilobytes" - MUTATION="mutation addOrUpdateEnvironmentStorage { + apiQuery "mutation { addOrUpdateEnvironmentStorage(input:{environment:${ENVIRONMENT_ID}, persistentStorageClaim:\"mariadb\", bytesUsed:${mariadb_size}}) { id } }" - - # Convert GraphQL file into single line (but with still \n existing), turn \n into \\n, esapee the Quotes - query=$(echo $MUTATION | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $0} else {printf "\\n"$0}}') - curl -s -XPOST -H 'Content-Type: application/json' -H "$BEARER" "${GRAPHQL_ENDPOINT:-api:3000/graphql}" -d "{\"query\": \"$query\"}" fi - ${OC} delete deploymentconfig/storage-calc + ${OC} delete deployment/storage-calc done else diff --git a/services/ui/.env.defaults b/services/ui/.env.defaults index a7fbe079cf..f773989e80 100644 --- a/services/ui/.env.defaults +++ b/services/ui/.env.defaults @@ -1,3 +1,3 @@ GRAPHQL_API=http://localhost:3000/graphql -KEYCLOAK_API=http://docker.for.mac.localhost:8088/auth +KEYCLOAK_API=http://localhost:8088/auth LAGOON_UI_ICON='%3Csvg%20id%3D%22Layer_11%22%20data-name%3D%22Layer%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2030%2030%22%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill%3A%23231f20%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Ctitle%3Eamazee-io%3C%2Ftitle%3E%3Cpath%20class%3D%22cls-1%22%20d%3D%22M15%2C0A15%2C15%2C0%2C1%2C0%2C30%2C15%2C15%2C15%2C0%2C0%2C0%2C15%2C0ZM9.8%2C18.36a.79.79%2C0%2C0%2C1-.79.79H8.82A.79.79%2C0%2C0%2C1%2C8%2C18.36V11.64a.79.79%2C0%2C0%2C1%2C.79-.79H9a.79.79%2C0%2C0%2C1%2C.79.79Zm6.93-9.84L13.19%2C21.74a.51.51%2C0%2C0%2C1-.48.37h-.32a.5.5%2C0%2C0%2C1-.48-.63L15.45%2C8.26a.5.5%2C0%2C0%2C1%2C.48-.36h.32A.49.49%2C0%2C0%2C1%2C16.73%2C8.52Zm6.69%2C8.16c0%2C2.35-1.55%2C2.68-2.46%2C2.68h-.19c-.91%2C0-2.46-.33-2.46-2.68V13.32c0-2.35%2C1.55-2.68%2C2.46-2.68H21c.91%2C0%2C2.46.33%2C2.46%2C2.68Zm-1.77-3.45v3.54a.82.82%2C0%2C0%2C1-.78.87.83.83%2C0%2C0%2C1-.79-.87V13.23a.83.83%2C0%2C0%2C1%2C.79-.87A.82.82%2C0%2C0%2C1%2C21.65%2C13.23Z%22%2F%3E%3C%2Fsvg%3E' diff --git a/services/ui/.lagoon.app.yml b/services/ui/.lagoon.app.yml deleted file mode 100644 index 995229eae3..0000000000 --- a/services/ui/.lagoon.app.yml +++ /dev/null @@ -1,151 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 3000 - protocol: TCP - readinessProbe: - httpGet: - path: / - port: 3000 - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 1 - livenessProbe: - httpGet: - path: / - port: 3000 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 1 - env: - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - envFrom: - - configMapRef: - name: lagoon-env - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 3000-tcp - port: 3000 - protocol: TCP - targetPort: 3000 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: Route - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - host: ${SERVICE_ROUTER_URL} - port: - targetPort: 3000-tcp - to: - kind: Service - name: ${SERVICE_NAME} diff --git a/services/ui/Dockerfile b/services/ui/Dockerfile index 2592eae896..8e02de840f 100644 --- a/services/ui/Dockerfile +++ b/services/ui/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/ui/src/components/ActiveStandbyConfirm/index.js b/services/ui/src/components/ActiveStandbyConfirm/index.js index 9740847c42..1331fe9805 100644 --- a/services/ui/src/components/ActiveStandbyConfirm/index.js +++ b/services/ui/src/components/ActiveStandbyConfirm/index.js @@ -3,7 +3,7 @@ import Modal from 'components/Modal'; import Button from 'components/Button'; import { bp, color } from 'lib/variables'; // @TODO: add this once the logic exists -//import withLogic from 'components/ActiveStandbyConfirm/logic'; +import withLogic from 'components/ActiveStandbyConfirm/logic'; import ActiveStandby from 'components/ActiveStandbyConfirm'; /** @@ -66,4 +66,4 @@ export const ActiveStandbyConfirm = ({ ); }; -export default ActiveStandbyConfirm; +export default withLogic(ActiveStandbyConfirm); diff --git a/services/ui/src/components/Dates/index.js b/services/ui/src/components/Dates/index.js index f88bfff008..64d127744a 100644 --- a/services/ui/src/components/Dates/index.js +++ b/services/ui/src/components/Dates/index.js @@ -1,9 +1,9 @@ import moment from "moment"; export const getFromNowTime = (date) => { - return moment(date).fromNow(); + return moment.utc(date).fromNow(); }; export const getCreatedDate = (date) => { - return moment.utc(date).local().format('DD MM YYYY, HH:mm:ss'); + return moment.utc(date).format('DD MM YYYY, HH:mm:ssZ'); }; \ No newline at end of file diff --git a/services/ui/src/components/Problem/ContentDisplay/DrutinyContent.js b/services/ui/src/components/Problem/ContentDisplay/DrutinyContent.js index 9f8d28eaaa..6c0dccbe60 100644 --- a/services/ui/src/components/Problem/ContentDisplay/DrutinyContent.js +++ b/services/ui/src/components/Problem/ContentDisplay/DrutinyContent.js @@ -44,7 +44,7 @@ const DrutinyDisplay = ({ problem }) => { )} {data.service && (
-
{data.service}
+
{data.service}
)} {data.created && (
diff --git a/services/ui/src/components/Problem/index.js b/services/ui/src/components/Problem/index.js index 18f7169cfa..bc34559043 100644 --- a/services/ui/src/components/Problem/index.js +++ b/services/ui/src/components/Problem/index.js @@ -11,7 +11,7 @@ const Problem = ({ problem, display }) => { severity: problem.severity, source: problem.source, created: fromNowDate, - severityScore: problem.severityScore, + service: problem.service, associatedPackage: problem.version ? `${problem.associatedPackage}:${problem.version}` : problem.associatedPackage }; diff --git a/services/ui/src/components/Problems/index.js b/services/ui/src/components/Problems/index.js index 681164c9e1..028aab8bfc 100644 --- a/services/ui/src/components/Problems/index.js +++ b/services/ui/src/components/Problems/index.js @@ -1,229 +1,354 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; +import { useQuery } from "@apollo/react-hooks"; +import getSeverityEnumQuery, {getProjectOptions, getSourceOptions} from 'components/Filters/helpers'; import { bp, color, fontSize } from 'lib/variables'; import useSortableProblemsData from './sortedItems'; -import { getFromNowTime } from "components/Dates"; import Problem from "components/Problem"; +import SelectFilter from 'components/Filters'; -const Problems = ({ problems }) => { - const { sortedItems, requestSort, getClassNamesFor } = useSortableProblemsData(problems); +const getOptionsFromProblems = (problems, key) => { + let uniqueOptions= problems && + new Set(problems.filter(p => p[key]).map(p => p[key])); - const [problemTerm, setProblemTerm] = useState(''); - const [hasFilter, setHasFilter] = React.useState(false); + return [...uniqueOptions]; +}; + +const Problems = ({problems}) => { + const { sortedItems, requestSort, getClassNamesFor } = useSortableProblemsData(problems); + const [severitySelected, setSeverity] = useState([]); + const [sourceSelected, setSource] = useState([]); + const [servicesSelected, setService] = useState([]); + + const [problemTerm, setProblemTerm] = useState(''); + const [hasFilter, setHasFilter] = useState(false); + const [problemStats, setProblemStats] = useState([]); + + const severities = getOptionsFromProblems(problems, 'severity'); + const sources = getOptionsFromProblems(problems, 'source'); + const services = getOptionsFromProblems(problems, 'service'); + + + // Handlers + const handleSort = (key) => requestSort(key); + + const handleTextFilterChange = (event) => { + setHasFilter(false); + + if (event.target.value !== null || event.target.value !== '') { + setHasFilter(true); + } + setProblemTerm(event.target.value); + }; + + const handleSourceChange = (source) => { + let values = source && source.map(s => s.value) || []; + setSource(values); + }; + + const handleSeverityChange = (severity) => { + let values = severity && severity.map(s => s.value) || []; + setSeverity(values); + }; + + const handleServiceChange = (service) => { + let values = service && service.map(s => s.value) || []; + setService(values); + }; + + // Options + const severityOptions = (severity) => { + return severity && severity.map(s => ({ value: s, label: s})); + }; + + const sourceOptions = (sources) => { + return sources && sources.map(s => ({ value: s, label: s})); + }; + + const serviceOptions = (services) => { + return services && services.map(s => ({ value: s, label: s})); + }; + + // Selector filtering + const matchesSeveritySelector = (item) => { + return (severitySelected.length > 0) ? + Object.keys(item).some(key => { + if (item[key] !== null) { + return severitySelected.indexOf(item['severity'].toString()) > -1; + }; + }) + : true; + } - const handleProblemFilterChange = (event) => { - setHasFilter(false); + const matchesSourceSelector = (item) => { + return (sourceSelected.length > 0) ? + Object.keys(item).some(key => { + if (item[key] !== null) { + return sourceSelected.indexOf(item['source'].toString()) > -1; + }; + }) + : true; + } - if (event.target.value !== null || event.target.value !== '') { - setHasFilter(true); + const matchesServiceSelector = (item) => { + return (servicesSelected.length > 0) ? + Object.keys(item).some(key => { + if (item[key] !== null) { + return servicesSelected.indexOf(item['service'].toString()) > -1; + }; + }) + : true; + } + + const matchesTextFilter = (item) => { + return (problemTerm != null || problemTerm !== '') ? + Object.keys(item).some(key => { + if (item[key] !== null) { + return item[key].toString().toLowerCase().includes(problemTerm.toLowerCase()); } - setProblemTerm(event.target.value); - }; + }) + : true; + } - const handleSort = (key) => { - return requestSort(key); + const shouldItemBeShown = (item) => { + return (matchesSeveritySelector(item) && matchesServiceSelector(item) && matchesSourceSelector(item) && matchesTextFilter(item)); + }; + + useEffect(() => { + let stats = { + 'critical': sortedItems.filter(p => p.severity === 'CRITICAL').length, + 'high': sortedItems.filter(p => p.severity === 'HIGH').length, + 'medium': sortedItems.filter(p => p.severity === 'MEDIUM').length, + 'low': sortedItems.filter(p => p.severity === 'LOW').length }; - const filterResults = (item) => { - const lowercasedFilter = problemTerm.toLowerCase(); - if (problemTerm == null || problemTerm === '') { - return problems; + if (stats != problemStats) { + setProblemStats(stats); + } + }, []); + + return ( +
+
+
    +
  • {Object.keys(sortedItems).length}
  • +
  • {problemStats.critical}
  • +
  • {problemStats.high}
  • +
  • {problemStats.medium}
  • +
  • {problemStats.low}
  • +
+
+
+
+ + + +
+
+
+ +
+
+ + + + + + +
+
+ {sortedItems.filter(item => shouldItemBeShown(item)).length == 0 && +
+
+ No Problems +
+
} + {sortedItems + .filter(item => shouldItemBeShown(item)) + .map((problem) => ) + } +
+ -
- ); + .filters-wrapper { + .select-filters { + display: flex; + flex-direction: column; + @media ${bp.wideUp} { + flex-flow: row; + } + + &:first-child { + padding-bottom: 1em; + } + } + } + + .text-large { + font-size: 1.4em; + } + + .red { + color: ${color.red}; + } + + .blue { + color: ${color.blue}; + } + + .yellow { + color: ${color.lightestBlue}; + } + + .grey { + color: ${color.grey}; + } + + input#filter { + width: 100%; + border: none; + padding: 10px 20px; + margin: 0; + } + + .button-sort { + color: #5f6f7a; + font-family: 'source-code-pro',sans-serif; + font-size: 12px; + font-size: 0.8125rem; + line-height: 1.4; + text-transform: uppercase; + text-align: center; + border: none; + background: none; + cursor: pointer; + padding: 0; + width: calc(100% / 6); + + &.identifier { + text-align: left; + } + + &.ascending:after { + content: ' \\25B2'; + } + + &.descending:after { + content: ' \\25BC'; + } + } + + .overview { + .overview-list { + display: flex; + justify-content: space-between; + padding: 10px 20px; + margin: 0 0 20px; + background: #f3f3f3; + + li.result { + display: flex; + flex-direction: column; + margin: 0; + } + } + } + + .data-none { + border: 1px solid ${color.white}; + border-bottom: 1px solid ${color.lightestGrey}; + border-radius: 3px; + line-height: 1.5rem; + padding: 8px 0 7px 0; + text-align: center; + } + `} +
+ ); }; export default Problems; diff --git a/services/ui/src/components/Problems/sortedItems.js b/services/ui/src/components/Problems/sortedItems.js index b9ba246ca6..fa9ee4cfaf 100644 --- a/services/ui/src/components/Problems/sortedItems.js +++ b/services/ui/src/components/Problems/sortedItems.js @@ -41,10 +41,10 @@ const useSortableProblemsData = (initialItems) => { } const requestSort = (key) => { - let direction = 'ascending'; + let direction = key !== 'created' ? 'ascending' : 'descending'; - if (sortConfig && sortConfig.key === key && sortConfig.direction === 'ascending') { - direction = 'descending'; + if (sortConfig && sortConfig.key === key && sortConfig.direction === direction) { + direction = direction === 'ascending' ? 'descending' : 'ascending'; } setCurrentItems(sortedItems); diff --git a/services/ui/src/components/ProjectDetailsSidebar/index.js b/services/ui/src/components/ProjectDetailsSidebar/index.js index 8d46f2d33c..0c39061187 100644 --- a/services/ui/src/components/ProjectDetailsSidebar/index.js +++ b/services/ui/src/components/ProjectDetailsSidebar/index.js @@ -201,6 +201,10 @@ const Project = ({ project }) => { &::before { background-image: url('/static/images/branches.svg'); } + + .field { + white-space: break-spaces; + } } &.prs { diff --git a/services/ui/tsconfig.json b/services/ui/tsconfig.json index d610fbcaaa..655cb40d20 100644 --- a/services/ui/tsconfig.json +++ b/services/ui/tsconfig.json @@ -21,7 +21,8 @@ "declaration": true, "allowSyntheticDefaultImports": true, "experimentalDecorators": true, - "emitDecoratorMetadata": true + "emitDecoratorMetadata": true, + "resolveJsonModule": true }, "exclude": ["node_modules", "build", "scripts", "../api"], "include": ["./src"], diff --git a/services/webhook-handler/.lagoon.app.yml b/services/webhook-handler/.lagoon.app.yml deleted file mode 100644 index daeb3f26c9..0000000000 --- a/services/webhook-handler/.lagoon.app.yml +++ /dev/null @@ -1,147 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - ports: - - containerPort: 3000 - protocol: TCP - readinessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 15 - timeoutSeconds: 1 - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} -- apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - ports: - - name: 3000-tcp - port: 3000 - protocol: TCP - targetPort: 3000 - selector: - service: ${SERVICE_NAME} - status: - loadBalancer: {} -- apiVersion: v1 - kind: Route - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - host: ${SERVICE_ROUTER_URL} - port: - targetPort: 3000-tcp - to: - kind: Service - name: ${SERVICE_NAME} \ No newline at end of file diff --git a/services/webhook-handler/Dockerfile b/services/webhook-handler/Dockerfile index 90ccd908c3..80906f9826 100644 --- a/services/webhook-handler/Dockerfile +++ b/services/webhook-handler/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/webhook-handler/README.md b/services/webhook-handler/README.md index 5cc9e31633..cc8ce699e0 100644 --- a/services/webhook-handler/README.md +++ b/services/webhook-handler/README.md @@ -13,7 +13,7 @@ The main Lagoon entrypoint for webhooks originating from other services. Every incoming webhook is parsed and validated before being queued for processing later. -Examples of webhooks Lagoon is interested in: GitHub/Bitbucket/GitLab repository +Examples of webhooks Lagoon is interested in: GitHub/Gitea/Bitbucket/GitLab repository activity, Lagoon project environment backup events. ## Technology diff --git a/services/webhook-handler/src/extractWebhookData.ts b/services/webhook-handler/src/extractWebhookData.ts index c96d3dc6b9..ce2eb76b7d 100644 --- a/services/webhook-handler/src/extractWebhookData.ts +++ b/services/webhook-handler/src/extractWebhookData.ts @@ -2,6 +2,7 @@ import uuid4 from 'uuid4'; import url from 'url'; import R from 'ramda'; import { IncomingMessage } from 'http'; +import { secureGitlabSystemHooks } from '@lagoon/commons/dist/gitlabApi'; import type { RawData, WebhookRequestData } from './types'; @@ -33,7 +34,12 @@ export function extractWebhookData(req: IncomingMessage, body: string): WebhookR throw new Error(`Request body is not parsable as JSON. Are you sure you have enabled application/json as the webhook content type? ${e}.`); } - if ('x-github-event' in req.headers) { + if ('x-gitea-event' in req.headers) { + webhooktype = 'gitea'; + event = req.headers['x-gitea-event']; + uuid = req.headers['x-gitea-delivery']; + giturl = R.path(['repository', 'ssh_url'], bodyObj); + } else if ('x-github-event' in req.headers) { webhooktype = 'github'; event = req.headers['x-github-event']; uuid = req.headers['x-github-delivery']; @@ -45,7 +51,7 @@ export function extractWebhookData(req: IncomingMessage, body: string): WebhookR giturl = R.path(['project', 'git_ssh_url'], bodyObj); // This is a system webhook - if (!giturl) { + if (R.contains(event, secureGitlabSystemHooks)) { // Ensure the system hook came from gitlab if (!('x-gitlab-token' in req.headers) || req.headers['x-gitlab-token'] !== process.env.GITLAB_SYSTEM_HOOK_TOKEN) { throw new Error('Gitlab system hook secret verification failed'); diff --git a/services/webhook-handler/src/types.ts b/services/webhook-handler/src/types.ts index 6f4c03d770..03aee6a6e6 100644 --- a/services/webhook-handler/src/types.ts +++ b/services/webhook-handler/src/types.ts @@ -24,6 +24,20 @@ export interface GithubPushEvent { }, }; +// See: https://docs.gitea.io/en-us/webhooks/ +export interface GiteaPushEvent { + event: 'push', + webhooktype: 'gitea', + uuid: string, + body: { + repository: { + ssh_url: string, + }, + ref: string, + after: string, + }, +}; + // See: https://developer.github.com/v3/activity/events/types/#pullrequestevent export interface GithubPullRequestEvent { event: 'pull_request', @@ -38,6 +52,20 @@ export interface GithubPullRequestEvent { } }; +// See: https://docs.gitea.io/en-us/webhooks/ +export interface GiteaPullRequestEvent { + event: 'pull_request', + webhooktype: 'gitea', + uuid: string, + body: { + action: string, + repository: { + ssh_url: string, + }, + number: number, + } +}; + // See: https://developer.github.com/v3/activity/events/types/#deleteevent export interface GithubDeleteEvent { event: 'delete', @@ -52,6 +80,19 @@ export interface GithubDeleteEvent { } }; +// See: https://docs.gitea.io/en-us/webhooks/ +export interface GiteaDeleteEvent { + event: 'delete', + webhooktype: 'gitea', + uuid: string, + body: { + ref_type: string, + repository: { + ssh_url: string, + } + } +}; + export interface CustomPushEvent { event: 'push', webhooktype: 'custom', @@ -78,6 +119,9 @@ export type RawData = GithubPushEvent | GithubPullRequestEvent | GithubDeleteEvent + | GiteaPushEvent + | GiteaPullRequestEvent + | GiteaDeleteEvent | CustomPushEvent | any; diff --git a/services/webhooks2tasks/.lagoon.app.yml b/services/webhooks2tasks/.lagoon.app.yml deleted file mode 100644 index 24648a20d7..0000000000 --- a/services/webhooks2tasks/.lagoon.app.yml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: lagoon-openshift-template-node -parameters: - - name: SERVICE_NAME - description: Name of this service - required: true - - name: SAFE_BRANCH - description: Which branch this belongs to, special chars replaced with dashes - required: true - - name: SAFE_PROJECT - description: Which project this belongs to, special chars replaced with dashes - required: true - - name: BRANCH - description: Which branch this belongs to, original value - required: true - - name: PROJECT - description: Which project this belongs to, original value - required: true - - name: LAGOON_GIT_SHA - description: git hash sha of the current deployment - required: true - - name: SERVICE_ROUTER_URL - description: URL of the Router for this service - value: "" - - name: OPENSHIFT_PROJECT - description: Name of the Project that this service is in - required: true - - name: REGISTRY - description: Registry where Images are pushed to - required: true - - name: DEPLOYMENT_STRATEGY - description: Strategy of Deploymentconfig - value: "Rolling" - - name: SERVICE_IMAGE - description: Pullable image of service - required: true - - name: CRONJOBS - description: Oneliner of Cronjobs - value: "" -objects: -- apiVersion: v1 - kind: DeploymentConfig - metadata: - creationTimestamp: null - labels: - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - name: ${SERVICE_NAME} - spec: - replicas: 2 - selector: - service: ${SERVICE_NAME} - strategy: - type: ${DEPLOYMENT_STRATEGY} - template: - metadata: - creationTimestamp: null - labels: - service: ${SERVICE_NAME} - branch: ${SAFE_BRANCH} - project: ${SAFE_PROJECT} - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: service - operator: In - values: - - ${SERVICE_NAME} - topologyKey: kubernetes.io/hostname - containers: - - image: ${SERVICE_IMAGE} - name: ${SERVICE_NAME} - envFrom: - - configMapRef: - name: lagoon-env - env: - - name: RABBITMQ_USERNAME - valueFrom: - secretKeyRef: - name: rabbitmq-username - key: RABBITMQ_USERNAME - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: rabbitmq-password - key: RABBITMQ_PASSWORD - - name: JWTSECRET - valueFrom: - secretKeyRef: - name: jwtsecret - key: JWTSECRET - - name: SERVICE_NAME - value: ${SERVICE_NAME} - - name: CRONJOBS - value: ${CRONJOBS} - resources: - requests: - cpu: 10m - memory: 10Mi - test: false - triggers: - - type: ConfigChange - status: {} \ No newline at end of file diff --git a/services/webhooks2tasks/Dockerfile b/services/webhooks2tasks/Dockerfile index e3b2578c2e..d6e2dc9507 100644 --- a/services/webhooks2tasks/Dockerfile +++ b/services/webhooks2tasks/Dockerfile @@ -1,10 +1,15 @@ ARG LAGOON_GIT_BRANCH ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG # STAGE 1: Loading Image lagoon-node-packages-builder which contains node packages shared by all Node Services -FROM ${IMAGE_REPO:-amazeeiolagoon}/yarn-workspace-builder:${LAGOON_GIT_BRANCH:-latest} as yarn-workspace-builder +FROM ${IMAGE_REPO:-lagoon}/yarn-workspace-builder as yarn-workspace-builder # STAGE 2: specific service Image -FROM ${IMAGE_REPO:-amazeeiolagoon}/node:10 +FROM ${UPSTREAM_REPO:-uselagoon}/node-10:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION # Copying generated node_modules from the first stage COPY --from=yarn-workspace-builder /app /app diff --git a/services/webhooks2tasks/src/handlers/bitbucketBranchDeleted.ts b/services/webhooks2tasks/src/handlers/bitbucketBranchDeleted.ts index d062ddfef2..1daae7d71c 100644 --- a/services/webhooks2tasks/src/handlers/bitbucketBranchDeleted.ts +++ b/services/webhooks2tasks/src/handlers/bitbucketBranchDeleted.ts @@ -1,5 +1,6 @@ import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; import { WebhookRequestData, removeData, Project } from '../types'; @@ -19,10 +20,23 @@ export async function bitbucketBranchDeleted(webhook: WebhookRequestData, projec projectName: project.name, } + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(meta.branch)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${meta.branch}`); + const data: removeData = { projectName: project.name, branch: meta.branch, branchName: meta.branchName, + openshiftProjectName: openshiftProjectName, forceDeleteProductionEnvironment: false, type: 'branch' } diff --git a/services/webhooks2tasks/src/handlers/bitbucketPullRequestClosed.ts b/services/webhooks2tasks/src/handlers/bitbucketPullRequestClosed.ts index 6029c78d94..d9b869afcb 100644 --- a/services/webhooks2tasks/src/handlers/bitbucketPullRequestClosed.ts +++ b/services/webhooks2tasks/src/handlers/bitbucketPullRequestClosed.ts @@ -1,5 +1,6 @@ import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; import { WebhookRequestData, removeData, Project } from '../types'; @@ -22,10 +23,25 @@ export async function bitbucketPullRequestClosed(webhook: WebhookRequestData, pr repoUrl: body.repository.links.html.href, } + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let branchName = `pr-${body.pullrequest.id}` + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(branchName)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${branchName}`); + const data: removeData = { projectName: project.name, pullrequestNumber: body.pullrequest.id, pullrequestTitle: body.pullrequest.title, + branch: branchName, + openshiftProjectName: openshiftProjectName, type: 'pullrequest' } diff --git a/services/webhooks2tasks/src/handlers/giteaBranchDeleted.ts b/services/webhooks2tasks/src/handlers/giteaBranchDeleted.ts new file mode 100644 index 0000000000..82f07ac2e4 --- /dev/null +++ b/services/webhooks2tasks/src/handlers/giteaBranchDeleted.ts @@ -0,0 +1,73 @@ +import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; +import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; + +import { WebhookRequestData, removeData, Project } from '../types'; + +export async function giteaBranchDeleted(webhook: WebhookRequestData, project: Project) { + const { + webhooktype, + event, + giturl, + uuid, + body, + } = webhook; + + const meta: { [key: string]: any } = { + projectName: project.name, + branch: body.ref.replace('refs/heads/',''), + branchName: body.ref.replace('refs/heads/','') + } + + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(meta.branch)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${meta.branch}`); + + const data: removeData = { + projectName: project.name, + branch: meta.branch, + branchName: meta.branchName, + openshiftProjectName: openshiftProjectName, + forceDeleteProductionEnvironment: false, + type: 'branch' + } + + try { + await createRemoveTask(data); + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:delete:handled`, meta, + `*[${project.name}]* \`${meta.branch}\` deleted in <${body.repository.html_url}|${body.repository.full_name}>` + ) + return; + } catch (error) { + meta.error = error + switch (error.name) { + case "ProjectNotFound": + case "NoActiveSystemsDefined": + case "UnknownActiveSystem": + // These are not real errors and also they will happen many times. We just log them locally but not throw an error + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* \`${meta.branch}\` deleted. No remove task created, reason: ${error}` + ) + return; + + case "CannotDeleteProductionEnvironment": + // These are not real errors and also they will happen many times. We just log them locally but not throw an error + sendToLagoonLogs('warning', project.name, uuid, `${webhooktype}:${event}:CannotDeleteProductionEnvironment`, meta, + `*[${project.name}]* \`${meta.branch}\` not deleted. ${error}` + ) + return; + + default: + // Other messages are real errors and should reschedule the message in RabbitMQ in order to try again + throw error + } + } +} diff --git a/services/webhooks2tasks/src/handlers/giteaPullRequestClosed.ts b/services/webhooks2tasks/src/handlers/giteaPullRequestClosed.ts new file mode 100644 index 0000000000..32be1feece --- /dev/null +++ b/services/webhooks2tasks/src/handlers/giteaPullRequestClosed.ts @@ -0,0 +1,80 @@ +import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; +import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; + +import { WebhookRequestData, removeData, Project } from '../types'; + +export async function giteaPullRequestClosed(webhook: WebhookRequestData, project: Project) { + + const { + webhooktype, + event, + giturl, + uuid, + body, + user, + sender, + } = webhook; + + const meta: { [key: string]: any } = { + projectName: project.name, + pullrequestTitle: body.pull_request.title, + pullrequestNumber: body.number, + pullrequestUrl: body.pull_request.html_url, + repoName: body.repository.full_name, + repoUrl: body.repository.html_url, + } + + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let branchName = `pr-${body.number}` + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(branchName)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${branchName}`); + + const data: removeData = { + projectName: project.name, + pullrequestNumber: body.number, + pullrequestTitle: body.pull_request.title, + branch: branchName, + openshiftProjectName: openshiftProjectName, + type: 'pullrequest' + } + + try { + await createRemoveTask(data); + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:closed:handled`, meta, + `*[${project.name}]* PR <${body.pull_request.html_url}|#${body.number} (${body.pull_request.title})> by <${body.pull_request.user.login}> changed by <${body.sender.login}> closed in <${body.repository.html_url}|${body.repository.full_name}>` + ) + return; + } catch (error) { + meta.error = error + switch (error.name) { + case "ProjectNotFound": + case "NoActiveSystemsDefined": + case "UnknownActiveSystem": + // These are not real errors and also they will happen many times. We just log them locally but not throw an error + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* PR ${body.number} closed. No remove task created, reason: ${error}` + ) + return; + + case "CannotDeleteProductionEnvironment": + // These are not real errors and also they will happen many times. We just log them locally but not throw an error + sendToLagoonLogs('warning', project.name, uuid, `${webhooktype}:${event}:CannotDeleteProductionEnvironment`, meta, + `*[${project.name}]* \`${meta.branch}\` not deleted. ${error}` + ) + return; + + default: + // Other messages are real errors and should reschedule the message in RabbitMQ in order to try again + throw error + } + } +} diff --git a/services/webhooks2tasks/src/handlers/giteaPullRequestOpened.ts b/services/webhooks2tasks/src/handlers/giteaPullRequestOpened.ts new file mode 100644 index 0000000000..1fa010256a --- /dev/null +++ b/services/webhooks2tasks/src/handlers/giteaPullRequestOpened.ts @@ -0,0 +1,78 @@ +import R from 'ramda'; +import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; +import { createDeployTask } from '@lagoon/commons/dist/tasks'; + +import { WebhookRequestData, deployData, Project } from '../types'; + +export async function giteaPullRequestOpened(webhook: WebhookRequestData, project: Project) { + + const { + webhooktype, + event, + giturl, + uuid, + body, + } = webhook; + + const headRepoId = body.pull_request.head.repo.id + const headBranchName = body.pull_request.head.ref + const headSha = body.pull_request.head.sha + const baseRepoId = body.pull_request.base.repo.id + const baseBranchName = body.pull_request.base.ref + const baseSha = body.pull_request.base.sha + + const meta = { + projectName: project.name, + pullrequestTitle: body.pull_request.title, + pullrequestNumber: body.number, + pullrequestUrl: body.pull_request.html_url, + repoName: body.repository.full_name, + repoUrl: body.repository.html_url, + } + + // Don't trigger deploy if the head and base repos are different + if (!R.equals(headRepoId, baseRepoId)) { + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* PR ${body.number} opened. No deploy task created, reason: Head/Base not same repo` + ) + return; + } + + const data: deployData = { + repoUrl: body.repository.html_url, + repoName: body.repository.full_name, + pullrequestTitle: body.pull_request.title, + pullrequestNumber: body.number, + pullrequestUrl: body.pull_request.html_url, + projectName: project.name, + type: 'pullrequest', + headBranchName: headBranchName, + headSha: headSha, + baseBranchName: baseBranchName, + baseSha: baseSha, + branchName: `pr-${body.number}`, + } + + try { + await createDeployTask(data); + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:opened:handled`, data, + `*[${project.name}]* PR <${body.pull_request.html_url}|#${body.number} (${body.pull_request.title})> opened in <${body.repository.html_url}|${body.repository.full_name}>` + ) + return; + } catch (error) { + switch (error.name) { + case "ProjectNotFound": + case "NoActiveSystemsDefined": + case "UnknownActiveSystem": + // These are not real errors and also they will happen many times. We just log them locally but not throw an error + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* PR ${body.number} opened. No deploy task created, reason: ${error}` + ) + return; + + default: + // Other messages are real errors and should reschedule the message in RabbitMQ in order to try again + throw error + } + } +} diff --git a/services/webhooks2tasks/src/handlers/giteaPullRequestSynchronize.ts b/services/webhooks2tasks/src/handlers/giteaPullRequestSynchronize.ts new file mode 100644 index 0000000000..54d0fd0858 --- /dev/null +++ b/services/webhooks2tasks/src/handlers/giteaPullRequestSynchronize.ts @@ -0,0 +1,96 @@ +import R from 'ramda'; +import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; +import { createDeployTask } from '@lagoon/commons/dist/tasks'; + +import { WebhookRequestData, deployData, Project } from '../types'; + +const isEditAction = R.propEq('action', 'edited'); + +const onlyBodyChanges = R.pipe( + R.propOr({}, 'changes'), + R.keys, + R.equals(['body']), +); + +const skipRedeploy = R.and(isEditAction, onlyBodyChanges); + +export async function giteaPullRequestSynchronize(webhook: WebhookRequestData, project: Project) { + + const { + webhooktype, + event, + giturl, + uuid, + body, + } = webhook; + + const headRepoId = body.pull_request.head.repo.id + const headBranchName = body.pull_request.head.ref + const headSha = body.pull_request.head.sha + const baseRepoId = body.pull_request.base.repo.id + const baseBranchName = body.pull_request.base.ref + const baseSha = body.pull_request.base.sha + + const meta = { + projectName: project.name, + pullrequestTitle: body.pull_request.title, + pullrequestNumber: body.number, + pullrequestUrl: body.pull_request.html_url, + repoName: body.repository.full_name, + repoUrl: body.repository.html_url, + } + + // Don't trigger deploy if only the PR body was edited. + if (skipRedeploy(body)) { + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* PR ${body.number} updated. No deploy task created, reason: Only body changed` + ) + return; + } + + // Don't trigger deploy if the head and base repos are different + if (!R.equals(headRepoId, baseRepoId)) { + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* PR ${body.number} updated. No deploy task created, reason: Head/Base not same repo` + ) + return; + } + + const data: deployData = { + repoName: body.repository.full_name, + repoUrl: body.repository.html_url, + pullrequestUrl: body.pull_request.html_url, + pullrequestTitle: body.pull_request.title, + pullrequestNumber: body.number, + projectName: project.name, + type: 'pullrequest', + headBranchName: headBranchName, + headSha: headSha, + baseBranchName: baseBranchName, + baseSha: baseSha, + branchName: `pr-${body.number}`, + } + + try { + await createDeployTask(data); + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:synchronize:handled`, data, + `*[${project.name}]* PR <${body.pull_request.html_url}|#${body.number} (${body.pull_request.title})> updated in <${body.repository.html_url}|${body.repository.full_name}>` + ) + return; + } catch (error) { + switch (error.name) { + case "ProjectNotFound": + case "NoActiveSystemsDefined": + case "UnknownActiveSystem": + // These are not real errors and also they will happen many times. We just log them locally but not throw an error + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* PR ${body.number} opened. No deploy task created, reason: ${error}` + ) + return; + + default: + // Other messages are real errors and should reschedule the message in RabbitMQ in order to try again + throw error + } + } +} diff --git a/services/webhooks2tasks/src/handlers/giteaPush.ts b/services/webhooks2tasks/src/handlers/giteaPush.ts new file mode 100644 index 0000000000..97eef04fa2 --- /dev/null +++ b/services/webhooks2tasks/src/handlers/giteaPush.ts @@ -0,0 +1,80 @@ +import R from 'ramda'; +import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; +import { createDeployTask } from '@lagoon/commons/dist/tasks'; + +import { WebhookRequestData, deployData, Project } from '../types'; + +export async function giteaPush(webhook: WebhookRequestData, project: Project) { + + const { + webhooktype, + event, + giturl, + uuid, + body, + } = webhook; + + const branchName = body.ref.toLowerCase().replace('refs/heads/','') + const sha = body.after + var afterUrl = `${body.repository.html_url}/commit/${body.after}` + + // @ts-ignore + const skip_deploy = R.pathOr('',['head_commit','message'], body).match(/\[skip deploy\]|\[deploy skip\]/i) + + const meta = { + projectName: project.name, + branch: branchName, + sha: sha, + shortSha: sha.substring(0, 7), + repoFullName: body.repository.full_name, + repoUrl: body.repository.html_url, + branchName: branchName, + commitUrl: afterUrl, + event: event, + } + + const data: deployData = { + projectName: project.name, + type: 'branch', + branchName: branchName, + sha: sha, + } + + let logMessage = `\`<${body.repository.html_url}/tree/${meta.branch}|${meta.branch}>\`` + if (sha) { + const shortSha: string = sha.substring(0, 7) + logMessage = `${logMessage} (<${afterUrl}|${shortSha}>)` + } + + if (skip_deploy) { + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:skipped`, meta, + `*[${project.name}]* ${logMessage} pushed in <${body.repository.html_url}|${body.repository.full_name}> *deployment skipped*` + ) + return; + } + + try { + await createDeployTask(data); + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handled`, meta, + `*[${project.name}]* ${logMessage} pushed in <${body.repository.html_url}|${body.repository.full_name}>` + ) + return; + } catch (error) { + switch (error.name) { + case "ProjectNotFound": + case "NoActiveSystemsDefined": + case "UnknownActiveSystem": + case "NoNeedToDeployBranch": + // These are not real errors and also they will happen many times. We just log them locally but not throw an error + sendToLagoonLogs('info', project.name, uuid, `${webhooktype}:${event}:handledButNoTask`, meta, + `*[${project.name}]* ${logMessage}. No deploy task created, reason: ${error}` + ) + return; + + default: + // Other messages are real errors and should reschedule the message in RabbitMQ in order to try again + throw error + } + } + +} diff --git a/services/webhooks2tasks/src/handlers/githubBranchDeleted.ts b/services/webhooks2tasks/src/handlers/githubBranchDeleted.ts index 9ec1298dcd..0cd0559437 100644 --- a/services/webhooks2tasks/src/handlers/githubBranchDeleted.ts +++ b/services/webhooks2tasks/src/handlers/githubBranchDeleted.ts @@ -1,5 +1,6 @@ import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; import { WebhookRequestData, removeData, Project } from '../types'; @@ -18,10 +19,23 @@ export async function githubBranchDeleted(webhook: WebhookRequestData, project: branchName: body.ref.replace('refs/heads/','') } + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(meta.branch)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${meta.branch}`); + const data: removeData = { projectName: project.name, branch: meta.branch, branchName: meta.branchName, + openshiftProjectName: openshiftProjectName, forceDeleteProductionEnvironment: false, type: 'branch' } diff --git a/services/webhooks2tasks/src/handlers/githubPullRequestClosed.ts b/services/webhooks2tasks/src/handlers/githubPullRequestClosed.ts index 332f0d75c5..ec02a73ce4 100644 --- a/services/webhooks2tasks/src/handlers/githubPullRequestClosed.ts +++ b/services/webhooks2tasks/src/handlers/githubPullRequestClosed.ts @@ -1,5 +1,6 @@ import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; import { WebhookRequestData, removeData, Project } from '../types'; @@ -24,10 +25,25 @@ export async function githubPullRequestClosed(webhook: WebhookRequestData, proje repoUrl: body.repository.html_url, } + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let branchName = `pr-${body.number}` + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(branchName)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${branchName}`); + const data: removeData = { projectName: project.name, pullrequestNumber: body.number, pullrequestTitle: body.pull_request.title, + branch: branchName, + openshiftProjectName: openshiftProjectName, type: 'pullrequest' } diff --git a/services/webhooks2tasks/src/handlers/gitlabBranchDeleted.ts b/services/webhooks2tasks/src/handlers/gitlabBranchDeleted.ts index 4a6b20d107..b28da4f46f 100644 --- a/services/webhooks2tasks/src/handlers/gitlabBranchDeleted.ts +++ b/services/webhooks2tasks/src/handlers/gitlabBranchDeleted.ts @@ -1,5 +1,6 @@ import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; import { WebhookRequestData, removeData, Project } from '../types'; @@ -20,10 +21,23 @@ export async function gitlabBranchDeleted(webhook: WebhookRequestData, project: repoFullName: body.project.path_with_namespace, } + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(meta.branch)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${meta.branch}`); + const data: removeData = { projectName: project.name, branch: meta.branch, branchName: meta.branchName, + openshiftProjectName: openshiftProjectName, forceDeleteProductionEnvironment: false, type: 'branch' } diff --git a/services/webhooks2tasks/src/handlers/gitlabProjectDelete.ts b/services/webhooks2tasks/src/handlers/gitlabProjectDelete.ts index 38d0120226..9d1ce137cf 100644 --- a/services/webhooks2tasks/src/handlers/gitlabProjectDelete.ts +++ b/services/webhooks2tasks/src/handlers/gitlabProjectDelete.ts @@ -1,5 +1,6 @@ +import R from 'ramda'; import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; -import { deleteProject } from '@lagoon/commons/dist/api'; +import { allProjectsInGroup, deleteProject, sanitizeGroupName } from '@lagoon/commons/dist/api'; import { WebhookRequestData } from '../types'; @@ -9,15 +10,37 @@ export async function gitlabProjectDelete(webhook: WebhookRequestData) { event, uuid, body, - body: { path: name } + body: { path: projectName, path_with_namespace } } = webhook; try { const meta = { - project: name + project: projectName }; - await deleteProject(name); + const groupName = sanitizeGroupName(path_with_namespace.replace(`/${projectName}`, '')); + const projectsInGroup = await allProjectsInGroup({ name: groupName }); + const projectExists = R.pipe( + R.prop('allProjectsInGroup'), + R.pluck('name'), + R.contains(projectName), + // @ts-ignore + )(projectsInGroup); + + if (projectExists) { + await deleteProject(projectName); + + sendToLagoonLogs( + 'info', + '', + uuid, + `${webhooktype}:${event}:handled`, + meta, + `deleted project ${projectName}` + ); + + return; + } sendToLagoonLogs( 'info', @@ -25,7 +48,7 @@ export async function gitlabProjectDelete(webhook: WebhookRequestData) { uuid, `${webhooktype}:${event}:handled`, meta, - `deleted project ${name}` + `project "${projectName}" not a member of group "${groupName}"` ); return; diff --git a/services/webhooks2tasks/src/handlers/gitlabPullRequestClosed.ts b/services/webhooks2tasks/src/handlers/gitlabPullRequestClosed.ts index ff9c42340e..f7fe5e9407 100644 --- a/services/webhooks2tasks/src/handlers/gitlabPullRequestClosed.ts +++ b/services/webhooks2tasks/src/handlers/gitlabPullRequestClosed.ts @@ -1,5 +1,6 @@ import { sendToLagoonLogs } from '@lagoon/commons/dist/logs'; import { createRemoveTask } from '@lagoon/commons/dist/tasks'; +import { getOpenShiftInfoForProject } from '@lagoon/commons/dist/api'; import { WebhookRequestData, removeData, Project } from '../types'; @@ -22,10 +23,25 @@ export async function gitlabPullRequestClosed(webhook: WebhookRequestData, proje repoUrl: body.object_attributes.target.web_url, } + const result = await getOpenShiftInfoForProject(project.name); + const projectOpenShift = result.project; + + const ocsafety = string => + string.toLocaleLowerCase().replace(/[^0-9a-z-]/g, '-'); + + let branchName = `pr-${body.object_attributes.id}` + let openshiftProjectName = projectOpenShift.openshiftProjectPattern + ? projectOpenShift.openshiftProjectPattern + .replace('${branch}', ocsafety(branchName)) + .replace('${project}', ocsafety(project.name)) + : ocsafety(`${project.name}-${branchName}`); + const data: removeData = { projectName: project.name, pullrequestNumber: body.object_attributes.id, pullrequestTitle: body.object_attributes.title, + branch: branchName, + openshiftProjectName: openshiftProjectName, type: 'pullrequest' } diff --git a/services/webhooks2tasks/src/handlers/problems/harborScanningCompleted.ts b/services/webhooks2tasks/src/handlers/problems/harborScanningCompleted.ts index ef068f6913..3117a15a7f 100644 --- a/services/webhooks2tasks/src/handlers/problems/harborScanningCompleted.ts +++ b/services/webhooks2tasks/src/handlers/problems/harborScanningCompleted.ts @@ -175,11 +175,10 @@ const matchRepositoryAgainstPatterns = (repoFullName, matchPatterns = []) => { } const matchPatternDetails = matchingRes.pop() || DEFAULT_REPO_DETAILS_MATCHER; - const { - lagoonProjectName = matchPatternDetails.defaultProjectName, - lagoonEnvironmentName = matchPatternDetails.defaultEnvironmentName, - lagoonServiceName = matchPatternDetails.defaultServiceName, + lagoonProjectName = matchPatternDetails.defaultLagoonProject, + lagoonEnvironmentName = matchPatternDetails.defaultLagoonEnvironment, + lagoonServiceName = matchPatternDetails.defaultLagoonService, } = extractRepositoryDetailsGivenRegex(repoFullName, matchPatternDetails.regex); return {lagoonProjectName, lagoonEnvironmentName, lagoonServiceName}; @@ -190,7 +189,7 @@ const generateRegex = R.memoizeWith(R.identity, re => new RegExp(re)); const extractRepositoryDetailsGivenRegex = (repoFullName, pattern = DEFAULT_REPO_DETAILS_REGEX) => { const re = generateRegex(pattern); const match = re.exec(repoFullName); - return match.groups; + return match.groups || {}; } const generateWebhookData = ( diff --git a/services/webhooks2tasks/src/processQueue.ts b/services/webhooks2tasks/src/processQueue.ts index 34ce759a2e..4c7754577a 100644 --- a/services/webhooks2tasks/src/processQueue.ts +++ b/services/webhooks2tasks/src/processQueue.ts @@ -1,5 +1,7 @@ +import R from 'ramda'; import { ChannelWrapper } from 'amqp-connection-manager'; import { ConsumeMessage } from 'amqplib'; +import { secureGitlabSystemHooks } from '@lagoon/commons/dist/gitlabApi'; import { processProjects } from './webhooks/projects'; import { processDataSync } from './webhooks/dataSync'; import { processBackup } from './webhooks/backup'; @@ -11,13 +13,14 @@ export async function processQueue (rabbitMsg: ConsumeMessage, channelWrapperWeb const { webhooktype, + event, giturl, } = webhook; // GitLab supports System Hooks which trigger on changes like creating new // organizations or users. Since these don't have associated projects, they // must be handled separately. - if (webhooktype == 'gitlab' && !giturl) { + if (webhooktype == 'gitlab' && R.contains(event, secureGitlabSystemHooks)) { processDataSync(rabbitMsg, channelWrapperWebhooks); } else if (webhooktype == 'resticbackup') { processBackup(rabbitMsg, channelWrapperWebhooks); diff --git a/services/webhooks2tasks/src/types.ts b/services/webhooks2tasks/src/types.ts index 346815998e..37112b328c 100644 --- a/services/webhooks2tasks/src/types.ts +++ b/services/webhooks2tasks/src/types.ts @@ -6,6 +6,7 @@ export interface removeData { projectName: string, pullrequestNumber?: number, pullrequestTitle?: string, + openshiftProjectName?: string, forceDeleteProductionEnvironment?: boolean, branchName?: string, branch?: string, diff --git a/services/webhooks2tasks/src/webhooks/projects.ts b/services/webhooks2tasks/src/webhooks/projects.ts index 38bd61f04d..cd9ed15a35 100644 --- a/services/webhooks2tasks/src/webhooks/projects.ts +++ b/services/webhooks2tasks/src/webhooks/projects.ts @@ -8,6 +8,11 @@ import { githubPullRequestOpened } from '../handlers/githubPullRequestOpened'; import { githubPullRequestSynchronize } from '../handlers/githubPullRequestSynchronize'; import { githubBranchDeleted } from '../handlers/githubBranchDeleted'; import { githubPush } from '../handlers/githubPush'; +import { giteaPullRequestClosed } from '../handlers/giteaPullRequestClosed'; +import { giteaPullRequestOpened } from '../handlers/giteaPullRequestOpened'; +import { giteaPullRequestSynchronize } from '../handlers/giteaPullRequestSynchronize'; +import { giteaBranchDeleted } from '../handlers/giteaBranchDeleted'; +import { giteaPush } from '../handlers/giteaPush'; import { bitbucketPush } from '../handlers/bitbucketPush'; import { bitbucketBranchDeleted } from '../handlers/bitbucketBranchDeleted'; import { bitbucketPullRequestUpdated } from '../handlers/bitbucketPullRequestUpdated'; @@ -160,7 +165,49 @@ export async function processProjects( } break; + case 'gitea:pull_request': + switch (body.action) { + case 'closed': + await handle( + giteaPullRequestClosed, + webhook, + project, + `${webhooktype}:${event}:${body.action}` + ); + break; + + case 'opened': + case 'reopened': + await handle( + giteaPullRequestOpened, + webhook, + project, + `${webhooktype}:${event}:${body.action}` + ); + break; + + case 'synchronize': + case 'edited': + await handle( + giteaPullRequestSynchronize, + webhook, + project, + `${webhooktype}:${event}:${body.action}` + ); + break; + + default: + unhandled( + webhook, + project, + `${webhooktype}:${event}:${body.action}` + ); + break; + } + break; + case 'github:delete': + case 'gitea:delete': switch (body.ref_type) { case 'branch': // We do not handle branch deletes via github delete push event, as github also sends a regular push event with 'deleted=true'. It's handled there (see below inside "github:push") @@ -194,6 +241,21 @@ export async function processProjects( } break; + + case 'gitea:push': + if (body.deleted === true) { + await handle( + giteaBranchDeleted, + webhook, + project, + `${webhooktype}:${event}` + ); + } else { + await handle(giteaPush, webhook, project, `${webhooktype}:${event}`); + } + + break; + case 'bitbucket:repo:push': if (body.push.changes[0].closed === true) { await handle( diff --git a/taskimages/activestandby/main.go b/taskimages/activestandby/main.go index a622e46500..fedce2e75e 100644 --- a/taskimages/activestandby/main.go +++ b/taskimages/activestandby/main.go @@ -100,7 +100,8 @@ func main() { } // check the status of the crd until we have the status conditions. - // otherwise give up after a few minutes. + // otherwise give up after 10 minutes. 60 retries, 10 seconds apart. + try.MaxRetries = 60 err = try.Do(func(attempt int) (bool, error) { var err error if err := c.Get(context.Background(), types.NamespacedName{ @@ -122,14 +123,14 @@ func main() { if mapval["type"].(string) == "failed" { crdSpec := crd.Object["spec"].(map[string]interface{}) if crdSpec != nil { - crdIngress := crdSpec["ingress"].(map[string]interface{}) - if crdIngress != nil { + crdHosts := crdSpec["hosts"].(map[string]interface{}) + if crdHosts != nil { rData := returnData{ Status: "Failed", ProductionEnvironment: payloadData["productionEnvironment"].(string), StandbyProdutionEnvironment: payloadData["standbyEnvironment"].(string), - ProductionRoutes: crdIngress["activeIngress"].(string), - StandbyRoutes: crdIngress["standbyIngress"].(string), + ProductionRoutes: crdHosts["activeHosts"].(string), + StandbyRoutes: crdHosts["standbyHosts"].(string), } // print the result of the task, it will go back to lagoon-logs to be displayed @@ -139,7 +140,7 @@ func main() { // exit as the task failed os.Exit(1) } - fmt.Printf("Task failed, error was: no ingress found in resource") + fmt.Printf("Task failed, error was: no hosts found in resource") os.Exit(1) } fmt.Printf("Task failed, error was: no spec found in resource") @@ -149,14 +150,14 @@ func main() { if mapval["type"].(string) == "completed" { crdSpec := crd.Object["spec"].(map[string]interface{}) if crdSpec != nil { - crdIngress := crdSpec["ingress"].(map[string]interface{}) - if crdIngress != nil { + crdHosts := crdSpec["hosts"].(map[string]interface{}) + if crdHosts != nil { rData := returnData{ Status: "Completed", ProductionEnvironment: payloadData["productionEnvironment"].(string), StandbyProdutionEnvironment: payloadData["standbyEnvironment"].(string), - ProductionRoutes: crdIngress["activeIngress"].(string), - StandbyRoutes: crdIngress["standbyIngress"].(string), + ProductionRoutes: crdHosts["activeHosts"].(string), + StandbyRoutes: crdHosts["standbyHosts"].(string), } // print the result of the task, it will go back to lagoon-logs to be displayed @@ -180,11 +181,15 @@ Provide a copy of this entire log to the team.`, err) os.Exit(1) } // the job data to send back to lagoon must be base64 encoded - pod.ObjectMeta.Annotations = map[string]string{ - "lagoon.sh/taskData": base64.StdEncoding.EncodeToString(jsonData), - } + mergePatch, _ := json.Marshal(map[string]interface{}{ + "metadata": map[string]interface{}{ + "annotations": map[string]interface{}{ + "lagoon.sh/taskData": base64.StdEncoding.EncodeToString(jsonData), + }, + }, + }) // update the pod with the annotation - if err := c.Update(context.Background(), &pod); err != nil { + if err := c.Patch(context.Background(), &pod, client.ConstantPatch(types.MergePatchType, mergePatch)); err != nil { fmt.Printf(`======================================== Task failed to update pod with return information, error was: %v ======================================== @@ -200,7 +205,7 @@ Provide a copy of this entire log to the team.`, err) } os.Exit(0) } - fmt.Printf("Task failed, error was: no ingress found in resource") + fmt.Printf("Task failed, error was: no hosts found in resource") os.Exit(1) } fmt.Printf("Task failed, error was: no spec found in resource") @@ -210,11 +215,12 @@ Provide a copy of this entire log to the team.`, err) } } // sleep for 5 seconds up to a maximum of 60 times (5 minutes) before finally giving up - time.Sleep(5 * time.Second) + time.Sleep(10 * time.Second) + err = fmt.Errorf("status condition not met yet") return attempt < 60, err }) if err != nil { - fmt.Printf("Task failed, timed out waiting for the job to start: %v", err) + fmt.Printf("Task failed, timed out after 10 minutes waiting for the job to start: %v", err) os.Exit(1) } } diff --git a/tests/Dockerfile b/tests/Dockerfile index 1220be55ae..fc26d947b3 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,11 +1,14 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/python:2.7 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/python-2.7:${UPSTREAM_TAG:-latest} RUN apk add --no-cache \ bash \ curl \ + gettext \ git \ jq \ + moreutils \ openssh-client \ rsync @@ -21,9 +24,9 @@ RUN apk add --no-cache --virtual .build-deps \ && apk del .build-deps # download, extract and install kubectl binary -# https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.18.md#downloads-for-v1182 -ARG KUBECTL_URL=https://dl.k8s.io/v1.18.2/kubernetes-client-linux-amd64.tar.gz -ARG KUBECTL_SHA512=ed36f49e19d8e0a98add7f10f981feda8e59d32a8cb41a3ac6abdfb2491b3b5b3b6e0b00087525aa8473ed07c0e8a171ad43f311ab041dcc40f72b36fa78af95 +# https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md#downloads-for-v1204 +ARG KUBECTL_URL=https://dl.k8s.io/v1.20.4/kubernetes-client-linux-amd64.tar.gz +ARG KUBECTL_SHA512=daf1ec0cbd14885170a51d2a09bf652bfaa4d26925c1b4babdc427d2a2903b1a295403320229cde2b415fee65a5af22671afa926f184cf198df7f17a27f19394 # curl -> tee -> sha512sum -> grep # `-> tar RUN { { curl -sSL $KUBECTL_URL | tee /dev/fd/3 | sha512sum >&4; } 3>&1 | tar -xz --strip-components=3 -C /usr/local/bin kubernetes/client/bin/kubectl; } 4>&1 | grep -q $KUBECTL_SHA512 diff --git a/tests/checks/check-api-request.yaml b/tests/checks/check-api-request.yaml index 5ea28fe345..9c66f09f2e 100644 --- a/tests/checks/check-api-request.yaml +++ b/tests/checks/check-api-request.yaml @@ -1,11 +1,11 @@ --- -- name: "{{ testname }} - Check if API Request to {{url}} returns {{expected_content}}" +- name: "{{ testname }} - Check if API Request to {{ url }} returns {{ expected_content }}" uri: url: "{{ url }}" return_content: yes headers: - Authorization: "Bearer {{bearer_token}}" + Authorization: "Bearer {{ bearer_token }}" register: result - until: result.content | match(expected_content) + until: result.content is match(expected_content) retries: 1 delay: 0 diff --git a/tests/checks/check-auto-generated-ingress-short-router-url.yaml b/tests/checks/check-auto-generated-ingress-short-router-url.yaml new file mode 100644 index 0000000000..02277de060 --- /dev/null +++ b/tests/checks/check-auto-generated-ingress-short-router-url.yaml @@ -0,0 +1,38 @@ +--- +- name: > + {{ testname }} - Check if auto-generated ingress of namespace + {{ project }}-{{ lagoon_environment }} has the short-router-url in TLS hosts + shell: | + set -e + set -x + + INGRESS_JSON=$(kubectl -n {{ project }}-{{ lagoon_environment }} get ingress -o json) + + NUM_TLS_HOSTS=$(echo $INGRESS_JSON | jq -er '.items[] | select(.metadata.name == "node") | .spec.tls[0].hosts | length') + if [ $NUM_TLS_HOSTS -lt 2 ]; then + echo NUM_TLS_HOSTS: $NUM_TLS_HOSTS + echo $INGRESS_JSON + exit 1 + fi + + FIRST_HOST_LEN=$(echo $INGRESS_JSON | jq -er '.items[] | select(.metadata.name == "node") | .spec.tls[0].hosts[0] | length') + if [ $FIRST_HOST_LEN -gt 63 ]; then + echo FIRST_HOST_LEN: $FIRST_HOST_LEN + echo $INGRESS_JSON + exit 1 + fi + + SECOND_HOST_LEN=$(echo $INGRESS_JSON | jq -er '.items[] | select(.metadata.name == "node") | .spec.tls[0].hosts[1] | length') + if [ $SECOND_HOST_LEN -lt 63 ]; then + echo SECOND_HOST_LEN: $SECOND_HOST_LEN + echo $INGRESS_JSON + exit 1 + fi + register: result + retries: 30 + delay: 10 + until: result.rc == 0 +- name: > + {{ testname }} - Check if {{ ingress }} ingress of namespace + {{ project }}-{{ lagoon_environment }} has the short-router-url in TLS hosts + debug: msg="Success!!!" diff --git a/tests/checks/check-branch-sha.yaml b/tests/checks/check-branch-sha.yaml index df59cce688..c3fd86c384 100644 --- a/tests/checks/check-branch-sha.yaml +++ b/tests/checks/check-branch-sha.yaml @@ -15,6 +15,7 @@ expected_content: "LAGOON_GIT_BRANCH={{ expected_branch }}" tasks: - include: check-url-content.yaml + when: expected_branch != "" - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash inside an environment variable set during buildtime" hosts: localhost diff --git a/tests/checks/check-ingress-annotations.yaml b/tests/checks/check-ingress-annotations.yaml index 4de17246b8..d9474c28fe 100644 --- a/tests/checks/check-ingress-annotations.yaml +++ b/tests/checks/check-ingress-annotations.yaml @@ -1,15 +1,15 @@ --- -- name: "{{ testname }} - Check if {{ingress}} ingress of namespace {{ project }}-{{ branch }} has annotation" +- name: "{{ testname }} - Check if {{ ingress }} ingress of namespace {{ project }}-{{ branch }} has annotation" shell: | set -e # create the $annotation and $value variables from item eval $(echo "{{ item }}" | awk -F= '{sep=index($0,"="); print "annotation=\"" $1 "\" value=\"" substr($0,sep+1) "\""}') - [ $(kubectl -n {{ project }}-{{ branch }} get ingress {{ingress}} -o json | + [ $(kubectl -n {{ project }}-{{ branch }} get ingress {{ ingress }} -o json | jq -er ".metadata.annotations | .\"$annotation\"") = "$value" ] loop: "{{ expected_annotations }}" register: result - retries: 20 + retries: 30 delay: 10 until: result.rc == 0 -- name: "{{ testname }} - Check if {{ingress}} ingress of namespace {{ project }}-{{ branch }} has annotation" +- name: "{{ testname }} - Check if {{ ingress }} ingress of namespace {{ project }}-{{ branch }} has annotation" debug: msg="Success!!!" diff --git a/tests/checks/check-json-content.yaml b/tests/checks/check-json-content.yaml index 360e6b174d..62ee4a8ed2 100644 --- a/tests/checks/check-json-content.yaml +++ b/tests/checks/check-json-content.yaml @@ -1,12 +1,12 @@ --- -- name: "{{ testname }} - Check if URL {{url}} contains json {{expected_key}}:{{expected_value}}" +- name: "{{ testname }} - Check if URL {{ url }} contains json {{ expected_key }}:{{ expected_value }}" uri: url: "{{ url }}" return_content: yes body_format: json register: response until: response.json is defined and response.json.number_of_nodes is defined and response.json.number_of_nodes == node_count - retries: 30 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} contains json {{expected_key}}:{{expected_value}}" + retries: 90 + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} contains json {{ expected_key }}:{{ expected_value }}" debug: msg="Success!!!" diff --git a/tests/checks/check-namespace-labels.yaml b/tests/checks/check-namespace-labels.yaml index 26530b5dc0..9a0e8528ef 100644 --- a/tests/checks/check-namespace-labels.yaml +++ b/tests/checks/check-namespace-labels.yaml @@ -1,5 +1,5 @@ --- -- name: "{{ testname }} - Check if {{project}} namespace is labelled" +- name: "{{ testname }} - Check if {{ project }} namespace is labelled" shell: | set -e # create the $label and $value variables from item @@ -8,8 +8,8 @@ jq -er ".metadata.labels | .\"$label\"") = "$value" ] loop: "{{ expected_labels }}" register: result - retries: 20 + retries: 30 delay: 10 until: result.rc == 0 -- name: "{{ testname }} - Check if {{project}} namespace is labelled" +- name: "{{ testname }} - Check if {{ project }} namespace is labelled" debug: msg="Success!!!" diff --git a/tests/checks/check-url-content-absent.yaml b/tests/checks/check-url-content-absent.yaml index 1f735641ff..59722a7eb5 100644 --- a/tests/checks/check-url-content-absent.yaml +++ b/tests/checks/check-url-content-absent.yaml @@ -1,10 +1,10 @@ --- -- name: "{{ testname }} - Check if URL {{url}} doesn't contain content {{expected_content}}" +- name: "{{ testname }} - Check if URL {{ url }} doesn't contain content {{ expected_content }}" uri: url: "{{ url }}" return_content: yes validate_certs: no register: result - failed_when: result.content | search(expected_content) -- name: "{{ testname }} - Check if URL {{url}} doesn't contain content {{expected_content}}" + failed_when: result.content is search(expected_content) +- name: "{{ testname }} - Check if URL {{ url }} doesn't contain content {{ expected_content }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-content-basic-auth-host.yaml b/tests/checks/check-url-content-basic-auth-host.yaml index 1788f293dd..aed5f2720d 100644 --- a/tests/checks/check-url-content-basic-auth-host.yaml +++ b/tests/checks/check-url-content-basic-auth-host.yaml @@ -1,5 +1,5 @@ --- -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} contains content {{expected_content}}" +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} contains content {{ expected_content }}" uri: url: "{{ url }}" return_content: yes @@ -8,8 +8,8 @@ HEADER_Host: "{{ host }}" validate_certs: no register: result - until: result.content | search(expected_content) + until: result.content is search(expected_content) retries: 90 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} contains content {{expected_content}}" + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} contains content {{ expected_content }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-content-basic-auth.yaml b/tests/checks/check-url-content-basic-auth.yaml index 29812be200..b86d50cbc5 100644 --- a/tests/checks/check-url-content-basic-auth.yaml +++ b/tests/checks/check-url-content-basic-auth.yaml @@ -1,5 +1,5 @@ --- -- name: "{{ testname }} - Check if URL {{url}} contains content {{expected_content}}" +- name: "{{ testname }} - Check if URL {{ url }} contains content {{ expected_content }}" uri: url: "{{ url }}" return_content: yes @@ -7,8 +7,8 @@ password: "{{ password }}" validate_certs: no register: result - until: result.content | search(expected_content) + until: result.content is search(expected_content) retries: 90 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} contains content {{expected_content}}" + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} contains content {{ expected_content }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-content-host.yaml b/tests/checks/check-url-content-host.yaml index 6f1d7cb80f..43d2f005f5 100644 --- a/tests/checks/check-url-content-host.yaml +++ b/tests/checks/check-url-content-host.yaml @@ -1,13 +1,13 @@ --- -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} contains content {{expected_content}}" +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} contains content {{ expected_content }}" uri: url: "{{ url }}" return_content: yes HEADER_Host: "{{ host }}" validate_certs: no register: result - until: result.content | search(expected_content) + until: result.content is search(expected_content) retries: 90 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} contains content {{expected_content}}" + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} contains content {{ expected_content }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-content.yaml b/tests/checks/check-url-content.yaml index 6bc6866d80..692ebd1bb1 100644 --- a/tests/checks/check-url-content.yaml +++ b/tests/checks/check-url-content.yaml @@ -1,12 +1,12 @@ --- -- name: "{{ testname }} - Check if URL {{url}} contains content {{expected_content}}" +- name: "{{ testname }} - Check if URL {{ url }} contains content {{ expected_content }}" uri: url: "{{ url }}" return_content: yes validate_certs: no register: result - until: result.content | search(expected_content) + until: result.content is search(expected_content) retries: 90 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} contains content {{expected_content}}" + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} contains content {{ expected_content }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-header-absent.yaml b/tests/checks/check-url-header-absent.yaml index 98e20e67de..7ea4c7b318 100644 --- a/tests/checks/check-url-header-absent.yaml +++ b/tests/checks/check-url-header-absent.yaml @@ -1,8 +1,8 @@ --- - name: >- - {{ testname }} - Check if URL {{url}} returns without Header set to - {{expected_header}} + {{ testname }} - Check if URL {{ url }} returns without Header set to + {{ expected_header }} uri: url: "{{ url }}" validate_certs: no @@ -11,6 +11,6 @@ failed_when: result[expected_header] is defined - name: >- - {{ testname }} - Check if URL {{url}} returns without Header set to - {{expected_header}} + {{ testname }} - Check if URL {{ url }} returns without Header set to + {{ expected_header }} debug: msg="Success!!!" diff --git a/tests/checks/check-url-header.yaml b/tests/checks/check-url-header.yaml index 029c622dc4..9aaef3278b 100644 --- a/tests/checks/check-url-header.yaml +++ b/tests/checks/check-url-header.yaml @@ -1,8 +1,8 @@ --- - name: >- - {{testname}} - Check if URL {{url}} returns with Header set to - {{expected_header}} with value of '{{expected_header_value}}' + {{ testname }} - Check if URL {{ url }} returns with Header set to + {{ expected_header }} with value of '{{ expected_header_value }}' uri: url: "{{ url }}" validate_certs: no @@ -10,10 +10,10 @@ register: result until: result[expected_header] is defined failed_when: result[expected_header] != expected_header_value - retries: 20 - delay: 10 + retries: 90 + delay: 20 - name: >- - {{testname}} - Check if URL {{url}} returns with Header set to - {{expected_header}} with value of '{{expected_header_value}}' + {{ testname }} - Check if URL {{ url }} returns with Header set to + {{ expected_header }} with value of '{{ expected_header_value }}' debug: msg="Success!!!" diff --git a/tests/checks/check-url-redirect-host.yaml b/tests/checks/check-url-redirect-host.yaml index 7a47baa6a3..e90824d1d6 100644 --- a/tests/checks/check-url-redirect-host.yaml +++ b/tests/checks/check-url-redirect-host.yaml @@ -1,5 +1,5 @@ --- -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} redirects to the location {{expected_redirect_location}}" +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} redirects to the location {{ expected_redirect_location }}" uri: url: "{{ url }}" follow_redirects: none @@ -8,8 +8,8 @@ validate_certs: no register: result until: result.location | default('') | regex_search(expected_redirect_location) - retries: 20 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} redirects to the location {{expected_redirect_location}}" + retries: 90 + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} redirects to the location {{ expected_redirect_location }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-redirect.yaml b/tests/checks/check-url-redirect.yaml index 363f2116e8..69b91cd4a1 100644 --- a/tests/checks/check-url-redirect.yaml +++ b/tests/checks/check-url-redirect.yaml @@ -1,5 +1,5 @@ --- -- name: "{{ testname }} - Check if URL {{url}} redirects to the location {{expected_redirect_location}}" +- name: "{{ testname }} - Check if URL {{ url }} redirects to the location {{ expected_redirect_location }}" uri: url: "{{ url }}" follow_redirects: none @@ -7,8 +7,8 @@ validate_certs: no register: result until: result.location | default('') | regex_search(expected_redirect_location) - retries: 20 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} redirects to the location {{expected_redirect_location}}" + retries: 90 + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} redirects to the location {{ expected_redirect_location }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-returncode-host.yaml b/tests/checks/check-url-returncode-host.yaml index 531b0a5496..1f3833b53a 100644 --- a/tests/checks/check-url-returncode-host.yaml +++ b/tests/checks/check-url-returncode-host.yaml @@ -1,5 +1,5 @@ --- -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} returns with return code {{expected_returncode}}" +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} returns with return code {{ expected_returncode }}" uri: url: "{{ url }}" status_code: "{{ expected_returncode }}" @@ -7,8 +7,8 @@ validate_certs: no register: result until: result.status is defined and result.status == expected_returncode|int - retries: 20 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} with sending Host: {{ host }} returns with return code {{expected_returncode}}" + retries: 90 + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} with sending Host: {{ host }} returns with return code {{ expected_returncode }}" debug: msg="Success!!!" diff --git a/tests/checks/check-url-returncode.yaml b/tests/checks/check-url-returncode.yaml index 135abe8258..4f0135b947 100644 --- a/tests/checks/check-url-returncode.yaml +++ b/tests/checks/check-url-returncode.yaml @@ -1,13 +1,12 @@ --- -- name: "{{ testname }} - Check if URL {{url}} returns with return code {{expected_returncode}}" +- name: "{{ testname }} - Check if URL {{ url }} returns with return code {{ expected_returncode }}" uri: url: "{{ url }}" status_code: "{{ expected_returncode }}" validate_certs: no register: result until: result.status is defined and result.status == expected_returncode|int - retries: 20 - delay: 10 -- name: "{{ testname }} - Check if URL {{url}} returns with return code {{expected_returncode}}" + retries: 90 + delay: 20 +- name: "{{ testname }} - Check if URL {{ url }} returns with return code {{ expected_returncode }}" debug: msg="Success!!!" - diff --git a/tests/checks/check-url-ts.yaml b/tests/checks/check-url-ts.yaml index be297bb4fc..f6e2baf381 100644 --- a/tests/checks/check-url-ts.yaml +++ b/tests/checks/check-url-ts.yaml @@ -1,5 +1,5 @@ --- -- name: "{{ testname }} - Check if URL {{url}} returns a timestamp that is more than 90 seconds less than the current time." +- name: "{{ testname }} - Check if URL {{ url }} returns a timestamp that is more than 90 seconds less than the current time." uri: url: "{{ url }}" return_content: yes @@ -7,7 +7,7 @@ register: result until: ( lookup('pipe','date +%s')|int - result.content|int ) >= 90 retries: 90 - delay: 10 + delay: 20 failed_when: false -- name: "{{ testname }} - Check if URL {{url}} returns a timestamp that is more than 90 seconds less than the current time." - debug: msg="Success!!!" \ No newline at end of file +- name: "{{ testname }} - Check if URL {{ url }} returns a timestamp that is more than 90 seconds less than the current time." + debug: msg="Success!!!" diff --git a/tests/entrypoint.sh b/tests/entrypoint.sh index dd19aba7d3..56bedba88b 100755 --- a/tests/entrypoint.sh +++ b/tests/entrypoint.sh @@ -1,6 +1,9 @@ #!/bin/bash set -e +# inject variables from environment into the Ansible var template +envsubst '$API_HOST $API_PORT $API_PROTOCOL $CLUSTER_TYPE $DELETED_STATUS_CODE $GIT_HOST $GIT_REPO_PREFIX $GIT_PORT $ROUTE_SUFFIX_HTTP $ROUTE_SUFFIX_HTTP_PORT $ROUTE_SUFFIX_HTTPS $ROUTE_SUFFIX_HTTPS_PORT $SSH_HOST $SSH_PORT $WEBHOOK_HOST $WEBHOOK_PORT $WEBHOOK_PROTOCOL $WEBHOOK_REPO_PREFIX' < /ansible/tests/vars/test_vars.yaml | sponge /ansible/tests/vars/test_vars.yaml + if [ ! -z "$SSH_PRIVATE_KEY" ]; then mkdir -p ~/.ssh echo -e "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa diff --git a/tests/files/active-standby/first/Dockerfile b/tests/files/active-standby/first/Dockerfile index 005df92737..755cb33849 100644 --- a/tests/files/active-standby/first/Dockerfile +++ b/tests/files/active-standby/first/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY redirects-map.conf /etc/nginx/redirects-map.conf diff --git a/tests/files/active-standby/second/Dockerfile b/tests/files/active-standby/second/Dockerfile index 005df92737..755cb33849 100644 --- a/tests/files/active-standby/second/Dockerfile +++ b/tests/files/active-standby/second/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY redirects-map.conf /etc/nginx/redirects-map.conf diff --git a/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile index dd4c9fb322..8e10d09475 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.2-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.2-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile index 8e49056370..47e94916f2 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.2-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.2-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile index 87f50d9337..797be38689 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/solr.dockerfile @@ -1,3 +1,3 @@ -ARG IMAGE_REPO - -FROM ${IMAGE_REPO:-amazeeio}/solr:5.5-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/solr-5.5-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile b/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.2/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile index 42343c4f02..a147b4cd4e 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.3-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.3-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile index 1a4c836498..ea3020919e 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.3-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.3-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile index 87f50d9337..797be38689 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/solr.dockerfile @@ -1,3 +1,3 @@ -ARG IMAGE_REPO - -FROM ${IMAGE_REPO:-amazeeio}/solr:5.5-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/solr-5.5-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile b/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.3/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile index c260c36f1f..bc520e5fb9 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile index e219509639..5a3153de9e 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile index b05e244071..24af894aba 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/solr.dockerfile @@ -1,3 +1,4 @@ -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG -FROM ${IMAGE_REPO:-amazeeio}/solr:7.7-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/solr-7.7-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile b/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile +++ b/tests/files/drupal8-dockerfiles/php7.4/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal8-mariadb-single/.lagoon.yml b/tests/files/drupal8-mariadb-single/.lagoon.yml index 1f4ca2c636..c411924392 100644 --- a/tests/files/drupal8-mariadb-single/.lagoon.yml +++ b/tests/files/drupal8-mariadb-single/.lagoon.yml @@ -1,7 +1,7 @@ docker-compose-yaml: docker-compose.yml -endpoint: 172.17.0.1:2020 -api: 172.17.0.1:3000 +endpoint: lagoon-core-ssh.lagoon.svc.cluster.local:2020 +api: lagoon-core-api.lagoon.svc.cluster.local:80 environment_variables: git_sha: 'true' diff --git a/tests/files/drupal8-mariadb-single/docker-compose.yml b/tests/files/drupal8-mariadb-single/docker-compose.yml index 80cea669ec..b510906bc8 100644 --- a/tests/files/drupal8-mariadb-single/docker-compose.yml +++ b/tests/files/drupal8-mariadb-single/docker-compose.yml @@ -37,6 +37,7 @@ services: labels: lagoon.type: nginx-php-persistent lagoon.persistent: /app/web/sites/default/files/ + lagoon.persistent.size: 1Gi lagoon.name: nginx lagoon.deployment.servicetype: nginx volumes: diff --git a/tests/files/drupal8-mariadb-single/drush/aliases.drushrc.php b/tests/files/drupal8-mariadb-single/drush/aliases.drushrc.php index 012fcc5188..a8555e4ff9 100644 --- a/tests/files/drupal8-mariadb-single/drush/aliases.drushrc.php +++ b/tests/files/drupal8-mariadb-single/drush/aliases.drushrc.php @@ -4,7 +4,7 @@ * Don't change anything here, it's magic! */ -$aliasUrl = "http://172.17.0.1:8087/aliases.drushrc.php.stub"; +$aliasUrl = "http://lagoon-core-drush-alias.lagoon.svc.cluster.local:8080/aliases.drushrc.php.stub"; $aliasCheckTimeout = 5; //do a head check against the alias stub file, report on failure diff --git a/tests/files/drupal8-mariadb/.lagoon.yml b/tests/files/drupal8-mariadb/.lagoon.yml index 1f4ca2c636..c411924392 100644 --- a/tests/files/drupal8-mariadb/.lagoon.yml +++ b/tests/files/drupal8-mariadb/.lagoon.yml @@ -1,7 +1,7 @@ docker-compose-yaml: docker-compose.yml -endpoint: 172.17.0.1:2020 -api: 172.17.0.1:3000 +endpoint: lagoon-core-ssh.lagoon.svc.cluster.local:2020 +api: lagoon-core-api.lagoon.svc.cluster.local:80 environment_variables: git_sha: 'true' diff --git a/tests/files/drupal8-mariadb/docker-compose.yml b/tests/files/drupal8-mariadb/docker-compose.yml index 31e7d43ef2..18753477bd 100644 --- a/tests/files/drupal8-mariadb/docker-compose.yml +++ b/tests/files/drupal8-mariadb/docker-compose.yml @@ -35,6 +35,7 @@ services: labels: lagoon.type: nginx-php-persistent lagoon.persistent: /app/web/sites/default/files/ + lagoon.persistent.size: 1Gi lagoon.name: nginx lagoon.deployment.servicetype: nginx volumes: diff --git a/tests/files/drupal8-mariadb/drush/aliases.drushrc.php b/tests/files/drupal8-mariadb/drush/aliases.drushrc.php index 012fcc5188..a8555e4ff9 100644 --- a/tests/files/drupal8-mariadb/drush/aliases.drushrc.php +++ b/tests/files/drupal8-mariadb/drush/aliases.drushrc.php @@ -4,7 +4,7 @@ * Don't change anything here, it's magic! */ -$aliasUrl = "http://172.17.0.1:8087/aliases.drushrc.php.stub"; +$aliasUrl = "http://lagoon-core-drush-alias.lagoon.svc.cluster.local:8080/aliases.drushrc.php.stub"; $aliasCheckTimeout = 5; //do a head check against the alias stub file, report on failure diff --git a/tests/files/drupal8-postgres-single/.dockerignore b/tests/files/drupal8-postgres-single/.dockerignore new file mode 100644 index 0000000000..12fe6241b2 --- /dev/null +++ b/tests/files/drupal8-postgres-single/.dockerignore @@ -0,0 +1,2 @@ +.git +docker-compose.yml \ No newline at end of file diff --git a/tests/files/drupal8-postgres-single/.gitignore b/tests/files/drupal8-postgres-single/.gitignore new file mode 100644 index 0000000000..f34ab3e181 --- /dev/null +++ b/tests/files/drupal8-postgres-single/.gitignore @@ -0,0 +1,21 @@ +# Ignore directories generated by Composer +/drush/contrib/ +/vendor/ +/web/core/ +/web/modules/contrib/ +/web/themes/contrib/ +/web/profiles/contrib/ +/web/libraries/ + +# Ignore Drupal's file directory +/web/sites/*/files/ + +# Ingore files that are only for the current local environment +web/sites/*/local.settings.php +web/sites/*/local.services.yml + +# Ignore SimpleTest multi-site environment. +web/sites/simpletest + +# Ignore files generated by PhpStorm +/.idea/ diff --git a/tests/files/drupal8-postgres-single/.lagoon.yml b/tests/files/drupal8-postgres-single/.lagoon.yml new file mode 100644 index 0000000000..7708cd0e19 --- /dev/null +++ b/tests/files/drupal8-postgres-single/.lagoon.yml @@ -0,0 +1,46 @@ +docker-compose-yaml: docker-compose.yml + +endpoint: lagoon-core-ssh.lagoon.svc.cluster.local:2020 +api: lagoon-core-api.lagoon.svc.cluster.local:80 + +environment_variables: + git_sha: 'true' + +tasks: + post-rollout: + - run: + name: env variables + command: env + service: cli + - run: + name: IF no Drupal installed, install drupal + command: | + cd web + if tables=$(drush sqlq "\dt node") && [ -z "$tables" ]; then + # no drupal installed, we install drupal from scratch + zcat ../drupal-postgres.sql.gz > /tmp/drupal.sql + drush sqlq --file=/tmp/drupal.sql + fi + # set the sitename to the current SHA and BRANCH + drush -y cset system.site name "LAGOON_GIT_SHA=$LAGOON_GIT_SHA LAGOON_GIT_BRANCH=$LAGOON_GIT_BRANCH" + service: cli + shell: bash + - run: + name: drush cr + command: cd web && drush -y cr + service: cli + +environments: + master: + routes: + - nginx: + - "domain.com": + tls-acme: 'true' + insecure: Allow + - www.domain.com + + cronjobs: + - name: drush cron + schedule: "1 * * * *" + command: drush cron + service: cli diff --git a/tests/files/drupal8-postgres-single/LICENSE b/tests/files/drupal8-postgres-single/LICENSE new file mode 100644 index 0000000000..23cb790338 --- /dev/null +++ b/tests/files/drupal8-postgres-single/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + {signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/tests/files/drupal8-postgres-single/composer.json b/tests/files/drupal8-postgres-single/composer.json new file mode 100644 index 0000000000..b629143c49 --- /dev/null +++ b/tests/files/drupal8-postgres-single/composer.json @@ -0,0 +1,79 @@ +{ + "name": "amazeeio/drupal-project", + "description": "Project template for Drupal 8 projects with composer hosted on amazee.io", + "type": "project", + "license": "GPL-2.0+", + "authors": [ + { + "name": "Michael Schmid michael@amazee.io", + "role": "CTO" + } + ], + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + } + ], + "require": { + "composer/installers": "^1.2", + "drupal-composer/drupal-scaffold": "^2.2", + "cweagans/composer-patches": "~1.0", + "drupal/core": "~8.0", + "drush/drush": "~8.0", + "drupal/console": "~1.0", + "drupal/redis": "^1.0", + "drupal/search_api": "^1.5", + "drupal/search_api_solr": "^1.2" + }, + "require-dev": { + "behat/mink": "~1.7", + "behat/mink-goutte-driver": "~1.2", + "jcalderonzumba/gastonjs": "~1.0.2", + "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", + "mikey179/vfsstream": "~1.2", + "phpunit/phpunit": "~4.8", + "symfony/css-selector": "~2.8" + }, + "conflict": { + "drupal/drupal": "*" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "classmap": [ + "scripts/composer/ScriptHandler.php" + ] + }, + "scripts": { + "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", + "pre-install-cmd": [ + "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" + ], + "pre-update-cmd": [ + "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" + ], + "post-install-cmd": [ + "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" + ], + "post-update-cmd": [ + "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" + ] + }, + "extra": { + "installer-paths": { + "web/core": ["type:drupal-core"], + "web/libraries/{$name}": ["type:drupal-library"], + "web/modules/contrib/{$name}": ["type:drupal-module"], + "web/profiles/contrib/{$name}": ["type:drupal-profile"], + "web/themes/contrib/{$name}": ["type:drupal-theme"], + "drush/contrib/{$name}": ["type:drupal-drush"] + }, + "drupal-scaffold": { + "excludes": [ + "sites/development.services.yml", + "sites/example.settings.local.php" + ] + } + } +} diff --git a/tests/files/drupal8-postgres-single/composer.lock b/tests/files/drupal8-postgres-single/composer.lock new file mode 100644 index 0000000000..d0a50c5eaa --- /dev/null +++ b/tests/files/drupal8-postgres-single/composer.lock @@ -0,0 +1,7276 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "4efc13fb8d85501688650023e3410a61", + "packages": [ + { + "name": "alchemy/zippy", + "version": "0.4.9", + "source": { + "type": "git", + "url": "https://github.com/alchemy-fr/Zippy.git", + "reference": "59fbeefb9a249122867ef25e53addfcce31850d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alchemy-fr/Zippy/zipball/59fbeefb9a249122867ef25e53addfcce31850d7", + "reference": "59fbeefb9a249122867ef25e53addfcce31850d7", + "shasum": "" + }, + "require": { + "doctrine/collections": "~1.0", + "php": ">=5.5", + "symfony/filesystem": "^2.0.5 || ^3.0 || ^4.0", + "symfony/polyfill-mbstring": "^1.3", + "symfony/process": "^2.1 || ^3.0 || ^4.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzle/guzzle": "~3.0", + "guzzlehttp/guzzle": "^6.0", + "phpunit/phpunit": "^4.0 || ^5.0", + "symfony/finder": "^2.0.5 || ^3.0 || ^4.0" + }, + "suggest": { + "ext-zip": "To use the ZipExtensionAdapter", + "guzzle/guzzle": "To use the GuzzleTeleporter with Guzzle 3", + "guzzlehttp/guzzle": "To use the GuzzleTeleporter with Guzzle 6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Alchemy\\Zippy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alchemy", + "email": "dev.team@alchemy.fr", + "homepage": "http://www.alchemy.fr/" + } + ], + "description": "Zippy, the archive manager companion", + "keywords": [ + "bzip", + "compression", + "tar", + "zip" + ], + "time": "2018-02-22T13:58:36+00:00" + }, + { + "name": "asm89/stack-cors", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/asm89/stack-cors.git", + "reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/b9c31def6a83f84b4d4a40d35996d375755f0e08", + "reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/http-foundation": "~2.7|~3.0|~4.0|~5.0", + "symfony/http-kernel": "~2.7|~3.0|~4.0|~5.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8.10", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Asm89\\Stack\\": "src/Asm89/Stack/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexander", + "email": "iam.asm89@gmail.com" + } + ], + "description": "Cross-origin resource sharing library and stack middleware", + "homepage": "https://github.com/asm89/stack-cors", + "keywords": [ + "cors", + "stack" + ], + "time": "2019-12-24T22:41:47+00:00" + }, + { + "name": "composer/installers", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "7d610d50aae61ae7ed6675e58efeabdf279bb5e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/7d610d50aae61ae7ed6675e58efeabdf279bb5e3", + "reference": "7d610d50aae61ae7ed6675e58efeabdf279bb5e3", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0" + }, + "replace": { + "roundcube/plugin-installer": "*", + "shama/baton": "*" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpunit/phpunit": "^4.8.36" + }, + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Craft", + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "MantisBT", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Thelia", + "Whmcs", + "WolfCMS", + "agl", + "aimeos", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "joomla", + "known", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "mediawiki", + "modulework", + "modx", + "moodle", + "osclass", + "phpbb", + "piwik", + "ppi", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "sylius", + "symfony", + "typo3", + "wordpress", + "yawik", + "zend", + "zikula" + ], + "time": "2020-02-07T10:39:20+00:00" + }, + { + "name": "composer/semver", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5 || ^5.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "time": "2020-01-13T12:06:48+00:00" + }, + { + "name": "consolidation/annotated-command", + "version": "2.12.0", + "source": { + "type": "git", + "url": "https://github.com/consolidation/annotated-command.git", + "reference": "512a2e54c98f3af377589de76c43b24652bcb789" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", + "reference": "512a2e54c98f3af377589de76c43b24652bcb789", + "shasum": "" + }, + "require": { + "consolidation/output-formatters": "^3.4", + "php": ">=5.4.5", + "psr/log": "^1", + "symfony/console": "^2.8|^3|^4", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\AnnotatedCommand\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Initialize Symfony Console commands from annotated command class methods.", + "time": "2019-03-08T16:55:03+00:00" + }, + { + "name": "consolidation/output-formatters", + "version": "3.5.0", + "source": { + "type": "git", + "url": "https://github.com/consolidation/output-formatters.git", + "reference": "99ec998ffb697e0eada5aacf81feebfb13023605" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/99ec998ffb697e0eada5aacf81feebfb13023605", + "reference": "99ec998ffb697e0eada5aacf81feebfb13023605", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=5.4.0", + "symfony/console": "^2.8|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^5.7.27", + "squizlabs/php_codesniffer": "^2.7", + "symfony/var-dumper": "^2.8|^3|^4", + "victorjonsson/markdowndocs": "^1.3" + }, + "suggest": { + "symfony/var-dumper": "For using the var_dump formatter" + }, + "type": "library", + "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^6" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony3": { + "require": { + "symfony/console": "^3.4", + "symfony/finder": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "config": { + "platform": { + "php": "5.6.32" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + } + }, + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\OutputFormatters\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Format text by applying transformations provided by plug-in formatters.", + "time": "2019-05-30T23:16:01+00:00" + }, + { + "name": "cweagans/composer-patches", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", + "reference": "2e6f72a2ad8d59cd7e2b729f218bf42adb14f590", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "time": "2019-08-29T20:11:49+00:00" + }, + { + "name": "dflydev/dot-access-configuration", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-configuration.git", + "reference": "2e6eb0c8b8830b26bb23defcfc38d4276508fc49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-configuration/zipball/2e6eb0c8b8830b26bb23defcfc38d4276508fc49", + "reference": "2e6eb0c8b8830b26bb23defcfc38d4276508fc49", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "1.*", + "dflydev/placeholder-resolver": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "symfony/yaml": "~2.1" + }, + "suggest": { + "symfony/yaml": "Required for using the YAML Configuration Builders" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Dflydev\\DotAccessConfiguration": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + } + ], + "description": "Given a deep data structure representing a configuration, access configuration by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-configuration", + "keywords": [ + "config", + "configuration" + ], + "time": "2018-09-08T23:00:17+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Dflydev\\DotAccessData": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "time": "2017-01-20T21:14:22+00:00" + }, + { + "name": "dflydev/placeholder-resolver", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-placeholder-resolver.git", + "reference": "c498d0cae91b1bb36cc7d60906dab8e62bb7c356" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-placeholder-resolver/zipball/c498d0cae91b1bb36cc7d60906dab8e62bb7c356", + "reference": "c498d0cae91b1bb36cc7d60906dab8e62bb7c356", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Dflydev\\PlaceholderResolver": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + } + ], + "description": "Given a data source representing key => value pairs, resolve placeholders like ${foo.bar} to the value associated with the 'foo.bar' key in the data source.", + "homepage": "https://github.com/dflydev/dflydev-placeholder-resolver", + "keywords": [ + "placeholder", + "resolver" + ], + "time": "2012-10-28T21:08:28+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", + "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^7.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2019-10-01T18:55:10+00:00" + }, + { + "name": "doctrine/cache", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/382e7f4db9a12dc6c19431743a2b096041bcdd62", + "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62", + "shasum": "" + }, + "require": { + "php": "~7.1" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^6.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "time": "2019-11-29T15:36:20+00:00" + }, + { + "name": "doctrine/collections", + "version": "1.6.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "6b1e4b2b66f6d6e49983cebfe23a21b7ccc5b0d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/6b1e4b2b66f6d6e49983cebfe23a21b7ccc5b0d7", + "reference": "6b1e4b2b66f6d6e49983cebfe23a21b7ccc5b0d7", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan-shim": "^0.9.2", + "phpunit/phpunit": "^7.0", + "vimeo/psalm": "^3.2.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "time": "2019-11-13T13:07:11+00:00" + }, + { + "name": "doctrine/common", + "version": "2.12.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "2053eafdf60c2172ee1373d1b9289ba1db7f1fc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/2053eafdf60c2172ee1373d1b9289ba1db7f1fc6", + "reference": "2053eafdf60c2172ee1373d1b9289ba1db7f1fc6", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/inflector": "^1.0", + "doctrine/lexer": "^1.0", + "doctrine/persistence": "^1.1", + "doctrine/reflection": "^1.0", + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^1.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpunit/phpunit": "^7.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^4.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "time": "2020-01-10T15:49:25+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "629572819973f13486371cb611386eb17851e85c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/629572819973f13486371cb611386eb17851e85c", + "reference": "629572819973f13486371cb611386eb17851e85c", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "time": "2019-11-10T09:48:07+00:00" + }, + { + "name": "doctrine/inflector", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2019-10-30T19:59:35+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "time": "2019-10-30T14:39:59+00:00" + }, + { + "name": "doctrine/persistence", + "version": "1.3.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "0af483f91bada1c9ded6c2cfd26ab7d5ab2094e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/0af483f91bada1c9ded6c2cfd26ab7d5ab2094e0", + "reference": "0af483f91bada1c9ded6c2cfd26ab7d5ab2094e0", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/reflection": "^1.2", + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.10@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common", + "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "time": "2020-03-21T15:13:52+00:00" + }, + { + "name": "doctrine/reflection", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/reflection.git", + "reference": "b699ecc7f2784d1e49924fd9858cf1078db6b0e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/reflection/zipball/b699ecc7f2784d1e49924fd9858cf1078db6b0e2", + "reference": "b699ecc7f2784d1e49924fd9858cf1078db6b0e2", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "ext-tokenizer": "*", + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^5.0", + "doctrine/common": "^2.10", + "phpstan/phpstan": "^0.11.0", + "phpstan/phpstan-phpunit": "^0.11.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some additional functionality on top of the reflection functionality that comes with PHP. It allows you to get the reflection information about classes, methods and properties statically.", + "homepage": "https://www.doctrine-project.org/projects/reflection.html", + "keywords": [ + "reflection", + "static" + ], + "time": "2020-03-21T11:34:59+00:00" + }, + { + "name": "drupal-composer/drupal-scaffold", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/drupal-composer/drupal-scaffold.git", + "reference": "13c1ffc7dd4925cb03707759128b85c0cd6276f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/drupal-composer/drupal-scaffold/zipball/13c1ffc7dd4925cb03707759128b85c0cd6276f8", + "reference": "13c1ffc7dd4925cb03707759128b85c0cd6276f8", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0.0", + "composer/semver": "^1.4", + "php": "^5.5.9|>=7.0.8" + }, + "require-dev": { + "composer/composer": "dev-master", + "g1a/composer-test-scenarios": "^2.1.0", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^2.8" + }, + "type": "composer-plugin", + "extra": { + "class": "DrupalComposer\\DrupalScaffold\\Plugin", + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "DrupalComposer\\DrupalScaffold\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Composer Plugin for updating the Drupal scaffold files when using drupal/core", + "time": "2019-03-30T10:41:38+00:00" + }, + { + "name": "drupal/console", + "version": "1.9.4", + "source": { + "type": "git", + "url": "https://github.com/hechoendrupal/drupal-console.git", + "reference": "04522b687b2149dc1f808599e716421a20d50a5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console/zipball/04522b687b2149dc1f808599e716421a20d50a5b", + "reference": "04522b687b2149dc1f808599e716421a20d50a5b", + "shasum": "" + }, + "require": { + "alchemy/zippy": "~0.4", + "composer/installers": "~1.0", + "doctrine/annotations": "^1.2", + "doctrine/collections": "^1.3", + "drupal/console-core": "1.9.4", + "drupal/console-extend-plugin": "~0", + "php": "^5.5.9 || ^7.0", + "psy/psysh": "0.6.* || ~0.8", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0" + }, + "suggest": { + "symfony/thanks": "Thank your favorite PHP projects on GitHub using the CLI", + "vlucas/phpdotenv": "Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically" + }, + "bin": [ + "bin/drupal" + ], + "type": "library", + "autoload": { + "psr-4": { + "Drupal\\Console\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "David Flores", + "email": "dmousex@gmail.com", + "homepage": "http://dmouse.net" + }, + { + "name": "Jesus Manuel Olivas", + "email": "jesus.olivas@gmail.com", + "homepage": "http://jmolivas.com" + }, + { + "name": "Eduardo Garcia", + "email": "enzo@enzolutions.com", + "homepage": "http://enzolutions.com/" + }, + { + "name": "Omar Aguirre", + "email": "omersguchigu@gmail.com" + }, + { + "name": "Drupal Console Contributors", + "homepage": "https://github.com/hechoendrupal/drupal-console/graphs/contributors" + } + ], + "description": "The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.", + "homepage": "http://drupalconsole.com/", + "keywords": [ + "console", + "development", + "drupal", + "symfony" + ], + "time": "2019-11-11T19:35:01+00:00" + }, + { + "name": "drupal/console-core", + "version": "1.9.4", + "source": { + "type": "git", + "url": "https://github.com/hechoendrupal/drupal-console-core.git", + "reference": "cc6f50c6ac8199140224347c862df75fd2d2f5ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console-core/zipball/cc6f50c6ac8199140224347c862df75fd2d2f5ed", + "reference": "cc6f50c6ac8199140224347c862df75fd2d2f5ed", + "shasum": "" + }, + "require": { + "dflydev/dot-access-configuration": "^1.0", + "drupal/console-en": "1.9.4", + "guzzlehttp/guzzle": "~6.1", + "php": "^5.5.9 || ^7.0", + "stecman/symfony-console-completion": "~0.7", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/debug": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0", + "twig/twig": "^1.23.1", + "webflo/drupal-finder": "^1.0", + "webmozart/path-util": "^2.3" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Drupal\\Console\\Core\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "David Flores", + "email": "dmousex@gmail.com", + "homepage": "http://dmouse.net" + }, + { + "name": "Jesus Manuel Olivas", + "email": "jesus.olivas@gmail.com", + "homepage": "http://jmolivas.com" + }, + { + "name": "Eduardo Garcia", + "email": "enzo@enzolutions.com", + "homepage": "http://enzolutions.com/" + }, + { + "name": "Omar Aguirre", + "email": "omersguchigu@gmail.com" + }, + { + "name": "Drupal Console Contributors", + "homepage": "https://github.com/hechoendrupal/DrupalConsole/graphs/contributors" + } + ], + "description": "Drupal Console Core", + "homepage": "http://drupalconsole.com/", + "keywords": [ + "console", + "development", + "drupal", + "symfony" + ], + "time": "2019-11-11T19:26:28+00:00" + }, + { + "name": "drupal/console-en", + "version": "1.9.4", + "source": { + "type": "git", + "url": "https://github.com/hechoendrupal/drupal-console-en.git", + "reference": "30813a832fdb1244e84cbcc012cd103d5e9d673d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/30813a832fdb1244e84cbcc012cd103d5e9d673d", + "reference": "30813a832fdb1244e84cbcc012cd103d5e9d673d", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "David Flores", + "email": "dmousex@gmail.com", + "homepage": "http://dmouse.net" + }, + { + "name": "Jesus Manuel Olivas", + "email": "jesus.olivas@gmail.com", + "homepage": "http://jmolivas.com" + }, + { + "name": "Eduardo Garcia", + "email": "enzo@enzolutions.com", + "homepage": "http://enzolutions.com/" + }, + { + "name": "Omar Aguirre", + "email": "omersguchigu@gmail.com" + }, + { + "name": "Drupal Console Contributors", + "homepage": "https://github.com/hechoendrupal/DrupalConsole/graphs/contributors" + } + ], + "description": "Drupal Console English Language", + "homepage": "http://drupalconsole.com/", + "keywords": [ + "console", + "development", + "drupal", + "symfony" + ], + "time": "2019-10-07T23:45:30+00:00" + }, + { + "name": "drupal/console-extend-plugin", + "version": "0.9.3", + "source": { + "type": "git", + "url": "https://github.com/hechoendrupal/drupal-console-extend-plugin.git", + "reference": "ad8e52df34b2e78bdacfffecc9fe8edf41843342" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console-extend-plugin/zipball/ad8e52df34b2e78bdacfffecc9fe8edf41843342", + "reference": "ad8e52df34b2e78bdacfffecc9fe8edf41843342", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "composer/installers": "^1.2", + "symfony/finder": "~2.7|~3.0", + "symfony/yaml": "~2.7|~3.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Drupal\\Console\\Composer\\Plugin\\Extender" + }, + "autoload": { + "psr-4": { + "Drupal\\Console\\Composer\\Plugin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Jesus Manuel Olivas", + "email": "jesus.olivas@gmail.com" + } + ], + "description": "Drupal Console Extend Plugin", + "time": "2019-11-07T20:15:27+00:00" + }, + { + "name": "drupal/core", + "version": "8.8.4", + "source": { + "type": "git", + "url": "https://github.com/drupal/core.git", + "reference": "34e59fcf702c1b3c497bbd6e92e68e546c5d15b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/drupal/core/zipball/34e59fcf702c1b3c497bbd6e92e68e546c5d15b8", + "reference": "34e59fcf702c1b3c497bbd6e92e68e546c5d15b8", + "shasum": "" + }, + "require": { + "asm89/stack-cors": "^1.1", + "composer/semver": "^1.0", + "doctrine/annotations": "^1.4", + "doctrine/common": "^2.7", + "easyrdf/easyrdf": "^0.9", + "egulias/email-validator": "^2.0", + "ext-date": "*", + "ext-dom": "*", + "ext-filter": "*", + "ext-gd": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-pdo": "*", + "ext-session": "*", + "ext-simplexml": "*", + "ext-spl": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "guzzlehttp/guzzle": "^6.3", + "masterminds/html5": "^2.1", + "pear/archive_tar": "^1.4.9", + "php": ">=7.0.8", + "stack/builder": "^1.0", + "symfony-cmf/routing": "^1.4", + "symfony/class-loader": "~3.4.0", + "symfony/console": "~3.4.0", + "symfony/dependency-injection": "~3.4.26", + "symfony/event-dispatcher": "~3.4.0", + "symfony/http-foundation": "~3.4.27", + "symfony/http-kernel": "~3.4.14", + "symfony/polyfill-iconv": "^1.0", + "symfony/process": "~3.4.0", + "symfony/psr-http-message-bridge": "^1.1.2", + "symfony/routing": "~3.4.0", + "symfony/serializer": "~3.4.0", + "symfony/translation": "~3.4.0", + "symfony/validator": "~3.4.0", + "symfony/yaml": "~3.4.5", + "twig/twig": "^1.38.2", + "typo3/phar-stream-wrapper": "^3.1.3", + "zendframework/zend-diactoros": "^1.8", + "zendframework/zend-feed": "^2.12" + }, + "conflict": { + "drupal/pathauto": "<1.6", + "drush/drush": "<8.1.10" + }, + "replace": { + "drupal/action": "self.version", + "drupal/aggregator": "self.version", + "drupal/automated_cron": "self.version", + "drupal/ban": "self.version", + "drupal/bartik": "self.version", + "drupal/basic_auth": "self.version", + "drupal/big_pipe": "self.version", + "drupal/block": "self.version", + "drupal/block_content": "self.version", + "drupal/block_place": "self.version", + "drupal/book": "self.version", + "drupal/breakpoint": "self.version", + "drupal/ckeditor": "self.version", + "drupal/claro": "self.version", + "drupal/classy": "self.version", + "drupal/color": "self.version", + "drupal/comment": "self.version", + "drupal/config": "self.version", + "drupal/config_translation": "self.version", + "drupal/contact": "self.version", + "drupal/content_moderation": "self.version", + "drupal/content_translation": "self.version", + "drupal/contextual": "self.version", + "drupal/core-annotation": "self.version", + "drupal/core-assertion": "self.version", + "drupal/core-bridge": "self.version", + "drupal/core-class-finder": "self.version", + "drupal/core-datetime": "self.version", + "drupal/core-dependency-injection": "self.version", + "drupal/core-diff": "self.version", + "drupal/core-discovery": "self.version", + "drupal/core-event-dispatcher": "self.version", + "drupal/core-file-cache": "self.version", + "drupal/core-file-security": "self.version", + "drupal/core-filesystem": "self.version", + "drupal/core-gettext": "self.version", + "drupal/core-graph": "self.version", + "drupal/core-http-foundation": "self.version", + "drupal/core-php-storage": "self.version", + "drupal/core-plugin": "self.version", + "drupal/core-proxy-builder": "self.version", + "drupal/core-render": "self.version", + "drupal/core-serialization": "self.version", + "drupal/core-transliteration": "self.version", + "drupal/core-utility": "self.version", + "drupal/core-uuid": "self.version", + "drupal/core-version": "self.version", + "drupal/datetime": "self.version", + "drupal/datetime_range": "self.version", + "drupal/dblog": "self.version", + "drupal/dynamic_page_cache": "self.version", + "drupal/editor": "self.version", + "drupal/entity_reference": "self.version", + "drupal/field": "self.version", + "drupal/field_layout": "self.version", + "drupal/field_ui": "self.version", + "drupal/file": "self.version", + "drupal/filter": "self.version", + "drupal/forum": "self.version", + "drupal/hal": "self.version", + "drupal/help": "self.version", + "drupal/help_topics": "self.version", + "drupal/history": "self.version", + "drupal/image": "self.version", + "drupal/inline_form_errors": "self.version", + "drupal/jsonapi": "self.version", + "drupal/language": "self.version", + "drupal/layout_builder": "self.version", + "drupal/layout_discovery": "self.version", + "drupal/link": "self.version", + "drupal/locale": "self.version", + "drupal/media": "self.version", + "drupal/media_library": "self.version", + "drupal/menu_link_content": "self.version", + "drupal/menu_ui": "self.version", + "drupal/migrate": "self.version", + "drupal/migrate_drupal": "self.version", + "drupal/migrate_drupal_multilingual": "self.version", + "drupal/migrate_drupal_ui": "self.version", + "drupal/minimal": "self.version", + "drupal/node": "self.version", + "drupal/options": "self.version", + "drupal/page_cache": "self.version", + "drupal/path": "self.version", + "drupal/path_alias": "self.version", + "drupal/quickedit": "self.version", + "drupal/rdf": "self.version", + "drupal/responsive_image": "self.version", + "drupal/rest": "self.version", + "drupal/search": "self.version", + "drupal/serialization": "self.version", + "drupal/settings_tray": "self.version", + "drupal/seven": "self.version", + "drupal/shortcut": "self.version", + "drupal/simpletest": "self.version", + "drupal/standard": "self.version", + "drupal/stark": "self.version", + "drupal/statistics": "self.version", + "drupal/syslog": "self.version", + "drupal/system": "self.version", + "drupal/taxonomy": "self.version", + "drupal/telephone": "self.version", + "drupal/text": "self.version", + "drupal/toolbar": "self.version", + "drupal/tour": "self.version", + "drupal/tracker": "self.version", + "drupal/update": "self.version", + "drupal/user": "self.version", + "drupal/views": "self.version", + "drupal/views_ui": "self.version", + "drupal/workflows": "self.version", + "drupal/workspaces": "self.version" + }, + "type": "drupal-core", + "extra": { + "drupal-scaffold": { + "file-mapping": { + "[project-root]/.editorconfig": "assets/scaffold/files/editorconfig", + "[project-root]/.gitattributes": "assets/scaffold/files/gitattributes", + "[web-root]/.csslintrc": "assets/scaffold/files/csslintrc", + "[web-root]/.eslintignore": "assets/scaffold/files/eslintignore", + "[web-root]/.eslintrc.json": "assets/scaffold/files/eslintrc.json", + "[web-root]/.ht.router.php": "assets/scaffold/files/ht.router.php", + "[web-root]/.htaccess": "assets/scaffold/files/htaccess", + "[web-root]/example.gitignore": "assets/scaffold/files/example.gitignore", + "[web-root]/index.php": "assets/scaffold/files/index.php", + "[web-root]/INSTALL.txt": "assets/scaffold/files/drupal.INSTALL.txt", + "[web-root]/README.txt": "assets/scaffold/files/drupal.README.txt", + "[web-root]/robots.txt": "assets/scaffold/files/robots.txt", + "[web-root]/update.php": "assets/scaffold/files/update.php", + "[web-root]/web.config": "assets/scaffold/files/web.config", + "[web-root]/sites/README.txt": "assets/scaffold/files/sites.README.txt", + "[web-root]/sites/development.services.yml": "assets/scaffold/files/development.services.yml", + "[web-root]/sites/example.settings.local.php": "assets/scaffold/files/example.settings.local.php", + "[web-root]/sites/example.sites.php": "assets/scaffold/files/example.sites.php", + "[web-root]/sites/default/default.services.yml": "assets/scaffold/files/default.services.yml", + "[web-root]/sites/default/default.settings.php": "assets/scaffold/files/default.settings.php", + "[web-root]/modules/README.txt": "assets/scaffold/files/modules.README.txt", + "[web-root]/profiles/README.txt": "assets/scaffold/files/profiles.README.txt", + "[web-root]/themes/README.txt": "assets/scaffold/files/themes.README.txt" + } + } + }, + "autoload": { + "psr-4": { + "Drupal\\Core\\": "lib/Drupal/Core", + "Drupal\\Component\\": "lib/Drupal/Component", + "Drupal\\Driver\\": "../drivers/lib/Drupal/Driver" + }, + "classmap": [ + "lib/Drupal.php", + "lib/Drupal/Component/Utility/Timer.php", + "lib/Drupal/Component/Utility/Unicode.php", + "lib/Drupal/Core/Database/Database.php", + "lib/Drupal/Core/DrupalKernel.php", + "lib/Drupal/Core/DrupalKernelInterface.php", + "lib/Drupal/Core/Site/Settings.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "description": "Drupal is an open source content management platform powering millions of websites and applications.", + "time": "2020-03-18T16:26:33+00:00" + }, + { + "name": "drupal/redis", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/redis.git", + "reference": "8.x-1.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/redis-8.x-1.4.zip", + "reference": "8.x-1.4", + "shasum": "87165acdda18873c1e3994c670bcb4cdafd3d0ff" + }, + "require": { + "drupal/core": "^8.8 || ^9" + }, + "suggest": { + "predis/predis": "^1.1.1" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.4", + "datestamp": "1581504947", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "autoload": { + "psr-4": { + "Drupal\\redis\\": "src" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0" + ], + "authors": [ + { + "name": "Berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "pounard", + "homepage": "https://www.drupal.org/user/240164" + } + ], + "description": "Provide a module placeholder, for using as dependency for module that needs Redis.", + "homepage": "https://www.drupal.org/project/redis", + "support": { + "source": "https://git.drupalcode.org/project/redis" + } + }, + { + "name": "drupal/search_api", + "version": "1.15.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/search_api.git", + "reference": "8.x-1.15" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.15.zip", + "reference": "8.x-1.15", + "shasum": "12c13141adb6b687fe36781ac9269a49ef810323" + }, + "require": { + "drupal/core": "^8.6" + }, + "conflict": { + "drupal/search_api_solr": "2.* || 3.0 || 3.1" + }, + "require-dev": { + "drupal/language_fallback_fix": "@dev", + "drupal/search_api_autocomplete": "@dev", + "drupal/search_api_db": "*" + }, + "suggest": { + "drupal/facets": "Adds the ability to create faceted searches.", + "drupal/search_api_autocomplete": "Allows adding autocomplete suggestions to search fields.", + "drupal/search_api_solr": "Adds support for using Apache Solr as a backend." + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.15", + "datestamp": "1573122785", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "drush": { + "services": { + "drush.services.yml": "^9" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Thomas Seidl", + "homepage": "https://www.drupal.org/u/drunken-monkey" + }, + { + "name": "Nick Veenhof", + "homepage": "https://www.drupal.org/u/nick_vh" + }, + { + "name": "See other contributors", + "homepage": "https://www.drupal.org/node/790418/committers" + } + ], + "description": "Provides a generic framework for modules offering search capabilities.", + "homepage": "https://www.drupal.org/project/search_api", + "support": { + "source": "http://git.drupal.org/project/search_api.git", + "issues": "https://www.drupal.org/project/issues/search_api", + "irc": "irc://irc.freenode.org/drupal-search-api" + } + }, + { + "name": "drupal/search_api_solr", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/search_api_solr.git", + "reference": "8.x-1.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/search_api_solr-8.x-1.4.zip", + "reference": "8.x-1.4", + "shasum": "c39215129b13659d50531b85dc93f453b8c40670" + }, + "require": { + "drupal/core": "~8.0", + "drupal/search_api": "~1.3", + "solarium/solarium": "3.8.*" + }, + "require-dev": { + "drupal/facets": "1.x-dev", + "drupal/geofield": "1.x-dev", + "drupal/search_api_autocomplete": "1.x-dev", + "drupal/search_api_location": "1.x-dev", + "phayes/geophp": "dev-master" + }, + "suggest": { + "drupal/facets": "Provides facetted search.", + "drupal/search_api_solr_multilingual": "Highly recommended if installation is multilingual or uses a language different than English." + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.4", + "datestamp": "1581606078", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Markus Kalkbrenner", + "homepage": "https://www.drupal.org/u/mkalkbrenner" + }, + { + "name": "Other contributors", + "homepage": "https://www.drupal.org/node/982682/committers" + }, + { + "name": "amateescu", + "homepage": "https://www.drupal.org/user/729614" + }, + { + "name": "cspitzlay", + "homepage": "https://www.drupal.org/user/419305" + }, + { + "name": "drunken monkey", + "homepage": "https://www.drupal.org/user/205582" + }, + { + "name": "mkalkbrenner", + "homepage": "https://www.drupal.org/user/124705" + } + ], + "description": "Offers an implementation of the Search API that uses an Apache Solr server for indexing content.", + "homepage": "https://www.drupal.org/project/search_api_solr", + "support": { + "source": "http://git.drupal.org/project/search_api_solr.git", + "issues": "https://www.drupal.org/project/issues/search_api_solr", + "irc": "irc://irc.freenode.org/drupal-search-api" + } + }, + { + "name": "drush/drush", + "version": "8.3.2", + "source": { + "type": "git", + "url": "https://github.com/drush-ops/drush.git", + "reference": "60306a27347f6c69517dc2d91bb2fd5d1a41abec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/drush-ops/drush/zipball/60306a27347f6c69517dc2d91bb2fd5d1a41abec", + "reference": "60306a27347f6c69517dc2d91bb2fd5d1a41abec", + "shasum": "" + }, + "require": { + "consolidation/annotated-command": "^2.12.0", + "consolidation/output-formatters": "~3", + "pear/console_table": "~1.3.1", + "php": ">=5.4.5", + "psr/log": "~1.0", + "psy/psysh": "~0.6", + "symfony/console": "~2.7|^3", + "symfony/event-dispatcher": "~2.7|^3", + "symfony/finder": "~2.7|^3", + "symfony/var-dumper": "~2.7|^3", + "symfony/yaml": "~2.3|^3", + "webflo/drupal-finder": "^1.1.0", + "webmozart/path-util": "~2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "~2.7", + "symfony/event-dispatcher": "~2.7", + "symfony/finder": "~2.7", + "symfony/process": "2.7.*", + "symfony/var-dumper": "~2.7", + "symfony/yaml": "~2.3" + }, + "suggest": { + "drush/config-extra": "Provides configuration workflow commands, such as config-merge.", + "ext-pcntl": "*" + }, + "bin": [ + "drush", + "drush.launcher", + "drush.php", + "drush.complete.sh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Drush": "lib/", + "Consolidation": "lib/" + }, + "psr-4": { + "Drush\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Moshe Weitzman", + "email": "weitzman@tejasa.com" + }, + { + "name": "Owen Barton", + "email": "drupal@owenbarton.com" + }, + { + "name": "Mark Sonnabaum", + "email": "marksonnabaum@gmail.com" + }, + { + "name": "Antoine Beaupré", + "email": "anarcat@koumbit.org" + }, + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + }, + { + "name": "Jonathan Araña Cruz", + "email": "jonhattan@faita.net" + }, + { + "name": "Jonathan Hedstrom", + "email": "jhedstrom@gmail.com" + }, + { + "name": "Christopher Gervais", + "email": "chris@ergonlogic.com" + }, + { + "name": "Dave Reid", + "email": "dave@davereid.net" + }, + { + "name": "Damian Lee", + "email": "damiankloip@googlemail.com" + } + ], + "description": "Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.", + "homepage": "http://www.drush.org", + "time": "2019-11-26T22:34:50+00:00" + }, + { + "name": "easyrdf/easyrdf", + "version": "0.9.1", + "source": { + "type": "git", + "url": "https://github.com/njh/easyrdf.git", + "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/njh/easyrdf/zipball/acd09dfe0555fbcfa254291e433c45fdd4652566", + "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-pcre": "*", + "php": ">=5.2.8" + }, + "require-dev": { + "phpunit/phpunit": "~3.5", + "sami/sami": "~1.4", + "squizlabs/php_codesniffer": "~1.4.3" + }, + "suggest": { + "ml/json-ld": "~1.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "EasyRdf_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nicholas Humfrey", + "email": "njh@aelius.com", + "homepage": "http://www.aelius.com/njh/", + "role": "Developer" + }, + { + "name": "Alexey Zakhlestin", + "email": "indeyets@gmail.com", + "role": "Developer" + } + ], + "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", + "homepage": "http://www.easyrdf.org/", + "keywords": [ + "Linked Data", + "RDF", + "Semantic Web", + "Turtle", + "rdfa", + "sparql" + ], + "time": "2015-02-27T09:45:49+00:00" + }, + { + "name": "egulias/email-validator", + "version": "2.1.17", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a", + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.0.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" + }, + "require-dev": { + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "EmailValidator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "time": "2020-02-13T22:36:52+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", + "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2019-12-23T11:57:10+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, + { + "name": "jakub-onderka/php-console-color", + "version": "v0.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "1.0", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleColor\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" + } + ], + "time": "2018-09-29T17:23:10+00:00" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.4", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "jakub-onderka/php-console-color": "~0.2", + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~1.0", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleHighlighter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "description": "Highlight PHP code in terminal", + "time": "2018-09-29T18:48:56+00:00" + }, + { + "name": "masterminds/html5", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "104443ad663d15981225f99532ba73c2f1d6b6f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/104443ad663d15981225f99532ba73c2f1d6b6f2", + "reference": "104443ad663d15981225f99532ba73c2f1d6b6f2", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-libxml": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35", + "sami/sami": "~2.0", + "satooshi/php-coveralls": "1.0.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "time": "2019-07-25T07:03:26+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.3.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "0.0.5", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2019-11-08T13:50:10+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "pear/archive_tar", + "version": "1.4.9", + "source": { + "type": "git", + "url": "https://github.com/pear/Archive_Tar.git", + "reference": "c5b00053770e1d72128252c62c2c1a12c26639f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/c5b00053770e1d72128252c62c2c1a12c26639f0", + "reference": "c5b00053770e1d72128252c62c2c1a12c26639f0", + "shasum": "" + }, + "require": { + "pear/pear-core-minimal": "^1.10.0alpha2", + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-bz2": "Bz2 compression support.", + "ext-xz": "Lzma2 compression support.", + "ext-zlib": "Gzip compression support." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Archive_Tar": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "./" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Vincent Blavet", + "email": "vincent@phpconcept.net" + }, + { + "name": "Greg Beaver", + "email": "greg@chiaraquartet.net" + }, + { + "name": "Michiel Rook", + "email": "mrook@php.net" + } + ], + "description": "Tar file management class with compression support (gzip, bzip2, lzma2)", + "homepage": "https://github.com/pear/Archive_Tar", + "keywords": [ + "archive", + "tar" + ], + "time": "2019-12-04T10:17:28+00:00" + }, + { + "name": "pear/console_getopt", + "version": "v1.4.3", + "source": { + "type": "git", + "url": "https://github.com/pear/Console_Getopt.git", + "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/a41f8d3e668987609178c7c4a9fe48fecac53fa0", + "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Console": "./" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "./" + ], + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Andrei Zmievski", + "email": "andrei@php.net", + "role": "Lead" + }, + { + "name": "Stig Bakken", + "email": "stig@php.net", + "role": "Developer" + }, + { + "name": "Greg Beaver", + "email": "cellog@php.net", + "role": "Helper" + } + ], + "description": "More info available on: http://pear.php.net/package/Console_Getopt", + "time": "2019-11-20T18:27:48+00:00" + }, + { + "name": "pear/console_table", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/pear/Console_Table.git", + "reference": "1930c11897ca61fd24b95f2f785e99e0f36dcdea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Console_Table/zipball/1930c11897ca61fd24b95f2f785e99e0f36dcdea", + "reference": "1930c11897ca61fd24b95f2f785e99e0f36dcdea", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "suggest": { + "pear/Console_Color2": ">=0.1.2" + }, + "type": "library", + "autoload": { + "classmap": [ + "Table.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jan Schneider", + "homepage": "http://pear.php.net/user/yunosh" + }, + { + "name": "Tal Peer", + "homepage": "http://pear.php.net/user/tal" + }, + { + "name": "Xavier Noguer", + "homepage": "http://pear.php.net/user/xnoguer" + }, + { + "name": "Richard Heyes", + "homepage": "http://pear.php.net/user/richard" + } + ], + "description": "Library that makes it easy to build console style tables.", + "homepage": "http://pear.php.net/package/Console_Table/", + "keywords": [ + "console" + ], + "time": "2018-01-25T20:47:17+00:00" + }, + { + "name": "pear/pear-core-minimal", + "version": "v1.10.10", + "source": { + "type": "git", + "url": "https://github.com/pear/pear-core-minimal.git", + "reference": "625a3c429d9b2c1546438679074cac1b089116a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/625a3c429d9b2c1546438679074cac1b089116a7", + "reference": "625a3c429d9b2c1546438679074cac1b089116a7", + "shasum": "" + }, + "require": { + "pear/console_getopt": "~1.4", + "pear/pear_exception": "~1.0" + }, + "replace": { + "rsky/pear-core-min": "self.version" + }, + "type": "library", + "autoload": { + "psr-0": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "src/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@php.net", + "role": "Lead" + } + ], + "description": "Minimal set of PEAR core files to be used as composer dependency", + "time": "2019-11-19T19:00:24+00:00" + }, + { + "name": "pear/pear_exception", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/pear/PEAR_Exception.git", + "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", + "reference": "dbb42a5a0e45f3adcf99babfb2a1ba77b8ac36a7", + "shasum": "" + }, + "require": { + "php": ">=4.4.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "type": "class", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "PEAR/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "." + ], + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Helgi Thormar", + "email": "dufuz@php.net" + }, + { + "name": "Greg Beaver", + "email": "cellog@php.net" + } + ], + "description": "The PEAR Exception base class.", + "homepage": "https://github.com/pear/PEAR_Exception", + "keywords": [ + "exception" + ], + "time": "2019-12-10T10:24:42+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2019-11-01T11:05:21+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.10.2", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "573c2362c3cdebe846b4adae4b630eecb350afd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/573c2362c3cdebe846b4adae4b630eecb350afd8", + "reference": "573c2362c3cdebe846b4adae4b630eecb350afd8", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1.*", + "ext-json": "*", + "ext-tokenizer": "*", + "jakub-onderka/php-console-highlighter": "0.4.*|0.3.*", + "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", + "php": "^8.0 || ^7.0 || ^5.5.9", + "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10", + "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "hoa/console": "~3.16|~2.15" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", + "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.10.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2020-03-21T06:55:27+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "solarium/solarium", + "version": "3.8.1", + "source": { + "type": "git", + "url": "https://github.com/solariumphp/solarium.git", + "reference": "c353babec89fdbe8c64054bfec8e77bcb5da6705" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/solariumphp/solarium/zipball/c353babec89fdbe8c64054bfec8e77bcb5da6705", + "reference": "c353babec89fdbe8c64054bfec8e77bcb5da6705", + "shasum": "" + }, + "require": { + "php": ">=5.3.2", + "symfony/event-dispatcher": "~2.3|~3.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^3.8 || ^6.2", + "phpunit/phpunit": "~3.7", + "satooshi/php-coveralls": "~1.0", + "squizlabs/php_codesniffer": "~1.4", + "zendframework/zendframework1": "~1.12" + }, + "suggest": { + "minimalcode/search": "Query builder compatible with Solarium, allows simplified solr-query handling" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "3.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Solarium\\": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "See GitHub contributors", + "homepage": "https://github.com/basdenooijer/solarium/contributors" + } + ], + "description": "PHP Solr client", + "homepage": "http://www.solarium-project.org", + "keywords": [ + "php", + "search", + "solr" + ], + "time": "2017-02-02T13:32:22+00:00" + }, + { + "name": "stack/builder", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/stackphp/builder.git", + "reference": "a4faaa6f532c6086bc66c29e1bc6c29593e1ca7c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stackphp/builder/zipball/a4faaa6f532c6086bc66c29e1bc6c29593e1ca7c", + "reference": "a4faaa6f532c6086bc66c29e1bc6c29593e1ca7c", + "shasum": "" + }, + "require": { + "php": ">=7.2.0", + "symfony/http-foundation": "~2.1|~3.0|~4.0|~5.0", + "symfony/http-kernel": "~2.1|~3.0|~4.0|~5.0" + }, + "require-dev": { + "phpunit/phpunit": "~8.0", + "symfony/routing": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Stack": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Builder for stack middleware based on HttpKernelInterface.", + "keywords": [ + "stack" + ], + "time": "2020-01-30T12:17:27+00:00" + }, + { + "name": "stecman/symfony-console-completion", + "version": "0.11.0", + "source": { + "type": "git", + "url": "https://github.com/stecman/symfony-console-completion.git", + "reference": "a9502dab59405e275a9f264536c4e1cb61fc3518" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/a9502dab59405e275a9f264536c4e1cb61fc3518", + "reference": "a9502dab59405e275a9f264536c4e1cb61fc3518", + "shasum": "" + }, + "require": { + "php": ">=5.3.2", + "symfony/console": "~2.3 || ~3.0 || ~4.0 || ~5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Stecman\\Component\\Symfony\\Console\\BashCompletion\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stephen Holdaway", + "email": "stephen@stecman.co.nz" + } + ], + "description": "Automatic BASH completion for Symfony Console Component based applications.", + "time": "2019-11-24T17:03:06+00:00" + }, + { + "name": "symfony-cmf/routing", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/symfony-cmf/routing.git", + "reference": "fb1e7f85ff8c6866238b7e73a490a0a0243ae8ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony-cmf/routing/zipball/fb1e7f85ff8c6866238b7e73a490a0a0243ae8ac", + "reference": "fb1e7f85ff8c6866238b7e73a490a0a0243ae8ac", + "shasum": "" + }, + "require": { + "php": "^5.3.9|^7.0", + "psr/log": "1.*", + "symfony/http-kernel": "^2.2|3.*", + "symfony/routing": "^2.2|3.*" + }, + "require-dev": { + "friendsofsymfony/jsrouting-bundle": "^1.1", + "symfony-cmf/testing": "^1.3", + "symfony/config": "^2.2|3.*", + "symfony/dependency-injection": "^2.0.5|3.*", + "symfony/event-dispatcher": "^2.1|3.*" + }, + "suggest": { + "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Cmf\\Component\\Routing\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony CMF Community", + "homepage": "https://github.com/symfony-cmf/Routing/contributors" + } + ], + "description": "Extends the Symfony2 routing component for dynamic routes and chaining several routers", + "homepage": "http://cmf.symfony.com", + "keywords": [ + "database", + "routing" + ], + "time": "2017-05-09T08:10:41+00:00" + }, + { + "name": "symfony/class-loader", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/class-loader.git", + "reference": "bcdf6ff46e115b29be3186391f29e0da82cd6f72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/bcdf6ff46e115b29be3186391f29e0da82cd6f72", + "reference": "bcdf6ff46e115b29be3186391f29e0da82cd6f72", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "require-dev": { + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/polyfill-apcu": "~1.1" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcClassLoader on HHVM" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\ClassLoader\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony ClassLoader Component", + "homepage": "https://symfony.com", + "time": "2020-01-04T12:05:51+00:00" + }, + { + "name": "symfony/config", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "03328d6e172ec7384341c622d4c28d350040d021" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/03328d6e172ec7384341c622d4c28d350040d021", + "reference": "03328d6e172ec7384341c622d4c28d350040d021", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/filesystem": "~2.8|~3.0|~4.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/dependency-injection": "<3.3", + "symfony/finder": "<3.3" + }, + "require-dev": { + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/event-dispatcher": "~3.3|~4.0", + "symfony/finder": "~3.3|~4.0", + "symfony/yaml": "~3.0|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2020-02-03T08:11:57+00:00" + }, + { + "name": "symfony/console", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "6827023c5872bea44b29d145de693b21981cf4cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/6827023c5872bea44b29d145de693b21981cf4cd", + "reference": "6827023c5872bea44b29d145de693b21981cf4cd", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2020-02-15T13:27:16+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v2.8.52", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "7b1692e418d7ccac24c373528453bc90e42797de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/7b1692e418d7ccac24c373528453bc90e42797de", + "reference": "7b1692e418d7ccac24c373528453bc90e42797de", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T11:18:13+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "a99278d50af8a9164219da38d61fb161a7f6e0a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/a99278d50af8a9164219da38d61fb161a7f6e0a6", + "reference": "a99278d50af8a9164219da38d61fb161a7f6e0a6", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/http-kernel": "~2.8|~3.0|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2020-02-03T15:10:40+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "b06b36883abc61eb8fb576e89102a9ba6c9ee7ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b06b36883abc61eb8fb576e89102a9ba6c9ee7ee", + "reference": "b06b36883abc61eb8fb576e89102a9ba6c9ee7ee", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/container": "^1.0" + }, + "conflict": { + "symfony/config": "<3.3.7", + "symfony/finder": "<3.3", + "symfony/proxy-manager-bridge": "<3.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "psr/container-implementation": "1.0" + }, + "require-dev": { + "symfony/config": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DependencyInjection Component", + "homepage": "https://symfony.com", + "time": "2020-02-19T17:19:43+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "5ea08fead7392bc5bfe83fb8a289ac9b72cb689e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5ea08fead7392bc5bfe83fb8a289ac9b72cb689e", + "reference": "5ea08fead7392bc5bfe83fb8a289ac9b72cb689e", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0|~4.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2020-02-26T17:12:32+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "2f67a869aef3eecf42e7f8be4a8b86c92308686c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2f67a869aef3eecf42e7f8be4a8b86c92308686c", + "reference": "2f67a869aef3eecf42e7f8be4a8b86c92308686c", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2020-02-04T08:04:52+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "0a0d3b4bda11aa3a0464531c40e681e184e75628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0a0d3b4bda11aa3a0464531c40e681e184e75628", + "reference": "0a0d3b4bda11aa3a0464531c40e681e184e75628", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2020-01-17T08:50:08+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "5ec813ccafa8164ef21757e8c725d3a57da59200" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/5ec813ccafa8164ef21757e8c725d3a57da59200", + "reference": "5ec813ccafa8164ef21757e8c725d3a57da59200", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2020-02-14T07:34:21+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "4d440be93adcfd5e4ee0bdc7acd1c3260625728f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4d440be93adcfd5e4ee0bdc7acd1c3260625728f", + "reference": "4d440be93adcfd5e4ee0bdc7acd1c3260625728f", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php70": "~1.6" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2020-02-06T08:18:51+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "449c3f7a9b8c47d178f80610afa6e2873ac0a3c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/449c3f7a9b8c47d178f80610afa6e2873ac0a3c0", + "reference": "449c3f7a9b8c47d178f80610afa6e2873ac0a3c0", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0", + "symfony/debug": "^3.3.3|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php56": "~1.8" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.4.10|<4.0.10,>=4", + "symfony/var-dumper": "<3.3", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "~1.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "^3.4.10|^4.0.10", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2020-02-29T10:16:41+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/polyfill-iconv", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-iconv.git", + "reference": "926832ce51059bb58211b7b2080a88e0c3b5328e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/926832ce51059bb58211b7b2080a88e0c3b5328e", + "reference": "926832ce51059bb58211b7b2080a88e0c3b5328e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-iconv": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Iconv\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Iconv extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "iconv", + "polyfill", + "portable", + "shim" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2020-01-17T12:01:36+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "16ec91cb06998b609501b55b7177b7d7c02badb3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/16ec91cb06998b609501b55b7177b7d7c02badb3", + "reference": "16ec91cb06998b609501b55b7177b7d7c02badb3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "419c4940024c30ccc033650373a1fe13890d3255" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/419c4940024c30ccc033650373a1fe13890d3255", + "reference": "419c4940024c30ccc033650373a1fe13890d3255", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "ba3cfcea6d0192cae46c62041f61cbb704b526d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ba3cfcea6d0192cae46c62041f61cbb704b526d3", + "reference": "ba3cfcea6d0192cae46c62041f61cbb704b526d3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/process", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "b03b02dcea26ba4c65c16a73bab4f00c186b13da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/b03b02dcea26ba4c65c16a73bab4f00c186b13da", + "reference": "b03b02dcea26ba4c65c16a73bab4f00c186b13da", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2020-02-04T08:04:52+00:00" + }, + { + "name": "symfony/psr-http-message-bridge", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "shasum": "" + }, + "require": { + "php": "^7.1", + "psr/http-message": "^1.0", + "symfony/http-foundation": "^3.4 || ^4.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "symfony/phpunit-bridge": "^3.4.20 || ^4.0", + "zendframework/zend-diactoros": "^1.4.1 || ^2.0" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], + "time": "2019-03-11T18:22:33+00:00" + }, + { + "name": "symfony/routing", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "c1377905edfa76e6934dd3c73f9a073305b47c00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/c1377905edfa76e6934dd3c73f9a073305b47c00", + "reference": "c1377905edfa76e6934dd3c73f9a073305b47c00", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/config": "<3.3.1", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "psr/log": "~1.0", + "symfony/config": "^3.3.1|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2020-02-04T08:04:52+00:00" + }, + { + "name": "symfony/serializer", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/serializer.git", + "reference": "f8b99832d016e2d2c77c797c3df561adecd33dd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/serializer/zipball/f8b99832d016e2d2c77c797c3df561adecd33dd3", + "reference": "f8b99832d016e2d2c77c797c3df561adecd33dd3", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "phpdocumentor/type-resolver": "<0.2.1", + "symfony/dependency-injection": "<3.2", + "symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4", + "symfony/property-info": "<3.1", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "symfony/cache": "~3.1|~4.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.2|~4.0", + "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/property-access": "~2.8|~3.0|~4.0", + "symfony/property-info": "^3.4.13|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "psr/cache-implementation": "For using the metadata cache.", + "symfony/config": "For using the XML mapping loader.", + "symfony/http-foundation": "For using a MIME type guesser within the DataUriNormalizer.", + "symfony/property-access": "For using the ObjectNormalizer.", + "symfony/property-info": "To deserialize relations.", + "symfony/yaml": "For using the default YAML mapping loader." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Serializer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Serializer Component", + "homepage": "https://symfony.com", + "time": "2020-02-24T14:33:45+00:00" + }, + { + "name": "symfony/translation", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "1eb074e0bd94939a30dd14dbecf7a92b165cea34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/1eb074e0bd94939a30dd14dbecf7a92b165cea34", + "reference": "1eb074e0bd94939a30dd14dbecf7a92b165cea34", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", + "symfony/intl": "^2.8.18|^3.2.5|~4.0", + "symfony/var-dumper": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2020-02-04T07:22:30+00:00" + }, + { + "name": "symfony/validator", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/validator.git", + "reference": "b5ccfc1adf301bb6ca63823455fbd1b20902bcfe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/validator/zipball/b5ccfc1adf301bb6ca63823455fbd1b20902bcfe", + "reference": "b5ccfc1adf301bb6ca63823455fbd1b20902bcfe", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation": "~2.8|~3.0|~4.0" + }, + "conflict": { + "doctrine/lexer": "<1.0.2", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/dependency-injection": "<3.3", + "symfony/http-kernel": "<3.3.5", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.7", + "doctrine/cache": "~1.0", + "egulias/email-validator": "^2.1.10", + "symfony/cache": "~3.1|~4.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "^3.3.5|~4.0", + "symfony/intl": "^2.8.18|^3.2.5|~4.0", + "symfony/property-access": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "egulias/email-validator": "Strict (RFC compliant) email validation", + "psr/cache-implementation": "For using the metadata cache.", + "symfony/config": "", + "symfony/expression-language": "For using the Expression validator", + "symfony/http-foundation": "", + "symfony/intl": "", + "symfony/property-access": "For accessing properties within comparison constraints", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Validator\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Validator Component", + "homepage": "https://symfony.com", + "time": "2020-02-29T09:08:42+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "07801f3330aea80d58cbd125ad13a2f0b26c9d18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/07801f3330aea80d58cbd125ad13a2f0b26c9d18", + "reference": "07801f3330aea80d58cbd125ad13a2f0b26c9d18", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "require-dev": { + "ext-iconv": "*", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2020-02-14T12:39:29+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.38", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "bc63e15160866e8730a1f738541b194c401f72bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/bc63e15160866e8730a1f738541b194c401f72bf", + "reference": "bc63e15160866e8730a1f738541b194c401f72bf", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2020-01-16T19:04:26+00:00" + }, + { + "name": "twig/twig", + "version": "v1.42.5", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", + "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", + "shasum": "" + }, + "require": { + "php": ">=5.5.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.42-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "time": "2020-02-11T05:59:23+00:00" + }, + { + "name": "typo3/phar-stream-wrapper", + "version": "v3.1.4", + "source": { + "type": "git", + "url": "https://github.com/TYPO3/phar-stream-wrapper.git", + "reference": "e0c1b495cfac064f4f5c4bcb6bf67bb7f345ed04" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/e0c1b495cfac064f4f5c4bcb6bf67bb7f345ed04", + "reference": "e0c1b495cfac064f4f5c4bcb6bf67bb7f345ed04", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.0" + }, + "require-dev": { + "ext-xdebug": "*", + "phpunit/phpunit": "^6.5" + }, + "suggest": { + "ext-fileinfo": "For PHP builtin file type guessing, otherwise uses internal processing" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "v3.x-dev" + } + }, + "autoload": { + "psr-4": { + "TYPO3\\PharStreamWrapper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Interceptors for PHP's native phar:// stream handling", + "homepage": "https://typo3.org/", + "keywords": [ + "phar", + "php", + "security", + "stream-wrapper" + ], + "time": "2019-12-10T11:53:27+00:00" + }, + { + "name": "webflo/drupal-finder", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webflo/drupal-finder.git", + "reference": "123e248e14ee8dd3fbe89fb5a733a6cf91f5820e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/123e248e14ee8dd3fbe89fb5a733a6cf91f5820e", + "reference": "123e248e14ee8dd3fbe89fb5a733a6cf91f5820e", + "shasum": "" + }, + "require": { + "ext-json": "*" + }, + "require-dev": { + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": "^4.8" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/DrupalFinder.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Florian Weber", + "email": "florian@webflo.org" + } + ], + "description": "Helper class to locate a Drupal installation from a given path.", + "time": "2019-08-02T08:06:18+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2020-02-14T12:15:55+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "time": "2015-12-17T08:42:14+00:00" + }, + { + "name": "zendframework/zend-diactoros", + "version": "1.8.7", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/a85e67b86e9b8520d07e6415fcbcb8391b44a75b", + "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", + "zendframework/zend-coding-standard": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-release-1.8": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://github.com/zendframework/zend-diactoros", + "keywords": [ + "http", + "psr", + "psr-7" + ], + "abandoned": "laminas/laminas-diactoros", + "time": "2019-08-06T17:53:53+00:00" + }, + { + "name": "zendframework/zend-escaper", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-escaper.git", + "reference": "3801caa21b0ca6aca57fa1c42b08d35c395ebd5f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/3801caa21b0ca6aca57fa1c42b08d35c395ebd5f", + "reference": "3801caa21b0ca6aca57fa1c42b08d35c395ebd5f", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Escaper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", + "keywords": [ + "ZendFramework", + "escaper", + "zf" + ], + "abandoned": "laminas/laminas-escaper", + "time": "2019-09-05T20:03:20+00:00" + }, + { + "name": "zendframework/zend-feed", + "version": "2.12.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-feed.git", + "reference": "d926c5af34b93a0121d5e2641af34ddb1533d733" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/d926c5af34b93a0121d5e2641af34ddb1533d733", + "reference": "d926c5af34b93a0121d5e2641af34ddb1533d733", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^5.6 || ^7.0", + "zendframework/zend-escaper": "^2.5.2", + "zendframework/zend-stdlib": "^3.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "psr/http-message": "^1.0.1", + "zendframework/zend-cache": "^2.7.2", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-db": "^2.8.2", + "zendframework/zend-http": "^2.7", + "zendframework/zend-servicemanager": "^2.7.8 || ^3.3", + "zendframework/zend-validator": "^2.10.1" + }, + "suggest": { + "psr/http-message": "PSR-7 ^1.0.1, if you wish to use Zend\\Feed\\Reader\\Http\\Psr7ResponseDecorator", + "zendframework/zend-cache": "Zend\\Cache component, for optionally caching feeds between requests", + "zendframework/zend-db": "Zend\\Db component, for use with PubSubHubbub", + "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for easily extending ExtensionManager implementations", + "zendframework/zend-validator": "Zend\\Validator component, for validating email addresses used in Atom feeds and entries when using the Writer subcomponent" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.12.x-dev", + "dev-develop": "2.13.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Feed\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides functionality for consuming RSS and Atom feeds", + "keywords": [ + "ZendFramework", + "feed", + "zf" + ], + "abandoned": "laminas/laminas-feed", + "time": "2019-03-05T20:08:49+00:00" + }, + { + "name": "zendframework/zend-stdlib", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "66536006722aff9e62d1b331025089b7ec71c065" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/66536006722aff9e62d1b331025089b7ec71c065", + "reference": "66536006722aff9e62d1b331025089b7ec71c065", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpbench/phpbench": "^0.13", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "SPL extensions, array utilities, error handlers, and more", + "keywords": [ + "ZendFramework", + "stdlib", + "zf" + ], + "abandoned": "laminas/laminas-stdlib", + "time": "2018-08-28T21:34:05+00:00" + } + ], + "packages-dev": [ + { + "name": "behat/mink", + "version": "v1.8.1", + "source": { + "type": "git", + "url": "https://github.com/minkphp/Mink.git", + "reference": "07c6a9fe3fa98c2de074b25d9ed26c22904e3887" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/minkphp/Mink/zipball/07c6a9fe3fa98c2de074b25d9ed26c22904e3887", + "reference": "07c6a9fe3fa98c2de074b25d9ed26c22904e3887", + "shasum": "" + }, + "require": { + "php": ">=5.3.1", + "symfony/css-selector": "^2.7|^3.0|^4.0|^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20", + "symfony/debug": "^2.7|^3.0|^4.0", + "symfony/phpunit-bridge": "^3.4.38 || ^5.0.5" + }, + "suggest": { + "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", + "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation", + "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)", + "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)", + "dmore/chrome-mink-driver": "fast and JS-enabled driver for any app (requires chromium or google chrome)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Mink\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Browser controller/emulator abstraction for PHP", + "homepage": "http://mink.behat.org/", + "keywords": [ + "browser", + "testing", + "web" + ], + "time": "2020-03-11T15:45:53+00:00" + }, + { + "name": "behat/mink-browserkit-driver", + "version": "v1.3.4", + "source": { + "type": "git", + "url": "https://github.com/minkphp/MinkBrowserKitDriver.git", + "reference": "e3b90840022ebcd544c7b394a3c9597ae242cbee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/e3b90840022ebcd544c7b394a3c9597ae242cbee", + "reference": "e3b90840022ebcd544c7b394a3c9597ae242cbee", + "shasum": "" + }, + "require": { + "behat/mink": "^1.7.1@dev", + "php": ">=5.3.6", + "symfony/browser-kit": "~2.3|~3.0|~4.0", + "symfony/dom-crawler": "~2.3|~3.0|~4.0" + }, + "require-dev": { + "mink/driver-testsuite": "dev-master", + "symfony/debug": "^2.7|^3.0|^4.0", + "symfony/http-kernel": "~2.3|~3.0|~4.0" + }, + "type": "mink-driver", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Mink\\Driver\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Symfony2 BrowserKit driver for Mink framework", + "homepage": "http://mink.behat.org/", + "keywords": [ + "Mink", + "Symfony2", + "browser", + "testing" + ], + "time": "2020-03-11T09:49:45+00:00" + }, + { + "name": "behat/mink-goutte-driver", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/minkphp/MinkGoutteDriver.git", + "reference": "8b9ad6d2d95bc70b840d15323365f52fcdaea6ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/8b9ad6d2d95bc70b840d15323365f52fcdaea6ca", + "reference": "8b9ad6d2d95bc70b840d15323365f52fcdaea6ca", + "shasum": "" + }, + "require": { + "behat/mink": "~1.6@dev", + "behat/mink-browserkit-driver": "~1.2@dev", + "fabpot/goutte": "~1.0.4|~2.0|~3.1", + "php": ">=5.3.1" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0" + }, + "type": "mink-driver", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Mink\\Driver\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Goutte driver for Mink framework", + "homepage": "http://mink.behat.org/", + "keywords": [ + "browser", + "goutte", + "headless", + "testing" + ], + "time": "2016-03-05T09:04:22+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-10-21T16:45:58+00:00" + }, + { + "name": "fabpot/goutte", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/Goutte.git", + "reference": "3f0eaf0a40181359470651f1565b3e07e3dd31b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/3f0eaf0a40181359470651f1565b3e07e3dd31b8", + "reference": "3f0eaf0a40181359470651f1565b3e07e3dd31b8", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": ">=5.5.0", + "symfony/browser-kit": "~2.1|~3.0|~4.0", + "symfony/css-selector": "~2.1|~3.0|~4.0", + "symfony/dom-crawler": "~2.1|~3.0|~4.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.3 || ^4" + }, + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Goutte\\": "Goutte" + }, + "exclude-from-classmap": [ + "Goutte/Tests" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A simple PHP Web Scraper", + "homepage": "https://github.com/FriendsOfPHP/Goutte", + "keywords": [ + "scraper" + ], + "time": "2018-06-29T15:13:57+00:00" + }, + { + "name": "jcalderonzumba/gastonjs", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/jcalderonzumba/gastonjs.git", + "reference": "4ff4a788d4995ae0d4b45fdcb1b76650e2eec72a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jcalderonzumba/gastonjs/zipball/4ff4a788d4995ae0d4b45fdcb1b76650e2eec72a", + "reference": "4ff4a788d4995ae0d4b45fdcb1b76650e2eec72a", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "~5.0|~6.0", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.6", + "silex/silex": "~1.2", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.1" + }, + "type": "phantomjs-api", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zumba\\GastonJS\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Juan Francisco Calderón Zumba", + "email": "juanfcz@gmail.com", + "homepage": "http://github.com/jcalderonzumba" + } + ], + "description": "PhantomJS API based server for webpage automation", + "homepage": "https://github.com/jcalderonzumba/gastonjs", + "keywords": [ + "api", + "automation", + "browser", + "headless", + "phantomjs" + ], + "time": "2016-05-04T16:27:07+00:00" + }, + { + "name": "jcalderonzumba/mink-phantomjs-driver", + "version": "v0.3.3", + "source": { + "type": "git", + "url": "https://github.com/jcalderonzumba/MinkPhantomJSDriver.git", + "reference": "008f43670e94acd39273d15add1e7348eb23848d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jcalderonzumba/MinkPhantomJSDriver/zipball/008f43670e94acd39273d15add1e7348eb23848d", + "reference": "008f43670e94acd39273d15add1e7348eb23848d", + "shasum": "" + }, + "require": { + "behat/mink": "~1.7", + "jcalderonzumba/gastonjs": "~1.0", + "php": ">=5.4", + "twig/twig": "~1.20|~2.0" + }, + "require-dev": { + "mink/driver-testsuite": "dev-master", + "phpunit/phpunit": "~4.6" + }, + "type": "mink-driver", + "extra": { + "branch-alias": { + "dev-master": "0.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zumba\\Mink\\Driver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Juan Francisco Calderón Zumba", + "email": "juanfcz@gmail.com", + "homepage": "http://github.com/jcalderonzumba" + } + ], + "description": "PhantomJS driver for Mink framework", + "homepage": "http://mink.behat.org/", + "keywords": [ + "ajax", + "browser", + "headless", + "javascript", + "phantomjs", + "testing" + ], + "time": "2016-12-01T10:57:30+00:00" + }, + { + "name": "mikey179/vfsstream", + "version": "v1.6.8", + "source": { + "type": "git", + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/231c73783ebb7dd9ec77916c10037eff5a2b6efe", + "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "description": "Virtual file system to mock the real file system in unit tests.", + "homepage": "http://vfs.bovigo.org/", + "time": "2019-10-30T15:31:00+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2018-08-07T13:53:10+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "shasum": "" + }, + "require": { + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" + }, + "require-dev": { + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2020-02-22T12:28:44+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", + "shasum": "" + }, + "require": { + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2020-02-18T18:59:58+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.3", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "451c3cd1418cf640de218914901e51b064abb093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2020-03-05T15:02:03+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-06-21T08:07:12+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "abandoned": true, + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "symfony/browser-kit", + "version": "v4.4.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "090ce406505149d6852a7c03b0346dec3b8cf612" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/090ce406505149d6852a7c03b0346dec3b8cf612", + "reference": "090ce406505149d6852a7c03b0346dec3b8cf612", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/dom-crawler": "^3.4|^4.0|^5.0" + }, + "require-dev": { + "symfony/css-selector": "^3.4|^4.0|^5.0", + "symfony/http-client": "^4.3|^5.0", + "symfony/mime": "^4.3|^5.0", + "symfony/process": "^3.4|^4.0|^5.0" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "https://symfony.com", + "time": "2020-02-23T10:00:59+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} \ No newline at end of file diff --git a/tests/files/drupal8-postgres-single/config/sync/.gitkeep b/tests/files/drupal8-postgres-single/config/sync/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/files/drupal8-postgres-single/docker-compose.yml b/tests/files/drupal8-postgres-single/docker-compose.yml new file mode 100644 index 0000000000..0b2f301ed9 --- /dev/null +++ b/tests/files/drupal8-postgres-single/docker-compose.yml @@ -0,0 +1,82 @@ +version: '2' +services: + cli: + build: + context: . + dockerfile: builder.dockerfile + image: builder + labels: + lagoon.type: cli-persistent + lagoon.persistent: /app/web/sites/default/files/ + lagoon.persistent.name: nginx + environment: + LAGOON_PROJECT: ci-drupal + volumes: + - ./web:/app/web:delegated + varnish: + networks: + - amazeeio-network + - default + build: + context: . + dockerfile: varnish.dockerfile + labels: + lagoon.type: varnish + lagoon.name: varnish + depends_on: + - nginx + nginx: + networks: + - amazeeio-network + - default + build: + context: . + dockerfile: nginx.dockerfile + labels: + lagoon.type: nginx-php-persistent + lagoon.persistent: /app/web/sites/default/files/ + lagoon.name: nginx + volumes: + - ./web:/app/web:delegated + depends_on: + - cli + expose: + - "8080" + environment: + - AMAZEEIO_URL=drupal.docker.amazee.io + php: + build: + context: . + dockerfile: php.dockerfile + labels: + lagoon.type: nginx-php-persistent + lagoon.persistent: /app/web/sites/default/files/ + lagoon.name: nginx + volumes: + - ./web:/app/web:delegated + depends_on: + - cli + postgres: + build: + context: . + dockerfile: postgres.dockerfile + labels: + lagoon.type: postgres-single + redis: + build: + context: . + dockerfile: redis.dockerfile + labels: + lagoon.type: redis + solr: + networks: + - amazeeio-network + - default + build: + context: . + dockerfile: solr.dockerfile + labels: + lagoon.type: solr +networks: + amazeeio-network: + external: true diff --git a/tests/files/drupal8-postgres-single/drupal-postgres.sql.gz b/tests/files/drupal8-postgres-single/drupal-postgres.sql.gz new file mode 100644 index 0000000000..44eb7e8577 Binary files /dev/null and b/tests/files/drupal8-postgres-single/drupal-postgres.sql.gz differ diff --git a/tests/files/drupal8-postgres-single/drush/aliases.drushrc.php b/tests/files/drupal8-postgres-single/drush/aliases.drushrc.php new file mode 100644 index 0000000000..a8555e4ff9 --- /dev/null +++ b/tests/files/drupal8-postgres-single/drush/aliases.drushrc.php @@ -0,0 +1,37 @@ + 'cache,cache_*,history,sessions,watchdog,feeds_log'); +$command_specific['sql-dump'] = array('structure-tables-list' => 'cache,cache_*,history,sessions,watchdog,feeds_log'); diff --git a/tests/files/drupal8-postgres-single/drush/policy.drush.inc b/tests/files/drupal8-postgres-single/drush/policy.drush.inc new file mode 100644 index 0000000000..64cd62d0f6 --- /dev/null +++ b/tests/files/drupal8-postgres-single/drush/policy.drush.inc @@ -0,0 +1,38 @@ +exists($root . '/'. $dir)) { + $fs->mkdir($root . '/'. $dir); + $fs->touch($root . '/'. $dir . '/.gitkeep'); + } + } + + // Create the files directory with chmod 0777 + if (!$fs->exists($root . '/sites/default/files')) { + $oldmask = umask(0); + $fs->mkdir($root . '/sites/default/files', 0777); + umask($oldmask); + $event->getIO()->write("Create a sites/default/files directory with chmod 0777"); + } + } + + /** + * Checks if the installed version of Composer is compatible. + * + * Composer 1.0.0 and higher consider a `composer install` without having a + * lock file present as equal to `composer update`. We do not ship with a lock + * file to avoid merge conflicts downstream, meaning that if a project is + * installed with an older version of Composer the scaffolding of Drupal will + * not be triggered. We check this here instead of in drupal-scaffold to be + * able to give immediate feedback to the end user, rather than failing the + * installation after going through the lengthy process of compiling and + * downloading the Composer dependencies. + * + * @see https://github.com/composer/composer/pull/5035 + */ + public static function checkComposerVersion(Event $event) { + $composer = $event->getComposer(); + $io = $event->getIO(); + + $version = $composer::VERSION; + + // The dev-channel of composer uses the git revision as version number, + // try to the branch alias instead. + if (preg_match('/^[0-9a-f]{40}$/i', $version)) { + $version = $composer::BRANCH_ALIAS_VERSION; + } + + // If Composer is installed through git we have no easy way to determine if + // it is new enough, just display a warning. + if ($version === '@package_version@' || $version === '@package_branch_alias_version@') { + $io->writeError('You are running a development version of Composer. If you experience problems, please update Composer to the latest stable version.'); + } + elseif (Comparator::lessThan($version, '1.0.0')) { + $io->writeError('Drupal-project requires Composer version 1.0.0 or higher. Please update your Composer before continuing.'); + exit(1); + } + } + +} diff --git a/tests/files/drupal8-postgres-single/web/.csslintrc b/tests/files/drupal8-postgres-single/web/.csslintrc new file mode 100644 index 0000000000..177e4fcc7e --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/.csslintrc @@ -0,0 +1,40 @@ +--errors=box-model, + display-property-grouping, + duplicate-background-images, + duplicate-properties, + empty-rules, + ids, + import, + important, + known-properties, + outline-none, + overqualified-elements, + qualified-headings, + shorthand, + star-property-hack, + text-indent, + underscore-property-hack, + unique-headings, + unqualified-attributes, + vendor-prefix, + zero-units +--ignore=adjoining-classes, + box-sizing, + bulletproof-font-face, + compatible-vendor-prefixes, + errors, + fallback-colors, + floats, + font-faces, + font-sizes, + gradients, + import-ie-limit, + order-alphabetical, + regex-selectors, + rules-count, + selector-max, + selector-max-approaching, + selector-newline, + universal-selector +--exclude-list=core/assets, + vendor diff --git a/tests/files/drupal8-postgres-single/web/.editorconfig b/tests/files/drupal8-postgres-single/web/.editorconfig new file mode 100644 index 0000000000..686c443cec --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/.editorconfig @@ -0,0 +1,17 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[composer.{json,lock}] +indent_size = 4 diff --git a/tests/files/drupal8-postgres-single/web/.eslintignore b/tests/files/drupal8-postgres-single/web/.eslintignore new file mode 100644 index 0000000000..9c134873d4 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/.eslintignore @@ -0,0 +1,8 @@ +core/**/* +vendor/**/* +sites/**/files/**/* +libraries/**/* +sites/**/libraries/**/* +profiles/**/libraries/**/* +**/js_test_files/**/* +**/node_modules/**/* diff --git a/tests/files/drupal8-postgres-single/web/.gitattributes b/tests/files/drupal8-postgres-single/web/.gitattributes new file mode 100644 index 0000000000..a37894e8e4 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/.gitattributes @@ -0,0 +1,61 @@ +# Drupal git normalization +# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html +# @see https://www.drupal.org/node/1542048 + +# Normally these settings would be done with macro attributes for improved +# readability and easier maintenance. However macros can only be defined at the +# repository root directory. Drupal avoids making any assumptions about where it +# is installed. + +# Define text file attributes. +# - Treat them as text. +# - Ensure no CRLF line-endings, neither on checkout nor on checkin. +# - Detect whitespace errors. +# - Exposed by default in `git diff --color` on the CLI. +# - Validate with `git diff --check`. +# - Deny applying with `git apply --whitespace=error-all`. +# - Fix automatically with `git apply --whitespace=fix`. + +*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html +*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php +*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 +*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 + +# Define binary file attributes. +# - Do not treat them as text. +# - Include binary diff in patches instead of "binary files differ." +*.eot -text diff +*.exe -text diff +*.gif -text diff +*.gz -text diff +*.ico -text diff +*.jpeg -text diff +*.jpg -text diff +*.otf -text diff +*.phar -text diff +*.png -text diff +*.svgz -text diff +*.ttf -text diff +*.woff -text diff +*.woff2 -text diff diff --git a/tests/files/drupal8-postgres-single/web/.ht.router.php b/tests/files/drupal8-postgres-single/web/.ht.router.php new file mode 100644 index 0000000000..054f7119b0 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/.ht.router.php @@ -0,0 +1,65 @@ + + + Require all denied + + + Order allow,deny + +
+ +# Don't show directory listings for URLs which map to a directory. +Options -Indexes + +# Set the default handler. +DirectoryIndex index.php index.html index.htm + +# Add correct encoding for SVGZ. +AddType image/svg+xml svg svgz +AddEncoding gzip svgz + +# Most of the following PHP settings cannot be changed at runtime. See +# sites/default/default.settings.php and +# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be +# changed at runtime. + +# PHP 5, Apache 1 and 2. + + php_value assert.active 0 + php_flag session.auto_start off + php_value mbstring.http_input pass + php_value mbstring.http_output pass + php_flag mbstring.encoding_translation off + # PHP 5.6 has deprecated $HTTP_RAW_POST_DATA and produces warnings if this is + # not set. + php_value always_populate_raw_post_data -1 + + +# Requires mod_expires to be enabled. + + # Enable expirations. + ExpiresActive On + + # Cache all files for 2 weeks after access (A). + ExpiresDefault A1209600 + + + # Do not allow PHP scripts to be cached unless they explicitly send cache + # headers themselves. Otherwise all scripts would have to overwrite the + # headers set by mod_expires if they want another caching behavior. This may + # fail if an error occurs early in the bootstrap process, and it may cause + # problems if a non-Drupal PHP file is installed in a subdirectory. + ExpiresActive Off + + + +# Set a fallback resource if mod_rewrite is not enabled. This allows Drupal to +# work without clean URLs. This requires Apache version >= 2.2.16. If Drupal is +# not accessed by the top level URL (i.e.: http://example.com/drupal/ instead of +# http://example.com/), the path to index.php will need to be adjusted. + + FallbackResource /index.php + + +# Various rewrite rules. + + RewriteEngine on + + # Set "protossl" to "s" if we were accessed via https://. This is used later + # if you enable "www." stripping or enforcement, in order to ensure that + # you don't bounce between http and https. + RewriteRule ^ - [E=protossl] + RewriteCond %{HTTPS} on + RewriteRule ^ - [E=protossl:s] + + # Make sure Authorization HTTP header is available to PHP + # even when running as CGI or FastCGI. + RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Block access to "hidden" directories whose names begin with a period. This + # includes directories used by version control systems such as Subversion or + # Git to store control files. Files whose names begin with a period, as well + # as the control files used by CVS, are protected by the FilesMatch directive + # above. + # + # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is + # not possible to block access to entire directories from .htaccess because + # is not allowed here. + # + # If you do not have mod_rewrite installed, you should remove these + # directories from your webroot or otherwise protect them from being + # downloaded. + RewriteRule "/\.|^\.(?!well-known/)" - [F] + + # If your site can be accessed both with and without the 'www.' prefix, you + # can use one of the following settings to redirect users to your preferred + # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: + # + # To redirect all users to access the site WITH the 'www.' prefix, + # (http://example.com/foo will be redirected to http://www.example.com/foo) + # uncomment the following: + # RewriteCond %{HTTP_HOST} . + # RewriteCond %{HTTP_HOST} !^www\. [NC] + # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # + # To redirect all users to access the site WITHOUT the 'www.' prefix, + # (http://www.example.com/foo will be redirected to http://example.com/foo) + # uncomment the following: + # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] + # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301] + + # Modify the RewriteBase if you are using Drupal in a subdirectory or in a + # VirtualDocumentRoot and the rewrite rules are not working properly. + # For example if your site is at http://example.com/drupal uncomment and + # modify the following line: + # RewriteBase /drupal + # + # If your site is running in a VirtualDocumentRoot at http://example.com/, + # uncomment the following line: + # RewriteBase / + + # Redirect common PHP files to their new locations. + RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR] + RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild.php) + RewriteCond %{REQUEST_URI} !core + RewriteRule ^ %1/core/%2 [L,QSA,R=301] + + # Rewrite install.php during installation to see if mod_rewrite is working + RewriteRule ^core/install.php core/install.php?rewrite=ok [QSA,L] + + # Pass all requests not referring directly to files in the filesystem to + # index.php. + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} !=/favicon.ico + RewriteRule ^ index.php [L] + + # For security reasons, deny access to other PHP files on public sites. + # Note: The following URI conditions are not anchored at the start (^), + # because Drupal may be located in a subdirectory. To further improve + # security, you can replace '!/' with '!^/'. + # Allow access to PHP files in /core (like authorize.php or install.php): + RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$ + # Allow access to test-specific PHP files: + RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php + # Allow access to Statistics module's custom front controller. + # Copy and adapt this rule to directly execute PHP files in contributed or + # custom modules or to run another PHP application in the same directory. + RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$ + # Deny access to any other PHP files that do not match the rules above. + # Specifically, disallow autoload.php from being served directly. + RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F] + + # Rules to correctly serve gzip compressed CSS and JS files. + # Requires both mod_rewrite and mod_headers to be enabled. + + # Serve gzip compressed CSS files if they exist and the client accepts gzip. + RewriteCond %{HTTP:Accept-encoding} gzip + RewriteCond %{REQUEST_FILENAME}\.gz -s + RewriteRule ^(.*)\.css $1\.css\.gz [QSA] + + # Serve gzip compressed JS files if they exist and the client accepts gzip. + RewriteCond %{HTTP:Accept-encoding} gzip + RewriteCond %{REQUEST_FILENAME}\.gz -s + RewriteRule ^(.*)\.js $1\.js\.gz [QSA] + + # Serve correct content types, and prevent mod_deflate double gzip. + RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1] + RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1] + + + # Serve correct encoding type. + Header set Content-Encoding gzip + # Force proxies to cache gzipped & non-gzipped css/js files separately. + Header append Vary Accept-Encoding + + + + +# Various header fixes. + + # Disable content sniffing, since it's an attack vector. + Header always set X-Content-Type-Options nosniff + # Disable Proxy header, since it's an attack vector. + RequestHeader unset Proxy + diff --git a/tests/files/drupal8-postgres-single/web/autoload.php b/tests/files/drupal8-postgres-single/web/autoload.php new file mode 100644 index 0000000000..4722f6c9e0 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/autoload.php @@ -0,0 +1,17 @@ +handle($request); +$response->send(); + +$kernel->terminate($request, $response); diff --git a/tests/files/drupal8-postgres-single/web/modules/.gitkeep b/tests/files/drupal8-postgres-single/web/modules/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/files/drupal8-postgres-single/web/profiles/.gitkeep b/tests/files/drupal8-postgres-single/web/profiles/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/files/drupal8-postgres-single/web/robots.txt b/tests/files/drupal8-postgres-single/web/robots.txt new file mode 100644 index 0000000000..54da16277a --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/robots.txt @@ -0,0 +1,61 @@ +# +# robots.txt +# +# This file is to prevent the crawling and indexing of certain parts +# of your site by web crawlers and spiders run by sites like Yahoo! +# and Google. By telling these "robots" where not to go on your site, +# you save bandwidth and server resources. +# +# This file will be ignored unless it is at the root of your host: +# Used: http://example.com/robots.txt +# Ignored: http://example.com/site/robots.txt +# +# For more information about the robots.txt standard, see: +# http://www.robotstxt.org/robotstxt.html + +User-agent: * +# CSS, JS, Images +Allow: /core/*.css$ +Allow: /core/*.css? +Allow: /core/*.js$ +Allow: /core/*.js? +Allow: /core/*.gif +Allow: /core/*.jpg +Allow: /core/*.jpeg +Allow: /core/*.png +Allow: /core/*.svg +Allow: /profiles/*.css$ +Allow: /profiles/*.css? +Allow: /profiles/*.js$ +Allow: /profiles/*.js? +Allow: /profiles/*.gif +Allow: /profiles/*.jpg +Allow: /profiles/*.jpeg +Allow: /profiles/*.png +Allow: /profiles/*.svg +# Directories +Disallow: /core/ +Disallow: /profiles/ +# Files +Disallow: /README.txt +Disallow: /web.config +# Paths (clean URLs) +Disallow: /admin/ +Disallow: /comment/reply/ +Disallow: /filter/tips +Disallow: /node/add/ +Disallow: /search/ +Disallow: /user/register/ +Disallow: /user/password/ +Disallow: /user/login/ +Disallow: /user/logout/ +# Paths (no clean URLs) +Disallow: /index.php/admin/ +Disallow: /index.php/comment/reply/ +Disallow: /index.php/filter/tips +Disallow: /index.php/node/add/ +Disallow: /index.php/search/ +Disallow: /index.php/user/password/ +Disallow: /index.php/user/register/ +Disallow: /index.php/user/login/ +Disallow: /index.php/user/logout/ diff --git a/tests/files/drupal8-postgres-single/web/sites/default/all.services.yml b/tests/files/drupal8-postgres-single/web/sites/default/all.services.yml new file mode 100644 index 0000000000..d167f7e611 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/sites/default/all.services.yml @@ -0,0 +1,4 @@ +### amazee.io Drupal 8 all environment services file. +# +# This file should contain service definitions that are needed on all environments +# diff --git a/tests/files/drupal8-postgres-single/web/sites/default/all.settings.php b/tests/files/drupal8-postgres-single/web/sites/default/all.settings.php new file mode 100755 index 0000000000..64c43d5b41 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/sites/default/all.settings.php @@ -0,0 +1,15 @@ + 'databasename', + * 'username' => 'sqlusername', + * 'password' => 'sqlpassword', + * 'host' => 'localhost', + * 'port' => '3306', + * 'driver' => 'mysql', + * 'prefix' => '', + * 'collation' => 'utf8mb4_general_ci', + * ]; + * @endcode + */ +$databases = []; + +/** + * Customizing database settings. + * + * Many of the values of the $databases array can be customized for your + * particular database system. Refer to the sample in the section above as a + * starting point. + * + * The "driver" property indicates what Drupal database driver the + * connection should use. This is usually the same as the name of the + * database type, such as mysql or sqlite, but not always. The other + * properties will vary depending on the driver. For SQLite, you must + * specify a database file name in a directory that is writable by the + * webserver. For most other drivers, you must specify a + * username, password, host, and database name. + * + * Transaction support is enabled by default for all drivers that support it, + * including MySQL. To explicitly disable it, set the 'transactions' key to + * FALSE. + * Note that some configurations of MySQL, such as the MyISAM engine, don't + * support it and will proceed silently even if enabled. If you experience + * transaction related crashes with such configuration, set the 'transactions' + * key to FALSE. + * + * For each database, you may optionally specify multiple "target" databases. + * A target database allows Drupal to try to send certain queries to a + * different database if it can but fall back to the default connection if not. + * That is useful for primary/replica replication, as Drupal may try to connect + * to a replica server when appropriate and if one is not available will simply + * fall back to the single primary server (The terms primary/replica are + * traditionally referred to as master/slave in database server documentation). + * + * The general format for the $databases array is as follows: + * @code + * $databases['default']['default'] = $info_array; + * $databases['default']['replica'][] = $info_array; + * $databases['default']['replica'][] = $info_array; + * $databases['extra']['default'] = $info_array; + * @endcode + * + * In the above example, $info_array is an array of settings described above. + * The first line sets a "default" database that has one primary database + * (the second level default). The second and third lines create an array + * of potential replica databases. Drupal will select one at random for a given + * request as needed. The fourth line creates a new database with a name of + * "extra". + * + * You can optionally set prefixes for some or all database table names + * by using the 'prefix' setting. If a prefix is specified, the table + * name will be prepended with its value. Be sure to use valid database + * characters only, usually alphanumeric and underscore. If no prefixes + * are desired, leave it as an empty string ''. + * + * To have all database names prefixed, set 'prefix' as a string: + * @code + * 'prefix' => 'main_', + * @endcode + * + * Per-table prefixes are deprecated as of Drupal 8.2, and will be removed in + * Drupal 9.0. After that, only a single prefix for all tables will be + * supported. + * + * To provide prefixes for specific tables, set 'prefix' as an array. + * The array's keys are the table names and the values are the prefixes. + * The 'default' element is mandatory and holds the prefix for any tables + * not specified elsewhere in the array. Example: + * @code + * 'prefix' => [ + * 'default' => 'main_', + * 'users' => 'shared_', + * 'sessions' => 'shared_', + * 'role' => 'shared_', + * 'authmap' => 'shared_', + * ], + * @endcode + * You can also use a reference to a schema/database as a prefix. This may be + * useful if your Drupal installation exists in a schema that is not the default + * or you want to access several databases from the same code base at the same + * time. + * Example: + * @code + * 'prefix' => [ + * 'default' => 'main.', + * 'users' => 'shared.', + * 'sessions' => 'shared.', + * 'role' => 'shared.', + * 'authmap' => 'shared.', + * ]; + * @endcode + * NOTE: MySQL and SQLite's definition of a schema is a database. + * + * Advanced users can add or override initial commands to execute when + * connecting to the database server, as well as PDO connection settings. For + * example, to enable MySQL SELECT queries to exceed the max_join_size system + * variable, and to reduce the database connection timeout to 5 seconds: + * @code + * $databases['default']['default'] = [ + * 'init_commands' => [ + * 'big_selects' => 'SET SQL_BIG_SELECTS=1', + * ], + * 'pdo' => [ + * PDO::ATTR_TIMEOUT => 5, + * ], + * ]; + * @endcode + * + * WARNING: The above defaults are designed for database portability. Changing + * them may cause unexpected behavior, including potential data loss. See + * https://www.drupal.org/developing/api/database/configuration for more + * information on these defaults and the potential issues. + * + * More details can be found in the constructor methods for each driver: + * - \Drupal\Core\Database\Driver\mysql\Connection::__construct() + * - \Drupal\Core\Database\Driver\pgsql\Connection::__construct() + * - \Drupal\Core\Database\Driver\sqlite\Connection::__construct() + * + * Sample Database configuration format for PostgreSQL (pgsql): + * @code + * $databases['default']['default'] = [ + * 'driver' => 'pgsql', + * 'database' => 'databasename', + * 'username' => 'sqlusername', + * 'password' => 'sqlpassword', + * 'host' => 'localhost', + * 'prefix' => '', + * ]; + * @endcode + * + * Sample Database configuration format for SQLite (sqlite): + * @code + * $databases['default']['default'] = [ + * 'driver' => 'sqlite', + * 'database' => '/path/to/databasefilename', + * ]; + * @endcode + */ + +/** + * Location of the site configuration files. + * + * The $settings['config_sync_directory'] specifies the location of file system + * directory used for syncing configuration data. On install, the directory is + * created. This is used for configuration imports. + * + * The default location for this directory is inside a randomly-named + * directory in the public files path. The setting below allows you to set + * its location. + */ +# $settings['config_sync_directory'] = '/directory/outside/webroot'; + +/** + * Settings: + * + * $settings contains environment-specific configuration, such as the files + * directory and reverse proxy address, and temporary configuration, such as + * security overrides. + * + * @see \Drupal\Core\Site\Settings::get() + */ + +/** + * Salt for one-time login links, cancel links, form tokens, etc. + * + * This variable will be set to a random value by the installer. All one-time + * login links will be invalidated if the value is changed. Note that if your + * site is deployed on a cluster of web servers, you must ensure that this + * variable has the same value on each server. + * + * For enhanced security, you may set this variable to the contents of a file + * outside your document root; you should also ensure that this file is not + * stored with backups of your database. + * + * Example: + * @code + * $settings['hash_salt'] = file_get_contents('/home/example/salt.txt'); + * @endcode + */ +$settings['hash_salt'] = ''; + +/** + * Deployment identifier. + * + * Drupal's dependency injection container will be automatically invalidated and + * rebuilt when the Drupal core version changes. When updating contributed or + * custom code that changes the container, changing this identifier will also + * allow the container to be invalidated as soon as code is deployed. + */ +# $settings['deployment_identifier'] = \Drupal::VERSION; + +/** + * Access control for update.php script. + * + * If you are updating your Drupal installation using the update.php script but + * are not logged in using either an account with the "Administer software + * updates" permission or the site maintenance account (the account that was + * created during installation), you will need to modify the access check + * statement below. Change the FALSE to a TRUE to disable the access check. + * After finishing the upgrade, be sure to open this file again and change the + * TRUE back to a FALSE! + */ +$settings['update_free_access'] = FALSE; + +/** + * External access proxy settings: + * + * If your site must access the Internet via a web proxy then you can enter the + * proxy settings here. Set the full URL of the proxy, including the port, in + * variables: + * - $settings['http_client_config']['proxy']['http']: The proxy URL for HTTP + * requests. + * - $settings['http_client_config']['proxy']['https']: The proxy URL for HTTPS + * requests. + * You can pass in the user name and password for basic authentication in the + * URLs in these settings. + * + * You can also define an array of host names that can be accessed directly, + * bypassing the proxy, in $settings['http_client_config']['proxy']['no']. + */ +# $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080'; +# $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080'; +# $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost']; + +/** + * Reverse Proxy Configuration: + * + * Reverse proxy servers are often used to enhance the performance + * of heavily visited sites and may also provide other site caching, + * security, or encryption benefits. In an environment where Drupal + * is behind a reverse proxy, the real IP address of the client should + * be determined such that the correct client IP address is available + * to Drupal's logging, statistics, and access management systems. In + * the most simple scenario, the proxy server will add an + * X-Forwarded-For header to the request that contains the client IP + * address. However, HTTP headers are vulnerable to spoofing, where a + * malicious client could bypass restrictions by setting the + * X-Forwarded-For header directly. Therefore, Drupal's proxy + * configuration requires the IP addresses of all remote proxies to be + * specified in $settings['reverse_proxy_addresses'] to work correctly. + * + * Enable this setting to get Drupal to determine the client IP from the + * X-Forwarded-For header. If you are unsure about this setting, do not have a + * reverse proxy, or Drupal operates in a shared hosting environment, this + * setting should remain commented out. + * + * In order for this setting to be used you must specify every possible + * reverse proxy IP address in $settings['reverse_proxy_addresses']. + * If a complete list of reverse proxies is not available in your + * environment (for example, if you use a CDN) you may set the + * $_SERVER['REMOTE_ADDR'] variable directly in settings.php. + * Be aware, however, that it is likely that this would allow IP + * address spoofing unless more advanced precautions are taken. + */ +# $settings['reverse_proxy'] = TRUE; + +/** + * Specify every reverse proxy IP address in your environment. + * This setting is required if $settings['reverse_proxy'] is TRUE. + */ +# $settings['reverse_proxy_addresses'] = ['a.b.c.d', ...]; + +/** + * Reverse proxy trusted headers. + * + * Sets which headers to trust from your reverse proxy. + * + * Common values are: + * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * - \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * + * Note the default value of + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @endcode + * is not secure by default. The value should be set to only the specific + * headers the reverse proxy uses. For example: + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * @endcode + * This would trust the following headers: + * - X_FORWARDED_FOR + * - X_FORWARDED_HOST + * - X_FORWARDED_PROTO + * - X_FORWARDED_PORT + * + * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * @see \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @see \Symfony\Component\HttpFoundation\Request::setTrustedProxies + */ +# $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED; + + +/** + * Page caching: + * + * By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page + * views. This tells a HTTP proxy that it may return a page from its local + * cache without contacting the web server, if the user sends the same Cookie + * header as the user who originally requested the cached page. Without "Vary: + * Cookie", authenticated users would also be served the anonymous page from + * the cache. If the site has mostly anonymous users except a few known + * editors/administrators, the Vary header can be omitted. This allows for + * better caching in HTTP proxies (including reverse proxies), i.e. even if + * clients send different cookies, they still get content served from the cache. + * However, authenticated users should access the site directly (i.e. not use an + * HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid + * getting cached pages from the proxy. + */ +# $settings['omit_vary_cookie'] = TRUE; + + +/** + * Cache TTL for client error (4xx) responses. + * + * Items cached per-URL tend to result in a large number of cache items, and + * this can be problematic on 404 pages which by their nature are unbounded. A + * fixed TTL can be set for these items, defaulting to one hour, so that cache + * backends which do not support LRU can purge older entries. To disable caching + * of client error responses set the value to 0. Currently applies only to + * page_cache module. + */ +# $settings['cache_ttl_4xx'] = 3600; + +/** + * Expiration of cached forms. + * + * Drupal's Form API stores details of forms in a cache and these entries are + * kept for at least 6 hours by default. Expired entries are cleared by cron. + * + * @see \Drupal\Core\Form\FormCache::setCache() + */ +# $settings['form_cache_expiration'] = 21600; + +/** + * Class Loader. + * + * If the APC extension is detected, the Symfony APC class loader is used for + * performance reasons. Detection can be prevented by setting + * class_loader_auto_detect to false, as in the example below. + */ +# $settings['class_loader_auto_detect'] = FALSE; + +/* + * If the APC extension is not detected, either because APC is missing or + * because auto-detection has been disabled, auto-loading falls back to + * Composer's ClassLoader, which is good for development as it does not break + * when code is moved in the file system. You can also decorate the base class + * loader with another cached solution than the Symfony APC class loader, as + * all production sites should have a cached class loader of some sort enabled. + * + * To do so, you may decorate and replace the local $class_loader variable. For + * example, to use Symfony's APC class loader without automatic detection, + * uncomment the code below. + */ +/* +if ($settings['hash_salt']) { + $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']); + $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader); + unset($prefix); + $class_loader->unregister(); + $apc_loader->register(); + $class_loader = $apc_loader; +} +*/ + +/** + * Authorized file system operations: + * + * The Update Manager module included with Drupal provides a mechanism for + * site administrators to securely install missing updates for the site + * directly through the web user interface. On securely-configured servers, + * the Update manager will require the administrator to provide SSH or FTP + * credentials before allowing the installation to proceed; this allows the + * site to update the new files as the user who owns all the Drupal files, + * instead of as the user the webserver is running as. On servers where the + * webserver user is itself the owner of the Drupal files, the administrator + * will not be prompted for SSH or FTP credentials (note that these server + * setups are common on shared hosting, but are inherently insecure). + * + * Some sites might wish to disable the above functionality, and only update + * the code directly via SSH or FTP themselves. This setting completely + * disables all functionality related to these authorized file operations. + * + * @see https://www.drupal.org/node/244924 + * + * Remove the leading hash signs to disable. + */ +# $settings['allow_authorize_operations'] = FALSE; + +/** + * Default mode for directories and files written by Drupal. + * + * Value should be in PHP Octal Notation, with leading zero. + */ +# $settings['file_chmod_directory'] = 0775; +# $settings['file_chmod_file'] = 0664; + +/** + * Public file base URL: + * + * An alternative base URL to be used for serving public files. This must + * include any leading directory path. + * + * A different value from the domain used by Drupal to be used for accessing + * public files. This can be used for a simple CDN integration, or to improve + * security by serving user-uploaded files from a different domain or subdomain + * pointing to the same server. Do not include a trailing slash. + */ +# $settings['file_public_base_url'] = 'http://downloads.example.com/files'; + +/** + * Public file path: + * + * A local file system path where public files will be stored. This directory + * must exist and be writable by Drupal. This directory must be relative to + * the Drupal installation directory and be accessible over the web. + */ +# $settings['file_public_path'] = 'sites/default/files'; + +/** + * Private file path: + * + * A local file system path where private files will be stored. This directory + * must be absolute, outside of the Drupal installation directory and not + * accessible over the web. + * + * Note: Caches need to be cleared when this value is changed to make the + * private:// stream wrapper available to the system. + * + * See https://www.drupal.org/documentation/modules/file for more information + * about securing private files. + */ +# $settings['file_private_path'] = ''; + +/** + * Temporary file path: + * + * A local file system path where temporary files will be stored. This directory + * must be absolute, outside of the Drupal installation directory and not + * accessible over the web. + * + * If this is not set, the default for the operating system will be used. + * + * @see \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory() + */ +# $settings['file_temp_path'] = '/tmp'; + +/** + * Session write interval: + * + * Set the minimum interval between each session write to database. + * For performance reasons it defaults to 180. + */ +# $settings['session_write_interval'] = 180; + +/** + * String overrides: + * + * To override specific strings on your site with or without enabling the Locale + * module, add an entry to this list. This functionality allows you to change + * a small number of your site's default English language interface strings. + * + * Remove the leading hash signs to enable. + * + * The "en" part of the variable name, is dynamic and can be any langcode of + * any added language. (eg locale_custom_strings_de for german). + */ +# $settings['locale_custom_strings_en'][''] = [ +# 'forum' => 'Discussion board', +# '@count min' => '@count minutes', +# ]; + +/** + * A custom theme for the offline page: + * + * This applies when the site is explicitly set to maintenance mode through the + * administration page or when the database is inactive due to an error. + * The template file should also be copied into the theme. It is located inside + * 'core/modules/system/templates/maintenance-page.html.twig'. + * + * Note: This setting does not apply to installation and update pages. + */ +# $settings['maintenance_theme'] = 'bartik'; + +/** + * PHP settings: + * + * To see what PHP settings are possible, including whether they can be set at + * runtime (by using ini_set()), read the PHP documentation: + * http://php.net/manual/ini.list.php + * See \Drupal\Core\DrupalKernel::bootEnvironment() for required runtime + * settings and the .htaccess file for non-runtime settings. + * Settings defined there should not be duplicated here so as to avoid conflict + * issues. + */ + +/** + * If you encounter a situation where users post a large amount of text, and + * the result is stripped out upon viewing but can still be edited, Drupal's + * output filter may not have sufficient memory to process it. If you + * experience this issue, you may wish to uncomment the following two lines + * and increase the limits of these variables. For more information, see + * http://php.net/manual/pcre.configuration.php. + */ +# ini_set('pcre.backtrack_limit', 200000); +# ini_set('pcre.recursion_limit', 200000); + +/** + * Configuration overrides. + * + * To globally override specific configuration values for this site, + * set them here. You usually don't need to use this feature. This is + * useful in a configuration file for a vhost or directory, rather than + * the default settings.php. + * + * Note that any values you provide in these variable overrides will not be + * viewable from the Drupal administration interface. The administration + * interface displays the values stored in configuration so that you can stage + * changes to other environments that don't have the overrides. + * + * There are particular configuration values that are risky to override. For + * example, overriding the list of installed modules in 'core.extension' is not + * supported as module install or uninstall has not occurred. Other examples + * include field storage configuration, because it has effects on database + * structure, and 'core.menu.static_menu_link_overrides' since this is cached in + * a way that is not config override aware. Also, note that changing + * configuration values in settings.php will not fire any of the configuration + * change events. + */ +# $config['system.site']['name'] = 'My Drupal site'; +# $config['user.settings']['anonymous'] = 'Visitor'; + +/** + * Fast 404 pages: + * + * Drupal can generate fully themed 404 pages. However, some of these responses + * are for images or other resource files that are not displayed to the user. + * This can waste bandwidth, and also generate server load. + * + * The options below return a simple, fast 404 page for URLs matching a + * specific pattern: + * - $config['system.performance']['fast_404']['exclude_paths']: A regular + * expression to match paths to exclude, such as images generated by image + * styles, or dynamically-resized images. The default pattern provided below + * also excludes the private file system. If you need to add more paths, you + * can add '|path' to the expression. + * - $config['system.performance']['fast_404']['paths']: A regular expression to + * match paths that should return a simple 404 page, rather than the fully + * themed 404 page. If you don't have any aliases ending in htm or html you + * can add '|s?html?' to the expression. + * - $config['system.performance']['fast_404']['html']: The html to return for + * simple 404 pages. + * + * Remove the leading hash signs if you would like to alter this functionality. + */ +# $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//'; +# $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; +# $config['system.performance']['fast_404']['html'] = '404 Not Found

Not Found

The requested URL "@path" was not found on this server.

'; + +/** + * Load services definition file. + */ +$settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml'; + +/** + * Override the default service container class. + * + * This is useful for example to trace the service container for performance + * tracking purposes, for testing a service container with an error condition or + * to test a service container that throws an exception. + */ +# $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container'; + +/** + * Override the default yaml parser class. + * + * Provide a fully qualified class name here if you would like to provide an + * alternate implementation YAML parser. The class must implement the + * \Drupal\Component\Serialization\SerializationInterface interface. + */ +# $settings['yaml_parser_class'] = NULL; + +/** + * Trusted host configuration. + * + * Drupal core can use the Symfony trusted host mechanism to prevent HTTP Host + * header spoofing. + * + * To enable the trusted host mechanism, you enable your allowable hosts + * in $settings['trusted_host_patterns']. This should be an array of regular + * expression patterns, without delimiters, representing the hosts you would + * like to allow. + * + * For example: + * @code + * $settings['trusted_host_patterns'] = [ + * '^www\.example\.com$', + * ]; + * @endcode + * will allow the site to only run from www.example.com. + * + * If you are running multisite, or if you are running your site from + * different domain names (eg, you don't redirect http://www.example.com to + * http://example.com), you should specify all of the host patterns that are + * allowed by your site. + * + * For example: + * @code + * $settings['trusted_host_patterns'] = [ + * '^example\.com$', + * '^.+\.example\.com$', + * '^example\.org$', + * '^.+\.example\.org$', + * ]; + * @endcode + * will allow the site to run off of all variants of example.com and + * example.org, with all subdomains included. + */ + +/** + * The default list of directories that will be ignored by Drupal's file API. + * + * By default ignore node_modules and bower_components folders to avoid issues + * with common frontend tools and recursive scanning of directories looking for + * extensions. + * + * @see \Drupal\Core\File\FileSystemInterface::scanDirectory() + * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory() + */ +$settings['file_scan_ignore_directories'] = [ + 'node_modules', + 'bower_components', +]; + +/** + * The default number of entities to update in a batch process. + * + * This is used by update and post-update functions that need to go through and + * change all the entities on a site, so it is useful to increase this number + * if your hosting configuration (i.e. RAM allocation, CPU speed) allows for a + * larger number of entities to be processed in a single batch run. + */ +$settings['entity_update_batch_size'] = 50; + +/** + * Entity update backup. + * + * This is used to inform the entity storage handler that the backup tables as + * well as the original entity type and field storage definitions should be + * retained after a successful entity update process. + */ +$settings['entity_update_backup'] = TRUE; + +/** + * Load local development override configuration, if available. + * + * Use settings.local.php to override variables on secondary (staging, + * development, etc) installations of this site. Typically used to disable + * caching, JavaScript/CSS compression, re-routing of outgoing emails, and + * other things that should not happen on development and testing sites. + * + * Keep this code block at the end of this file to take full effect. + */ +# +# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { +# include $app_root . '/' . $site_path . '/settings.local.php'; +# } diff --git a/tests/files/drupal8-postgres-single/web/sites/default/development.services.yml b/tests/files/drupal8-postgres-single/web/sites/default/development.services.yml new file mode 100644 index 0000000000..1f36d8ae4c --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/sites/default/development.services.yml @@ -0,0 +1,15 @@ +### amazee.io Drupal 8 development environment services file. +# +# This file should contain service definitions that are needed on development environments +# +# It contains some defaults that the amazee.io team suggests, please edit them as required. +# +parameters: + twig.config: + debug: true # displays twig debug messages, developers like them :) + auto_reload: true # reloads the twig files on every request, so no drush cache clear is required + cache: false # No twig internal cache, important: check the example.settings.loca.php to fully fully disable the twig cache + +services: + cache.backend.null: # Defines a Cache Backend Factory which is just empty, it is not used by default + class: Drupal\Core\Cache\NullBackendFactory diff --git a/tests/files/drupal8-postgres-single/web/sites/default/development.settings.php b/tests/files/drupal8-postgres-single/web/sites/default/development.settings.php new file mode 100755 index 0000000000..6a5c56ac54 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/sites/default/development.settings.php @@ -0,0 +1,29 @@ + 'pgsql', + 'database' => getenv('POSTGRES_DATABASE') ?: 'drupal', + 'username' => getenv('POSTGRES_USERNAME') ?: 'drupal', + 'password' => getenv('POSTGRES_PASSWORD') ?: 'drupal', + 'host' => getenv('POSTGRES_HOST') ?: 'postgres', + 'port' => 5432, + 'prefix' => '', + ); +} + +### Lagoon Solr connection +// WARNING: you have to create a search_api server having "solr" machine name at +// /admin/config/search/search-api/add-server to make this work. +if (getenv('LAGOON')) { + $config['search_api.server.solr']['backend_config']['connector_config']['host'] = getenv('SOLR_HOST') ?: 'solr'; + $config['search_api.server.solr']['backend_config']['connector_config']['path'] = '/solr/'; + $config['search_api.server.solr']['backend_config']['connector_config']['core'] = getenv('SOLR_CORE') ?: 'drupal'; + $config['search_api.server.solr']['backend_config']['connector_config']['port'] = getenv('SOLR_PORT') ?: '8983'; + $config['search_api.server.solr']['backend_config']['connector_config']['http_user'] = (getenv('SOLR_USER') ?: ''); + $config['search_api.server.solr']['backend_config']['connector_config']['http']['http_user'] = (getenv('SOLR_USER') ?: ''); + $config['search_api.server.solr']['backend_config']['connector_config']['http_pass'] = (getenv('SOLR_PASSWORD') ?: ''); + $config['search_api.server.solr']['backend_config']['connector_config']['http']['http_pass'] = (getenv('SOLR_PASSWORD') ?: ''); + $config['search_api.server.solr']['name'] = 'Lagoon Solr - Environment: ' . getenv('LAGOON_PROJECT'); +} + +### Lagoon Redis connection +if (getenv('LAGOON')){ + $settings['redis.connection']['interface'] = 'PhpRedis'; + $settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis'; + $settings['redis.connection']['port'] = getenv('REDIS_SERVICE_PORT') ?: '6379'; + + // # Do not set the cache during installations of Drupal + // if (!drupal_installation_attempted()) { + // $settings['cache']['default'] = 'cache.backend.redis'; + // } +} + +### Lagoon Varnish & Reverse proxy settings +if (getenv('LAGOON')) { + $settings['reverse_proxy'] = TRUE; + + $varnish_hosts = explode(',', getenv('VARNISH_HOSTS') ?: 'varnish'); + array_walk($varnish_hosts, function(&$value, $key) { $value .= ':6082'; }); + + $config['varnish.settings']['varnish_control_terminal'] = implode($varnish_hosts, " "); + $config['varnish.settings']['varnish_control_key'] = getenv('VARNISH_SECRET') ?: 'lagoon_default_secret'; + $config['varnish.settings']['varnish_version'] = 4; +} + +### Trusted Host Patterns, see https://www.drupal.org/node/2410395 for more information. +### If your site runs on multiple domains, you need to add these domains here +if (getenv('LAGOON_ROUTES')) { + $settings['trusted_host_patterns'] = array( + '^' . str_replace(['.', 'https://', 'http://', ','], ['\.', '', '', '|'], getenv('LAGOON_ROUTES')) . '$', // escape dots, remove schema, use commas as regex separator + ); +} + +### Temp directory +if (getenv('TMP')) { + $config['system.file']['path']['temporary'] = getenv('TMP'); +} + +### Hash Salt +if (getenv('LAGOON')) { + $settings['hash_salt'] = hash('sha256', getenv('LAGOON_PROJECT')); +} + +// Settings for all environments +if (file_exists(__DIR__ . '/all.settings.php')) { + include __DIR__ . '/all.settings.php'; +} + +// Services for all environments +if (file_exists(__DIR__ . '/all.services.yml')) { + $settings['container_yamls'][] = __DIR__ . '/all.services.yml'; +} + +if(getenv('LAGOON_ENVIRONMENT_TYPE')){ + // Environment specific settings files. + if (file_exists(__DIR__ . '/' . getenv('LAGOON_ENVIRONMENT_TYPE') . '.settings.php')) { + include __DIR__ . '/' . getenv('LAGOON_ENVIRONMENT_TYPE') . '.settings.php'; + } + + // Environment specific services files. + if (file_exists(__DIR__ . '/' . getenv('LAGOON_ENVIRONMENT_TYPE') . '.services.yml')) { + $settings['container_yamls'][] = __DIR__ . '/' . getenv('LAGOON_ENVIRONMENT_TYPE') . '.services.yml'; + } +} + +// Last: this servers specific settings files. +if (file_exists(__DIR__ . '/settings.local.php')) { + include __DIR__ . '/settings.local.php'; +} +// Last: This server specific services file. +if (file_exists(__DIR__ . '/services.local.yml')) { + $settings['container_yamls'][] = __DIR__ . '/services.local.yml'; +} diff --git a/tests/files/drupal8-postgres-single/web/sites/example.sites.php b/tests/files/drupal8-postgres-single/web/sites/example.sites.php new file mode 100644 index 0000000000..daaf68272a --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/sites/example.sites.php @@ -0,0 +1,57 @@ +..' => 'directory'. As an + * example, to map https://www.drupal.org:8080/mysite/test to the configuration + * directory sites/example.com, the array should be defined as: + * @code + * $sites = [ + * '8080.www.drupal.org.mysite.test' => 'example.com', + * ]; + * @endcode + * The URL, https://www.drupal.org:8080/mysite/test/, could be a symbolic link + * or an Apache Alias directive that points to the Drupal root containing + * index.php. An alias could also be created for a subdomain. See the + * @link https://www.drupal.org/documentation/install online Drupal installation guide @endlink + * for more information on setting up domains, subdomains, and subdirectories. + * + * The following examples look for a site configuration in sites/example.com: + * @code + * URL: http://dev.drupal.org + * $sites['dev.drupal.org'] = 'example.com'; + * + * URL: http://localhost/example + * $sites['localhost.example'] = 'example.com'; + * + * URL: http://localhost:8080/example + * $sites['8080.localhost.example'] = 'example.com'; + * + * URL: https://www.drupal.org:8080/mysite/test/ + * $sites['8080.www.drupal.org.mysite.test'] = 'example.com'; + * @endcode + * + * @see default.settings.php + * @see \Drupal\Core\DrupalKernel::getSitePath() + * @see https://www.drupal.org/documentation/install/multi-site + */ diff --git a/tests/files/drupal8-postgres-single/web/themes/.gitkeep b/tests/files/drupal8-postgres-single/web/themes/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/files/drupal8-postgres-single/web/update.php b/tests/files/drupal8-postgres-single/web/update.php new file mode 100644 index 0000000000..59e808ed24 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/update.php @@ -0,0 +1,31 @@ +handle($request); +$response->send(); + +$kernel->terminate($request, $response); diff --git a/tests/files/drupal8-postgres-single/web/web.config b/tests/files/drupal8-postgres-single/web/web.config new file mode 100644 index 0000000000..8dff0b27e2 --- /dev/null +++ b/tests/files/drupal8-postgres-single/web/web.config @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/files/drupal8-postgres/.lagoon.yml b/tests/files/drupal8-postgres/.lagoon.yml index 75e4a88237..7708cd0e19 100644 --- a/tests/files/drupal8-postgres/.lagoon.yml +++ b/tests/files/drupal8-postgres/.lagoon.yml @@ -1,7 +1,7 @@ docker-compose-yaml: docker-compose.yml -endpoint: 172.17.0.1:2020 -api: 172.17.0.1:3000 +endpoint: lagoon-core-ssh.lagoon.svc.cluster.local:2020 +api: lagoon-core-api.lagoon.svc.cluster.local:80 environment_variables: git_sha: 'true' diff --git a/tests/files/drupal8-postgres/docker-compose.yml b/tests/files/drupal8-postgres/docker-compose.yml index 878639f468..c4a87134a3 100644 --- a/tests/files/drupal8-postgres/docker-compose.yml +++ b/tests/files/drupal8-postgres/docker-compose.yml @@ -35,6 +35,7 @@ services: labels: lagoon.type: nginx-php-persistent lagoon.persistent: /app/web/sites/default/files/ + lagoon.persistent.size: 1Gi lagoon.name: nginx volumes: - ./web:/app/web:delegated diff --git a/tests/files/drupal8-postgres/drush/aliases.drushrc.php b/tests/files/drupal8-postgres/drush/aliases.drushrc.php index 012fcc5188..a8555e4ff9 100644 --- a/tests/files/drupal8-postgres/drush/aliases.drushrc.php +++ b/tests/files/drupal8-postgres/drush/aliases.drushrc.php @@ -4,7 +4,7 @@ * Don't change anything here, it's magic! */ -$aliasUrl = "http://172.17.0.1:8087/aliases.drushrc.php.stub"; +$aliasUrl = "http://lagoon-core-drush-alias.lagoon.svc.cluster.local:8080/aliases.drushrc.php.stub"; $aliasCheckTimeout = 5; //do a head check against the alias stub file, report on failure diff --git a/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile index c260c36f1f..bc520e5fb9 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/builder.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-cli-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-cli-drupal:${UPSTREAM_TAG:-latest} COPY composer.json composer.lock /app/ COPY scripts /app/scripts diff --git a/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile index 096a4e086d..c1c0eef023 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/mariadb.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/mariadb-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/mariadb-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile index a9ec9268bd..3edca76168 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/nginx.dockerfile @@ -1,8 +1,9 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/nginx-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/nginx-drupal:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile index e219509639..5a3153de9e 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/php.dockerfile @@ -1,7 +1,8 @@ ARG CLI_IMAGE -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG FROM ${CLI_IMAGE:-builder} as builder -FROM ${IMAGE_REPO:-amazeeio}/php:7.4-fpm +FROM ${UPSTREAM_REPO:-testlagoon}/php-7.4-fpm:${UPSTREAM_TAG:-latest} COPY --from=builder /app /app diff --git a/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile index 4f64428002..71d19c4b84 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/postgres.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/postgres-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/postgres-11-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile index 0d6e0dad34..008aed821f 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/redis.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/redis \ No newline at end of file +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/redis-5:${UPSTREAM_TAG:-latest} \ No newline at end of file diff --git a/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile index b05e244071..24af894aba 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/solr.dockerfile @@ -1,3 +1,4 @@ -ARG IMAGE_REPO +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG -FROM ${IMAGE_REPO:-amazeeio}/solr:7.7-drupal +FROM ${UPSTREAM_REPO:-testlagoon}/solr-7.7-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile b/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile index 1ab3a13a84..55fc4c8ab7 100644 --- a/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile +++ b/tests/files/drupal9-dockerfiles/php7.4/varnish.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/varnish-drupal +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/varnish-drupal:${UPSTREAM_TAG:-latest} diff --git a/tests/files/drupal9-mariadb/.lagoon.yml b/tests/files/drupal9-mariadb/.lagoon.yml index 1f4ca2c636..c411924392 100644 --- a/tests/files/drupal9-mariadb/.lagoon.yml +++ b/tests/files/drupal9-mariadb/.lagoon.yml @@ -1,7 +1,7 @@ docker-compose-yaml: docker-compose.yml -endpoint: 172.17.0.1:2020 -api: 172.17.0.1:3000 +endpoint: lagoon-core-ssh.lagoon.svc.cluster.local:2020 +api: lagoon-core-api.lagoon.svc.cluster.local:80 environment_variables: git_sha: 'true' diff --git a/tests/files/drupal9-mariadb/docker-compose.yml b/tests/files/drupal9-mariadb/docker-compose.yml index d8df59b304..9500c1fa70 100644 --- a/tests/files/drupal9-mariadb/docker-compose.yml +++ b/tests/files/drupal9-mariadb/docker-compose.yml @@ -35,6 +35,7 @@ services: labels: lagoon.type: nginx-php-persistent lagoon.persistent: /app/web/sites/default/files/ + lagoon.persistent.size: 1Gi lagoon.name: nginx lagoon.deployment.servicetype: nginx volumes: diff --git a/tests/files/drupal9-mariadb/drush/aliases.drushrc.php b/tests/files/drupal9-mariadb/drush/aliases.drushrc.php index 012fcc5188..a8555e4ff9 100644 --- a/tests/files/drupal9-mariadb/drush/aliases.drushrc.php +++ b/tests/files/drupal9-mariadb/drush/aliases.drushrc.php @@ -4,7 +4,7 @@ * Don't change anything here, it's magic! */ -$aliasUrl = "http://172.17.0.1:8087/aliases.drushrc.php.stub"; +$aliasUrl = "http://lagoon-core-drush-alias.lagoon.svc.cluster.local:8080/aliases.drushrc.php.stub"; $aliasCheckTimeout = 5; //do a head check against the alias stub file, report on failure diff --git a/tests/files/elasticsearch-cluster/elasticsearch.dockerfile b/tests/files/elasticsearch-cluster/elasticsearch.dockerfile index fe5b44dbd5..305ca5a466 100644 --- a/tests/files/elasticsearch-cluster/elasticsearch.dockerfile +++ b/tests/files/elasticsearch-cluster/elasticsearch.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/elasticsearch:6 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/elasticsearch-6:${UPSTREAM_TAG:-latest} diff --git a/tests/files/elasticsearch-cluster/nginx.dockerfile b/tests/files/elasticsearch-cluster/nginx.dockerfile index 698e3f54fb..69ddd7fb7a 100644 --- a/tests/files/elasticsearch-cluster/nginx.dockerfile +++ b/tests/files/elasticsearch-cluster/nginx.dockerfile @@ -1,4 +1,5 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY app.conf /etc/nginx/conf.d/app.conf diff --git a/tests/files/elasticsearch/elasticsearch.dockerfile b/tests/files/elasticsearch/elasticsearch.dockerfile index fe5b44dbd5..c91a5e9f05 100644 --- a/tests/files/elasticsearch/elasticsearch.dockerfile +++ b/tests/files/elasticsearch/elasticsearch.dockerfile @@ -1,2 +1,3 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/elasticsearch:6 +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/elasticsearch-7:${UPSTREAM_TAG:-latest} diff --git a/tests/files/elasticsearch/nginx.dockerfile b/tests/files/elasticsearch/nginx.dockerfile index 698e3f54fb..69ddd7fb7a 100644 --- a/tests/files/elasticsearch/nginx.dockerfile +++ b/tests/files/elasticsearch/nginx.dockerfile @@ -1,4 +1,5 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY app.conf /etc/nginx/conf.d/app.conf diff --git a/tests/files/features-autogenerated-routes-disabled/Dockerfile b/tests/files/features-autogenerated-routes-disabled/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-autogenerated-routes-disabled/Dockerfile +++ b/tests/files/features-autogenerated-routes-disabled/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features-disable-inject-git-sha/Dockerfile b/tests/files/features-disable-inject-git-sha/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-disable-inject-git-sha/Dockerfile +++ b/tests/files/features-disable-inject-git-sha/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features-lagoon-type-override/Dockerfile b/tests/files/features-lagoon-type-override/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-lagoon-type-override/Dockerfile +++ b/tests/files/features-lagoon-type-override/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile b/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile index 27c2cbbb5e..902f449871 100644 --- a/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile +++ b/tests/files/features-subfolder/subfolder1/subfolder2/subfolder3/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/features/.lagoon.yml b/tests/files/features/.lagoon.yml index 65f8a0771e..0f8c48bbba 100644 --- a/tests/files/features/.lagoon.yml +++ b/tests/files/features/.lagoon.yml @@ -9,6 +9,10 @@ environments: - node: - customdomain-will-be-main-domain.com - customdomain-will-be-not-be-main-domain.com + fastly-annotations: + routes: + - node: + - annotations.com ingress-annotations: routes: - node: @@ -43,6 +47,10 @@ environments: schedule: "* * * * *" command: printf '%s_%s' "CRONJOB" "SINGLE" >> /files/cron.txt service: node + - name: echo /files/cron.txt pwd + schedule: "* * * * *" + command: printf '%s_%s_%s' "CRONJOB" "PWD" "$(pwd)" >> /files/cron.txt + service: node - name: test H/1 schedule: "H/1 * * * *" command: printf '%s_%s' "CRONJOB" "H1" >> /files/cron.txt @@ -104,4 +112,4 @@ ci-multiproject2-control-k8s: multiproject: routes: - node: - - multiproject2.com \ No newline at end of file + - multiproject2.com diff --git a/tests/files/features/Dockerfile b/tests/files/features/Dockerfile index 5e9c6907c7..eb04a4aaa2 100644 --- a/tests/files/features/Dockerfile +++ b/tests/files/features/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/nginx/first/Dockerfile b/tests/files/nginx/first/Dockerfile index f0bff5c4ee..8f7da7b683 100644 --- a/tests/files/nginx/first/Dockerfile +++ b/tests/files/nginx/first/Dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} COPY redirects-map.conf /etc/nginx/redirects-map.conf diff --git a/tests/files/nginx/first/basic-auth-disable.dockerfile b/tests/files/nginx/first/basic-auth-disable.dockerfile index cb20a9a8d5..f49d9d19a5 100644 --- a/tests/files/nginx/first/basic-auth-disable.dockerfile +++ b/tests/files/nginx/first/basic-auth-disable.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} ENV BASIC_AUTH_USERNAME=username \ BASIC_AUTH_PASSWORD=password diff --git a/tests/files/nginx/first/basic-auth.dockerfile b/tests/files/nginx/first/basic-auth.dockerfile index 253787c713..1febe3990e 100644 --- a/tests/files/nginx/first/basic-auth.dockerfile +++ b/tests/files/nginx/first/basic-auth.dockerfile @@ -1,5 +1,6 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/nginx +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/nginx:${UPSTREAM_TAG:-latest} ENV BASIC_AUTH_USERNAME=username \ BASIC_AUTH_PASSWORD=password diff --git a/tests/files/node-mongodb/dbaas/.dockerignore b/tests/files/node-mongodb/dbaas/.dockerignore new file mode 100644 index 0000000000..b512c09d47 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/.lagoon.yml b/tests/files/node-mongodb/dbaas/.lagoon.yml new file mode 100644 index 0000000000..eade588656 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/.lagoon.yml @@ -0,0 +1,11 @@ +docker-compose-yaml: docker-compose.yml + +environment_variables: + git_sha: 'true' + +environments: + node10: + routes: + - node: + - customdomain-will-be-main-domain.com + - customdomain-will-be-not-be-main-domain.com diff --git a/tests/files/node-mongodb/dbaas/Dockerfile b/tests/files/node-mongodb/dbaas/Dockerfile new file mode 100644 index 0000000000..d5be35ae98 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/Dockerfile @@ -0,0 +1,11 @@ +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG + +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} +COPY . /app/ + +RUN npm install + +EXPOSE 3000 + +CMD ["node", "index.js"] diff --git a/tests/files/node-mongodb/dbaas/Dockerfile.mongo b/tests/files/node-mongodb/dbaas/Dockerfile.mongo new file mode 100644 index 0000000000..7a3aa177d6 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/Dockerfile.mongo @@ -0,0 +1,21 @@ +FROM mongo:4.2.3 +# generate a self signed mongodb with tls support +COPY mongodb/openssl-test-ca.cnf openssl-test-ca.cnf + +RUN openssl genrsa -out mongodb-test-ca.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -x509 -days 1826 -key mongodb-test-ca.key -out mongodb-test-ca.crt -config openssl-test-ca.cnf && \ + openssl genrsa -out mongodb-test-ia.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -key mongodb-test-ia.key -out mongodb-test-ia.csr -config openssl-test-ca.cnf && \ + openssl x509 -sha256 -req -days 730 -in mongodb-test-ia.csr -CA mongodb-test-ca.crt -CAkey mongodb-test-ca.key -set_serial 01 -out mongodb-test-ia.crt -extfile openssl-test-ca.cnf -extensions v3_ca && \ + cat mongodb-test-ca.crt mongodb-test-ia.crt > test-ca.pem + +COPY mongodb/openssl-test-server.cnf openssl-test-server.cnf + +RUN openssl genrsa -out mongodb-test-server1.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -key mongodb-test-server1.key -out mongodb-test-server1.csr -config openssl-test-server.cnf && \ + openssl x509 -sha256 -req -days 365 -in mongodb-test-server1.csr -CA mongodb-test-ia.crt -CAkey mongodb-test-ia.key -CAcreateserial -out mongodb-test-server1.crt -extfile openssl-test-server.cnf -extensions v3_req && \ + cat mongodb-test-server1.crt mongodb-test-server1.key > test-server1.pem + +COPY mongodb/mongo-init.js ./docker-entrypoint-initdb.d + +CMD ["mongod","--tlsMode","requireTLS","--tlsAllowConnectionsWithoutCertificates","--tlsCertificateKeyFile","test-server1.pem","--tlsCAFile","test-ca.pem"] \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/controllers/list.js b/tests/files/node-mongodb/dbaas/controllers/list.js new file mode 100644 index 0000000000..e9bd5c7be0 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/controllers/list.js @@ -0,0 +1,29 @@ +const path = require('path'); +const List = require('../models/list'); + +exports.index = function (req, res) { + res.sendFile(path.resolve('views/list.html')); +}; + +exports.create = function (req, res) { + var newItem = new List(req.body); + console.log(req.body); + newItem.save(function (err) { + if(err) { + res.status(400).send('Unable to save item to database'); + } else { + res.redirect('/list/getlist'); + } + }); + }; + +exports.list = function (req, res) { + List.find({}).exec(function (err, items) { + if (err) { + return res.send(500, err); + } + res.render('getlist', { + items: items + }); + }); +}; \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/db.js b/tests/files/node-mongodb/dbaas/db.js new file mode 100644 index 0000000000..2ac804168d --- /dev/null +++ b/tests/files/node-mongodb/dbaas/db.js @@ -0,0 +1,34 @@ +const mongoose = require('mongoose'); + +const { + MONGODB_USERNAME, + MONGODB_PASSWORD, + MONGODB_HOST, + MONGODB_PORT, + MONGODB_DATABASE, + MONGODB_AUTHSOURCE, + MONGODB_AUTHTLS +} = process.env; + +const options = { + useNewUrlParser: true, + reconnectTries: Number.MAX_VALUE, + reconnectInterval: 500, + connectTimeoutMS: 10000, +}; + +let authTLSString = ""; +if (MONGODB_AUTHTLS == "True") { + authTLSString = "ssl=true&sslInsecure=true&tls=true&tlsInsecure=true"; +} + +const url = `mongodb://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@${MONGODB_HOST}:${MONGODB_PORT}/${MONGODB_DATABASE}?${authTLSString}`; + +console.log(url); + +mongoose.connect(url, options).then( function() { + console.log('MongoDB is connected'); +}) + .catch( function(err) { + console.log(err); +}); \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/docker-compose.yml b/tests/files/node-mongodb/dbaas/docker-compose.yml new file mode 100644 index 0000000000..83f0b3208e --- /dev/null +++ b/tests/files/node-mongodb/dbaas/docker-compose.yml @@ -0,0 +1,39 @@ +version: '3' +services: + node: + networks: + - amazeeio-network + - default + build: + context: . + dockerfile: Dockerfile + labels: + lagoon.type: node + ports: + - "3020:3000" + depends_on: + - mongodb + environment: + - AMAZEEIO_URL=node-mongo.docker.amazee.io + - MONGODB_USERNAME=root_bob + - MONGODB_PASSWORD=password + - MONGODB_HOST=mongodb + - MONGODB_PORT=27017 + - MONGODB_DATABASE=bob + - MONGODB_AUTHSOURCE=admin + - MONGODB_AUTHTLS=True + mongodb: + build: + context: . + dockerfile: Dockerfile.mongo + labels: + lagoon.type: mongodb-dbaas + # ports: + # - "27027:27017" + # networks: + # - amazeeio-network + # - default + +networks: + amazeeio-network: + external: true \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/index.js b/tests/files/node-mongodb/dbaas/index.js new file mode 100644 index 0000000000..d9caf6ebd9 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/index.js @@ -0,0 +1,18 @@ +const express = require('express'); +const app = express(); +const router = express.Router(); +const db = require('./db'); +const list = require('./routes/list'); + +const path = __dirname + '/views/'; +const port = process.env.PORT || 3000; + +app.engine('html', require('ejs').renderFile); +app.set('view engine', 'html'); +app.use(express.urlencoded({ extended: true })); +app.use(express.static(path)); +app.use('/list', list); + +app.listen(port, function () { + console.log(`App listening on ${port}!`); +}); \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/models/list.js b/tests/files/node-mongodb/dbaas/models/list.js new file mode 100644 index 0000000000..3ad8c09f7d --- /dev/null +++ b/tests/files/node-mongodb/dbaas/models/list.js @@ -0,0 +1,9 @@ +const mongoose = require('mongoose'); +const Schema = mongoose.Schema; + +const List = new Schema ({ + name: { type: String, required: true }, + character: { type: String, required: true }, +}); + +module.exports = mongoose.model('List', List) \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/mongodb/mongo-init.js b/tests/files/node-mongodb/dbaas/mongodb/mongo-init.js new file mode 100644 index 0000000000..443a14c9f8 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/mongodb/mongo-init.js @@ -0,0 +1,11 @@ +// connect to admin database to create users +db = new Mongo().getDB("admin"); +// create admin user +db.createUser({ + user: "root_bob", + pwd: "password", + roles: [{ + role: "clusterAdmin", + db: "admin" + }] +}); \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/mongodb/openssl-test-ca.cnf b/tests/files/node-mongodb/dbaas/mongodb/openssl-test-ca.cnf new file mode 100644 index 0000000000..db9062eda2 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/mongodb/openssl-test-ca.cnf @@ -0,0 +1,57 @@ +# NOT FOR PRODUCTION USE. OpenSSL configuration file for testing. + +# For the CA policy +[ policy_match ] +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ req ] +default_bits = 4096 +default_keyfile = myTestCertificateKey.pem ## The default private key file name. +default_md = sha256 ## Use SHA-256 for Signatures +distinguished_name = req_dn +req_extensions = v3_req +x509_extensions = v3_ca # The extentions to add to the self signed cert + +[ v3_req ] +subjectKeyIdentifier = hash +basicConstraints = CA:FALSE +keyUsage = critical, digitalSignature, keyEncipherment +nsComment = "OpenSSL Generated Certificate for TESTING only. NOT FOR PRODUCTION USE." +extendedKeyUsage = serverAuth, clientAuth + +[ req_dn ] +countryName = AU +countryName_default = . +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name +stateOrProvinceName_default = TestCertificateStateName +stateOrProvinceName_max = 64 + +localityName = Locality Name +localityName_default = TestCertificateLocalityName +localityName_max = 64 + +organizationName = Organization Name +organizationName_default = TestCertificateOrgName +organizationName_max = 64 + +organizationalUnitName = Organizational Unit Name +organizationalUnitName_default = TestCertificateOrgUnitName +organizationalUnitName_max = 64 + +commonName = Common Name (eg, YOUR name) +commonName_max = 64 + +[ v3_ca ] +# Extensions for a typical CA + +subjectKeyIdentifier=hash +basicConstraints = critical,CA:true +authorityKeyIdentifier=keyid:always,issuer:always \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/mongodb/openssl-test-server.cnf b/tests/files/node-mongodb/dbaas/mongodb/openssl-test-server.cnf new file mode 100644 index 0000000000..7a3857af5e --- /dev/null +++ b/tests/files/node-mongodb/dbaas/mongodb/openssl-test-server.cnf @@ -0,0 +1,45 @@ +# NOT FOR PRODUCTION USE. OpenSSL configuration file for testing. + + +[ req ] +default_bits = 4096 +default_keyfile = myTestServerCertificateKey.pem ## The default private key file name. +default_md = sha256 +distinguished_name = req_dn +req_extensions = v3_req + +[ v3_req ] +subjectKeyIdentifier = hash +basicConstraints = CA:FALSE +keyUsage = critical, digitalSignature, keyEncipherment +nsComment = "OpenSSL Generated Certificate for TESTING only. NOT FOR PRODUCTION USE." +extendedKeyUsage = serverAuth, clientAuth +subjectAltName = @alt_names + +[ alt_names ] +DNS.1 = www.acme.com ##TODO: Enter the DNS names. The DNS names should match the server names. + +[ req_dn ] +countryName = Country Name (2 letter code) +countryName_default = TestServerCertificateCountry +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = TestServerCertificateState +stateOrProvinceName_max = 64 + +localityName = Locality Name (eg, city) +localityName_default = TestServerCertificateLocality +localityName_max = 64 + +organizationName = Organization Name (eg, company) +organizationName_default = TestServerCertificateOrg +organizationName_max = 64 + +organizationalUnitName = Organizational Unit Name (eg, section) +organizationalUnitName_default = TestServerCertificateOrgUnit +organizationalUnitName_max = 64 + +commonName = Common Name (eg, YOUR name) +commonName_max = 64 \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/package.json b/tests/files/node-mongodb/dbaas/package.json new file mode 100644 index 0000000000..0ccb4b7a55 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/package.json @@ -0,0 +1,15 @@ +{ + "name": "node", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "ejs": "^2.6.1", + "express": "^4.16.4", + "mongoose": "^5.4.10", + "nodemon": "^1.19.4" + }, + "scripts": { + "start": "node index.js" + } +} diff --git a/tests/files/node-mongodb/dbaas/routes/index.js b/tests/files/node-mongodb/dbaas/routes/index.js new file mode 100644 index 0000000000..589ccae5ee --- /dev/null +++ b/tests/files/node-mongodb/dbaas/routes/index.js @@ -0,0 +1,14 @@ +const express = require('express'); +const router = express.Router(); +const path = require('path'); + +router.use (function (req,res,next) { + console.log('/' + req.method); + next(); +}); + +router.get('/',function(req,res){ + res.sendFile(path.resolve('views/index.html')); +}); + +module.exports = router; \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/routes/list.js b/tests/files/node-mongodb/dbaas/routes/list.js new file mode 100644 index 0000000000..1cefe59ef7 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/routes/list.js @@ -0,0 +1,17 @@ +const express = require('express'); +const router = express.Router(); +const list = require('../controllers/list'); + +router.get('/', function(req, res){ + list.index(req,res); +}); + +router.post('/additem', function(req, res) { + list.create(req,res); +}); + +router.get('/getlist', function(req, res) { + list.list(req,res); +}); + +module.exports = router; \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/views/getlist.html b/tests/files/node-mongodb/dbaas/views/getlist.html new file mode 100644 index 0000000000..b6fdf973f6 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/views/getlist.html @@ -0,0 +1,30 @@ + + + + + List + + +
+

Items

+
+
+

+

Your Items
+ <% items.forEach(function(list) { %> +

+ Name: <%= list.name %>
+ Character: <%= list.character %> +

+ <% }); %> +

+
+ \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/views/index.html b/tests/files/node-mongodb/dbaas/views/index.html new file mode 100644 index 0000000000..75884cdc2c --- /dev/null +++ b/tests/files/node-mongodb/dbaas/views/index.html @@ -0,0 +1,19 @@ + + + + + List + + +
+

Home

+
+ \ No newline at end of file diff --git a/tests/files/node-mongodb/dbaas/views/list.html b/tests/files/node-mongodb/dbaas/views/list.html new file mode 100644 index 0000000000..c7d2ff30b5 --- /dev/null +++ b/tests/files/node-mongodb/dbaas/views/list.html @@ -0,0 +1,33 @@ + + + + + Add + + +
+

Add

+
+
+
+
+

+

+
Enter Your Item
+ + + +
+

+
+
+
+ \ No newline at end of file diff --git a/tests/files/node-mongodb/single/.dockerignore b/tests/files/node-mongodb/single/.dockerignore new file mode 100644 index 0000000000..b512c09d47 --- /dev/null +++ b/tests/files/node-mongodb/single/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/tests/files/node-mongodb/single/.env b/tests/files/node-mongodb/single/.env new file mode 100644 index 0000000000..cdda283af8 --- /dev/null +++ b/tests/files/node-mongodb/single/.env @@ -0,0 +1,7 @@ +MONGODB_USERNAME=mongouser +MONGODB_PASSWORD=password +MONGODB_HOST=mongodb +MONGODB_PORT=27017 +MONGODB_DATABASE=admin +MONGODB_AUTHSOURCE=admin +MONGODB_AUTHTLS=True \ No newline at end of file diff --git a/tests/files/node-mongodb/single/.lagoon.yml b/tests/files/node-mongodb/single/.lagoon.yml new file mode 100644 index 0000000000..eade588656 --- /dev/null +++ b/tests/files/node-mongodb/single/.lagoon.yml @@ -0,0 +1,11 @@ +docker-compose-yaml: docker-compose.yml + +environment_variables: + git_sha: 'true' + +environments: + node10: + routes: + - node: + - customdomain-will-be-main-domain.com + - customdomain-will-be-not-be-main-domain.com diff --git a/tests/files/node-mongodb/single/Dockerfile b/tests/files/node-mongodb/single/Dockerfile new file mode 100644 index 0000000000..d5be35ae98 --- /dev/null +++ b/tests/files/node-mongodb/single/Dockerfile @@ -0,0 +1,11 @@ +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG + +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} +COPY . /app/ + +RUN npm install + +EXPOSE 3000 + +CMD ["node", "index.js"] diff --git a/tests/files/node-mongodb/single/Dockerfile.mongo b/tests/files/node-mongodb/single/Dockerfile.mongo new file mode 100644 index 0000000000..69b0dcce48 --- /dev/null +++ b/tests/files/node-mongodb/single/Dockerfile.mongo @@ -0,0 +1,21 @@ +FROM mongo:4.2.3 +# generate a self signed mongodb with tls support +COPY mongodb/openssl-test-ca.cnf openssl-test-ca.cnf + +RUN openssl genrsa -out mongodb-test-ca.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -x509 -days 1826 -key mongodb-test-ca.key -out mongodb-test-ca.crt -config openssl-test-ca.cnf && \ + openssl genrsa -out mongodb-test-ia.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -key mongodb-test-ia.key -out mongodb-test-ia.csr -config openssl-test-ca.cnf && \ + openssl x509 -sha256 -req -days 730 -in mongodb-test-ia.csr -CA mongodb-test-ca.crt -CAkey mongodb-test-ca.key -set_serial 01 -out mongodb-test-ia.crt -extfile openssl-test-ca.cnf -extensions v3_ca && \ + cat mongodb-test-ca.crt mongodb-test-ia.crt > test-ca.pem + +COPY mongodb/openssl-test-server.cnf openssl-test-server.cnf + +RUN openssl genrsa -out mongodb-test-server1.key 4096 && \ + openssl req -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com" -new -key mongodb-test-server1.key -out mongodb-test-server1.csr -config openssl-test-server.cnf && \ + openssl x509 -sha256 -req -days 365 -in mongodb-test-server1.csr -CA mongodb-test-ia.crt -CAkey mongodb-test-ia.key -CAcreateserial -out mongodb-test-server1.crt -extfile openssl-test-server.cnf -extensions v3_req && \ + cat mongodb-test-server1.crt mongodb-test-server1.key > test-server1.pem + +COPY mongodb/mongo-init.js ./docker-entrypoint-initdb.d + +CMD ["mongod","--tlsMode","requireTLS","--tlsAllowConnectionsWithoutCertificates","--tlsCertificateKeyFile","test-server1.pem","--tlsCAFile","test-ca.pem","--bind_ip","0.0.0.0"] \ No newline at end of file diff --git a/tests/files/node-mongodb/single/controllers/list.js b/tests/files/node-mongodb/single/controllers/list.js new file mode 100644 index 0000000000..e9bd5c7be0 --- /dev/null +++ b/tests/files/node-mongodb/single/controllers/list.js @@ -0,0 +1,29 @@ +const path = require('path'); +const List = require('../models/list'); + +exports.index = function (req, res) { + res.sendFile(path.resolve('views/list.html')); +}; + +exports.create = function (req, res) { + var newItem = new List(req.body); + console.log(req.body); + newItem.save(function (err) { + if(err) { + res.status(400).send('Unable to save item to database'); + } else { + res.redirect('/list/getlist'); + } + }); + }; + +exports.list = function (req, res) { + List.find({}).exec(function (err, items) { + if (err) { + return res.send(500, err); + } + res.render('getlist', { + items: items + }); + }); +}; \ No newline at end of file diff --git a/tests/files/node-mongodb/single/db.js b/tests/files/node-mongodb/single/db.js new file mode 100644 index 0000000000..61c3490377 --- /dev/null +++ b/tests/files/node-mongodb/single/db.js @@ -0,0 +1,38 @@ +const mongoose = require('mongoose'); + +const { + MONGODB_USERNAME, + MONGODB_PASSWORD, + MONGODB_HOST, + MONGODB_PORT, + MONGODB_DATABASE, + MONGODB_AUTHSOURCE, + MONGODB_AUTHTLS +} = process.env; + +const options = { + useNewUrlParser: true, + reconnectTries: Number.MAX_VALUE, + reconnectInterval: 500, + connectTimeoutMS: 10000, +}; + +let authTLSString = ""; +if (MONGODB_AUTHTLS == "True") { + authTLSString = "ssl=true&sslInsecure=true&tls=true&tlsInsecure=true"; + if (MONGODB_AUTHSOURCE != "") { + authTLSString = `authSource=${MONGODB_AUTHSOURCE}&ssl=true&sslInsecure=true&tls=true&tlsInsecure=true`; + } +} + +const url = `mongodb://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@${MONGODB_HOST}:${MONGODB_PORT}/${MONGODB_DATABASE}?${authTLSString}`; + +console.log(url); + +mongoose.connect(url, options).then( function() { + console.log('MongoDB is connected'); +}) + .catch( function(err) { + console.log(err); + process.exit() +}); \ No newline at end of file diff --git a/tests/files/node-mongodb/single/docker-compose.yml b/tests/files/node-mongodb/single/docker-compose.yml new file mode 100644 index 0000000000..aa933aeebd --- /dev/null +++ b/tests/files/node-mongodb/single/docker-compose.yml @@ -0,0 +1,39 @@ +version: '3' +services: + node: + networks: + - amazeeio-network + - default + build: + context: . + dockerfile: Dockerfile + labels: + lagoon.type: node + ports: + - "3020:3000" + depends_on: + - mongodb + environment: + - AMAZEEIO_URL=node-mongo.docker.amazee.io + - MONGODB_USERNAME=mongouser + - MONGODB_PASSWORD=password + - MONGODB_HOST=mongodb + - MONGODB_PORT=27017 + - MONGODB_DATABASE=admin + - MONGODB_AUTHSOURCE=admin + - MONGODB_AUTHTLS=True + mongodb: + build: + context: . + dockerfile: Dockerfile.mongo + labels: + lagoon.type: mongodb-single + # ports: + # - "27027:27017" + # networks: + # - amazeeio-network + # - default + +networks: + amazeeio-network: + external: true \ No newline at end of file diff --git a/tests/files/node-mongodb/single/index.js b/tests/files/node-mongodb/single/index.js new file mode 100644 index 0000000000..d9caf6ebd9 --- /dev/null +++ b/tests/files/node-mongodb/single/index.js @@ -0,0 +1,18 @@ +const express = require('express'); +const app = express(); +const router = express.Router(); +const db = require('./db'); +const list = require('./routes/list'); + +const path = __dirname + '/views/'; +const port = process.env.PORT || 3000; + +app.engine('html', require('ejs').renderFile); +app.set('view engine', 'html'); +app.use(express.urlencoded({ extended: true })); +app.use(express.static(path)); +app.use('/list', list); + +app.listen(port, function () { + console.log(`App listening on ${port}!`); +}); \ No newline at end of file diff --git a/tests/files/node-mongodb/single/models/list.js b/tests/files/node-mongodb/single/models/list.js new file mode 100644 index 0000000000..3ad8c09f7d --- /dev/null +++ b/tests/files/node-mongodb/single/models/list.js @@ -0,0 +1,9 @@ +const mongoose = require('mongoose'); +const Schema = mongoose.Schema; + +const List = new Schema ({ + name: { type: String, required: true }, + character: { type: String, required: true }, +}); + +module.exports = mongoose.model('List', List) \ No newline at end of file diff --git a/tests/files/node-mongodb/single/mongodb/mongo-init.js b/tests/files/node-mongodb/single/mongodb/mongo-init.js new file mode 100644 index 0000000000..0584e5bf21 --- /dev/null +++ b/tests/files/node-mongodb/single/mongodb/mongo-init.js @@ -0,0 +1,11 @@ +// connect to admin database to create users +db = new Mongo().getDB("admin"); +// create admin user +db.createUser({ + user: "mongouser", + pwd: "password", + roles: [{ + role: "clusterAdmin", + db: "admin" + }] +}); \ No newline at end of file diff --git a/tests/files/node-mongodb/single/mongodb/openssl-test-ca.cnf b/tests/files/node-mongodb/single/mongodb/openssl-test-ca.cnf new file mode 100644 index 0000000000..db9062eda2 --- /dev/null +++ b/tests/files/node-mongodb/single/mongodb/openssl-test-ca.cnf @@ -0,0 +1,57 @@ +# NOT FOR PRODUCTION USE. OpenSSL configuration file for testing. + +# For the CA policy +[ policy_match ] +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ req ] +default_bits = 4096 +default_keyfile = myTestCertificateKey.pem ## The default private key file name. +default_md = sha256 ## Use SHA-256 for Signatures +distinguished_name = req_dn +req_extensions = v3_req +x509_extensions = v3_ca # The extentions to add to the self signed cert + +[ v3_req ] +subjectKeyIdentifier = hash +basicConstraints = CA:FALSE +keyUsage = critical, digitalSignature, keyEncipherment +nsComment = "OpenSSL Generated Certificate for TESTING only. NOT FOR PRODUCTION USE." +extendedKeyUsage = serverAuth, clientAuth + +[ req_dn ] +countryName = AU +countryName_default = . +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name +stateOrProvinceName_default = TestCertificateStateName +stateOrProvinceName_max = 64 + +localityName = Locality Name +localityName_default = TestCertificateLocalityName +localityName_max = 64 + +organizationName = Organization Name +organizationName_default = TestCertificateOrgName +organizationName_max = 64 + +organizationalUnitName = Organizational Unit Name +organizationalUnitName_default = TestCertificateOrgUnitName +organizationalUnitName_max = 64 + +commonName = Common Name (eg, YOUR name) +commonName_max = 64 + +[ v3_ca ] +# Extensions for a typical CA + +subjectKeyIdentifier=hash +basicConstraints = critical,CA:true +authorityKeyIdentifier=keyid:always,issuer:always \ No newline at end of file diff --git a/tests/files/node-mongodb/single/mongodb/openssl-test-server.cnf b/tests/files/node-mongodb/single/mongodb/openssl-test-server.cnf new file mode 100644 index 0000000000..7a3857af5e --- /dev/null +++ b/tests/files/node-mongodb/single/mongodb/openssl-test-server.cnf @@ -0,0 +1,45 @@ +# NOT FOR PRODUCTION USE. OpenSSL configuration file for testing. + + +[ req ] +default_bits = 4096 +default_keyfile = myTestServerCertificateKey.pem ## The default private key file name. +default_md = sha256 +distinguished_name = req_dn +req_extensions = v3_req + +[ v3_req ] +subjectKeyIdentifier = hash +basicConstraints = CA:FALSE +keyUsage = critical, digitalSignature, keyEncipherment +nsComment = "OpenSSL Generated Certificate for TESTING only. NOT FOR PRODUCTION USE." +extendedKeyUsage = serverAuth, clientAuth +subjectAltName = @alt_names + +[ alt_names ] +DNS.1 = www.acme.com ##TODO: Enter the DNS names. The DNS names should match the server names. + +[ req_dn ] +countryName = Country Name (2 letter code) +countryName_default = TestServerCertificateCountry +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = TestServerCertificateState +stateOrProvinceName_max = 64 + +localityName = Locality Name (eg, city) +localityName_default = TestServerCertificateLocality +localityName_max = 64 + +organizationName = Organization Name (eg, company) +organizationName_default = TestServerCertificateOrg +organizationName_max = 64 + +organizationalUnitName = Organizational Unit Name (eg, section) +organizationalUnitName_default = TestServerCertificateOrgUnit +organizationalUnitName_max = 64 + +commonName = Common Name (eg, YOUR name) +commonName_max = 64 \ No newline at end of file diff --git a/tests/files/node-mongodb/single/package.json b/tests/files/node-mongodb/single/package.json new file mode 100644 index 0000000000..0ccb4b7a55 --- /dev/null +++ b/tests/files/node-mongodb/single/package.json @@ -0,0 +1,15 @@ +{ + "name": "node", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "ejs": "^2.6.1", + "express": "^4.16.4", + "mongoose": "^5.4.10", + "nodemon": "^1.19.4" + }, + "scripts": { + "start": "node index.js" + } +} diff --git a/tests/files/node-mongodb/single/routes/index.js b/tests/files/node-mongodb/single/routes/index.js new file mode 100644 index 0000000000..589ccae5ee --- /dev/null +++ b/tests/files/node-mongodb/single/routes/index.js @@ -0,0 +1,14 @@ +const express = require('express'); +const router = express.Router(); +const path = require('path'); + +router.use (function (req,res,next) { + console.log('/' + req.method); + next(); +}); + +router.get('/',function(req,res){ + res.sendFile(path.resolve('views/index.html')); +}); + +module.exports = router; \ No newline at end of file diff --git a/tests/files/node-mongodb/single/routes/list.js b/tests/files/node-mongodb/single/routes/list.js new file mode 100644 index 0000000000..1cefe59ef7 --- /dev/null +++ b/tests/files/node-mongodb/single/routes/list.js @@ -0,0 +1,17 @@ +const express = require('express'); +const router = express.Router(); +const list = require('../controllers/list'); + +router.get('/', function(req, res){ + list.index(req,res); +}); + +router.post('/additem', function(req, res) { + list.create(req,res); +}); + +router.get('/getlist', function(req, res) { + list.list(req,res); +}); + +module.exports = router; \ No newline at end of file diff --git a/tests/files/node-mongodb/single/views/getlist.html b/tests/files/node-mongodb/single/views/getlist.html new file mode 100644 index 0000000000..b6fdf973f6 --- /dev/null +++ b/tests/files/node-mongodb/single/views/getlist.html @@ -0,0 +1,30 @@ + + + + + List + + +
+

Items

+
+
+

+

Your Items
+ <% items.forEach(function(list) { %> +

+ Name: <%= list.name %>
+ Character: <%= list.character %> +

+ <% }); %> +

+
+ \ No newline at end of file diff --git a/tests/files/node-mongodb/single/views/index.html b/tests/files/node-mongodb/single/views/index.html new file mode 100644 index 0000000000..75884cdc2c --- /dev/null +++ b/tests/files/node-mongodb/single/views/index.html @@ -0,0 +1,19 @@ + + + + + List + + +
+

Home

+
+ \ No newline at end of file diff --git a/tests/files/node-mongodb/single/views/list.html b/tests/files/node-mongodb/single/views/list.html new file mode 100644 index 0000000000..c7d2ff30b5 --- /dev/null +++ b/tests/files/node-mongodb/single/views/list.html @@ -0,0 +1,33 @@ + + + + + Add + + +
+

Add

+
+
+
+
+

+

+
Enter Your Item
+ + + +
+

+
+
+
+ \ No newline at end of file diff --git a/tests/files/node10/Dockerfile b/tests/files/node10/Dockerfile index 18931de976..3fc1f218c2 100644 --- a/tests/files/node10/Dockerfile +++ b/tests/files/node10/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:10-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-10-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:10 +FROM ${UPSTREAM_REPO:-testlagoon}/node-10:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/node12/Dockerfile b/tests/files/node12/Dockerfile index c1293c12df..e608ba240a 100644 --- a/tests/files/node12/Dockerfile +++ b/tests/files/node12/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:12-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-12-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:12 +FROM ${UPSTREAM_REPO:-testlagoon}/node-12:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/node14/Dockerfile b/tests/files/node14/Dockerfile index 6f7285f9cd..76f4f7310c 100644 --- a/tests/files/node14/Dockerfile +++ b/tests/files/node14/Dockerfile @@ -1,9 +1,10 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-amazeeio}/node:14-builder as builder +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-testlagoon}/node-14-builder:${UPSTREAM_TAG:-latest} as builder COPY package.json yarn.lock /app/ RUN yarn install -FROM ${IMAGE_REPO:-amazeeio}/node:14 +FROM ${UPSTREAM_REPO:-testlagoon}/node-14:${UPSTREAM_TAG:-latest} COPY --from=builder /app/node_modules /app/node_modules COPY . /app/ diff --git a/tests/files/python3.7/.lagoon.yml b/tests/files/python3.7/.lagoon.yml new file mode 100644 index 0000000000..f0ad2b8a73 --- /dev/null +++ b/tests/files/python3.7/.lagoon.yml @@ -0,0 +1,4 @@ +docker-compose-yaml: docker-compose.yml + +environment_variables: + git_sha: 'true' diff --git a/tests/files/python3.7/Dockerfile b/tests/files/python3.7/Dockerfile new file mode 100644 index 0000000000..3a0d72789f --- /dev/null +++ b/tests/files/python3.7/Dockerfile @@ -0,0 +1,34 @@ +FROM ${UPSTREAM_REPO:-testlagoon}/python-3.7:${UPSTREAM_TAG:-latest} +WORKDIR /code +ENV FLASK_APP=app.py +ENV FLASK_RUN_HOST=0.0.0.0 +ENV FLASK_RUN_PORT=8800 + +RUN pip install flask +COPY . . + +ARG LAGOON_GIT_SHA=0000000000000000000000000000000000000000 +ENV LAGOON_GIT_SHA_BUILDTIME ${LAGOON_GIT_SHA} + +ARG LAGOON_GIT_BRANCH=undefined +ENV LAGOON_GIT_BRANCH_BUILDTIME ${LAGOON_GIT_BRANCH} + +ARG LAGOON_BUILD_TYPE=undefined +ENV LAGOON_BUILD_TYPE_BUILDTIME ${LAGOON_BUILD_TYPE} + +ARG LAGOON_PR_HEAD_BRANCH=undefined +ENV LAGOON_PR_HEAD_BRANCH_BUILDTIME ${LAGOON_PR_HEAD_BRANCH} + +ARG LAGOON_PR_HEAD_SHA=undefined +ENV LAGOON_PR_HEAD_SHA_BUILDTIME ${LAGOON_PR_HEAD_SHA} + +ARG LAGOON_PR_BASE_BRANCH=undefined +ENV LAGOON_PR_BASE_BRANCH_BUILDTIME ${LAGOON_PR_BASE_BRANCH} + +ARG LAGOON_PR_BASE_SHA=undefined +ENV LAGOON_PR_BASE_SHA_BUILDTIME ${LAGOON_PR_BASE_SHA} + +ARG LAGOON_PR_TITLE=undefined +ENV LAGOON_PR_TITLE_BUILDTIME ${LAGOON_PR_TITLE} + +CMD ["flask", "run"] \ No newline at end of file diff --git a/tests/files/python3.7/app.py b/tests/files/python3.7/app.py new file mode 100644 index 0000000000..f5300f339d --- /dev/null +++ b/tests/files/python3.7/app.py @@ -0,0 +1,13 @@ +import time +import os + +from flask import Flask + +app = Flask(__name__) + +@app.route('/') +def hello(): + envs = '' + for key, val in os.environ.items(): + envs+=str("{}={}\n".format(key, val)) + return '{}'.format(envs) diff --git a/tests/files/python3.7/docker-compose.yml b/tests/files/python3.7/docker-compose.yml new file mode 100644 index 0000000000..fdae4c1de9 --- /dev/null +++ b/tests/files/python3.7/docker-compose.yml @@ -0,0 +1,18 @@ +version: '2' +services: + python: + networks: + - amazeeio-network + - default + build: + context: . + dockerfile: Dockerfile + labels: + lagoon.type: python + ports: + - "8800:8800" + environment: + - AMAZEEIO_URL=python.docker.amazee.io +networks: + amazeeio-network: + external: true \ No newline at end of file diff --git a/tests/tasks/api/add-project-variable.yaml b/tests/tasks/api/add-project-variable.yaml index 005af30266..08abefcc3a 100644 --- a/tests/tasks/api/add-project-variable.yaml +++ b/tests/tasks/api/add-project-variable.yaml @@ -1,27 +1,27 @@ -- name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ graphql_url }}" block: - include: refresh-token.yaml - - name: "{{ testname }} - POST api get project by name with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api get project by name with target project {{ project }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "query($project: String!) {projectByName(name:$project){id,name}}", "variables": {"project":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api get project by name with target project {{ project }} and sha {{ sha }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api get project by name with target project {{ project }} and sha {{ sha }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" - - name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($projectId: Int!, $name: String!, $value: String!, $scope: EnvVariableScope!) {addEnvVariable(input:{type:PROJECT,typeId:$projectId,name:$name,value:$value,scope:$scope}){id,name,value,scope}}", "variables": {"projectId":{{ apiresponse.json.data.projectByName.id }},"name":"{{ envName }}","value":"{{ envValue }}","scope":"{{ envScope }}"}}' register: apiresponse - - name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" \ No newline at end of file diff --git a/tests/tasks/api/delete-project-variable.yaml b/tests/tasks/api/delete-project-variable.yaml index 219ae0dab1..e66b2f1aa2 100644 --- a/tests/tasks/api/delete-project-variable.yaml +++ b/tests/tasks/api/delete-project-variable.yaml @@ -1,27 +1,31 @@ -- name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ graphql_url }}" block: - include: refresh-token.yaml - - name: "{{ testname }} - POST api get project by name with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api get project by name with target project {{ project }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "query($project: String!) {projectByName(name:$project){id,name,envVariables{id,name}}}", "variables": {"project":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api get project by name with target project {{ project }} and sha {{ sha }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api get project by name with target project {{ project }} and sha {{ sha }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" - - name: "{{ testname }} - POST api get project by name with target project {{ project }} and sha {{ sha }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api get project by name with target project {{ project }} and sha {{ sha }} to {{ graphql_url }}" debug: - msg: "api response: {{ apiresponse.json|json_query('data.projectByName.envVariables[?name==`LAGOON_SERVICE_TYPES`].id | [0]') }}" + msg: "api response: {{ apiresponse.json|json_query(query) }}" + vars: + query: 'data.projectByName.envVariables[?name==`{{ envName }}`].id | [0]' - name: "{{ testname }} - set envvar id to fact" set_fact: - env_var_id: "{{ apiresponse.json|json_query('data.projectByName.envVariables[?name==`LAGOON_SERVICE_TYPES`].id | [0]') }}" - - name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + env_var_id: "{{ apiresponse.json|json_query(query) }}" + vars: + query: 'data.projectByName.envVariables[?name==`{{ envName }}`].id | [0]' + - name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" @@ -29,7 +33,7 @@ body: '{ "query": "mutation($id: Int!) {deleteEnvVariable(input:{id:$id})}", "variables": {"id":{{ env_var_id }}}}' register: apiresponse when: env_var_id != "" - - name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" when: env_var_id != "" \ No newline at end of file diff --git a/tests/tasks/api/deploy-no-sha.yaml b/tests/tasks/api/deploy-no-sha.yaml index 1ce6159a10..55b6a53ba9 100644 --- a/tests/tasks/api/deploy-no-sha.yaml +++ b/tests/tasks/api/deploy-no-sha.yaml @@ -1,15 +1,18 @@ -- name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ graphql_url }}" block: - include: refresh-token.yaml - - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($branchName: String!, $projectName: String!) {deployEnvironmentBranch(input:{branchName:$branchName,project:{name:$projectName}})}", "variables": {"branchName":"{{ branch }}","projectName":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" + until: apiresponse.json.data.deployEnvironmentBranch == "success" + retries: 10 + delay: 30 diff --git a/tests/tasks/api/deploy-sha.yaml b/tests/tasks/api/deploy-sha.yaml index 98e60aacbf..e4388fb722 100644 --- a/tests/tasks/api/deploy-sha.yaml +++ b/tests/tasks/api/deploy-sha.yaml @@ -1,15 +1,18 @@ -- name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} and sha {{ sha }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} and sha {{ sha }} to {{ graphql_url }}" block: - include: refresh-token.yaml - - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} and sha {{ sha }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} and sha {{ sha }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($branchName: String!, $branchRef: String!, $projectName: String!) {deployEnvironmentBranch(input:{branchName:$branchName,branchRef:$branchRef,project:{name:$projectName}})}", "variables": {"branchName":"{{ branch }}","branchRef":"{{ sha }}","projectName":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} and sha {{ sha }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} and sha {{ sha }} to {{ graphql_url }}" debug: - msg: "api response: {{ apiresponse.json }}" \ No newline at end of file + msg: "api response: {{ apiresponse.json }}" + until: apiresponse.json.data.deployEnvironmentBranch == "success" + retries: 10 + delay: 30 \ No newline at end of file diff --git a/tests/tasks/api/promote.yaml b/tests/tasks/api/promote.yaml index 48c2938050..c45941d26f 100644 --- a/tests/tasks/api/promote.yaml +++ b/tests/tasks/api/promote.yaml @@ -1,15 +1,15 @@ -- name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ graphql_url }}" block: - include: refresh-token.yaml - - name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($destinationEnvironment: String!, $projectName: String!, $sourceEnvironmentName: String!) {deployEnvironmentPromote(input:{destinationEnvironment:$destinationEnvironment,project:{name:$projectName},sourceEnvironment:{name:$sourceEnvironmentName,project:{name:$projectName}}})}", "variables": {"destinationEnvironment":"{{ promote_environment }}","sourceEnvironmentName":"{{ source_environment }}","projectName":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" diff --git a/tests/tasks/api/pullrequest-deploy.yaml b/tests/tasks/api/pullrequest-deploy.yaml index fafeca11fe..40083219e1 100644 --- a/tests/tasks/api/pullrequest-deploy.yaml +++ b/tests/tasks/api/pullrequest-deploy.yaml @@ -1,15 +1,15 @@ -- name: "{{ testname }} - POST api deployEnvironmentPullrequest with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api deployEnvironmentPullrequest with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} to {{ graphql_url }}" block: - include: refresh-token.yaml - - name: "{{ testname }} - POST api deployEnvironmentPullrequest with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentPullrequest with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json - body: '{ "query": "mutation($projectName:String!, $number:Int!, $title:String!, $baseName:String!, $baseRef:String!, $headName:String!, $headRef:String!) {deployEnvironmentPullrequest(input:{project:{name:$projectName},number:$number,title:$title,baseBranchName:$baseName,baseBranchRef:$baseRef,headBranchName:$headName,headBranchRef:$headRef})}", "variables": {"projectName":"{{ project }}","number":"{{ git_pr_number }}","title":"{{ git_pr_title }}","baseName":"{{ git_base_branch }}","baseRef":"{{ git_base_commit_hash }}","headName":"{{ git_pr_branch }}","headRef":"{{ git_pr_commit_hash }}"}}' + body: '{ "query": "mutation($projectName:String!, $number:Int!, $title:String!, $baseName:String!, $baseRef:String!, $headName:String!, $headRef:String!) {deployEnvironmentPullrequest(input:{project:{name:$projectName},number:$number,title:$title,baseBranchName:$baseName,baseBranchRef:$baseRef,headBranchName:$headName,headBranchRef:$headRef})}", "variables": {"projectName":"{{ project }}","number":{{ git_pr_number }},"title":"{{ git_pr_title }}","baseName":"{{ git_base_branch }}","baseRef":"{{ git_base_commit_hash }}","headName":"{{ git_pr_branch }}","headRef":"{{ git_pr_commit_hash }}"}}' register: apiresponse - - name: "{{ testname }} - POST api deployEnvironmentPullrequest with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentPullrequest with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" diff --git a/tests/tasks/api/refresh-token.yaml b/tests/tasks/api/refresh-token.yaml index cd4ee5a9e7..266cd3c3e9 100644 --- a/tests/tasks/api/refresh-token.yaml +++ b/tests/tasks/api/refresh-token.yaml @@ -3,5 +3,9 @@ - name: "{{ testname }} - Refresh API token if necessary" script: refresh_token.py {{ lookup('env', 'KEYCLOAK_AUTH_SERVER_CLIENT_SECRET') }} {{ grant.stdout | b64encode }} register: grant + - debug: + msg: "refresh token stdout: {{ grant.stdout }}" + - debug: + msg: "refresh token stderr: {{ grant.stderr }}" - set_fact: token: "{{ (grant.stdout | from_json).access_token }}" diff --git a/tests/tasks/api/refresh_token.py b/tests/tasks/api/refresh_token.py index 79cb35ca9a..7c6e5df6db 100755 --- a/tests/tasks/api/refresh_token.py +++ b/tests/tasks/api/refresh_token.py @@ -17,16 +17,10 @@ access_token = jwt.decode(grant['access_token'], verify=False) -current_time = int(time.time()) - -if current_time < access_token['exp']: - print grant_raw -else: - data = {'client_id': 'auth-server', - 'client_secret': auth_server_client_secret, - 'grant_type': 'refresh_token', - 'refresh_token': grant['refresh_token']} - - r = requests.post(url = os.environ['KEYCLOAK_URL'] + "/auth/realms/lagoon/protocol/openid-connect/token", data = data) - print r.text +data = {'client_id': 'auth-server', + 'client_secret': auth_server_client_secret, + 'grant_type': 'refresh_token', + 'refresh_token': grant['refresh_token']} +r = requests.post(url = os.environ['KEYCLOAK_URL'] + "/auth/realms/lagoon/protocol/openid-connect/token", data = data) +print(r.text) diff --git a/tests/tasks/api/remove.yaml b/tests/tasks/api/remove.yaml index 5a5021487d..eebe5dec43 100644 --- a/tests/tasks/api/remove.yaml +++ b/tests/tasks/api/remove.yaml @@ -1,15 +1,15 @@ -- name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ graphql_url }}" block: - include: refresh-token.yaml - - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($name: String!, $project: String!) {deleteEnvironment(input:{name:$name,project:$project})}", "variables": {"name":"{{ branch }}","project":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" diff --git a/tests/tasks/git-add-commit-push.yaml b/tests/tasks/git-add-commit-push.yaml index 31913e1ca7..3baff3b686 100644 --- a/tests/tasks/git-add-commit-push.yaml +++ b/tests/tasks/git-add-commit-push.yaml @@ -1,44 +1,44 @@ -- name: "{{ testname }} - create new branch {{ branch }} in {{git_repo_name}}" +- name: "{{ testname }} - create new branch {{ branch }} in {{ git_repo_name }}" shell: git checkout -b {{ branch }} || git checkout {{ branch }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - copying all files from {{git_files}} into git repo {{git_repo_name}}" +- name: "{{ testname }} - copying all files from {{ git_files }} into git repo {{ git_repo_name }}" synchronize: - src: /ansible/files/{{git_files}} - dest: /{{git_repo_name}}/ + src: /ansible/files/{{ git_files }} + dest: /{{ git_repo_name }}/ -- name: "{{ testname }} - copying all files from {{docker_files}} into git repo {{git_repo_name}}" +- name: "{{ testname }} - copying all files from {{ docker_files }} into git repo {{ git_repo_name }}" copy: - src: /ansible/files/{{docker_files}} - dest: /{{git_repo_name}}/ + src: /ansible/files/{{ docker_files }} + dest: /{{ git_repo_name }}/ when: docker_files is defined - name: "{{ testname }} - removing cronjobs from .lagoon.yml" copy: - src: /{{git_repo_name}}/{{overwrite_lagoon_yml}} - dest: /{{git_repo_name}}/.lagoon.yml + src: /{{ git_repo_name }}/{{ overwrite_lagoon_yml }} + dest: /{{ git_repo_name }}/.lagoon.yml when: overwrite_lagoon_yml is defined -- name: "{{ testname }} - git adding all files from {{git_files}} to git repo {{git_repo_name}}" +- name: "{{ testname }} - git adding all files from {{ git_files }} to git repo {{ git_repo_name }}" command: git add . args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - git commit to git repo {{git_repo_name}}" +- name: "{{ testname }} - git commit to git repo {{ git_repo_name }}" command: git commit -m "push" args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - force push branch {{ branch }} to remote in git repo {{git_repo_name}}" +- name: "{{ testname }} - force push branch {{ branch }} to remote in git repo {{ git_repo_name }}" command: git push --force origin {{ branch }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - getting current head git hash in repo {{git_repo_name}}" +- name: "{{ testname }} - getting current head git hash in repo {{ git_repo_name }}" command: git rev-parse HEAD args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} register: result - set_fact: diff --git a/tests/tasks/git-empty-commit-push.yaml b/tests/tasks/git-empty-commit-push.yaml index 78a52acdd3..4ee5388b2f 100644 --- a/tests/tasks/git-empty-commit-push.yaml +++ b/tests/tasks/git-empty-commit-push.yaml @@ -1,29 +1,29 @@ - name: "{{ testname }} - make sure we are on the branch {{ branch }}" shell: git checkout -b {{ branch }} || git checkout {{ branch }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - create empty commit in {{git_repo_name}}" +- name: "{{ testname }} - create empty commit in {{ git_repo_name }}" command: git commit -m "empty commit" --allow-empty args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - getting current head git hash in repo {{git_repo_name}}" +- name: "{{ testname }} - getting current head git hash in repo {{ git_repo_name }}" command: git rev-parse HEAD args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} register: result -- name: "{{ testname }} - getting current gitbranch in repo {{git_repo_name}}" +- name: "{{ testname }} - getting current gitbranch in repo {{ git_repo_name }}" command: git symbolic-ref --short HEAD args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} register: gitbranch -- name: "{{ testname }} - force push branch {{ branch }} to remote in git repo {{git_repo_name}}" +- name: "{{ testname }} - force push branch {{ branch }} to remote in git repo {{ git_repo_name }}" command: git push --force origin {{ gitbranch.stdout }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} - set_fact: current_head: "{{ result.stdout }}" diff --git a/tests/tasks/git-init.yaml b/tests/tasks/git-init.yaml index c62c12e424..2593845d18 100644 --- a/tests/tasks/git-init.yaml +++ b/tests/tasks/git-init.yaml @@ -1,22 +1,22 @@ --- -- name: "{{ testname }} - ensure empty repo folder /{{git_repo_name}} exists" +- name: "{{ testname }} - ensure empty repo folder /{{ git_repo_name }} exists" file: state: "{{ item }}" - path: /{{git_repo_name}} + path: /{{ git_repo_name }} loop: - absent - directory - name: >- {{ testname }} - init and add remote - {{ lookup('env','GIT_REPO_PREFIX') }}{{git_repo_name}} to git repo in - {{git_repo_name}} + {{ lookup('env','GIT_REPO_PREFIX') }}{{ git_repo_name }} to git repo in + {{ git_repo_name }} command: "{{ item }}" args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} loop: - git init - >- git remote add origin - {{ lookup('env','GIT_REPO_PREFIX') }}{{git_repo_name}} + {{ lookup('env','GIT_REPO_PREFIX') }}{{ git_repo_name }} diff --git a/tests/tasks/git-skip-empty-commit-push.yaml b/tests/tasks/git-skip-empty-commit-push.yaml index d288f3f771..48986ffb00 100644 --- a/tests/tasks/git-skip-empty-commit-push.yaml +++ b/tests/tasks/git-skip-empty-commit-push.yaml @@ -1,29 +1,29 @@ - name: "{{ testname }} - make sure we are on the branch {{ branch }}" shell: git checkout -b {{ branch }} || git checkout {{ branch }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - create empty commit in {{git_repo_name}}" +- name: "{{ testname }} - create empty commit in {{ git_repo_name }}" command: git commit -m "empty commit but [skip deploy]" --allow-empty args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - getting current head git hash in repo {{git_repo_name}}" +- name: "{{ testname }} - getting current head git hash in repo {{ git_repo_name }}" command: git rev-parse HEAD args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} register: result -- name: "{{ testname }} - getting current gitbranch in repo {{git_repo_name}}" +- name: "{{ testname }} - getting current gitbranch in repo {{ git_repo_name }}" command: git symbolic-ref --short HEAD args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} register: gitbranch -- name: "{{ testname }} - force push branch {{ branch }} to remote in git repo {{git_repo_name}}" +- name: "{{ testname }} - force push branch {{ branch }} to remote in git repo {{ git_repo_name }}" command: git push --force origin {{ gitbranch.stdout }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} - set_fact: current_head: "{{ result.stdout }}" diff --git a/tests/tasks/pause.yaml b/tests/tasks/pause.yaml index 717b17f127..99ea100ad3 100644 --- a/tests/tasks/pause.yaml +++ b/tests/tasks/pause.yaml @@ -1,3 +1,3 @@ -- name: "{{ testname }} - pause for {{seconds}} seconds" +- name: "{{ testname }} - pause for {{ seconds }} seconds" pause: - seconds: "{{seconds}}" \ No newline at end of file + seconds: "{{ seconds }}" \ No newline at end of file diff --git a/tests/tasks/ssh/get-jwt-token-via-ssh.yaml b/tests/tasks/ssh/get-jwt-token-via-ssh.yaml index 0a854ead7f..393c1dd470 100644 --- a/tests/tasks/ssh/get-jwt-token-via-ssh.yaml +++ b/tests/tasks/ssh/get-jwt-token-via-ssh.yaml @@ -1,3 +1,3 @@ -- name: "{{ testname }} - getting a new login token from ssh-auth on {{ssh_host}} on port {{ssh_host}}" - command: ssh lagoon@{{ssh_host}} -p {{ssh_auth_port}} token +- name: "{{ testname }} - getting a new login token from ssh-auth on {{ ssh_host }} on port {{ ssh_auth_port }}" + command: ssh lagoon@{{ ssh_host }} -p {{ ssh_auth_port }} token register: token diff --git a/tests/tasks/ssh/get-keycloak-grant-via-ssh.yaml b/tests/tasks/ssh/get-keycloak-grant-via-ssh.yaml index 3838ff027a..56e9cb54fd 100644 --- a/tests/tasks/ssh/get-keycloak-grant-via-ssh.yaml +++ b/tests/tasks/ssh/get-keycloak-grant-via-ssh.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - getting a new keycloak grant from ssh-auth on {{ssh_host}} on port {{ssh_host}}" +- name: "{{ testname }} - getting a new keycloak grant from ssh-auth on {{ ssh_host }} on port {{ ssh_auth_port }}" block: - - command: ssh lagoon@{{ssh_host}} -p {{ssh_auth_port}} grant + - command: ssh lagoon@{{ ssh_host }} -p {{ ssh_auth_port }} grant register: grant - set_fact: token: "{{ (grant.stdout | from_json).access_token }}" diff --git a/tests/tasks/ssh/ssh-command.yaml b/tests/tasks/ssh/ssh-command.yaml index 09c62b407d..a6bb87f42d 100644 --- a/tests/tasks/ssh/ssh-command.yaml +++ b/tests/tasks/ssh/ssh-command.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - running {{command}} on {{username}}@{{ lookup('env','SSH_HOST') }} on port {{ lookup('env','SSH_PORT') }}, searching for '{{ expected_content }}'" - shell: ssh {{username}}@{{ lookup('env','SSH_HOST') }} -p {{ lookup('env','SSH_PORT') }} {{command}} +- name: "{{ testname }} - running {{ command }} on {{ username }}@{{ ssh_host }} on port {{ ssh_auth_port }}, searching for '{{ expected_content }}'" + shell: ssh {{ username }}@{{ ssh_host }} -p {{ ssh_auth_port }} {{ command }} register: result - until: result.stdout | search(expected_content) - retries: 20 + until: result.stdout is search(expected_content) + retries: 30 delay: 10 \ No newline at end of file diff --git a/tests/tasks/webhook-bitbucket/pullrequest-closed.yaml b/tests/tasks/webhook-bitbucket/pullrequest-closed.yaml index 1b1996fbb1..73a2aada39 100644 --- a/tests/tasks/webhook-bitbucket/pullrequest-closed.yaml +++ b/tests/tasks/webhook-bitbucket/pullrequest-closed.yaml @@ -1,10 +1,10 @@ -- name: "{{ testname }} - POST bitbucket pull request closed webhook with pr number {{ git_pr_number }} repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST bitbucket pull request closed webhook with pr number {{ git_pr_number }} repo {{ bitbucket_git_repo }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-Event-Key: pullrequest:fulfilled content-type: application/json method: POST follow_redirects: yes body_format: json - body: '{"pullrequest":{"merge_commit":{"hash":"e6a418ba5568","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/commit/e6a418ba5568"}}},"description":"","links":{"decline":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/decline"},"commits":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/commits"},"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2"},"comments":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/comments"},"merge":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/merge"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"activity":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/activity"},"diff":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/diff"},"approve":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/approve"},"statuses":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/statuses"}},"title":"new pull request","close_source_branch":false,"reviewers":[],"destination":{"commit":{"hash":"3dadce7","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/commit/60d8a1b9f64a"}}},"branch":{"name":"master"},"repository":{"full_name":"rtprio/testrepo","type":"repository","name":"testrepo","links":{"self":{"href":"https://172.17.0.1:2222/2.0/repositories/git/bitbucket"},"html":{"href":"https://172.17.0.1:2222/2.0/repositories/git/bitbucket"},"avatar":{"href":"https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default"}},"uuid":"{24411c7b-cb68-4d50-9a2d-969dda2e1464}"}},"comment_count":0,"closed_by":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"source":{"commit":{"hash":"658824d","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/commit/d690dfc0e7c7"}}},"branch":{"name":"pull-request"},"repository":{"full_name":"rtprio/testrepo","type":"repository","name":"testrepo","links":{"self":{"href":"https://172.17.0.1:2222/2.0/repositories/git/bitbucket"},"html":{"href":"https://172.17.0.1:2222/2.0/repositories/git/bitbucket"},"avatar":{"href":"https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default"}},"uuid":"{24411c7b-cb68-4d50-9a2d-969dda2e1464}"}},"created_on":"2018-07-27T18:18:39.856770+00:00","state":"MERGED","task_count":0,"participants":[],"reason":"","updated_on":"2018-07-27T20:29:56.934984+00:00","author":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"summary":{"raw":"","markup":"markdown","html":"","type":"rendered"},"type":"pullrequest","id":2},"actor":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"repository":{"scm":"git","website":"","name":"testrepo","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo"},"html":{"href":"https://172.17.0.1:2222/2.0/repositories/git/bitbucket"},"avatar":{"href":"https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default"}},"full_name":"git/bitbucket","owner":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/rtprio/"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"type":"repository","is_private":true,"uuid":"{24411c7b-cb68-4d50-9a2d-969dda2e1464}"}}' + body: '{"pullrequest":{"merge_commit":{"hash":"e6a418ba5568","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/commit/e6a418ba5568"}}},"description":"","links":{"decline":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/decline"},"commits":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/commits"},"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2"},"comments":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/comments"},"merge":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/merge"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"activity":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/activity"},"diff":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/diff"},"approve":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/approve"},"statuses":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/pullrequests/2/statuses"}},"title":"new pull request","close_source_branch":false,"reviewers":[],"destination":{"commit":{"hash":"3dadce7","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/commit/60d8a1b9f64a"}}},"branch":{"name":"master"},"repository":{"full_name":"rtprio/testrepo","type":"repository","name":"testrepo","links":{"self":{"href":"{{ bitbucket_git_repo }}"},"html":{"href":"{{ bitbucket_git_repo }}"},"avatar":{"href":"https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default"}},"uuid":"{24411c7b-cb68-4d50-9a2d-969dda2e1464}"}},"comment_count":0,"closed_by":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"source":{"commit":{"hash":"658824d","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo/commit/d690dfc0e7c7"}}},"branch":{"name":"pull-request"},"repository":{"full_name":"rtprio/testrepo","type":"repository","name":"testrepo","links":{"self":{"href":"{{ bitbucket_git_repo }}"},"html":{"href":"{{ bitbucket_git_repo }}"},"avatar":{"href":"https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default"}},"uuid":"{24411c7b-cb68-4d50-9a2d-969dda2e1464}"}},"created_on":"2018-07-27T18:18:39.856770+00:00","state":"MERGED","task_count":0,"participants":[],"reason":"","updated_on":"2018-07-27T20:29:56.934984+00:00","author":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"summary":{"raw":"","markup":"markdown","html":"","type":"rendered"},"type":"pullrequest","id":2},"actor":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/git/bitbucket"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"repository":{"scm":"git","website":"","name":"testrepo","links":{"self":{"href":"https://api.bitbucket.org/2.0/repositories/rtprio/testrepo"},"html":{"href":"{{ bitbucket_git_repo }}"},"avatar":{"href":"https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default"}},"full_name":"git/bitbucket","owner":{"username":"rtprio","display_name":"lagoon user","account_id":"557058:1376beb4-2683-49a8-9dc6-924faebb2666","links":{"self":{"href":"https://api.bitbucket.org/2.0/users/rtprio"},"html":{"href":"https://bitbucket.org/rtprio/"},"avatar":{"href":"https://bitbucket.org/account/rtprio/avatar/"}},"type":"user","uuid":"{e21dc300-390c-402c-ba6f-37d9f152729c}"},"type":"repository","is_private":true,"uuid":"{24411c7b-cb68-4d50-9a2d-969dda2e1464}"}}' diff --git a/tests/tasks/webhook-bitbucket/pullrequest-opened.yaml b/tests/tasks/webhook-bitbucket/pullrequest-opened.yaml index ababb697e5..a241d0b5c5 100644 --- a/tests/tasks/webhook-bitbucket/pullrequest-opened.yaml +++ b/tests/tasks/webhook-bitbucket/pullrequest-opened.yaml @@ -1,10 +1,10 @@ -- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ bitbucket_git_repo }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-Event-Key: pullrequest:created content-type: application/json method: POST follow_redirects: yes body_format: json - body: '{ "pullrequest": { "merge_commit": null, "description": "", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/merge" }, "html": { "href": "https://bitbucket.org/git/bitbucket/pull-requests/2" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/statuses" } }, "title": "new pull request", "close_source_branch": false, "reviewers": [], "destination": { "commit": { "hash": "{{ base_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/60d8a1b9f64a" } } }, "branch": { "name": "master" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "https://172.17.0.1:2222/2.0/repositories/git/bitbucket" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "comment_count": 0, "closed_by": null, "source": { "commit": { "hash": "{{ pr_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/d690dfc0e7c7" } } }, "branch": { "name": "pullrequest_pr" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "created_on": "2018-07-27T18:18:39.856770+00:00", "state": "OPEN", "task_count": 0, "participants": [], "reason": "", "updated_on": "2018-07-27T18:18:39.898027+00:00", "author": { "username": "rtprio", "display_name": "lagoon user", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "summary": { "raw": "", "markup": "markdown", "html": "", "type": "rendered" }, "type": "pullrequest", "id": 2 }, "actor": { "username": "rtprio", "display_name": "lagoon user", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "repository": { "scm": "git", "website": "", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "https://172.17.0.1:2222/2.0/repositories/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "full_name": "git/bitbucket", "owner": { "username": "rtprio", "display_name": "lagoon user", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "type": "repository", "is_private": true, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }' + body: '{ "pullrequest": { "merge_commit": null, "description": "", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/merge" }, "html": { "href": "https://bitbucket.org/git/bitbucket/pull-requests/2" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/statuses" } }, "title": "new pull request", "close_source_branch": false, "reviewers": [], "destination": { "commit": { "hash": "{{ base_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/60d8a1b9f64a" } } }, "branch": { "name": "master" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "{{ bitbucket_git_repo }}" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "comment_count": 0, "closed_by": null, "source": { "commit": { "hash": "{{ pr_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/d690dfc0e7c7" } } }, "branch": { "name": "pullrequest_pr" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "created_on": "2018-07-27T18:18:39.856770+00:00", "state": "OPEN", "task_count": 0, "participants": [], "reason": "", "updated_on": "2018-07-27T18:18:39.898027+00:00", "author": { "username": "rtprio", "display_name": "lagoon user", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "summary": { "raw": "", "markup": "markdown", "html": "", "type": "rendered" }, "type": "pullrequest", "id": 2 }, "actor": { "username": "rtprio", "display_name": "lagoon user", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "repository": { "scm": "git", "website": "", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "{{ bitbucket_git_repo }}" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "full_name": "git/bitbucket", "owner": { "username": "rtprio", "display_name": "lagoon user", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "type": "repository", "is_private": true, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }' diff --git a/tests/tasks/webhook-bitbucket/pullrequest-updated.yaml b/tests/tasks/webhook-bitbucket/pullrequest-updated.yaml index 8d0322ae15..80c5cd228f 100644 --- a/tests/tasks/webhook-bitbucket/pullrequest-updated.yaml +++ b/tests/tasks/webhook-bitbucket/pullrequest-updated.yaml @@ -1,10 +1,10 @@ -- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-Event-Key: pullrequest:updated content-type: application/json method: POST follow_redirects: yes body_format: json - body: '{ "pullrequest": { "merge_commit": null, "description": "", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/merge" }, "html": { "href": "https://bitbucket.org/git/bitbucket/pull-requests/2" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/statuses" } }, "title": "PR Title - UPDATE", "close_source_branch": false, "reviewers": [], "destination": { "commit": { "hash": "{{ base_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/60d8a1b9f64a" } } }, "branch": { "name": "master" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "https://172.17.0.1:2222/2.0/repositories/git/bitbucket" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "comment_count": 0, "closed_by": null, "source": { "commit": { "hash": "{{ pr_2nd_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/d690dfc0e7c7" } } }, "branch": { "name": "pullrequest_pr" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "created_on": "2018-07-27T18:18:39.856770+00:00", "state": "OPEN", "task_count": 0, "participants": [], "reason": "", "updated_on": "2018-07-27T18:18:39.898027+00:00", "author": { "username": "rtprio", "display_name": "Elliot Schlegelmilch", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "summary": { "raw": "", "markup": "markdown", "html": "", "type": "rendered" }, "type": "pullrequest", "id": 2 }, "actor": { "username": "rtprio", "display_name": "Elliot Schlegelmilch", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "repository": { "scm": "git", "website": "", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "https://172.17.0.1:2222/2.0/repositories/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "full_name": "git/bitbucket", "owner": { "username": "rtprio", "display_name": "Elliot Schlegelmilch", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "type": "repository", "is_private": true, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }' + body: '{ "pullrequest": { "merge_commit": null, "description": "", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/merge" }, "html": { "href": "https://bitbucket.org/git/bitbucket/pull-requests/2" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/pullrequests/2/statuses" } }, "title": "PR Title - UPDATE", "close_source_branch": false, "reviewers": [], "destination": { "commit": { "hash": "{{ base_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/60d8a1b9f64a" } } }, "branch": { "name": "master" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "{{ bitbucket_git_repo }}" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "comment_count": 0, "closed_by": null, "source": { "commit": { "hash": "{{ pr_2nd_commit_hash }}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket/commit/d690dfc0e7c7" } } }, "branch": { "name": "pullrequest_pr" }, "repository": { "full_name": "git/bitbucket", "type": "repository", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "https://bitbucket.org/git/bitbucket" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }, "created_on": "2018-07-27T18:18:39.856770+00:00", "state": "OPEN", "task_count": 0, "participants": [], "reason": "", "updated_on": "2018-07-27T18:18:39.898027+00:00", "author": { "username": "rtprio", "display_name": "Elliot Schlegelmilch", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "summary": { "raw": "", "markup": "markdown", "html": "", "type": "rendered" }, "type": "pullrequest", "id": 2 }, "actor": { "username": "rtprio", "display_name": "Elliot Schlegelmilch", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "repository": { "scm": "git", "website": "", "name": "bitbucket", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/git/bitbucket" }, "html": { "href": "{{ bitbucket_git_repo }}" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B24411c7b-cb68-4d50-9a2d-969dda2e1464%7D?ts=default" } }, "full_name": "git/bitbucket", "owner": { "username": "rtprio", "display_name": "Elliot Schlegelmilch", "account_id": "557058:1376beb4-2683-49a8-9dc6-924faebb2666", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/rtprio" }, "html": { "href": "https://bitbucket.org/rtprio/" }, "avatar": { "href": "https://bitbucket.org/account/rtprio/avatar/" } }, "type": "user", "uuid": "{e21dc300-390c-402c-ba6f-37d9f152729c}" }, "type": "repository", "is_private": true, "uuid": "{24411c7b-cb68-4d50-9a2d-969dda2e1464}" } }' diff --git a/tests/tasks/webhook-bitbucket/push-delete.yaml b/tests/tasks/webhook-bitbucket/push-delete.yaml index 095352cb85..d5932d89ed 100644 --- a/tests/tasks/webhook-bitbucket/push-delete.yaml +++ b/tests/tasks/webhook-bitbucket/push-delete.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST bitbucket push delete webhook with branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST bitbucket push delete webhook with branch {{ branch }} and repo {{ bitbucket_git_repo }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: Bitbucket-Webhooks/2.0 X-Event-Key: repo:push diff --git a/tests/tasks/webhook-bitbucket/push-skipdeploy.yaml b/tests/tasks/webhook-bitbucket/push-skipdeploy.yaml index 91cc47623c..a1a6c5b6a7 100644 --- a/tests/tasks/webhook-bitbucket/push-skipdeploy.yaml +++ b/tests/tasks/webhook-bitbucket/push-skipdeploy.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST bitbucket push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST bitbucket push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: Bitbucket-Webhooks/2.0 X-Event-Key: repo:push diff --git a/tests/tasks/webhook-bitbucket/push.yaml b/tests/tasks/webhook-bitbucket/push.yaml index 8fb7e7c5a6..d827f04515 100644 --- a/tests/tasks/webhook-bitbucket/push.yaml +++ b/tests/tasks/webhook-bitbucket/push.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST bitbucket push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST bitbucket push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: Bitbucket-Webhooks/2.0 X-Event-Key: repo:push diff --git a/tests/tasks/webhook-github/pullrequest-closed.yaml b/tests/tasks/webhook-github/pullrequest-closed.yaml index 3c600893bb..8d833b889a 100644 --- a/tests/tasks/webhook-github/pullrequest-closed.yaml +++ b/tests/tasks/webhook-github/pullrequest-closed.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST github pull request closed webhook with pr number {{ git_pr_number }} repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST github pull request closed webhook with pr number {{ git_pr_number }} repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: GitHub-Hookshot/eb03e36 X-GitHub-Event: pull_request diff --git a/tests/tasks/webhook-github/pullrequest-opened.yaml b/tests/tasks/webhook-github/pullrequest-opened.yaml index eb999674fb..9738c63d55 100644 --- a/tests/tasks/webhook-github/pullrequest-opened.yaml +++ b/tests/tasks/webhook-github/pullrequest-opened.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST github pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST github pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: GitHub-Hookshot/eb03e36 X-GitHub-Event: pull_request diff --git a/tests/tasks/webhook-github/pullrequest-synchronize.yaml b/tests/tasks/webhook-github/pullrequest-synchronize.yaml index b916f7d26b..27cc561f2d 100644 --- a/tests/tasks/webhook-github/pullrequest-synchronize.yaml +++ b/tests/tasks/webhook-github/pullrequest-synchronize.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST github pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST github pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, base commit hash {{ git_base_commit_hash }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: GitHub-Hookshot/eb03e36 X-GitHub-Event: pull_request diff --git a/tests/tasks/webhook-github/push-delete.yaml b/tests/tasks/webhook-github/push-delete.yaml index e98d793042..4eebc53171 100644 --- a/tests/tasks/webhook-github/push-delete.yaml +++ b/tests/tasks/webhook-github/push-delete.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST github push delete webhook with branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST github push delete webhook with branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: GitHub-Hookshot/eb03e36 X-GitHub-Event: push diff --git a/tests/tasks/webhook-github/push-skipdeploy.yaml b/tests/tasks/webhook-github/push-skipdeploy.yaml index e2328eb6e0..a92cfa26f4 100644 --- a/tests/tasks/webhook-github/push-skipdeploy.yaml +++ b/tests/tasks/webhook-github/push-skipdeploy.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST github push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST github push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: GitHub-Hookshot/eb03e36 X-GitHub-Event: push diff --git a/tests/tasks/webhook-github/push.yaml b/tests/tasks/webhook-github/push.yaml index 368c8e7be0..49706a7faf 100644 --- a/tests/tasks/webhook-github/push.yaml +++ b/tests/tasks/webhook-github/push.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST github push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST github push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: User-Agent: GitHub-Hookshot/eb03e36 X-GitHub-Event: push diff --git a/tests/tasks/webhook-gitlab/pullrequest-closed.yaml b/tests/tasks/webhook-gitlab/pullrequest-closed.yaml index f1de5255e4..80e9d0399f 100644 --- a/tests/tasks/webhook-gitlab/pullrequest-closed.yaml +++ b/tests/tasks/webhook-gitlab/pullrequest-closed.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST gitlab pull request merged webhook with pr number {{ git_pr_number }} repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab pull request merged webhook with pr number {{ git_pr_number }} repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-Gitlab-Event: Merge Request Hook content-type: application/json diff --git a/tests/tasks/webhook-gitlab/pullrequest-opened.yaml b/tests/tasks/webhook-gitlab/pullrequest-opened.yaml index dba8b89794..8c107957f1 100644 --- a/tests/tasks/webhook-gitlab/pullrequest-opened.yaml +++ b/tests/tasks/webhook-gitlab/pullrequest-opened.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-Gitlab-Event: Merge Request Hook content-type: application/json diff --git a/tests/tasks/webhook-gitlab/pullrequest-updated.yaml b/tests/tasks/webhook-gitlab/pullrequest-updated.yaml index 34579e8084..ee67e93cf7 100644 --- a/tests/tasks/webhook-gitlab/pullrequest-updated.yaml +++ b/tests/tasks/webhook-gitlab/pullrequest-updated.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab pull request open webhook with pr number {{ git_pr_number }}, git base branch {{ git_base_branch }}, pr branch {{ git_pr_branch }}, pr commit hash {{ git_pr_commit_hash }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-Gitlab-Event: Merge Request Hook content-type: application/json diff --git a/tests/tasks/webhook-gitlab/push-delete.yaml b/tests/tasks/webhook-gitlab/push-delete.yaml index f28560a420..d223a6ea4b 100644 --- a/tests/tasks/webhook-gitlab/push-delete.yaml +++ b/tests/tasks/webhook-gitlab/push-delete.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST gitlab push delete webhook with branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab push delete webhook with branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-GitLab-Event: Push Hook content-type: application/json diff --git a/tests/tasks/webhook-gitlab/push-skipdeploy.yaml b/tests/tasks/webhook-gitlab/push-skipdeploy.yaml index f1a100cc63..c07f4dec5f 100644 --- a/tests/tasks/webhook-gitlab/push-skipdeploy.yaml +++ b/tests/tasks/webhook-gitlab/push-skipdeploy.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST gitlab push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-GitLab-Event: "Push Hook" content-type: application/json diff --git a/tests/tasks/webhook-gitlab/push.yaml b/tests/tasks/webhook-gitlab/push.yaml index fe3fb5c99d..30b3388591 100644 --- a/tests/tasks/webhook-gitlab/push.yaml +++ b/tests/tasks/webhook-gitlab/push.yaml @@ -1,6 +1,6 @@ -- name: "{{ testname }} - POST gitlab push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" +- name: "{{ testname }} - POST gitlab push webhook with target git hash {{ git_hash_push }}, branch {{ branch }} and repo {{ git_repo_ssh_url }} to {{ webhook_url }}" uri: - url: "{{ lookup('env','WEBHOOK_PROTOCOL') }}://{{ lookup('env','WEBHOOK_HOST') }}:{{ lookup('env','WEBHOOK_PORT') }}" + url: "{{ webhook_url }}" headers: X-GitLab-Event: "Push Hook" content-type: application/json diff --git a/tests/tests/active-standby-kubernetes.yaml b/tests/tests/active-standby-kubernetes.yaml index 8744e3e42a..4c019c55a3 100644 --- a/tests/tests/active-standby-kubernetes.yaml +++ b/tests/tests/active-standby-kubernetes.yaml @@ -8,7 +8,7 @@ vars: testname: "ACTIVE_STANDBY" git_repo_name: active-standby.git - project: ci-active-standby-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-active-standby-{{ cluster_type }} branch: master-a standby_branch: master-b error_code_check: 404 \ No newline at end of file diff --git a/tests/tests/active-standby-openshift.yaml b/tests/tests/active-standby-openshift.yaml index ee121caf3e..e538b2fa71 100644 --- a/tests/tests/active-standby-openshift.yaml +++ b/tests/tests/active-standby-openshift.yaml @@ -8,7 +8,7 @@ vars: testname: "ACTIVE_STANDBY" git_repo_name: active-standby.git - project: ci-active-standby-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-active-standby-{{ cluster_type }} branch: master-a standby_branch: master-b error_code_check: 503 \ No newline at end of file diff --git a/tests/tests/active-standby/active-standby.yaml b/tests/tests/active-standby/active-standby.yaml index 92ffdb6c56..c2df976242 100644 --- a/tests/tests/active-standby/active-standby.yaml +++ b/tests/tests/active-standby/active-standby.yaml @@ -75,8 +75,8 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{error_code_check}}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ error_code_check }}" tasks: - include: ../../checks/check-url-returncode.yaml @@ -84,7 +84,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{error_code_check}}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ error_code_check }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/active-standby/deploy-active-standby.yaml b/tests/tests/active-standby/deploy-active-standby.yaml index f7cc1aca48..7f55ed9a0b 100644 --- a/tests/tests/active-standby/deploy-active-standby.yaml +++ b/tests/tests/active-standby/deploy-active-standby.yaml @@ -1,9 +1,9 @@ -- name: "{{ testname }} - POST api switchActiveStandby with target project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api switchActiveStandby with target project {{ project }} (no sha) to {{ graphql_url }}" block: - include: ../../tasks/api/refresh-token.yaml - - name: "{{ testname }} - POST api switchActiveStandby with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api switchActiveStandby with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" @@ -11,22 +11,34 @@ body: '{ "query": "mutation($projectName: String!) {switchActiveStandby(input:{project:{name:$projectName}}){id}}", "variables": {"projectName":"{{ project }}"}}' register: apiresponse until: - - name: "{{ testname }} - POST api switchActiveStandby with target project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api switchActiveStandby with target project {{ project }} (no sha) to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" - - name: "{{ testname }} - POST api taskById with ID {{ apiresponse.json.data.switchActiveStandby.id }} for migration status to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api taskById with ID {{ apiresponse.json.data.switchActiveStandby.id }} for migration status to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "query($id: Int!) {taskById(id: $id){status}}", "variables": {"id":{{ apiresponse.json.data.switchActiveStandby.id }}}}' register: taskresult - until: taskresult.json.data.taskById.status == "succeeded" or taskresult.json.data.taskById.status == "failed" - retries: 10 - delay: 5 + until: taskresult.json.data is defined and (taskresult.json.data.taskById.status == "succeeded" or taskresult.json.data.taskById.status == "failed") + retries: 30 + delay: 10 - name: "{{ testname }} - fail if task fails" fail: msg: "The route migration failed for some reason" - when: taskresult.json.data.taskById.status == "failed" \ No newline at end of file + when: taskresult.json.data.taskById.status == "failed" + - name: "{{ testname }} - POST api projectByName with project {{ project }} for final migration status to {{ graphql_url }}" + uri: + url: "{{ graphql_url }}" + method: POST + headers: + Authorization: "Bearer {{ token }}" + body_format: json + body: '{ "query": "query($projectName: String!) {projectByName(name:$projectName){productionEnvironment,standbyProductionEnvironment}}", "variables": {"projectName":"{{ project }}"}}' + register: switchresult + until: switchresult.json.data.projectByName.productionEnvironment == standby_branch or switchresult.json.data.projectByName.standbyProductionEnvironment == branch + retries: 30 + delay: 10 \ No newline at end of file diff --git a/tests/tests/active-standby/deploy-no-sha.yaml b/tests/tests/active-standby/deploy-no-sha.yaml index 83a5824bd2..4088918f3d 100644 --- a/tests/tests/active-standby/deploy-no-sha.yaml +++ b/tests/tests/active-standby/deploy-no-sha.yaml @@ -1,15 +1,15 @@ -- name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ graphql_url }}" block: - include: ../../tasks/api/refresh-token.yaml - - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($branchName: String!, $projectName: String!) {deployEnvironmentBranch(input:{branchName:$branchName,project:{name:$projectName}})}", "variables": {"branchName":"{{ standby_branch }}","projectName":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" diff --git a/tests/tests/active-standby/git-add-commit-push.yaml b/tests/tests/active-standby/git-add-commit-push.yaml index 3efe74c5ae..29a49f6e21 100644 --- a/tests/tests/active-standby/git-add-commit-push.yaml +++ b/tests/tests/active-standby/git-add-commit-push.yaml @@ -1,44 +1,44 @@ -- name: "{{ testname }} - create new branch {{ standby_branch }} in {{git_repo_name}}" +- name: "{{ testname }} - create new branch {{ standby_branch }} in {{ git_repo_name }}" shell: git checkout -b {{ standby_branch }} || git checkout {{ standby_branch }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - copying all files from {{git_files}} into git repo {{git_repo_name}}" +- name: "{{ testname }} - copying all files from {{ git_files }} into git repo {{ git_repo_name }}" synchronize: - src: /ansible/files/{{git_files}} - dest: /{{git_repo_name}}/ + src: /ansible/files/{{ git_files }} + dest: /{{ git_repo_name }}/ -- name: "{{ testname }} - copying all files from {{docker_files}} into git repo {{git_repo_name}}" +- name: "{{ testname }} - copying all files from {{ docker_files }} into git repo {{ git_repo_name }}" copy: - src: /ansible/files/{{docker_files}} - dest: /{{git_repo_name}}/ + src: /ansible/files/{{ docker_files }} + dest: /{{ git_repo_name }}/ when: docker_files is defined - name: "{{ testname }} - removing cronjobs from .lagoon.yml" copy: - src: /{{git_repo_name}}/{{overwrite_lagoon_yml}} - dest: /{{git_repo_name}}/.lagoon.yml + src: /{{ git_repo_name }}/{{ overwrite_lagoon_yml }} + dest: /{{ git_repo_name }}/.lagoon.yml when: overwrite_lagoon_yml is defined -- name: "{{ testname }} - git adding all files from {{git_files}} to git repo {{git_repo_name}}" +- name: "{{ testname }} - git adding all files from {{ git_files }} to git repo {{ git_repo_name }}" command: git add . args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - git commit to git repo {{git_repo_name}}" +- name: "{{ testname }} - git commit to git repo {{ git_repo_name }}" command: git commit -m "push" args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - force push branch {{ standby_branch }} to remote in git repo {{git_repo_name}}" +- name: "{{ testname }} - force push branch {{ standby_branch }} to remote in git repo {{ git_repo_name }}" command: git push --force origin {{ standby_branch }} args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} -- name: "{{ testname }} - getting current head git hash in repo {{git_repo_name}}" +- name: "{{ testname }} - getting current head git hash in repo {{ git_repo_name }}" command: git rev-parse HEAD args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} register: result - set_fact: diff --git a/tests/tests/active-standby/post-switch-check.yaml b/tests/tests/active-standby/post-switch-check.yaml index 7c9137159b..41410f0152 100644 --- a/tests/tests/active-standby/post-switch-check.yaml +++ b/tests/tests/active-standby/post-switch-check.yaml @@ -2,7 +2,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - include: ../../checks/check-url-content.yaml @@ -11,7 +11,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Standby Hello World!" tasks: - include: ../../checks/check-url-content.yaml @@ -20,7 +20,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "active-moving-route.com" expected_content: "Standby Hello World!" tasks: @@ -30,7 +30,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "standby-moving-route.com" expected_content: "Hello World!" tasks: diff --git a/tests/tests/active-standby/pre-switch-check.yaml b/tests/tests/active-standby/pre-switch-check.yaml index 44c8f368ff..07d648e010 100644 --- a/tests/tests/active-standby/pre-switch-check.yaml +++ b/tests/tests/active-standby/pre-switch-check.yaml @@ -2,7 +2,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - include: ../../checks/check-url-content.yaml @@ -11,7 +11,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Standby Hello World!" tasks: - include: ../../checks/check-url-content.yaml @@ -20,7 +20,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "active-moving-route.com" expected_content: "Hello World!" tasks: @@ -30,7 +30,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "standby-moving-route.com" expected_content: "Standby Hello World!" tasks: diff --git a/tests/tests/active-standby/remove.yaml b/tests/tests/active-standby/remove.yaml index ffcbbcc99f..4c2322c9e5 100644 --- a/tests/tests/active-standby/remove.yaml +++ b/tests/tests/active-standby/remove.yaml @@ -1,39 +1,39 @@ -- name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ standby_branch }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" +- name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ standby_branch }} to {{ graphql_url }}" block: - include: ../../tasks/api/refresh-token.yaml - - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ standby_branch }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ standby_branch }} to {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($name: String!, $project: String!) {deleteEnvironment(input:{name:$name,project:$project})}", "variables": {"name":"{{ standby_branch }}","project":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ standby_branch }} to {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ standby_branch }} to {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" - - name: "{{ testname }} - POST api get project id {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api get project id {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "query($projectName: String!) {projectByName(name:$projectName){id}}", "variables": {"projectName":"{{ project }}"}}' register: apiresponse - - name: "{{ testname }} - POST api get project id {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api get project id {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" - - name: "{{ testname }} - POST api updateProject {{ apiresponse.json.data.projectByName.id }} to reset production and standby {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api updateProject {{ apiresponse.json.data.projectByName.id }} to reset production and standby {{ graphql_url }}" uri: - url: "{{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + url: "{{ graphql_url }}" method: POST headers: Authorization: "Bearer {{ token }}" body_format: json body: '{ "query": "mutation($projectId: Int!) {updateProject(input:{id:$projectId,patch:{productionEnvironment:\"master-a\",standbyProductionEnvironment:\"master-b\"}}){name,productionEnvironment,standbyProductionEnvironment}}","variables": {"projectId":{{ apiresponse.json.data.projectByName.id }}}}' register: apiresponse - - name: "{{ testname }} - POST api updateProject to reset production and standby {{ lookup('env','API_PROTOCOL') }}://{{ lookup('env','API_HOST') }}:{{ lookup('env','API_PORT') }}/graphql" + - name: "{{ testname }} - POST api updateProject to reset production and standby {{ graphql_url }}" debug: msg: "api response: {{ apiresponse.json }}" \ No newline at end of file diff --git a/tests/tests/api.yaml b/tests/tests/api.yaml index 7f80fa48b2..bea5db85fe 100644 --- a/tests/tests/api.yaml +++ b/tests/tests/api.yaml @@ -6,17 +6,17 @@ - include: api/deploy-pullrequest.yaml vars: - testname: "API {{ lookup('env','CLUSTER_TYPE')|upper }} - deploy pullrequest" + testname: "API {{ cluster_type|upper }} - deploy pullrequest" node_version: 10 git_repo_name: api.git - project: ci-api-{{ lookup('env','CLUSTER_TYPE') }} - check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + project: ci-api-{{ cluster_type }} + check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ route_suffix }}" - include: api/deploy-branch.yaml vars: - testname: "API {{ lookup('env','CLUSTER_TYPE')|upper }} - deploy regular branch" + testname: "API {{ cluster_type|upper }} - deploy regular branch" node_version: 10 git_repo_name: api.git - project: ci-api-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-api-{{ cluster_type }} branch: api/slash/branch - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" diff --git a/tests/tests/api/deploy-branch.yaml b/tests/tests/api/deploy-branch.yaml index b957cdb48d..004baf7d93 100644 --- a/tests/tests/api/deploy-branch.yaml +++ b/tests/tests/api/deploy-branch.yaml @@ -102,7 +102,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/api/deploy-pullrequest.yaml b/tests/tests/api/deploy-pullrequest.yaml index 6e0387c92d..3da54ead88 100644 --- a/tests/tests/api/deploy-pullrequest.yaml +++ b/tests/tests/api/deploy-pullrequest.yaml @@ -39,19 +39,12 @@ git_base_commit_hash: "{{ base_commit_hash }}" git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_commit_hash }}" - git_pr_number: "1" + git_pr_number: 1 git_pr_title: "PR Title" tasks: - include: ../../tasks/api/pullrequest-deploy.yaml -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_commit_hash }}" - expected_branch: "pr-1" - project: "{{ project }}" - url: "{{ check_url }}" - - include: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" @@ -85,18 +78,11 @@ git_base_commit_hash: "{{ base_commit_hash }}" git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_2nd_commit_hash }}" - git_pr_number: "1" + git_pr_number: 1 git_pr_title: "PR Title - UPDATE" tasks: - include: ../../tasks/api/pullrequest-deploy.yaml -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_2nd_commit_hash }}" - expected_branch: "pr-1" - project: "{{ project }}" - url: "{{ check_url }}" - - include: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" @@ -121,6 +107,6 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/bitbucket.yaml b/tests/tests/bitbucket.yaml index ba3c09f461..60891de795 100644 --- a/tests/tests/bitbucket.yaml +++ b/tests/tests/bitbucket.yaml @@ -1,30 +1,35 @@ --- - include: bitbucket/branch.yaml vars: - testname: "BITBUCKET {{ lookup('env','CLUSTER_TYPE')|upper }} - slash branch" + testname: "BITBUCKET {{ cluster_type|upper }} - slash branch" node_version: 10 git_repo_name: bitbucket.git - git_repo_url: https://172.17.0.1:2222/git/bitbucket git_repo_full_name: git/bitbucket - project: ci-bitbucket-{{ lookup('env','CLUSTER_TYPE') }} + git_repo_url: "http://{{ lookup('env','GIT_HOST') }}:{{ lookup('env','GIT_PORT') }}/git/bitbucket" + bitbucket_git_repo: "http://{{ lookup('env','GIT_HOST') }}:{{ lookup('env','GIT_PORT') }}/2.0/repositories/git/bitbucket" + project: ci-bitbucket-{{ cluster_type }} branch: bitbucket/slash/branch - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: github/skip-deployment.yaml vars: - testname: "BITBUCKET {{ lookup('env','CLUSTER_TYPE')|upper }} - skip deployment" + testname: "BITBUCKET {{ cluster_type|upper }} - skip deployment" node_version: 10 git_repo_name: bitbucket.git - git_repo_url: https://172.17.0.1:2222/git/bitbucket git_repo_full_name: git/bitbucket - project: ci-bitbucket-{{ lookup('env','CLUSTER_TYPE') }} + git_repo_url: "http://{{ lookup('env','GIT_HOST') }}:{{ lookup('env','GIT_PORT') }}/git/bitbucket" + bitbucket_git_repo: "http://{{ lookup('env','GIT_HOST') }}:{{ lookup('env','GIT_PORT') }}/2.0/repositories/git/bitbucket" + project: ci-bitbucket-{{ cluster_type }} branch: skip - check_url: "http://node.{{ project | regex_replace('_', '-') }}.skip.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.skip.{{ route_suffix }}" - include: bitbucket/pullrequest.yaml vars: - testname: "BITBUCKET {{ lookup('env','CLUSTER_TYPE')|upper }} - PULLREQUEST" + testname: "BITBUCKET {{ cluster_type|upper }} - PULLREQUEST" node_version: 10 git_repo_name: bitbucket.git - project: ci-bitbucket-{{ lookup('env','CLUSTER_TYPE') }} - check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-2.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + git_repo_full_name: git/bitbucket + git_repo_url: "http://{{ lookup('env','GIT_HOST') }}:{{ lookup('env','GIT_PORT') }}/git/bitbucket" + bitbucket_git_repo: "http://{{ lookup('env','GIT_HOST') }}:{{ lookup('env','GIT_PORT') }}/2.0/repositories/git/bitbucket" + project: ci-bitbucket-{{ cluster_type }} + check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-2.{{ route_suffix }}" diff --git a/tests/tests/bitbucket/branch.yaml b/tests/tests/bitbucket/branch.yaml index a693d8da97..b5c66f908a 100644 --- a/tests/tests/bitbucket/branch.yaml +++ b/tests/tests/bitbucket/branch.yaml @@ -13,7 +13,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/push.yaml @@ -36,7 +36,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/push.yaml @@ -67,7 +67,7 @@ serial: 1 vars: git_hash_push: "{{ third_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/push.yaml @@ -82,7 +82,7 @@ hosts: localhost serial: 1 vars: - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/push-delete.yaml @@ -90,7 +90,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml \ No newline at end of file diff --git a/tests/tests/bitbucket/pullrequest.yaml b/tests/tests/bitbucket/pullrequest.yaml index 034fa634cb..1605f65475 100644 --- a/tests/tests/bitbucket/pullrequest.yaml +++ b/tests/tests/bitbucket/pullrequest.yaml @@ -40,18 +40,17 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_commit_hash }}" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "pr-2" tasks: - include: ../../tasks/webhook-bitbucket/pullrequest-opened.yaml - -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_commit_hash }}" - expected_branch: "pr-2" - project: "{{ project }}" - url: "{{ check_url }}" +# - include: ../../checks/check-branch-sha.yaml +# vars: +# expected_head: "{{ pr_commit_hash }}" +# expected_branch: "pr-2" +# project: "{{ project }}" +# url: "{{ check_url }}" - include: ../../checks/check-pullrequest.yaml vars: @@ -87,17 +86,17 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_2nd_commit_hash }}" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "PR Title - UPDATE" tasks: - include: ../../tasks/webhook-bitbucket/pullrequest-updated.yaml -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_2nd_commit_hash }}" - expected_branch: "pr-2" - project: "{{ project }}" - url: "{{ check_url }}" +# - include: ../../checks/check-branch-sha.yaml +# vars: +# expected_head: "{{ pr_2nd_commit_hash }}" +# expected_branch: "pr-2" +# project: "{{ project }}" +# url: "{{ check_url }}" - include: ../../checks/check-pullrequest.yaml vars: @@ -118,7 +117,7 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "00000" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/pullrequest-closed.yaml @@ -127,6 +126,6 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/bitbucket/skip-deployment.yaml b/tests/tests/bitbucket/skip-deployment.yaml index 090a2f1247..a459db9947 100644 --- a/tests/tests/bitbucket/skip-deployment.yaml +++ b/tests/tests/bitbucket/skip-deployment.yaml @@ -15,7 +15,7 @@ serial: 1 vars: git_hash_push: "{{ first_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/push.yaml @@ -40,7 +40,7 @@ serial: 1 vars: git_hash_push: "{{ second_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/push-skipdeploy.yaml @@ -63,7 +63,7 @@ hosts: localhost serial: 1 vars: - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-bitbucket/push-delete.yaml @@ -71,7 +71,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml \ No newline at end of file diff --git a/tests/tests/drupal-php72.yaml b/tests/tests/drupal-php72.yaml new file mode 100644 index 0000000000..86129b92e2 --- /dev/null +++ b/tests/tests/drupal-php72.yaml @@ -0,0 +1,25 @@ +--- + +- include: features/api-token.yaml + vars: + testname: "API TOKEN" + +- include: drupal/drupal.yaml + vars: + testname: "Drupal 8 composer PHP 7.2 - MARIADB SINGLE {{ cluster_type|upper }}" + drupal_version: 8 + db: mariadb-single + php_version: 7.2 + git_repo_name: drupal.git + project: ci-drupal-{{ cluster_type }} + branch: drupal8-composer-72-mariadb-single + +- include: drupal/drupal.yaml + vars: + testname: "Drupal 8 composer PHP 7.2 - MARIADB DBAAS {{ cluster_type|upper }}" + drupal_version: 8 + db: mariadb + php_version: 7.2 + git_repo_name: drupal.git + project: ci-drupal-{{ cluster_type }} + branch: drupal8-composer-72-mariadb-dbaas diff --git a/tests/tests/drupal-php73.yaml b/tests/tests/drupal-php73.yaml new file mode 100644 index 0000000000..0002005e2e --- /dev/null +++ b/tests/tests/drupal-php73.yaml @@ -0,0 +1,24 @@ +--- + +- include: features/api-token.yaml + vars: + testname: "API TOKEN" + +- include: drupal/drupal.yaml + vars: + testname: "Drupal 8 composer PHP 7.3 - MARIADB SINGLE {{ cluster_type|upper }}" + drupal_version: 8 + db: mariadb-single + php_version: 7.3 + git_repo_name: drupal.git + project: ci-drupal-{{ cluster_type }} + branch: drupal8-composer-73-mariadb-single + +- include: drupal/drush.yaml + vars: + testname: "DRUSH {{ cluster_type|upper }}" + drupal_version: 8 + db: mariadb + php_version: 7.3 + git_repo_name: drupal.git + project: ci-drupal-{{ cluster_type }} diff --git a/tests/tests/drupal-php74.yaml b/tests/tests/drupal-php74.yaml new file mode 100644 index 0000000000..b0b8a22452 --- /dev/null +++ b/tests/tests/drupal-php74.yaml @@ -0,0 +1,25 @@ +--- + +- include: features/api-token.yaml + vars: + testname: "API TOKEN" + +- include: drupal/drupal.yaml + vars: + testname: "Drupal 8 composer PHP 7.4 - MARIADB DBAAS {{ cluster_type|upper }}" + drupal_version: 8 + db: mariadb + php_version: 7.4 + git_repo_name: drupal.git + project: ci-drupal-{{ cluster_type }} + branch: drupal8-composer-74-mariadb-dbaas + +- include: drupal/drupal.yaml + vars: + testname: "Drupal 9 composer PHP 7.4 - MARIADB DBAAS {{ cluster_type|upper }}" + drupal_version: 9 + db: mariadb + php_version: 7.4 + git_repo_name: drupal.git + project: ci-drupal-{{ cluster_type }} + branch: drupal9-composer-74-mariadb-dbaas diff --git a/tests/tests/drupal-postgres.yaml b/tests/tests/drupal-postgres.yaml index 255c693e77..5354280995 100644 --- a/tests/tests/drupal-postgres.yaml +++ b/tests/tests/drupal-postgres.yaml @@ -6,10 +6,20 @@ - include: drupal/drupal.yaml vars: - testname: "Drupal 8 composer PHP 7.2 - POSTGRES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "Drupal 8 composer PHP 7.4 - POSTGRES SINGLE {{ cluster_type|upper }}" + drupal_version: 8 + db: postgres-single + php_version: 7.4 + git_repo_name: drupal-postgres.git + project: ci-drupal-postgres-{{ cluster_type }} + branch: d8-php74-psql-single + +- include: drupal/drupal.yaml + vars: + testname: "Drupal 8 composer PHP 7.4 - POSTGRES DBAAS {{ cluster_type|upper }}" drupal_version: 8 db: postgres - php_version: 7.2 + php_version: 7.4 git_repo_name: drupal-postgres.git - project: ci-drupal-postgres-{{ lookup('env','CLUSTER_TYPE') }} - branch: drupal8-composer-72-postgres + project: ci-drupal-postgres-{{ cluster_type }} + branch: d8-php74-psql-dbaas \ No newline at end of file diff --git a/tests/tests/drupal.yaml b/tests/tests/drupal.yaml deleted file mode 100644 index 6d4d4376dc..0000000000 --- a/tests/tests/drupal.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- - -- include: features/api-token.yaml - vars: - testname: "API TOKEN" - -- include: drupal/drupal.yaml - vars: - testname: "Drupal 8 composer PHP 7.2 - MARIADB SINGLE {{ lookup('env','CLUSTER_TYPE')|upper }}" - drupal_version: 8 - db: mariadb-single - php_version: 7.2 - git_repo_name: drupal.git - project: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }} - branch: drupal8-composer-72-mariadb-single - -- include: drupal/drupal.yaml - vars: - testname: "Drupal 8 composer PHP 7.2 - MARIADB DBAAAS {{ lookup('env','CLUSTER_TYPE')|upper }}" - drupal_version: 8 - db: mariadb - php_version: 7.2 - git_repo_name: drupal.git - project: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }} - branch: drupal8-composer-72-mariadb-dbaas - -- include: drupal/drupal.yaml - vars: - testname: "Drupal 8 composer PHP 7.3 - MARIADB DBAAAS {{ lookup('env','CLUSTER_TYPE')|upper }}" - drupal_version: 8 - db: mariadb - php_version: 7.3 - git_repo_name: drupal.git - project: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }} - branch: drupal8-composer-73-mariadb-dbaas - -- include: drupal/drupal.yaml - vars: - testname: "Drupal 8 composer PHP 7.4 - MARIADB DBAAAS {{ lookup('env','CLUSTER_TYPE')|upper }}" - drupal_version: 8 - db: mariadb - php_version: 7.4 - git_repo_name: drupal.git - project: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }} - branch: drupal8-composer-74-mariadb-dbaas - -- include: drupal/drupal.yaml - vars: - testname: "Drupal 9 composer PHP 7.4 - MARIADB DBAAAS {{ lookup('env','CLUSTER_TYPE')|upper }}" - drupal_version: 9 - db: mariadb - php_version: 7.4 - git_repo_name: drupal.git - project: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }} - branch: drupal9-composer-74-mariadb-dbaas - -- include: drupal/drush.yaml - vars: - testname: "DRUSH {{ lookup('env','CLUSTER_TYPE')|upper }}" - drupal_version: 8 - db: mariadb - php_version: 7.3 - git_repo_name: drupal.git - project: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }} diff --git a/tests/tests/drupal/check-deployed.yaml b/tests/tests/drupal/check-deployed.yaml index 93df8520ae..b462783acb 100644 --- a/tests/tests/drupal/check-deployed.yaml +++ b/tests/tests/drupal/check-deployed.yaml @@ -2,7 +2,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_SHA={{ expected_head }}" tasks: - include: ../../checks/check-url-content.yaml @@ -11,7 +11,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_BRANCH={{ expected_branch }}" tasks: - include: ../../checks/check-url-content.yaml @@ -20,7 +20,7 @@ hosts: localhost serial: 1 vars: - url: "http://varnish.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://varnish.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_SHA={{ expected_head }}" tasks: - include: ../../checks/check-url-content.yaml @@ -29,7 +29,7 @@ hosts: localhost serial: 1 vars: - url: "http://varnish.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://varnish.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_BRANCH={{ expected_branch }}" tasks: - include: ../../checks/check-url-content.yaml diff --git a/tests/tests/drupal/drupal.yaml b/tests/tests/drupal/drupal.yaml index e7ef5bda77..7d0039b23a 100644 --- a/tests/tests/drupal/drupal.yaml +++ b/tests/tests/drupal/drupal.yaml @@ -60,7 +60,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/drupal/drush.yaml b/tests/tests/drupal/drush.yaml index 2301888615..0788dc0062 100644 --- a/tests/tests/drupal/drush.yaml +++ b/tests/tests/drupal/drush.yaml @@ -61,7 +61,7 @@ serial: 1 vars: username: lagoon - command: rsh ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first env + command: rsh ci-drupal-{{ cluster_type }}-drush-first env expected_content: LAGOON_PROJECT=ci-drupal tasks: - include: ../../tasks/ssh/ssh-command.yaml @@ -70,7 +70,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first + username: ci-drupal-{{ cluster_type }}-drush-first command: env expected_content: LAGOON=cli-drupal tasks: @@ -80,7 +80,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first + username: ci-drupal-{{ cluster_type }}-drush-first command: service=nginx container=php env expected_content: LAGOON=php tasks: @@ -90,7 +90,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first + username: ci-drupal-{{ cluster_type }}-drush-first command: drush sa expected_content: "@drush-second" tasks: @@ -100,7 +100,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first + username: ci-drupal-{{ cluster_type }}-drush-first command: drush @drush-second -y cset system.site name "CHANGED-{{ random_number }}" expected_content: "" tasks: @@ -112,7 +112,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first + username: ci-drupal-{{ cluster_type }}-drush-first command: drush @drush-second -y cget system.site name expected_content: "CHANGED-{{ random_number }}" tasks: @@ -122,7 +122,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ route_suffix }}" expected_content: "CHANGED-{{ random_number }}" tasks: - include: ../../checks/check-url-content.yaml @@ -131,7 +131,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first + username: ci-drupal-{{ cluster_type }}-drush-first command: drush -y sql-sync @drush-second @self expected_content: "" tasks: @@ -141,7 +141,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first + username: ci-drupal-{{ cluster_type }}-drush-first command: drush -y cget system.site name expected_content: "CHANGED-{{ random_number }}" tasks: @@ -151,7 +151,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ route_suffix }}" expected_content: "CHANGED-{{ random_number }}" tasks: - include: ../../checks/check-url-content.yaml @@ -178,8 +178,8 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml @@ -187,8 +187,8 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml @@ -225,7 +225,7 @@ hosts: localhost serial: 1 vars: - username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-foo-bar + username: ci-drupal-{{ cluster_type }}-foo-bar command: drush @foo-bar ssh echo zzyzx expected_content: "zzyzx" tasks: @@ -244,7 +244,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.foo-bar.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.foo-bar.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml \ No newline at end of file diff --git a/tests/tests/elasticsearch.yaml b/tests/tests/elasticsearch.yaml index a25f1e6ce1..c3bc6c428b 100644 --- a/tests/tests/elasticsearch.yaml +++ b/tests/tests/elasticsearch.yaml @@ -6,18 +6,18 @@ - include: elasticsearch/elasticsearch.yaml vars: - testname: "ELASTICSEARCH SINGLE NODE {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "ELASTICSEARCH SINGLE NODE {{ cluster_type|upper }}" git_repo_name: elasticsearch.git - project: ci-elasticsearch-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-elasticsearch-{{ cluster_type }} branch: elasticsearch - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}/_cluster/health" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/_cluster/health" node_count: 1 -- include: elasticsearch/elasticsearch.yaml - vars: - testname: "ELASTICSEARCH CLUSTER {{ lookup('env','CLUSTER_TYPE')|upper }}" - git_repo_name: elasticsearch.git - project: ci-elasticsearch-{{ lookup('env','CLUSTER_TYPE') }} - branch: elasticsearch-cluster - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}/_cluster/health" - node_count: 3 +# - include: elasticsearch/elasticsearch.yaml +# vars: +# testname: "ELASTICSEARCH CLUSTER {{ cluster_type|upper }}" +# git_repo_name: elasticsearch.git +# project: ci-elasticsearch-{{ cluster_type }} +# branch: elasticsearch-cluster +# url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/_cluster/health" +# node_count: 3 diff --git a/tests/tests/elasticsearch/elasticsearch.yaml b/tests/tests/elasticsearch/elasticsearch.yaml index cf77e0de00..6e54469715 100644 --- a/tests/tests/elasticsearch/elasticsearch.yaml +++ b/tests/tests/elasticsearch/elasticsearch.yaml @@ -42,7 +42,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features-kubernetes.yaml b/tests/tests/features-kubernetes.yaml index 0801677d4c..fd62a30d02 100644 --- a/tests/tests/features-kubernetes.yaml +++ b/tests/tests/features-kubernetes.yaml @@ -4,153 +4,174 @@ vars: testname: "API TOKEN" +- include: features/fastly-annotations.yaml + vars: + testname: "FASTLY ANNOTATIONS {{ cluster_type|upper }}" + git_repo_name: features.git + project: ci-features-{{ cluster_type }} + branch: fastly-annotations + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + - include: features/lagoon-type-override.yaml vars: - testname: "LAGOON TYPE OVERRIDE {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "LAGOON TYPE OVERRIDE {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: lagoon-type-override - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/ingress-annotations.yaml vars: - testname: "INGRESS ANNOTATIONS {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "INGRESS ANNOTATIONS {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: ingress-annotations + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + +- include: features/short-router-url.yaml + vars: + testname: "SHORT ROUTER URL {{ cluster_type|upper }}" + git_repo_name: features.git + project: ci-features-{{ cluster_type }} + branch: short-router-url-from-a-very-long-environment-name-like-this + # lagoon_environment is truncated for very long branches. + # See commons/src/tasks.ts + lagoon_environment: short-router-url-from-a-very-l-ebe8 + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/namespace-labels.yaml vars: - testname: "NAMESPACE LABELS {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "NAMESPACE LABELS {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: namespace-labels - include: features/remote-shell.yaml vars: - testname: "REMOTE SHELL {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "REMOTE SHELL {{ cluster_type|upper }}" node_version: 10 git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: remoteshell + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: features/promote.yaml -# vars: -# testname: "PROMOTE {{ lookup('env','CLUSTER_TYPE')|upper }}" -# git_repo_name: features.git -# project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} -# source_environment: source -# promote_environment: target -# check_url_source: "https://node.{{ project | regex_replace('_', '-') }}.{{ source_environment | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" -# check_url_promote: "https://node.{{ project | regex_replace('_', '-') }}.{{ promote_environment | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" +- include: features/promote.yaml + vars: + testname: "PROMOTE {{ cluster_type|upper }}" + git_repo_name: features.git + project: ci-features-{{ cluster_type }} + source_environment: source + promote_environment: target + check_url_source: "https://node.{{ project | regex_replace('_', '-') }}.{{ source_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" + check_url_promote: "https://node.{{ project | regex_replace('_', '-') }}.{{ promote_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" - include: features/cronjobs.yaml vars: - testname: "CRONJOBS {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "CRONJOBS {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch/cronjob - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/multiproject.yaml vars: - testname: "MULTIPROJECT {{ lookup('env','CLUSTER_TYPE')|upper }} - two projects with same git url" + testname: "MULTIPROJECT {{ cluster_type|upper }} - two projects with same git url" git_repo_name: multiproject.git - project1: ci-multiproject1-{{ lookup('env','CLUSTER_TYPE') }} - project2: ci-multiproject2-{{ lookup('env','CLUSTER_TYPE') }} + project1: ci-multiproject1-{{ cluster_type }} + project2: ci-multiproject2-{{ cluster_type }} branch: multiproject - check_url1: "https://node.{{ project1 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" - check_url2: "https://node.{{ project2 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + check_url1: "https://node.{{ project1 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" + check_url2: "https://node.{{ project2 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" custom_domain1: "multiproject1.com" custom_domain2: "multiproject2.com" # - include: features/openshift-limit.yaml # vars: -# testname: "openshift-character-limit {{ lookup('env','CLUSTER_TYPE')|upper }}" +# testname: "openshift-character-limit {{ cluster_type|upper }}" # node_version: 10 # git_repo_name: features.git -# project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} +# project: ci-features-{{ cluster_type }} # branch: very-long-branch-name-what-would-otherwise-overflow-the-sixty-three-limit # # not going to try hashing something in yaml. -# check_url: "http://node.{{ project | regex_replace('_', '-') }}.very-long-branch-name-what-would-otherwise-aae9.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" +# check_url: "http://node.{{ project | regex_replace('_', '-') }}.very-long-branch-name-what-would-otherwise-aae9.{{ route_suffix }}" - include: features/environment-type.yaml vars: - testname: "ENVIRONMENT TYPE DEVELOPMENT {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "ENVIRONMENT TYPE DEVELOPMENT {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: environment-type environment_type: development - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" # - include: features/environment-templates.yaml # vars: -# testname: "CUSTOM DEPLOYMENT TEMPLATES docker-compose {{ lookup('env','CLUSTER_TYPE')|upper }}" +# testname: "CUSTOM DEPLOYMENT TEMPLATES docker-compose {{ cluster_type|upper }}" # git_repo_name: features.git -# project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} +# project: ci-features-{{ cluster_type }} # branch: branch/custom-template # expected_template_filename: .lagoon.node.yml -# check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" +# check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" # - include: features/environment-templates.yaml # vars: -# testname: "ENVIRIONMENT SPECIFIC CUSTOM DEPLOYMENT TEMPLATES {{ lookup('env','CLUSTER_TYPE')|upper }} .lagoon.yml" +# testname: "ENVIRIONMENT SPECIFIC CUSTOM DEPLOYMENT TEMPLATES {{ cluster_type|upper }} .lagoon.yml" # git_repo_name: features.git -# project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} +# project: ci-features-{{ cluster_type }} # branch: branch/env-specific-template # expected_template_filename: .lagoon.node-env-specific.yml -# check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" +# check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/environment-type.yaml vars: - testname: "ENVIRONMENT TYPE PRODUCTION {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "ENVIRONMENT TYPE PRODUCTION {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: master environment_type: production - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/route-env-variables.yaml vars: - testname: "ROUTE ENV VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "ROUTE ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch/routes - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/autogenerated-routes-disabled.yaml vars: - testname: "AUTOGENERATED ROUTES DISABLED {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "AUTOGENERATED ROUTES DISABLED {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: autogen-routes-disabled - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/dot-env.yaml vars: - testname: "DOT-ENV VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "DOT-ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: slash/branch1 expected_dot_env: slash/branch1 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/dot-env.yaml vars: - testname: "DOT-ENV VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "DOT-ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch1 expected_dot_env: branch1 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/subfolder.yaml vars: - testname: "SUBFOLDER {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "SUBFOLDER {{ cluster_type|upper }}" git_repo_name: features-subfolder.git - project: ci-features-subfolder-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-subfolder-{{ cluster_type }} branch: subfolder - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" # # @TODO: Enable again, see https://github.com/amazeeio/lagoon/issues/1099 # # - include: features/limits.yaml @@ -158,12 +179,12 @@ # # testname: "limits" # # git_repo_name: node.git # # project: ci-env-limit -# # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" +# # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/lagoon-api-variables.yaml vars: - testname: "LAGOON API VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "LAGOON API VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: lagoon-api-variables - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" diff --git a/tests/tests/features-openshift.yaml b/tests/tests/features-openshift.yaml index d7e6f4baa2..927fdae6bb 100644 --- a/tests/tests/features-openshift.yaml +++ b/tests/tests/features-openshift.yaml @@ -6,137 +6,138 @@ - include: features/lagoon-type-override.yaml vars: - testname: "LAGOON TYPE OVERRIDE {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "LAGOON TYPE OVERRIDE {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: lagoon-type-override - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/remote-shell.yaml vars: - testname: "REMOTE SHELL {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "REMOTE SHELL {{ cluster_type|upper }}" node_version: 10 git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: remoteshell + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/promote.yaml vars: - testname: "PROMOTE {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "PROMOTE {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} source_environment: source promote_environment: target - check_url_source: "https://node.{{ project | regex_replace('_', '-') }}.{{ source_environment | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" - check_url_promote: "https://node.{{ project | regex_replace('_', '-') }}.{{ promote_environment | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + check_url_source: "https://node.{{ project | regex_replace('_', '-') }}.{{ source_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" + check_url_promote: "https://node.{{ project | regex_replace('_', '-') }}.{{ promote_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" - include: features/cronjobs.yaml vars: - testname: "CRONJOBS {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "CRONJOBS {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch/cronjob - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/multiproject.yaml vars: - testname: "MULTIPROJECT {{ lookup('env','CLUSTER_TYPE')|upper }} - two projects with same git url" + testname: "MULTIPROJECT {{ cluster_type|upper }} - two projects with same git url" git_repo_name: multiproject.git - project1: ci-multiproject1-{{ lookup('env','CLUSTER_TYPE') }} - project2: ci-multiproject2-{{ lookup('env','CLUSTER_TYPE') }} + project1: ci-multiproject1-{{ cluster_type }} + project2: ci-multiproject2-{{ cluster_type }} branch: multiproject - check_url1: "https://node.{{ project1 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" - check_url2: "https://node.{{ project2 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + check_url1: "https://node.{{ project1 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" + check_url2: "https://node.{{ project2 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" custom_domain1: "multiproject1.com" custom_domain2: "multiproject2.com" - include: features/openshift-limit.yaml vars: - testname: "openshift-character-limit {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "openshift-character-limit {{ cluster_type|upper }}" node_version: 10 git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: very-long-branch-name-what-would-otherwise-overflow-the-sixty-three-limit # not going to try hashing something in yaml. - check_url: "http://node.{{ project | regex_replace('_', '-') }}.very-long-branch-name-what-would-aae9.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.very-long-branch-name-what-would-aae9.{{ route_suffix }}" - include: features/environment-type.yaml vars: - testname: "ENVIRONMENT TYPE DEVELOPMENT {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "ENVIRONMENT TYPE DEVELOPMENT {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: environment-type environment_type: development - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/environment-templates.yaml vars: - testname: "CUSTOM DEPLOYMENT TEMPLATES docker-compose {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "CUSTOM DEPLOYMENT TEMPLATES docker-compose {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch/custom-template expected_template_filename: .lagoon.node.yml - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/environment-templates.yaml vars: - testname: "ENVIRIONMENT SPECIFIC CUSTOM DEPLOYMENT TEMPLATES {{ lookup('env','CLUSTER_TYPE')|upper }} .lagoon.yml" + testname: "ENVIRIONMENT SPECIFIC CUSTOM DEPLOYMENT TEMPLATES {{ cluster_type|upper }} .lagoon.yml" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch/env-specific-template expected_template_filename: .lagoon.node-env-specific.yml - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/environment-type.yaml vars: - testname: "ENVIRONMENT TYPE PRODUCTION {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "ENVIRONMENT TYPE PRODUCTION {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: master environment_type: production - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/route-env-variables.yaml vars: - testname: "ROUTE ENV VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "ROUTE ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch/routes - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/autogenerated-routes-disabled.yaml vars: - testname: "AUTOGENERATED ROUTES DISABLED {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "AUTOGENERATED ROUTES DISABLED {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: autogen-routes-disabled - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/dot-env.yaml vars: - testname: "DOT-ENV VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "DOT-ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: slash/branch1 expected_dot_env: slash/branch1 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/dot-env.yaml vars: - testname: "DOT-ENV VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "DOT-ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: branch1 expected_dot_env: branch1 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/subfolder.yaml vars: - testname: "SUBFOLDER {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "SUBFOLDER {{ cluster_type|upper }}" git_repo_name: features-subfolder.git - project: ci-features-subfolder-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-subfolder-{{ cluster_type }} branch: subfolder - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" # @TODO: Enable again, see https://github.com/amazeeio/lagoon/issues/1099 # - include: features/limits.yaml @@ -144,12 +145,12 @@ # testname: "limits" # git_repo_name: node.git # project: ci-env-limit -# check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" +# check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: features/lagoon-api-variables.yaml vars: - testname: "LAGOON API VARIABLES {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "LAGOON API VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git - project: ci-features-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-features-{{ cluster_type }} branch: lagoon-api-variables - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" diff --git a/tests/tests/features/api-token.yaml b/tests/tests/features/api-token.yaml index de7f0a9a34..8e0945a8d1 100644 --- a/tests/tests/features/api-token.yaml +++ b/tests/tests/features/api-token.yaml @@ -1,9 +1,6 @@ - name: "SSH AUTH - Get Grant via SSH" hosts: localhost serial: 1 - vars: - ssh_host: "{{ lookup('env','SSH_HOST') }}" - ssh_auth_port: "{{ lookup('env','SSH_PORT') }}" tasks: - include: ../../tasks/ssh/get-keycloak-grant-via-ssh.yaml diff --git a/tests/tests/features/autogenerated-routes-disabled.yaml b/tests/tests/features/autogenerated-routes-disabled.yaml index 82ad613d95..4d286af9f1 100644 --- a/tests/tests/features/autogenerated-routes-disabled.yaml +++ b/tests/tests/features/autogenerated-routes-disabled.yaml @@ -32,7 +32,7 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml @@ -51,6 +51,6 @@ vars: url: "{{ check_url }}" host: "customdomain.com" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode-host.yaml diff --git a/tests/tests/features/cronjobs.yaml b/tests/tests/features/cronjobs.yaml index 86f0bb5734..392f7710c9 100644 --- a/tests/tests/features/cronjobs.yaml +++ b/tests/tests/features/cronjobs.yaml @@ -17,6 +17,15 @@ tasks: - include: ../../tasks/api/deploy-no-sha.yaml +- name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_PWD_/app' which is added via a cronjob" + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_content: "CRONJOB_PWD_/app" + tasks: + - include: ../../checks/check-url-content.yaml + - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_SINGLE' which is added via a cronjob" hosts: localhost serial: 1 @@ -112,7 +121,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/disable-inject-git-sha.yaml b/tests/tests/features/disable-inject-git-sha.yaml index bf7cdc8b24..ad55b5d33f 100644 --- a/tests/tests/features/disable-inject-git-sha.yaml +++ b/tests/tests/features/disable-inject-git-sha.yaml @@ -40,6 +40,6 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode-host.yaml diff --git a/tests/tests/features/dot-env.yaml b/tests/tests/features/dot-env.yaml index 17930be200..e0854a9247 100644 --- a/tests/tests/features/dot-env.yaml +++ b/tests/tests/features/dot-env.yaml @@ -57,7 +57,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/environment-templates.yaml b/tests/tests/features/environment-templates.yaml index 3e9450e5ae..eb9bf21fe4 100644 --- a/tests/tests/features/environment-templates.yaml +++ b/tests/tests/features/environment-templates.yaml @@ -39,7 +39,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/environment-type.yaml b/tests/tests/features/environment-type.yaml index 6d4488c265..95d9cc0d18 100644 --- a/tests/tests/features/environment-type.yaml +++ b/tests/tests/features/environment-type.yaml @@ -39,7 +39,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/fastly-annotations.yaml b/tests/tests/features/fastly-annotations.yaml new file mode 100644 index 0000000000..216ded3a74 --- /dev/null +++ b/tests/tests/features/fastly-annotations.yaml @@ -0,0 +1,172 @@ + +- name: "{{ testname }} - init git, add files, commit, git push" + hosts: localhost + serial: 1 + vars: + git_files: "features/" + tasks: + - include: ../../tasks/git-init.yaml + - include: ../../tasks/git-add-commit-push.yaml + +# delete the envvar if it exists already +- name: "{{ testname }} - api delete LAGOON_FASTLY_SERVICE_ID envVariable on {{ project }}" + hosts: localhost + serial: 1 + vars: + envName: "LAGOON_FASTLY_SERVICE_ID" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/delete-project-variable.yaml + +# delete the envvar if it exists already +- name: "{{ testname }} - api delete LAGOON_FASTLY_SERVICE_IDS envVariable on {{ project }}" + hosts: localhost + serial: 1 + vars: + envName: "LAGOON_FASTLY_SERVICE_IDS" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/delete-project-variable.yaml + +# delete the envvar if it exists already +- name: "{{ testname }} - api delete LAGOON_FASTLY_API_SECRETS envVariable on {{ project }}" + hosts: localhost + serial: 1 + vars: + envName: "LAGOON_FASTLY_API_SECRETS" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/delete-project-variable.yaml + +# # add the `LAGOON_FASTLY_NOCACHE_SERVICE_ID` environment variable +# - name: "{{ testname }} - api add envVariable on {{ project }}" +# hosts: localhost +# serial: 1 +# vars: +# envName: "LAGOON_FASTLY_NOCACHE_SERVICE_ID" +# envValue: "lagoon" +# envScope: "BUILD" +# project: "{{ project }}" +# tasks: +# - include: ../../tasks/api/add-project-variable.yaml + +# - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" +# hosts: localhost +# serial: 1 +# vars: +# branch: "{{ branch }}" +# project: "{{ project }}" +# tasks: +# - include: ../../tasks/api/deploy-no-sha.yaml + +# - name: > +# {{ testname }} - check that the ingress has the correct fastly annotations +# hosts: localhost +# serial: 1 +# vars: +# url: "{{ check_url }}" +# expected_annotations: +# - "fastly.amazee.io/watch=true" +# - "fastly.amazee.io/service-id=lagoon" +# ingress: annotations.com +# tasks: +# - include: ../../checks/check-ingress-annotations.yaml + +# add the `LAGOON_FASTLY_SERVICE_ID` environment variable +- name: "{{ testname }} - api add LAGOON_FASTLY_SERVICE_ID envVariable on {{ project }}" + hosts: localhost + serial: 1 + vars: + envName: "LAGOON_FASTLY_SERVICE_ID" + envValue: "newlagoon:true" + envScope: "BUILD" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/add-project-variable.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +- name: > + {{ testname }} - check that the ingress has the correct fastly annotations + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_annotations: + - "fastly.amazee.io/watch=true" + - "fastly.amazee.io/service-id=newlagoon" + ingress: annotations.com + tasks: + - include: ../../checks/check-ingress-annotations.yaml + +# add the `LAGOON_FASTLY_API_SECRETS` environment variable +- name: "{{ testname }} - api add LAGOON_FASTLY_API_SECRETS envVariable on {{ project }}" + hosts: localhost + serial: 1 + vars: + envName: "LAGOON_FASTLY_API_SECRETS" + envValue: "annotationscom:apitoken:platformtlsid" + envScope: "BUILD" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/add-project-variable.yaml + +# add the `LAGOON_FASTLY_API_SECRETS` environment variable +- name: "{{ testname }} - api add LAGOON_FASTLY_SERVICE_IDS envVariable on {{ project }}" + hosts: localhost + serial: 1 + vars: + envName: "LAGOON_FASTLY_SERVICE_IDS" + envValue: "annotations.com:newlagoon2:true:annotationscom" + envScope: "BUILD" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/add-project-variable.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +- name: > + {{ testname }} - check that the ingress has the correct fastly annotations for a service override with custom secret + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_annotations: + - "fastly.amazee.io/watch=true" + - "fastly.amazee.io/service-id=newlagoon2" + - "fastly.amazee.io/api-secret-name=fastly-api-annotationscom" + ingress: annotations.com + tasks: + - include: ../../checks/check-ingress-annotations.yaml + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "{{ branch }}" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + tasks: + - include: ../../checks/check-url-returncode.yaml \ No newline at end of file diff --git a/tests/tests/features/ingress-annotations.yaml b/tests/tests/features/ingress-annotations.yaml index eddde09f88..ca2271d08b 100644 --- a/tests/tests/features/ingress-annotations.yaml +++ b/tests/tests/features/ingress-annotations.yaml @@ -21,6 +21,7 @@ {{ testname }} - check that the ingress has the correct annotations hosts: localhost serial: 1 + tags: skip-on-jenkins vars: expected_annotations: - "foo=bar" @@ -33,7 +34,7 @@ hosts: localhost serial: 1 vars: - url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "{{ check_url }}" host: "redirect-to-example.com" expected_redirect_location: "https://example.com/$" tasks: @@ -43,7 +44,7 @@ hosts: localhost serial: 1 vars: - url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}/asdf" + url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/asdf" host: "redirect-to-example.com" expected_redirect_location: "https://example.com/asdf$" tasks: @@ -53,7 +54,7 @@ hosts: localhost serial: 1 vars: - url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "{{ check_url }}" host: "redirect-to-www.com" expected_redirect_location: "https://www.redirect-to-www.com/$" tasks: @@ -63,7 +64,7 @@ hosts: localhost serial: 1 vars: - url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "{{ check_url }}" host: "www.redirect-from-www.com" expected_redirect_location: "https://redirect-from-www.com/$" tasks: @@ -82,7 +83,7 @@ hosts: localhost serial: 1 vars: - url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/lagoon-api-variables.yaml b/tests/tests/features/lagoon-api-variables.yaml index 1c09e3f0bc..c096636869 100644 --- a/tests/tests/features/lagoon-api-variables.yaml +++ b/tests/tests/features/lagoon-api-variables.yaml @@ -138,7 +138,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/lagoon-type-override.yaml b/tests/tests/features/lagoon-type-override.yaml index 7cd0b837d0..c08b5e76e8 100644 --- a/tests/tests/features/lagoon-type-override.yaml +++ b/tests/tests/features/lagoon-type-override.yaml @@ -33,7 +33,7 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml @@ -92,6 +92,6 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/limits.yaml b/tests/tests/features/limits.yaml index 705d173557..856e7d0fee 100644 --- a/tests/tests/features/limits.yaml +++ b/tests/tests/features/limits.yaml @@ -7,7 +7,8 @@ project: ci-env-limit branch: master expected_status: 200 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "{{ check_url }}" + - include: ../api/push.yaml vars: testname: "environment limits - allow deployment of existing branch" @@ -16,7 +17,7 @@ project: ci-env-limit branch: stage expected_status: 200 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "{{ check_url }}" - include: ../api/push.yaml vars: @@ -26,4 +27,4 @@ project: ci-env-limit branch: will-not-deploy expected_status: 500 - # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "{{ check_url }}" diff --git a/tests/tests/features/multiproject.yaml b/tests/tests/features/multiproject.yaml index 0faff6da64..c911ce26cf 100644 --- a/tests/tests/features/multiproject.yaml +++ b/tests/tests/features/multiproject.yaml @@ -82,8 +82,8 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project1 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "http://{{ project1 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml @@ -91,7 +91,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project2 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "http://{{ project2 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/namespace-labels.yaml b/tests/tests/features/namespace-labels.yaml index 1bb005b417..3099610d7a 100644 --- a/tests/tests/features/namespace-labels.yaml +++ b/tests/tests/features/namespace-labels.yaml @@ -20,6 +20,7 @@ {{ testname }} - check that the namespace is labelled correctly hosts: localhost serial: 1 + tags: skip-on-jenkins vars: expected_labels: - "lagoon.sh/project={{ project }}" diff --git a/tests/tests/features/promote.yaml b/tests/tests/features/promote.yaml index f65e4ad7e0..568e19ef5d 100644 --- a/tests/tests/features/promote.yaml +++ b/tests/tests/features/promote.yaml @@ -37,7 +37,7 @@ - include: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" - expected_branch: "{{ promote_environment }}" + expected_branch: "" expected_branch_buildtime: "{{ source_environment }}" project: "{{ project }}" url: "{{ check_url_promote }}" @@ -65,7 +65,7 @@ serial: 1 vars: url: "{{ check_url_promote }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml @@ -74,6 +74,6 @@ serial: 1 vars: url: "{{ check_url_source }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/remote-shell.yaml b/tests/tests/features/remote-shell.yaml index af2c5a7da0..6e1997bee9 100644 --- a/tests/tests/features/remote-shell.yaml +++ b/tests/tests/features/remote-shell.yaml @@ -20,8 +20,6 @@ hosts: localhost serial: 1 vars: - ssh_host: "{{ lookup('env','SSH_HOST') }}" - ssh_auth_port: "{{ lookup('env','SSH_PORT') }}" username: lagoon command: "rsh {{ project }}-remoteshell service=node env" expected_content: "LAGOON_PROJECT={{ project }}" @@ -32,8 +30,6 @@ hosts: localhost serial: 1 vars: - ssh_host: "{{ lookup('env','SSH_HOST') }}" - ssh_auth_port: "{{ lookup('env','SSH_PORT') }}" username: "{{ project }}-remoteshell" command: service=node env expected_content: "LAGOON_PROJECT={{ project }}" @@ -44,8 +40,6 @@ hosts: localhost serial: 1 vars: - ssh_host: "{{ lookup('env','SSH_HOST') }}" - ssh_auth_port: "{{ lookup('env','SSH_PORT') }}" username: "{{ project }}-remoteshell" command: service=node container=node env expected_content: "LAGOON_PROJECT={{ project }}" @@ -56,8 +50,6 @@ hosts: localhost serial: 1 vars: - ssh_host: "{{ lookup('env','SSH_HOST') }}" - ssh_auth_port: "{{ lookup('env','SSH_PORT') }}" username: "{{ project }}-remoteshell" command: service=node env expected_content: "LAGOON_GIT_SHA={{ current_head }}" @@ -68,8 +60,6 @@ hosts: localhost serial: 1 vars: - ssh_host: "{{ lookup('env','SSH_HOST') }}" - ssh_auth_port: "{{ lookup('env','SSH_PORT') }}" username: "{{ project }}-remoteshell" command: service=node env expected_content: "LAGOON_GIT_BRANCH={{ branch }}" @@ -89,7 +79,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/route-env-variables.yaml b/tests/tests/features/route-env-variables.yaml index 05cd8d7e95..7784589d8b 100644 --- a/tests/tests/features/route-env-variables.yaml +++ b/tests/tests/features/route-env-variables.yaml @@ -48,7 +48,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/short-router-url.yaml b/tests/tests/features/short-router-url.yaml new file mode 100644 index 0000000000..7ba5499489 --- /dev/null +++ b/tests/tests/features/short-router-url.yaml @@ -0,0 +1,48 @@ + +- name: "{{ testname }} - init git, add files, commit, git push" + hosts: localhost + serial: 1 + vars: + git_files: "features/" + tasks: + - include: ../../tasks/git-init.yaml + - include: ../../tasks/git-add-commit-push.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +- name: > + {{ testname }} - check that the auto-generated ingress has the + short-router-url + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + lagoon_environment: "{{ lagoon_environment }}" + tasks: + - include: ../../checks/check-auto-generated-ingress-short-router-url.yaml + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "{{ branch }}" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" + tasks: + - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/subfolder.yaml b/tests/tests/features/subfolder.yaml index 35d6026c55..27d56422f6 100644 --- a/tests/tests/features/subfolder.yaml +++ b/tests/tests/features/subfolder.yaml @@ -37,7 +37,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/github.yaml b/tests/tests/github.yaml index 7375488237..78ce898249 100644 --- a/tests/tests/github.yaml +++ b/tests/tests/github.yaml @@ -1,36 +1,36 @@ --- - include: github/branch.yaml vars: - testname: "GITHUB {{ lookup('env','CLUSTER_TYPE')|upper }} - slash branch" + testname: "GITHUB {{ cluster_type|upper }} - slash branch" node_version: 10 git_repo_name: github.git - project: ci-github-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-github-{{ cluster_type }} branch: github/slash/branch - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" # This project has a branch regex that does not match `banana`. - include: github/branch-picky.yaml vars: - testname: "GITHUB {{ lookup('env','CLUSTER_TYPE')|upper }} - picky branch" + testname: "GITHUB {{ cluster_type|upper }} - picky branch" node_version: 10 git_repo_name: github.git - project: ci-github-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-github-{{ cluster_type }} branch: github/slash/banana - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: github/pullrequest.yaml vars: - testname: "GITHUB {{ lookup('env','CLUSTER_TYPE')|upper }} - PULLREQUEST" + testname: "GITHUB {{ cluster_type|upper }} - PULLREQUEST" node_version: 10 git_repo_name: github.git - project: ci-github-{{ lookup('env','CLUSTER_TYPE') }} - check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + project: ci-github-{{ cluster_type }} + check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ route_suffix }}" - include: github/skip-deployment.yaml vars: - testname: "GITHUB {{ lookup('env','CLUSTER_TYPE')|upper }} - skip deployment" + testname: "GITHUB {{ cluster_type|upper }} - skip deployment" branch: skip node_version: 10 git_repo_name: github.git - project: ci-github-{{ lookup('env','CLUSTER_TYPE') }} - check_url: "http://node.{{ project | regex_replace('_', '-') }}.skip.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + project: ci-github-{{ cluster_type }} + check_url: "http://node.{{ project | regex_replace('_', '-') }}.skip.{{ route_suffix }}" diff --git a/tests/tests/github/branch-picky.yaml b/tests/tests/github/branch-picky.yaml index 5e87af04ee..dad72f50b6 100644 --- a/tests/tests/github/branch-picky.yaml +++ b/tests/tests/github/branch-picky.yaml @@ -13,7 +13,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push.yaml @@ -28,7 +28,7 @@ hosts: localhost serial: 1 vars: - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push-delete.yaml @@ -37,6 +37,6 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/github/branch.yaml b/tests/tests/github/branch.yaml index 8ca13b81c5..740a952c09 100644 --- a/tests/tests/github/branch.yaml +++ b/tests/tests/github/branch.yaml @@ -13,7 +13,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push.yaml @@ -36,7 +36,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push.yaml @@ -67,7 +67,7 @@ serial: 1 vars: git_hash_push: "{{ third_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push.yaml @@ -82,7 +82,7 @@ hosts: localhost serial: 1 vars: - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push-delete.yaml @@ -90,7 +90,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/github/pullrequest.yaml b/tests/tests/github/pullrequest.yaml index d36464345b..081687a9dd 100644 --- a/tests/tests/github/pullrequest.yaml +++ b/tests/tests/github/pullrequest.yaml @@ -40,18 +40,18 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_commit_hash }}" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: PR Title \"quoted\" & [special chars] tasks: - include: ../../tasks/webhook-github/pullrequest-opened.yaml -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_commit_hash }}" - expected_branch: "pr-1" - project: "{{ project }}" - url: "{{ check_url }}" +# - include: ../../checks/check-branch-sha.yaml +# vars: +# expected_head: "{{ pr_commit_hash }}" +# expected_branch: "pr-1" +# project: "{{ project }}" +# url: "{{ check_url }}" - include: ../../checks/check-pullrequest.yaml vars: @@ -87,17 +87,17 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_2nd_commit_hash }}" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: PR Title \"quoted\" & [special chars] - UPDATE tasks: - include: ../../tasks/webhook-github/pullrequest-synchronize.yaml -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_2nd_commit_hash }}" - expected_branch: "pr-1" - project: "{{ project }}" - url: "{{ check_url }}" +# - include: ../../checks/check-branch-sha.yaml +# vars: +# expected_head: "{{ pr_2nd_commit_hash }}" +# expected_branch: "pr-1" +# project: "{{ project }}" +# url: "{{ check_url }}" - include: ../../checks/check-pullrequest.yaml vars: @@ -118,7 +118,7 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "00000" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/pullrequest-closed.yaml @@ -127,6 +127,6 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/github/skip-deployment.yaml b/tests/tests/github/skip-deployment.yaml index 151a06aec9..0a27a74518 100644 --- a/tests/tests/github/skip-deployment.yaml +++ b/tests/tests/github/skip-deployment.yaml @@ -15,7 +15,7 @@ serial: 1 vars: git_hash_push: "{{ first_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push.yaml @@ -40,7 +40,7 @@ serial: 1 vars: git_hash_push: "{{ second_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push-skipdeploy.yaml @@ -63,7 +63,7 @@ hosts: localhost serial: 1 vars: - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push-delete.yaml @@ -71,7 +71,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/gitlab.yaml b/tests/tests/gitlab.yaml index 0844c76632..a4adc72487 100644 --- a/tests/tests/gitlab.yaml +++ b/tests/tests/gitlab.yaml @@ -1,26 +1,26 @@ --- - include: gitlab/skip-deployment.yaml vars: - testname: "GITLAB {{ lookup('env','CLUSTER_TYPE')|upper }} - skip deployment" + testname: "GITLAB {{ cluster_type|upper }} - skip deployment" node_version: 10 git_repo_name: gitlab.git - project: ci-gitlab-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-gitlab-{{ cluster_type }} branch: skip - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: gitlab/branch.yaml vars: - testname: "GITLAB {{ lookup('env','CLUSTER_TYPE')|upper }} - slash branch" + testname: "GITLAB {{ cluster_type|upper }} - slash branch" node_version: 10 git_repo_name: gitlab.git - project: ci-gitlab-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-gitlab-{{ cluster_type }} branch: gitlab/slash/branch - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: gitlab/pullrequest.yaml vars: - testname: "GITLAB {{ lookup('env','CLUSTER_TYPE')|upper }} - PULLREQUEST" + testname: "GITLAB {{ cluster_type|upper }} - PULLREQUEST" node_version: 10 git_repo_name: gitlab.git - project: ci-gitlab-{{ lookup('env','CLUSTER_TYPE') }} - check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + project: ci-gitlab-{{ cluster_type }} + check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ route_suffix }}" diff --git a/tests/tests/gitlab/branch.yaml b/tests/tests/gitlab/branch.yaml index e913d506f9..e50dc30ecb 100644 --- a/tests/tests/gitlab/branch.yaml +++ b/tests/tests/gitlab/branch.yaml @@ -13,7 +13,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-gitlab/push.yaml @@ -36,7 +36,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-gitlab/push.yaml @@ -67,7 +67,7 @@ serial: 1 vars: git_hash_push: "{{ third_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-gitlab/push.yaml @@ -82,7 +82,7 @@ hosts: localhost serial: 1 vars: - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-gitlab/push-delete.yaml @@ -90,7 +90,7 @@ hosts: localhost serial: 1 vars: - url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/gitlab/pullrequest.yaml b/tests/tests/gitlab/pullrequest.yaml index 64cc44145e..09a181b107 100644 --- a/tests/tests/gitlab/pullrequest.yaml +++ b/tests/tests/gitlab/pullrequest.yaml @@ -39,18 +39,19 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_commit_hash }}" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "PR Title" tasks: - include: ../../tasks/webhook-gitlab/pullrequest-opened.yaml -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_commit_hash }}" - expected_branch: "pr-1" - project: "{{ project }}" - url: "{{ check_url }}" +# pullrequest type doesn't have a LAGOON_GIT_BRANCH to check? +#- include: ../../checks/check-branch-sha.yaml +# vars: +# expected_head: "{{ pr_commit_hash }}" +# expected_branch: "pr-1" +# project: "{{ project }}" +# url: "{{ check_url }}" - include: ../../checks/check-pullrequest.yaml vars: @@ -85,17 +86,17 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "{{ pr_2nd_commit_hash }}" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "PR Title - UPDATE" tasks: - include: ../../tasks/webhook-gitlab/pullrequest-updated.yaml -- include: ../../checks/check-branch-sha.yaml - vars: - expected_head: "{{ pr_2nd_commit_hash }}" - expected_branch: "pr-1" - project: "{{ project }}" - url: "{{ check_url }}" +# - include: ../../checks/check-branch-sha.yaml +# vars: +# expected_head: "{{ pr_2nd_commit_hash }}" +# expected_branch: "pr-1" +# project: "{{ project }}" +# url: "{{ check_url }}" - include: ../../checks/check-pullrequest.yaml vars: @@ -115,7 +116,7 @@ git_pr_branch: "pullrequest_pr" git_pr_commit_hash: "00000" git_pr_number: "1" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-gitlab/pullrequest-closed.yaml @@ -124,6 +125,6 @@ serial: 1 vars: url: "{{ check_url }}" - expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/gitlab/skip-deployment.yaml b/tests/tests/gitlab/skip-deployment.yaml index c8bceb70fe..b526037378 100644 --- a/tests/tests/gitlab/skip-deployment.yaml +++ b/tests/tests/gitlab/skip-deployment.yaml @@ -15,7 +15,7 @@ serial: 1 vars: git_hash_push: "{{ first_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-gitlab/push.yaml @@ -40,7 +40,7 @@ serial: 1 vars: git_hash_push: "{{ second_commit_hash }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-gitlab/push-skipdeploy.yaml @@ -58,3 +58,20 @@ expected_branch: "{{ branch }}" project: "{{ project }}" url: "{{ check_url }}" + +- name: "{{ testname }} - webhook gitlab delete push" + hosts: localhost + serial: 1 + vars: + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" + tasks: + - include: ../../tasks/webhook-gitlab/push-delete.yaml + +- name: "{{ testname }} - check if site for project does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" + tasks: + - include: ../../checks/check-url-returncode.yaml \ No newline at end of file diff --git a/tests/tests/helpers/just-push.yaml b/tests/tests/helpers/just-push.yaml index 89e18cf815..1fcc0eaea7 100644 --- a/tests/tests/helpers/just-push.yaml +++ b/tests/tests/helpers/just-push.yaml @@ -5,7 +5,7 @@ - name: getting HEAD hash command: git rev-parse HEAD args: - chdir: /{{git_repo_name}} + chdir: /{{ git_repo_name }} register: result - set_fact: @@ -16,7 +16,7 @@ serial: 1 vars: git_hash_push: "{{ current_head }}" - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push.yaml - include: ../../tasks/webhook-bitbucket/push.yaml diff --git a/tests/tests/helpers/webhook-push-delete.yaml b/tests/tests/helpers/webhook-push-delete.yaml index c600e01904..977c810825 100644 --- a/tests/tests/helpers/webhook-push-delete.yaml +++ b/tests/tests/helpers/webhook-push-delete.yaml @@ -2,7 +2,7 @@ hosts: localhost serial: 1 vars: - git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - include: ../../tasks/webhook-github/push-delete.yaml - include: ../../tasks/webhook-gitlab/push-delete.yaml diff --git a/tests/tests/nginx.yaml b/tests/tests/nginx.yaml index 73fa4f24eb..f5ff3e1cfc 100644 --- a/tests/tests/nginx.yaml +++ b/tests/tests/nginx.yaml @@ -6,7 +6,7 @@ - include: nginx/nginx.yaml vars: - testname: "NGINX {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "NGINX {{ cluster_type|upper }}" git_repo_name: nginx.git - project: ci-nginx-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-nginx-{{ cluster_type }} branch: nginx diff --git a/tests/tests/nginx/check-first.yaml b/tests/tests/nginx/check-first.yaml index b73c874e51..1cce4f0e96 100644 --- a/tests/tests/nginx/check-first.yaml +++ b/tests/tests/nginx/check-first.yaml @@ -2,7 +2,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - include: ../../checks/check-url-content.yaml @@ -11,8 +11,8 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" - host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" + host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - include: ../../checks/check-url-content-host.yaml @@ -21,7 +21,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" host: "insecure-allow.com" expected_content: "Hello World!" tasks: @@ -31,7 +31,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "insecure-allow.com" expected_content: "Hello World!" tasks: @@ -41,9 +41,9 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" host: "insecure-redirect.com" - expected_redirect_location: "https://insecure-redirect.com/$" + expected_redirect_location: "https://insecure-redirect.com/?$" tasks: - include: ../../checks/check-url-redirect-host.yaml @@ -51,7 +51,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "insecure-redirect.com" expected_content: "Hello World!" tasks: @@ -62,7 +62,7 @@ serial: 1 tags: skip-on-kubernetes vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" host: "insecure-none.com" expected_returncode: 503 tasks: @@ -72,7 +72,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "insecure-none.com" expected_content: "Hello World!" tasks: @@ -82,7 +82,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "moving-route.com" expected_content: "Hello World!" tasks: @@ -93,7 +93,7 @@ serial: 1 tags: skip-on-kubernetes vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "hsts-header.com" expected_returncode: 200 expected_header: "strict_transport_security" @@ -106,7 +106,7 @@ serial: 1 tags: skip-on-kubernetes vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "hsts-header-null.com" expected_returncode: 200 expected_header: "strict_transport_security" @@ -117,7 +117,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}/redirect-no-preserve/should/be/missing?arg1" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-no-preserve/should/be/missing?arg1" expected_redirect_location: "foo.com$" tasks: - include: ../../checks/check-url-redirect.yaml @@ -126,7 +126,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}/redirect-preserve/should/be/existing?arg1" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-preserve/should/be/existing?arg1" expected_redirect_location: "foo.com/redirect-preserve/should/be/existing\\?arg1$" tasks: - include: ../../checks/check-url-redirect.yaml @@ -135,7 +135,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}/redirect-preserve-uri-only/should/be/existing?should-be-gone" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-preserve-uri-only/should/be/existing?should-be-gone" expected_redirect_location: "foo.com/redirect-preserve-uri-only/should/be/existing$" tasks: - include: ../../checks/check-url-redirect.yaml @@ -144,7 +144,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}/redirect-strip-args-handling/should/be/existing?arg1" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-strip-args-handling/should/be/existing?arg1" expected_redirect_location: "foo.com/should/be/existing\\?arg1$" tasks: - include: ../../checks/check-url-redirect.yaml @@ -153,7 +153,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: 401 tasks: - include: ../../checks/check-url-returncode.yaml @@ -162,7 +162,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" user: "username" password: "password" @@ -173,7 +173,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx-basic-auth-disable.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx-basic-auth-disable.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - include: ../../checks/check-url-content.yaml @@ -182,10 +182,10 @@ hosts: localhost serial: 1 vars: - url: "https://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" expected_content: "Hello World!" user: "username" password: "password" host: "nginx-basic-auth.com" tasks: - - include: ../../checks/check-url-content-basic-auth-host.yaml \ No newline at end of file + - include: ../../checks/check-url-content-basic-auth-host.yaml diff --git a/tests/tests/nginx/check-second.yaml b/tests/tests/nginx/check-second.yaml index 13717584c9..4b48b72bd4 100644 --- a/tests/tests/nginx/check-second.yaml +++ b/tests/tests/nginx/check-second.yaml @@ -2,7 +2,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - include: ../../checks/check-url-redirect.yaml @@ -11,8 +11,8 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - include: ../../checks/check-url-redirect.yaml @@ -22,7 +22,7 @@ tags: skip-on-kubernetes serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" host: "insecure-allow.com" expected_returncode: 503 tasks: @@ -32,9 +32,9 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" host: "insecure-redirect.com" - expected_redirect_location: "https://insecure-redirect.com/$" + expected_redirect_location: "https://insecure-redirect.com/?$" tasks: - include: ../../checks/check-url-redirect-host.yaml @@ -42,7 +42,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" host: "insecure-none.com" expected_content: "Hello World!" tasks: @@ -52,7 +52,7 @@ hosts: localhost serial: 1 vars: - url: "https://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "moving-route.com" expected_returncode: 401 tasks: @@ -63,7 +63,7 @@ serial: 1 tags: skip-on-kubernetes vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "hsts-header-null.com" expected_returncode: 200 expected_header: "strict_transport_security" @@ -76,9 +76,9 @@ serial: 1 tags: skip-on-kubernetes vars: - url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}:{{ lookup('env','ROUTE_SUFFIX_HTTPS_PORT') }}" + url: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" host: "hsts-header.com" expected_returncode: 200 expected_header: "strict_transport_security" tasks: - - include: ../../checks/check-url-header-absent.yaml \ No newline at end of file + - include: ../../checks/check-url-header-absent.yaml diff --git a/tests/tests/nginx/nginx.yaml b/tests/tests/nginx/nginx.yaml index 00525dcf1e..a413319c0b 100644 --- a/tests/tests/nginx/nginx.yaml +++ b/tests/tests/nginx/nginx.yaml @@ -1,4 +1,12 @@ +- name: "{{ testname }} - wait for 60 seconds to give an eventual running deployment time to run, after that check again if the first commit is still there" + hosts: localhost + serial: 1 + vars: + seconds: "60" + tasks: + - include: ../../tasks/pause.yaml + - name: "{{ testname }} - init git, add files, commit, git push" hosts: localhost serial: 1 @@ -59,7 +67,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" - expected_returncode: "{{ lookup('env', 'DELETED_STATUS_CODE') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ del_status_code }}" tasks: - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/node-mongodb.yaml b/tests/tests/node-mongodb.yaml new file mode 100644 index 0000000000..2919d3e460 --- /dev/null +++ b/tests/tests/node-mongodb.yaml @@ -0,0 +1,27 @@ +--- + +- include: features/api-token.yaml + vars: + testname: "API TOKEN" + +- include: node-mongodb/node-mongodb-single.yaml + vars: + testname: "Node 10 - MONGODB SINGLE {{ cluster_type|upper }}" + node_version: 10 + db: mongodb + git_repo_name: node-mongodb.git + project: ci-node-mongodb-{{ cluster_type }} + branch: node-mongodb-single + +- include: features/api-token.yaml + vars: + testname: "API TOKEN" + +- include: node-mongodb/node-mongodb.yaml + vars: + testname: "Node 10 - MONGODB DBAAAS {{ cluster_type|upper }}" + node_version: 10 + db: mongodb + git_repo_name: node-mongodb.git + project: ci-node-mongodb-{{ cluster_type }} + branch: node-mongodb-dbaas diff --git a/tests/tests/node-mongodb/check-deployed.yaml b/tests/tests/node-mongodb/check-deployed.yaml new file mode 100644 index 0000000000..3795365096 --- /dev/null +++ b/tests/tests/node-mongodb/check-deployed.yaml @@ -0,0 +1,32 @@ +- name: "{{ testname }} - check if {{ project }} is deployed with searching for 'Home'" + hosts: localhost + serial: 1 + vars: + url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_content: "Home" + tasks: + - include: ../../checks/check-url-content.yaml + - name: "{{ testname }} - Post data to URL http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/list/additem returns" + shell: curl -s -i -k -X POST -d name=TESTDATA -d character=TESTDATA http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/list/additem + # uri: + # url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/list/additem" + # status_code: 302 + # validate_certs: no + # method: POST + # body_format: form-urlencoded + # body: + # name: TESTDATA + # character: TESTDATA + # register: result + # until: result.status is defined and result.status == 302 + # - name: "{{ testname }} - Check if URL http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/list/additem returns with return code 302" + # debug: msg="Success!!!" + +- name: "{{ testname }} - check if {{ project }} is deployed with searching for 'TESTDATA'" + hosts: localhost + serial: 1 + vars: + url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/list/getlist" + expected_content: "TESTDATA" + tasks: + - include: ../../checks/check-url-content.yaml diff --git a/tests/tests/node-mongodb/node-mongodb-single.yaml b/tests/tests/node-mongodb/node-mongodb-single.yaml new file mode 100644 index 0000000000..f8259bc3fd --- /dev/null +++ b/tests/tests/node-mongodb/node-mongodb-single.yaml @@ -0,0 +1,42 @@ + +- name: "{{ testname }} - init git, add files, commit, git push" + hosts: localhost + serial: 1 + vars: + git_files: "node-mongodb/single/" + tasks: + - include: ../../tasks/git-init.yaml + - include: ../../tasks/git-add-commit-push.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +- include: check-deployed.yaml + vars: + expected_head: "{{ current_head }}" + expected_branch: "{{ branch }}" + project: "{{ project }}" + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "{{ branch }}" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + tasks: + - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/node-mongodb/node-mongodb.yaml b/tests/tests/node-mongodb/node-mongodb.yaml new file mode 100644 index 0000000000..65933cdac1 --- /dev/null +++ b/tests/tests/node-mongodb/node-mongodb.yaml @@ -0,0 +1,42 @@ + +- name: "{{ testname }} - init git, add files, commit, git push" + hosts: localhost + serial: 1 + vars: + git_files: "node-mongodb/dbaas/" + tasks: + - include: ../../tasks/git-init.yaml + - include: ../../tasks/git-add-commit-push.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +- include: check-deployed.yaml + vars: + expected_head: "{{ current_head }}" + expected_branch: "{{ branch }}" + project: "{{ project }}" + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "{{ branch }}" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" + expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" + tasks: + - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/node.yaml b/tests/tests/node.yaml index e097b19461..71693b602c 100644 --- a/tests/tests/node.yaml +++ b/tests/tests/node.yaml @@ -6,27 +6,27 @@ - include: api/deploy-branch.yaml vars: - testname: "NODE 14 {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "NODE 14 {{ cluster_type|upper }}" node_version: 14 git_repo_name: node.git - project: ci-node-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-node-{{ cluster_type }} branch: node14 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: api/deploy-branch.yaml vars: - testname: "NODE 12 {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "NODE 12 {{ cluster_type|upper }}" node_version: 12 git_repo_name: node.git - project: ci-node-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-node-{{ cluster_type }} branch: node12 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" - include: api/deploy-branch.yaml vars: - testname: "NODE 10 {{ lookup('env','CLUSTER_TYPE')|upper }}" + testname: "NODE 10 {{ cluster_type|upper }}" node_version: 10 git_repo_name: node.git - project: ci-node-{{ lookup('env','CLUSTER_TYPE') }} + project: ci-node-{{ cluster_type }} branch: node10 - check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTP') }}:{{ lookup('env','ROUTE_SUFFIX_HTTP_PORT') }}" + check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" diff --git a/tests/tests/python.yaml b/tests/tests/python.yaml new file mode 100644 index 0000000000..6100e253b4 --- /dev/null +++ b/tests/tests/python.yaml @@ -0,0 +1,14 @@ +--- + +- include: features/api-token.yaml + vars: + testname: "API TOKEN" + +- include: python/deploy-branch.yaml + vars: + testname: "PYTHON 3.7 {{ cluster_type|upper }}" + python_version: 3.7 + git_repo_name: python.git + project: ci-python-{{ cluster_type }} + branch: python37 + check_url: "http://python.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" diff --git a/tests/tests/python/deploy-branch.yaml b/tests/tests/python/deploy-branch.yaml new file mode 100644 index 0000000000..b85b629d14 --- /dev/null +++ b/tests/tests/python/deploy-branch.yaml @@ -0,0 +1,108 @@ + +- name: "{{ testname }} - init git, add files, commit, git push" + hosts: localhost + serial: 1 + vars: + git_files: "python{{ python_version }}/" + tasks: + - include: ../../tasks/git-init.yaml + - include: ../../tasks/git-add-commit-push.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +- include: ../../checks/check-branch-sha.yaml + vars: + expected_head: "{{ current_head }}" + expected_branch: "{{ branch }}" + project: "{{ project }}" + url: "{{ check_url }}" + +- name: "{{ testname }} - second commit (empty) and git push into same git repo" + hosts: localhost + serial: 1 + tasks: + - include: ../../tasks/git-empty-commit-push.yaml + - set_fact: + second_commit_hash: "{{ current_head }}" + +- name: "{{ testname }} - third commit (empty) and git push into same git repo" + hosts: localhost + serial: 1 + tasks: + - include: ../../tasks/git-empty-commit-push.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch with sha of second commit on {{ project }}, which should deploy the second commit" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + sha: "{{ second_commit_hash }}" + tasks: + - include: ../../tasks/api/deploy-sha.yaml + + +- include: ../../checks/check-branch-sha.yaml + vars: + expected_head: "{{ second_commit_hash }}" + expected_branch: "{{ branch }}" + project: "{{ project }}" + url: "{{ check_url }}" + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the third commit" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +- include: ../../checks/check-branch-sha.yaml + vars: + expected_head: "{{ current_head }}" + expected_branch: "{{ branch }}" + project: "{{ project }}" + url: "{{ check_url }}" + +- name: "{{ testname }} - api deployEnvironmentBranch with sha of second commit on {{ project }}, which should deploy again the second commit even we had a deployment of the branch before" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + sha: "{{ second_commit_hash }}" + tasks: + - include: ../../tasks/api/deploy-sha.yaml + +- include: ../../checks/check-branch-sha.yaml + vars: + expected_head: "{{ second_commit_hash }}" + expected_branch: "{{ branch }}" + project: "{{ project }}" + url: "{{ check_url }}" + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "{{ branch }}" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" + tasks: + - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/python/deploy-pullrequest.yaml b/tests/tests/python/deploy-pullrequest.yaml new file mode 100644 index 0000000000..fb7a3026bf --- /dev/null +++ b/tests/tests/python/deploy-pullrequest.yaml @@ -0,0 +1,126 @@ + +- name: "{{ testname }} - init git, add files, commit, git push" + hosts: localhost + serial: 1 + vars: + git_files: "python{{ python_version }}/" + branch: "pullrequest_base" + tasks: + - include: ../../tasks/git-init.yaml + - include: ../../tasks/git-add-commit-push.yaml + +- name: "{{ testname }} - save base branch commit" + hosts: localhost + serial: 1 + tasks: + - set_fact: + base_commit_hash: "{{ current_head }}" + +- name: "{{ testname }} - git commit " + hosts: localhost + serial: 1 + vars: + branch: "pullrequest_pr" + tasks: + - include: ../../tasks/git-empty-commit-push.yaml + +- name: "{{ testname }} - save pr branch commit" + hosts: localhost + serial: 1 + tasks: + - set_fact: + pr_commit_hash: "{{ current_head }}" + +- name: "{{ testname }} - api deployEnvironmentPullrequest" + hosts: localhost + serial: 1 + vars: + git_base_branch: "pullrequest_base" + git_base_commit_hash: "{{ base_commit_hash }}" + git_pr_branch: "pullrequest_pr" + git_pr_commit_hash: "{{ pr_commit_hash }}" + git_pr_number: "1" + git_pr_title: "PR Title" + tasks: + - include: ../../tasks/api/pullrequest-deploy.yaml + + +- include: ../../checks/check-branch-sha.yaml + vars: + expected_head: "{{ pr_commit_hash }}" + expected_branch: "pr-1" + project: "{{ project }}" + url: "{{ check_url }}" + +- include: ../../checks/check-pullrequest.yaml + vars: + url: "{{ check_url }}" + expected_build_type: "pullrequest" + expected_pr_base_branch: "pullrequest_base" + expected_pr_base_sha: "{{ base_commit_hash }}" + expected_pr_head_branch: "pullrequest_pr" + expected_pr_head_sha: "{{ pr_commit_hash }}" + expected_pr_title: "PR Title" + +- name: "{{ testname }} - git commit a second time into pull request branch" + hosts: localhost + serial: 1 + vars: + branch: "pullrequest_pr" + tasks: + - include: ../../tasks/git-empty-commit-push.yaml + +- name: "{{ testname }} - save pr branch commit" + hosts: localhost + serial: 1 + tasks: + - set_fact: + pr_2nd_commit_hash: "{{ current_head }}" + +- name: "{{ testname }} - api deployEnvironmentPullrequest" + hosts: localhost + serial: 1 + vars: + git_base_branch: "pullrequest_base" + git_base_commit_hash: "{{ base_commit_hash }}" + git_pr_branch: "pullrequest_pr" + git_pr_commit_hash: "{{ pr_2nd_commit_hash }}" + git_pr_number: "1" + git_pr_title: "PR Title - UPDATE" + tasks: + - include: ../../tasks/api/pullrequest-deploy.yaml + +- include: ../../checks/check-branch-sha.yaml + vars: + expected_head: "{{ pr_2nd_commit_hash }}" + expected_branch: "pr-1" + project: "{{ project }}" + url: "{{ check_url }}" + +- include: ../../checks/check-pullrequest.yaml + vars: + url: "{{ check_url }}" + expected_build_type: "pullrequest" + expected_pr_base_branch: "pullrequest_base" + expected_pr_base_sha: "{{ base_commit_hash }}" + expected_pr_head_branch: "pullrequest_pr" + expected_pr_head_sha: "{{ pr_2nd_commit_hash }}" + expected_pr_title: "PR Title - UPDATE" + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "pr-1" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - check if site for project does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "{{ check_url }}" + expected_returncode: "{{ del_status_code }}" + tasks: + - include: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/python/push.yaml b/tests/tests/python/push.yaml new file mode 100644 index 0000000000..a2767b43db --- /dev/null +++ b/tests/tests/python/push.yaml @@ -0,0 +1,27 @@ + +- name: "{{ testname }} - init git, add files, commit, git push" + hosts: localhost + serial: 1 + vars: + git_files: "python{{ python_version }}/" + tasks: + - include: ../../tasks/git-init.yaml + - include: ../../tasks/git-add-commit-push.yaml + +- name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" + hosts: localhost + serial: 1 + vars: + branch: "{{ branch }}" + project: "{{ project }}" + tasks: + - include: ../../tasks/api/deploy-no-sha.yaml + +#- include: ../../checks/check-branch-sha.yaml +# # when: +# # - expected_status != "500" +# vars: +# expected_head: "{{ current_head }}" +# expected_branch: "{{ branch }}" +# project: "{{ project }}" +# url: "{{ check_url }}" diff --git a/tests/tests/vars/test_vars.yaml b/tests/tests/vars/test_vars.yaml new file mode 100644 index 0000000000..a56ef8fca4 --- /dev/null +++ b/tests/tests/vars/test_vars.yaml @@ -0,0 +1,10 @@ +--- +webhook_url: "$WEBHOOK_PROTOCOL://$WEBHOOK_HOST:$WEBHOOK_PORT" +graphql_url: "$API_PROTOCOL://$API_HOST:$API_PORT/graphql" +localgit_url: "ssh://git@$GIT_HOST:$GIT_PORT/git" +ssh_host: "$SSH_HOST" +ssh_auth_port: "$SSH_PORT" +cluster_type: "$CLUSTER_TYPE" +route_suffix: "$ROUTE_SUFFIX_HTTP:$ROUTE_SUFFIX_HTTP_PORT" +route_suffix_https: "$ROUTE_SUFFIX_HTTPS:$ROUTE_SUFFIX_HTTPS_PORT" +del_status_code: "$DELETED_STATUS_CODE" \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 8f1f96aebe..216dad2d01 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,7 @@ "lib": ["es6", "es2017"], "target": "ES6", "esModuleInterop": true, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "resolveJsonModule": true } }