Opc-au client and server added
[eliot.git] / blueprints / iotgateway / playbooks / roles / el_opc-au / files / deploy / opc-au_client / build.sh
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2019 Huawei Tech and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 set -o errexit
13
14 # set the docker name and docker tag when you build
15 DOCKER_NAME=
16 DOCKER_TAG=
17
18 export ELIOT_DIR=$(cd $(dirname $0); pwd)
19 export WORK_DIR=$ELIOT_DIR/work
20 export CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v3.15.2/cmake-3.15.2.tar.gz
21 export SCONS_PPA_URL=http://repo.okay.com.mx/centos/7/x86_64/release//scons-2.3.0-1.el7.centos.noarch.rpm
22 export GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
23 export OPCUA_REPO=https://github.com/edgexfoundry-holding/protocol-opcua-c.git
24 export DOCKER_NAME=${DOCKER_NAME:-"eliot/opc-ua-client"}
25 export DOCKER_TAG=${DOCKER_TAG:-"latest"}
26
27
28 rm -rf $WORK_DIR
29 mkdir -p $WORK_DIR
30
31 cd $WORK_DIR
32 wget $CMAKE_URL
33 wget $SCONS_PPA_URL
34 wget $GET_PIP_URL
35 git clone $OPCUA_REPO
36
37 cd $ELIOT_DIR
38 docker build ./ -t $DOCKER_NAME:$DOCKER_TAG