Skip to content

Commit

Permalink
set up remote execution plane
Browse files Browse the repository at this point in the history
  • Loading branch information
bacherfl committed Apr 28, 2021
1 parent 459f2ab commit 33d5a10
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions setup_keptn_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,32 @@

source ${BASE_PATH}/utils.sh

function onboard_service() {
SERVICE_NAME=$1
PROJECT_NAME=$2
HELM_CHART_URL=$3

echo "Onboarding ${SERVICE_NAME} to ${PROJECT_NAME}"
keptn create service ${SERVICE_NAME} --project=${PROJECT_NAME}
wget ${HELM_CHART_URL} -O "${HOME}/downloads/${SERVICE_NAME}.tgz"
keptn add-resource --project=${PROJECT_NAME} --service=${SERVICE_NAME} --all-stages --resource=${HOME}/downloads/${SERVICE_NAME}.tgz --resourceUri=helm/${SERVICE_NAME}.tgz

}

echo "Creating project ${KEPTN_PROJECT}"
keptn create project ${KEPTN_PROJECT} --shipyard=${BASE_PATH}/assets/shipyard.yaml

echo "Onboarding Keptn to ${KEPTN_PROJECT}"
keptn create service keptn --project=${KEPTN_PROJECT}
# download the helm charts
wget "https://github.com/keptn/keptn/releases/download/${KEPTN_PROJECT_VERSION}/keptn-${KEPTN_PROJECT_VERSION}.tgz" -O "${HOME}/downloads/keptn.tgz"
keptn add-resource --project=${KEPTN_PROJECT} --service=keptn --all-stages --resource=${HOME}/downloads/keptn.tgz --resourceUri=helm/keptn.tgz
onboard_service "keptn" ${KEPTN_PROJECT} "https://github.com/keptn/keptn/releases/download/${KEPTN_PROJECT_VERSION}/keptn-${KEPTN_PROJECT_VERSION}.tgz"
onboard_service "helm-service" ${KEPTN_PROJECT} "https://github.com/keptn/keptn/releases/download/${KEPTN_PROJECT_VERSION}/helm-service-${KEPTN_PROJECT_VERSION}.tgz"
onboard_service "jmeter-service" ${KEPTN_PROJECT} "https://github.com/keptn/keptn/releases/download/${KEPTN_PROJECT_VERSION}/jmeter-service-${KEPTN_PROJECT_VERSION}.tgz"

if [[ $ONBOARD_DYNATRACE_SERVICE == "true" ]]; then
echo "Onboarding the dynatrace-service"
keptn create service dynatrace-service --project=${KEPTN_PROJECT}
wget "https://github.com/keptn-contrib/dynatrace-service/releases/download/${DYNATRACE_SERVICE_VERSION}/dynatrace-service-${DYNATRACE_SERVICE_VERSION}.tgz" -O "${HOME}/downloads/dynatrace-service.tgz"
keptn add-resource --project=${KEPTN_PROJECT} --service=dynatrace-service --all-stages --resource=${HOME}/downloads/dynatrace-service.tgz --resourceUri=helm/dynatrace-service.tgz
onboard_service "dynatrace-service" ${KEPTN_PROJECT} "https://github.com/keptn-contrib/dynatrace-service/releases/download/${DYNATRACE_SERVICE_VERSION}/dynatrace-service-${DYNATRACE_SERVICE_VERSION}.tgz"
fi

if [[ $ONBOARD_DYNATRACE_SERVICE == "true" ]]; then
echo "Onboarding the dynatrace-sli-service"
keptn create service dynatrace-sli-service --project=${KEPTN_PROJECT}
wget "https://github.com/keptn-contrib/dynatrace-sli-service/releases/download/${DYNATRACE_SLI_SERVICE_VERSION}/dynatrace-sli-service-${DYNATRACE_SLI_SERVICE_VERSION}.tgz" -O "${HOME}/downloads/dynatrace-sli-service.tgz"
keptn add-resource --project=${KEPTN_PROJECT} --service=dynatrace-sli-service --all-stages --resource=${HOME}/downloads/dynatrace-sli-service.tgz --resourceUri=helm/dynatrace-sli-service.tgz
onboard_service "dynatrace-sli-service" ${KEPTN_PROJECT} "https://github.com/keptn-contrib/dynatrace-sli-service/releases/download/${DYNATRACE_SLI_SERVICE_VERSION}/dynatrace-sli-service-${DYNATRACE_SLI_SERVICE_VERSION}.tgz"
fi


0 comments on commit 33d5a10

Please sign in to comment.