-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into discover-help
- Loading branch information
Showing
6,200 changed files
with
548,607 additions
and
477,870 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.10.1 | ||
1.11.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.2.1 | ||
5.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/cloud/build_and_deploy.sh | ||
label: 'Build and Deploy to Cloud' | ||
agents: | ||
queue: n2-2 | ||
depends_on: build | ||
timeout_in_minutes: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
steps: | ||
- command: .buildkite/scripts/steps/cloud/purge.sh | ||
label: Purge old cloud deployments | ||
timeout_in_minutes: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/common/util.sh | ||
|
||
.buildkite/scripts/bootstrap.sh | ||
|
||
export KBN_NP_PLUGINS_BUILT=true | ||
|
||
VERSION="$(jq -r '.version' package.json)-SNAPSHOT" | ||
|
||
echo "--- Download kibana distribution" | ||
|
||
mkdir -p ./target | ||
buildkite-agent artifact download "kibana-$VERSION-linux-x86_64.tar.gz" ./target --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}" | ||
|
||
echo "--- Build and push Kibana Cloud Distribution" | ||
|
||
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co | ||
trap 'docker logout docker.elastic.co' EXIT | ||
|
||
node scripts/build \ | ||
--skip-initialize \ | ||
--skip-generic-folders \ | ||
--skip-platform-folders \ | ||
--skip-archives \ | ||
--docker-images \ | ||
--docker-tag-qualifier="$GIT_COMMIT" \ | ||
--docker-push \ | ||
--skip-docker-ubi \ | ||
--skip-docker-ubuntu \ | ||
--skip-docker-contexts | ||
|
||
CLOUD_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-cloud) | ||
CLOUD_DEPLOYMENT_NAME="kibana-pr-$BUILDKITE_PULL_REQUEST" | ||
|
||
jq ' | ||
.resources.kibana[0].plan.kibana.docker_image = "'$CLOUD_IMAGE'" | | ||
.name = "'$CLOUD_DEPLOYMENT_NAME'" | | ||
.resources.kibana[0].plan.kibana.version = "'$VERSION'" | | ||
.resources.elasticsearch[0].plan.elasticsearch.version = "'$VERSION'" | ||
' .buildkite/scripts/steps/cloud/deploy.json > /tmp/deploy.json | ||
|
||
CLOUD_DEPLOYMENT_ID=$(ecctl deployment list --output json | jq -r '.deployments[] | select(.name == "'$CLOUD_DEPLOYMENT_NAME'") | .id') | ||
JSON_FILE=$(mktemp --suffix ".json") | ||
if [ -z "${CLOUD_DEPLOYMENT_ID}" ]; then | ||
ecctl deployment create --track --output json --file /tmp/deploy.json &> "$JSON_FILE" | ||
CLOUD_DEPLOYMENT_USERNAME=$(jq --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.username' "$JSON_FILE") | ||
CLOUD_DEPLOYMENT_PASSWORD=$(jq --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.password' "$JSON_FILE") | ||
CLOUD_DEPLOYMENT_ID=$(jq -r --slurp '.[0].id' "$JSON_FILE") | ||
CLOUD_DEPLOYMENT_STATUS_MESSAGES=$(jq --slurp '[.[]|select(.resources == null)]' "$JSON_FILE") | ||
|
||
# Refresh vault token | ||
VAULT_ROLE_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-role-id)" | ||
VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)" | ||
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") | ||
retry 5 30 vault login -no-print "$VAULT_TOKEN" | ||
|
||
retry 5 5 vault write "secret/kibana-issues/dev/cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD" | ||
else | ||
ecctl deployment update "$CLOUD_DEPLOYMENT_ID" --track --output json --file /tmp/deploy.json &> "$JSON_FILE" | ||
fi | ||
|
||
CLOUD_DEPLOYMENT_KIBANA_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.kibana[0].info.metadata.aliased_url') | ||
CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.elasticsearch[0].info.metadata.aliased_url') | ||
|
||
cat << EOF | buildkite-agent annotate --style "info" --context cloud | ||
### Cloud Deployment | ||
Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL | ||
Elasticsearch: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL | ||
Credentials: \`vault read secret/kibana-issues/dev/cloud-deploy/$CLOUD_DEPLOYMENT_NAME\` | ||
Image: $CLOUD_IMAGE | ||
EOF | ||
|
||
buildkite-agent meta-data set pr_comment:deploy_cloud:head "* [Cloud Deployment](${CLOUD_DEPLOYMENT_KIBANA_URL})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
{ | ||
"resources": { | ||
"elasticsearch": [ | ||
{ | ||
"region": "gcp-us-west2", | ||
"settings": { | ||
"dedicated_masters_threshold": 6 | ||
}, | ||
"plan": { | ||
"autoscaling_enabled": false, | ||
"cluster_topology": [ | ||
{ | ||
"zone_count": 2, | ||
"instance_configuration_id": "gcp.coordinating.1", | ||
"node_roles": ["ingest", "remote_cluster_client"], | ||
"id": "coordinating", | ||
"size": { | ||
"resource": "memory", | ||
"value": 0 | ||
}, | ||
"elasticsearch": { | ||
"enabled_built_in_plugins": [] | ||
} | ||
}, | ||
{ | ||
"zone_count": 1, | ||
"elasticsearch": { | ||
"node_attributes": { | ||
"data": "hot" | ||
}, | ||
"enabled_built_in_plugins": [] | ||
}, | ||
"instance_configuration_id": "gcp.data.highio.1", | ||
"node_roles": [ | ||
"master", | ||
"ingest", | ||
"transform", | ||
"data_hot", | ||
"remote_cluster_client", | ||
"data_content" | ||
], | ||
"id": "hot_content", | ||
"size": { | ||
"value": 1024, | ||
"resource": "memory" | ||
} | ||
}, | ||
{ | ||
"zone_count": 2, | ||
"elasticsearch": { | ||
"node_attributes": { | ||
"data": "warm" | ||
}, | ||
"enabled_built_in_plugins": [] | ||
}, | ||
"instance_configuration_id": "gcp.data.highstorage.1", | ||
"node_roles": ["data_warm", "remote_cluster_client"], | ||
"id": "warm", | ||
"size": { | ||
"resource": "memory", | ||
"value": 0 | ||
} | ||
}, | ||
{ | ||
"zone_count": 1, | ||
"elasticsearch": { | ||
"node_attributes": { | ||
"data": "cold" | ||
}, | ||
"enabled_built_in_plugins": [] | ||
}, | ||
"instance_configuration_id": "gcp.data.highstorage.1", | ||
"node_roles": ["data_cold", "remote_cluster_client"], | ||
"id": "cold", | ||
"size": { | ||
"resource": "memory", | ||
"value": 0 | ||
} | ||
}, | ||
{ | ||
"zone_count": 1, | ||
"elasticsearch": { | ||
"node_attributes": { | ||
"data": "frozen" | ||
}, | ||
"enabled_built_in_plugins": [] | ||
}, | ||
"instance_configuration_id": "gcp.es.datafrozen.n1.64x10x95", | ||
"node_roles": ["data_frozen"], | ||
"id": "frozen", | ||
"size": { | ||
"resource": "memory", | ||
"value": 0 | ||
} | ||
}, | ||
{ | ||
"zone_count": 3, | ||
"instance_configuration_id": "gcp.master.1", | ||
"node_roles": ["master", "remote_cluster_client"], | ||
"id": "master", | ||
"size": { | ||
"resource": "memory", | ||
"value": 0 | ||
}, | ||
"elasticsearch": { | ||
"enabled_built_in_plugins": [] | ||
} | ||
}, | ||
{ | ||
"zone_count": 1, | ||
"instance_configuration_id": "gcp.ml.1", | ||
"node_roles": ["ml", "remote_cluster_client"], | ||
"id": "ml", | ||
"size": { | ||
"resource": "memory", | ||
"value": 0 | ||
}, | ||
"elasticsearch": { | ||
"enabled_built_in_plugins": [] | ||
} | ||
} | ||
], | ||
"elasticsearch": { | ||
"version": null | ||
}, | ||
"deployment_template": { | ||
"id": "gcp-io-optimized-v2" | ||
} | ||
}, | ||
"ref_id": "main-elasticsearch" | ||
} | ||
], | ||
"enterprise_search": [], | ||
"kibana": [ | ||
{ | ||
"elasticsearch_cluster_ref_id": "main-elasticsearch", | ||
"region": "gcp-us-west2", | ||
"plan": { | ||
"cluster_topology": [ | ||
{ | ||
"instance_configuration_id": "gcp.kibana.1", | ||
"zone_count": 1, | ||
"size": { | ||
"resource": "memory", | ||
"value": 1024 | ||
} | ||
} | ||
], | ||
"kibana": { | ||
"version": null, | ||
"docker_image": null | ||
} | ||
}, | ||
"ref_id": "main-kibana" | ||
} | ||
], | ||
"apm": [] | ||
}, | ||
"name": null, | ||
"metadata": { | ||
"system_owned": false | ||
} | ||
} |
Oops, something went wrong.