Skip to content

Commit

Permalink
Merge pull request #110 from AO-StreetArt/DependencyScriptUpdates
Browse files Browse the repository at this point in the history
Dependency script updates
  • Loading branch information
AO-StreetArt committed Jan 24, 2018
2 parents 2059b31 + 428fa52 commit 81ebb2a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 48 deletions.
34 changes: 3 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,11 @@ MAINTAINER Alex Barry
#Set up front end
ENV DEBIAN_FRONTEND noninteractive

#Setup basic environment tools
RUN apt-get update
RUN apt-get install -y apt-utils debconf-utils iputils-ping wget curl mc htop ssh software-properties-common
RUN apt-get clean

#Setup necessary components for building the library
RUN add-apt-repository -y ppa:cleishm/neo4j
RUN apt-get update
RUN apt-get install -y build-essential libtool pkg-config autoconf automake cmake uuid-dev libhiredis-dev libcurl4-openssl-dev libevent-dev git libsnappy-dev liblog4cpp5-dev libssl-dev openssl neo4j-client libneo4j-client-dev

#Get the Mongo Dependencies, we build from source as the version provided by apt-get uses deprecated functions
RUN wget https://github.com/mongodb/mongo-c-driver/releases/download/1.6.3/mongo-c-driver-1.6.3.tar.gz
RUN tar xzf mongo-c-driver-1.6.3.tar.gz
RUN cd mongo-c-driver-1.6.3 && ./configure --disable-automatic-init-and-cleanup --with-libbson=bundled && make && make install

#Build & Install ZMQ
RUN wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.4/zeromq-4.1.4.tar.gz
RUN tar -xvzf zeromq-4.1.4.tar.gz
RUN cd ./zeromq-4.1.4 && ./configure --without-libsodium && make && make install
ADD ./scripts/deb/build_deps.sh .

#Get Hayai, for benchmarks
RUN git clone https://github.com/nickbruun/hayai.git
RUN cd hayai && cmake . && make && make install

#Run ldconfig to ensure that Hayai is on the linker path
RUN ldconfig

#Get the ZMQ C++ Bindings
RUN git clone https://github.com/zeromq/cppzmq.git

#Get ZMQ C++ Header files into include path
RUN cp cppzmq/zmq.hpp /usr/local/include
RUN cp cppzmq/zmq_addon.hpp /usr/local/include
#Setup basic environment tools
RUN ./build_deps.sh

#Expose some of the default ports
EXPOSE 22
Expand Down
36 changes: 19 additions & 17 deletions scripts/deb/build_deps.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
#!/bin/bash
set -e
#This script will attempt to build AOSSL dependencies

#Based on Ubuntu 14.04 LTS

printf "Creating Dependency Folder"
printf "Creating Dependency Folder\n"
PRE=./downloads
mkdir $PRE

printf "apt-get setup"
printf "apt-get setup\n"
apt-get -y update

#Install the basic tools we need
apt-get install -y apt-utils debconf-utils iputils-ping wget curl mc htop ssh software-properties-common

#Install latest version of autoconf
#Fix for Travis CI Builds which don't have latest version installed
sudo add-apt-repository ppa:dns/gnu -y
sudo apt-get -y -q update
sudo apt-get install -y --only-upgrade autoconf

#Install the basic tools we need
sudo apt-get install -y apt-utils debconf-utils iputils-ping wget curl mc htop ssh software-properties-common
# add-apt-repository ppa:dns/gnu -y
# apt-get -y -q update
# apt-get install -y --only-upgrade autoconf

#Add libneo4j repository
sudo add-apt-repository ppa:cleishm/neo4j -y
sudo apt-get -y -q update
add-apt-repository ppa:cleishm/neo4j -y
apt-get -y -q update

printf "Starting with apt-get dependencies"
sudo apt-get -y -q install build-essential libtool pkg-config automake cmake uuid-dev libhiredis-dev libcurl4-openssl-dev libevent-dev git libsnappy-dev liblog4cpp5-dev libssl-dev openssl neo4j-client libneo4j-client-dev
apt-get -y -q install build-essential libtool pkg-config automake cmake uuid-dev libhiredis-dev libcurl4-openssl-dev libevent-dev git libsnappy-dev liblog4cpp5-dev libssl-dev openssl neo4j-client libneo4j-client-dev

printf "Building Mongo C Driver"
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.6.3/mongo-c-driver-1.6.3.tar.gz
tar xzf mongo-c-driver-1.6.3.tar.gz
cd mongo-c-driver-1.6.3 && ./configure --disable-automatic-init-and-cleanup --with-libbson=bundled && make && sudo make install
cd mongo-c-driver-1.6.3 && ./configure --disable-automatic-init-and-cleanup --with-libbson=bundled && make && make install

if [ ! -f /usr/local/include/zmq.h ]; then

Expand All @@ -45,7 +47,7 @@ if [ ! -f /usr/local/include/zmq.h ]; then
printf "Building ZMQ"

#Configure, make, install
cd ./zeromq-4.1.4 && ./configure --without-libsodium && make && sudo make install
cd ./zeromq-4.1.4 && ./configure --without-libsodium && make && make install
cd ../

fi
Expand All @@ -58,16 +60,16 @@ if [ ! -f /usr/local/include/zmq.hpp ]; then
git clone https://github.com/zeromq/cppzmq.git

#Get ZMQ C++ Header files into include path
sudo cp ./cppzmq/zmq.hpp /usr/local/include
sudo cp ./cppzmq/zmq_addon.hpp /usr/local/include
cp ./cppzmq/zmq.hpp /usr/local/include
cp ./cppzmq/zmq_addon.hpp /usr/local/include

fi

printf "Building Hayai, optional, for benchmarks"
git clone https://github.com/nickbruun/hayai.git
cd hayai && cmake . && make && sudo make install
cd hayai && cmake . && make && make install

#Run ldconfig to ensure that all built libraries are on the linker path
sudo ldconfig
ldconfig

printf "Finished installing dependencies"

0 comments on commit 81ebb2a

Please sign in to comment.