Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install script #17

Open
chrizzly123 opened this issue May 5, 2020 · 0 comments
Open

install script #17

chrizzly123 opened this issue May 5, 2020 · 0 comments
Assignees

Comments

@chrizzly123
Copy link
Collaborator

chrizzly123 commented May 5, 2020

possible install script for ubuntu:

#!/bin/sh

#install stuff
sudo apt update && sudo apt install -y \
git \
build-essential \
libtool \
pkg-config \
autotools-dev \
autoconf \
make \
automake \
cmake \
uuid-dev \
libpcre3-dev \
wget \
tar \
git \
maven

#install boost
sudo apt install -y libboost-all-dev

# install openjdk
sudo apt install -y openjdk-14-jdk
sudo bash -c "echo JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64 >> /etc/environment"

#install libsodium
wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz \
&& tar -xf libsodium-1.0.18.tar.gz \
&& cd libsodium-1.0.18 \
&& ./autogen.sh \
&& ./configure \
&& make \
&& sudo make install \
&& sudo ldconfig \
&& cd .. \
&& sudo rm -r libsodium-1.0.18.tar.gz libsodium-1.0.18

#install zmq
git clone git://github.com/zeromq/libzmq.git \
&& cd libzmq \
&& ./autogen.sh \
&& ./configure --with-libsodium \
&& make \
&& sudo make install \
&& sudo ldconfig \
&& cd .. \
&& sudo rm -r libzmq

#install zmqpp
wget https://github.com/zeromq/zmqpp/archive/4.2.0.tar.gz \
&& tar -xf 4.2.0.tar.gz \
&& cd zmqpp-4.2.0 \
&& make \
&& sudo make install \
&& sudo ldconfig \
&& cd .. \
&& sudo rm -r 4.2.0.tar.gz zmqpp-4.2.0

#install SFSCpp
git clone -b dev https://github.com/nalim2/SFSCpp.git \
&& cd SFSCpp \
&& cmake . \
&& make \
&& sudo make install \
&& sudo cp /usr/local/lib/libZmqExecutorLib.so /usr/lib/ \
&& sudo cp /usr/local/lib/libJniZmq.so /usr/lib/ \
&& sudo ldconfig \
&& cd .. \
&& sudo rm -r SFSCpp

#install protobuf
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protobuf-all-3.11.4.tar.gz \
&& tar -xf protobuf-all-3.11.4.tar.gz \
&& cd protobuf-3.11.4 \
&& ./autogen.sh \
&& ./configure \
&& make \
&& sudo make install \
&& sudo ldconfig \
&& cd .. \
&& sudo rm -r protobuf-all-3.11.4.tar.gz protobuf-3.11.4

#install SFSC
git clone -b dev https://github.com/nalim2/SFSC.git \
&& cd SFSC \
&& mvn install \
&& cp ./docker-core/target/docker-core.jar / \
&& cd .. \
&& sudo rm -r SFSC 

possible install script for openjdk:14-alpine:

#!/bin/sh

#install stuff
apk update && apk add --no-cache \
build-base \
libtool \
autoconf \
automake \
pkgconfig \
cmake \
git \
boost-dev \
maven \
tini

#install libsodium
wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz \
&& tar -xf libsodium-1.0.18.tar.gz \
&& cd libsodium-1.0.18 \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm -r libsodium-1.0.18.tar.gz libsodium-1.0.18

#install zmq
git clone git://github.com/zeromq/libzmq.git \
&& cd libzmq \
&& ./autogen.sh \
&& ./configure --with-libsodium \
&& make \
&& make install \
&& cd .. \
&& rm -r libzmq

#install zmqpp
wget https://github.com/zeromq/zmqpp/archive/4.2.0.tar.gz \
&& tar -xf 4.2.0.tar.gz \
&& cd zmqpp-4.2.0 \
&& make \
&& make install \
&& cd .. \
&& rm -r 4.2.0.tar.gz zmqpp-4.2.0

#install SFSCpp
git clone -b dev https://github.com/nalim2/SFSCpp.git \
&& cd SFSCpp \
&& cmake . \
&& make \
&& make install \
&& cp /usr/local/lib/libZmqExecutorLib.so /usr/lib/ \
&& cp /usr/local/lib/libJniZmq.so /usr/lib/ \
&& cd .. \
&& rm -r SFSCpp

#install protobuf
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protobuf-all-3.11.4.tar.gz \
&& tar -xf protobuf-all-3.11.4.tar.gz \
&& cd protobuf-3.11.4 \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm -r protobuf-all-3.11.4.tar.gz protobuf-3.11.4

#install SFSC
git clone -b dev https://github.com/nalim2/SFSC.git \
&& cd SFSC \
&& mvn install \
&& cp ./docker-core/target/docker-core.jar / \
&& cd .. \
&& rm -r SFSC 

note:

  • no claim to be minimal
  • some libraries would be also available over apt/apk
  • for ubuntu, the installation of docker is not included
  • currently the build file from docker is triggered from mvn install. Therefore, the alpine script does not complete when run inside a docker container at the moment. Also, for SFSC and SFSCpp we simply pull the newest branches from github
    • thoughts need to be made when to build the docker image. i think it would be good to not do it by default, instead split it into a completely separate job, triggered by a succesful new release.
      • open point with this solution: it should still be possbile to build a local image for debugging on a developer machine
  • no thoughts yet made about caching in docker file, maybe it would be good to split script into multiple layers
  • because of this issue in zmq we cant use the newest final release, instead we use the current master branch. Else we could do sth like this instead
    • for ubuntu
    #install zmq
    wget https://github.com/zeromq/libzmq/releases/download/v4.3.2/zeromq-4.3.2.tar.gz \
    && tar -xf zeromq-4.3.2.tar.gz \
    && cd zeromq-4.3.2 \
    && ./autogen.sh \
    && ./configure --with-libsodium \
    && make \
    && sudo make install \
    && sudo ldconfig \
    && cd .. \
    && sudo rm -r zeromq-4.3.2.tar.gz zeromq-4.3.2
    
    • for alpine
    #install zmq
    wget https://github.com/zeromq/libzmq/releases/download/v4.3.2/zeromq-4.3.2.tar.gz \
    && tar -xf zeromq-4.3.2.tar.gz \
    && cd zeromq-4.3.2 \
    && ./autogen.sh \
    && ./configure --with-libsodium \
    && make \
    && make install \
    && cd .. \
    && rm -r zeromq-4.3.2.tar.gz zeromq-4.3.2
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants