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
18 export IMAGE_NAME="nexus3.onap.org:10003/onap/multicloud/k8s"
20 export CSAR_DIR=/opt/csar
21 export KUBE_CONFIG_DIR=/opt/kubeconfig
22 export DATABASE_TYPE=mongo
23 export PLUGINS_DIR=$k8s_path/src/k8splugin/plugins
25 echo "Starting mongo services"
27 docker-compose up -d mongo
28 export DATABASE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aqf "name=mongo"))
29 export no_proxy=$no_proxy,$DATABASE_IP
30 export NO_PROXY=$NO_PROXY,$DATABASE_IP
32 echo "Compiling source code"
33 pushd $k8s_path/src/k8splugin/
35 env GO111MODULE=on go run cmd/main.go