X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=jjb%2Fshell%2Fkni_deploy_aws.sh;fp=jjb%2Fshell%2Fkni_deploy_aws.sh;h=0000000000000000000000000000000000000000;hb=696cc7df40341399f545521afa9957469341d5f7;hp=d9c468d26156a1b99c64dd979a2006a51ae02d74;hpb=efa0120dc6b80d5e144c40531323098e7d6acbfd;p=ci-management.git diff --git a/jjb/shell/kni_deploy_aws.sh b/jjb/shell/kni_deploy_aws.sh deleted file mode 100755 index d9c468d..0000000 --- a/jjb/shell/kni_deploy_aws.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2019 Red Hat -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e -u -x -o pipefail - -export PATH=$PATH:/usr/local/go/bin:/usr/local/bin -KNI_PATH='src/gerrit.akraino.org/kni/' -SITE_NAME='edge-sites-testing.devcluster.openshift.com' - -echo '---> Starting kni installer generation' -export GOPATH=${WORKSPACE}/ - -# move the blueprint to an inner directory -mkdir ${WORKSPACE}/blueprint-pae -mv base profiles sites tools ${WORKSPACE}/blueprint-pae/ - -# clone installer in the right directory -sudo rm -rf ${WORKSPACE}/${KNI_PATH} -mkdir -p ${WORKSPACE}/${KNI_PATH} -pushd ${WORKSPACE}/${KNI_PATH}/ -git clone https://gerrit.akraino.org/r/kni/installer -pushd installer - -# first build kni installer -make build 2>&1 | tee ${WORKSPACE}/build.log - -# add the right credentials to kni -mkdir $HOME/.kni || true -cp $WORKSPACE/akraino-secrets/coreos-pull-secret $HOME/.kni/pull-secret.json || true - -# start the workflow -./knictl fetch_requirements file://${WORKSPACE}/blueprint-pae//sites/${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_requirements.log -./knictl prepare_manifests ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_manifests.log - -# now run the cluster -source $HOME/.kni/${SITE_NAME}/profile.env -$HOME/.kni/${SITE_NAME}/requirements/openshift-install create cluster --dir=/$HOME/.kni/${SITE_NAME}/final_manifests 2>&1 | tee ${WORKSPACE}/aws_deploy.log -STATUS=$? - -# output tfstate -echo "metadata.json for removing cluster" -cat $HOME/.kni/${SITE_NAME}/final_manifests/metadata.json - -if [ $STATUS -ne 0 ]; then - echo "Error deploying in AWS" - exit 1 -fi - -echo "Cluster successfully deployed! Start applying workloads" -./knictl apply_workloads ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_workloads.go -STATUS=$? - -if [ $STATUS -ne 0 ]; then - echo "Error applying workloads to AWS" - exit 1 -fi - -echo "Workloads successfully applied! Starting cleanup" -$HOME/.kni/${SITE_NAME}/requirements/openshift-install destroy cluster --dir=/$HOME/.kni/${SITE_NAME}/final_manifests 2>&1 | tee ${WORKSPACE}/aws_destroy.log -STATUS=$? - -popd - -exit $STATUS