2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018 Intel Corporation
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
14 source /etc/environment
16 k8s_path="$(git rev-parse --show-toplevel)"
17 export GOPATH=$k8s_path
19 export CSAR_DIR=/opt/csar
20 export KUBE_CONFIG_DIR=/opt/kubeconfig
21 export DATABASE_TYPE=consul
22 export PLUGINS_DIR=$k8s_path/src/k8splugin/plugins
24 echo "Starting consul services"
26 docker-compose up -d consul
27 export DATABASE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' deployments_consul_1)
28 export no_proxy=$no_proxy,$DATABASE_IP
29 export NO_PROXY=$NO_PROXY,$DATABASE_IP
31 echo "Compiling source code"
32 pushd $k8s_path/src/k8splugin/
34 env GO111MODULE=on go run cmd/main.go