You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2018/08/02 19:39:14 UTC
[geode] branch develop updated: [GEODE-5519] Add stackdriver
monitoring to instances.
This is an automated email from the ASF dual-hosted git repository.
jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new c431d24 [GEODE-5519] Add stackdriver monitoring to instances.
c431d24 is described below
commit c431d24be1c00e25feefbeca26268079882c464f
Author: Sean Goller <sg...@pivotal.io>
AuthorDate: Thu Aug 2 11:33:32 2018 -0700
[GEODE-5519] Add stackdriver monitoring to instances.
* Add stackdriver agent to google-geode-builder.
* Add labels identifying heavy-lifters
Signed-off-by: Patrick Rhomberg <pr...@pivotal.io>
---
ci/images/google-geode-builder/packer.json | 4 ++--
ci/images/google-geode-builder/scripts/setup.sh | 3 +++
ci/scripts/start_instance.sh | 6 +++++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ci/images/google-geode-builder/packer.json b/ci/images/google-geode-builder/packer.json
index b930fd1..950aab1 100644
--- a/ci/images/google-geode-builder/packer.json
+++ b/ci/images/google-geode-builder/packer.json
@@ -1,7 +1,7 @@
{
"variables": {
- "image_family_prefix": "",
- "geode_docker_image": ""
+ "image_family_prefix": "local-testing-",
+ "geode_docker_image": "gcr.io/apachegeode-ci/test-container"
},
"provisioners": [
{
diff --git a/ci/images/google-geode-builder/scripts/setup.sh b/ci/images/google-geode-builder/scripts/setup.sh
index 8aa1ad1..b55283b 100755
--- a/ci/images/google-geode-builder/scripts/setup.sh
+++ b/ci/images/google-geode-builder/scripts/setup.sh
@@ -55,6 +55,9 @@ pushd /tmp
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz
tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz -C /
rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz
+ curl -sSO https://dl.google.com/cloudagents/install-monitoring-agent.sh
+ bash install-monitoring-agent.sh
+ rm install-monitoring-agent.sh
popd
export PATH=/google-cloud-sdk/bin:${PATH}
gcloud config set core/disable_usage_reporting true
diff --git a/ci/scripts/start_instance.sh b/ci/scripts/start_instance.sh
index 7bdd1fb..60a5465 100755
--- a/ci/scripts/start_instance.sh
+++ b/ci/scripts/start_instance.sh
@@ -46,6 +46,9 @@ fi
SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-" | tr '[:upper:]' '[:lower:]')
+SANITIZED_BUILD_PIPELINE_NAME=$(echo ${BUILD_PIPELINE_NAME} | tr "/" "-" | tr '[:upper:]' '[:lower:]')
+SANITIZED_BUILD_JOB_NAME=$(echo ${BUILD_JOB_NAME} | tr "/" "-" | tr '[:upper:]' '[:lower:]')
+SANITIZED_BUILD_NAME=$(echo ${BUILD_NAME} | tr "/" "-" | tr '[:upper:]' '[:lower:]')
IMAGE_FAMILY_PREFIX=""
if [[ "${GEODE_FORK}" != "apache" ]]; then
@@ -64,6 +67,7 @@ RAM_MEGABYTES=$( expr ${RAM} \* 1024 )
while true; do
TTL=$(($(date +%s) + 60 * 60 * 6))
+ LABELS="instance_type=heavy-lifter,time-to-live=${TTL},job-name=${SANITIZED_BUILD_JOB_NAME},pipeline-name=${SANITIZED_BUILD_PIPELINE_NAME},build-name=${SANITIZED_BUILD_NAME}"
set +e
INSTANCE_INFORMATION=$(gcloud compute --project=${PROJECT} instances create ${INSTANCE_NAME} \
@@ -74,7 +78,7 @@ while true; do
--image-project=${PROJECT} \
--boot-disk-size=100GB \
--boot-disk-type=pd-ssd \
- --labels=time-to-live=${TTL} \
+ --labels="${LABELS}" \
--format=json)
CREATE_EXIT_STATUS=$?
set -e