Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 352e2d8

Browse files
committed
Added install script on Ubuntu
1 parent d5da87b commit 352e2d8

File tree

5 files changed

+68
-20
lines changed

5 files changed

+68
-20
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ install:
1111
- docker run -dt --name "worker-box" -e TEST_TYPE -e GTEST_ROOT -v ${TRAVIS_BUILD_DIR}/:/${TRAVIS_REPO_SLUG} for-worker-box bash
1212
script:
1313
- docker exec -ti worker-box bash -c "cd /${TRAVIS_REPO_SLUG} && git submodule update --init"
14-
- docker exec -ti worker-box bash -c "cd /${TRAVIS_REPO_SLUG} && ./install_deps_centos.sh"
14+
- docker exec -ti worker-box bash -c "cd /${TRAVIS_REPO_SLUG} && ./install_deps_ubuntu.sh"
1515
- docker exec -ti worker-box bash -c "cd /${TRAVIS_REPO_SLUG} && ./test.sh"
1616
after_script:
1717
- docker rm -fv worker-box

Docker/Dockerfile.travis

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
FROM centos:7
19-
RUN yum update -y
20-
RUN yum groupinstall -y base
21-
RUN yum install -y git cmake mc tmux autoconf automake python-devel libtool zlib-devel openssl-devel curl make unzip wget golang clang bzip2-devel gcc-c++ protobuf-compiler libprotobuf-dev libprotoc-dev centos-release-scl-rh
22-
RUN yum install -y devtoolset-4-gcc devtoolset-4-gcc-c++
23-
RUN scl enable devtoolset-4 bash
24-
RUN export PATH=/opt/rh/devtoolset-4/root/usr/bin/:$PATH
18+
FROM ubuntu:xenial
19+
20+
RUN apt-get update && apt-get upgrade -yq
21+
RUN apt-get install g++-4.9 gcc-4.9 protobuf-compiler libprotobuf-dev libprotoc-dev libboost-dev libcppnetlib-dev libspdlog-dev git curl cmake golang-go autoconf libtool ca-certificates unzip software-properties-common golang-go -yq

Vagrant/Vagrantfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Vagrant.configure("2") do |config|
1313

1414
# Every Vagrant development environment requires a box. You can search for
1515
# boxes at https://atlas.hashicorp.com/search.
16-
config.vm.box = "centos/7"
16+
config.vm.box = "ubuntu/xenial64"
1717

1818
config.vm.synced_folder "..", "/home/vagrant/snap-plugin-collector-rdt", :mount_options => ["umask=0022,dmask=0022,fmask=0022"]
1919

@@ -79,14 +79,11 @@ Vagrant.configure("2") do |config|
7979
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
8080
# documentation for more information about their specific syntax and use.
8181
config.vm.provision "shell", inline: <<-SHELL
82-
sudo yum update -y
83-
sudo yum install -y git cmake mc tmux autoconf automake libtool zlib-devel openssl-devel curl make unzip wget golang clang gcc-c++ protobuf-compiler libprotobuf-dev libprotoc-dev centos-release-scl-rh
84-
sudo yum install -y devtoolset-4-gcc devtoolset-4-gcc-c++
85-
sudo scl enable devtoolset-4 bash
86-
export PATH=/opt/rh/devtoolset-4/root/usr/bin/:$PATH
87-
cd snap-plugin-collector-rdt
82+
sudo apt-get update && sudo apt-get upgrade -yq
83+
sudo apt-get install g++-4.9 gcc-4.9 protobuf-compiler libprotobuf-dev libprotoc-dev libboost-dev libcppnetlib-dev libspdlog-dev git curl cmake golang-go autoconf libtool ca-certificates unzip software-properties-common golang-go -yq
84+
cd /home/vagrant/snap-plugin-collector-rdt
8885
git submodule update --init
89-
./install_deps_centos.sh
86+
./install_deps_ubuntu.sh
9087
./build.sh
9188
SHELL
9289
end

build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/usr/bin/env bash
22

3-
export CC=/opt/rh/devtoolset-4/root/usr/bin/gcc
4-
export CXX=/opt/rh/devtoolset-4/root/usr/bin/g++
5-
export PATH=/opt/rh/devtoolset-4/root/usr/bin/:$PATH
6-
gcc --version
73
mkdir -p build
84
cd build
95
cmake ..

install_deps_ubuntu.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2017 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
pushd `pwd`
17+
cd third_party/intel-cmt-cat/lib/
18+
make SHARED=n
19+
cp libpqos.a ../../../lib/
20+
popd
21+
22+
pushd `pwd`
23+
cd ./third_party/googletest
24+
cmake CMakeLists.txt
25+
make -j2
26+
make install
27+
cp googlemock/libgmock.a ../../lib
28+
cp googlemock/gtest/libgtest.a ../../lib
29+
popd
30+
31+
pushd `pwd`
32+
cd ./third_party/grpc
33+
git checkout tags/v1.0.1
34+
git submodule update --init
35+
make -j2
36+
make install
37+
38+
pushd `pwd`
39+
cd ./third_party/protobuf
40+
make clean
41+
./autogen.sh
42+
./configure
43+
make -j2
44+
make install
45+
popd
46+
popd
47+
48+
pushd `pwd`
49+
cd ./third_party/snap-plugin-lib-cpp
50+
mkdir -p build
51+
./autogen.sh
52+
./configure -prefix=`pwd`/build
53+
make -j2
54+
make install
55+
cp build/lib/libsnap.a ../../lib
56+
popd
57+
58+
ldconfig -v

0 commit comments

Comments
 (0)