-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·76 lines (62 loc) · 2.44 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
#
# This will install and configure myslicelib and myslice
# See RAEDME.md to understand how to start this image
#
#Installing required software
apt-get -y install wget libssl-dev libcurl4-openssl-dev curl git
apt-get -y install python3-pip
pip --version
apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install software-properties-common python-software-properties \
&& add-apt-repository -y ppa:fkrull/deadsnakes \
&& apt-get update \
&& apt-get -y install python3.5 python3.5-dev \
&& apt-get -y install libxml2-dev libxslt1-dev \
&& curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" \
&& python3.5 get-pip.py
apt-get -y install libffi-dev libffi6
#Installing RethinkDB
echo "deb http://download.rethinkdb.com/apt trusty main" > /etc/apt/sources.list.d/rethinkdb.list \
&& wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | apt-key add - \
&& apt-get update \
&& apt-get -y install rethinkdb \
&& echo "bind=all" > /etc/rethinkdb/instances.d/myslice.conf
# Installing myslicelib
cd /root/ \
&& git clone http://gitlab.noc.onelab.eu/onelab/myslicelib.git \
&& pip install --upgrade pip \
&& pip install -r myslicelib/requirements.txt \
&& cd myslicelib \
&& python3.5 setup.py develop
# INSTALLING myslice #
echo "Installing myslice" \
&& cd /root/ \
&& git clone http://gitlab.noc.onelab.eu/onelab/myslice.git \
&& apt-get -y install libzmq3-dev curl nodejs libmysqlclient-dev \
&& pip install -r myslice/requirements.txt \
&& cd myslice \
&& python3.5 setup.py develop \
&& cd /root/ \
&& curl -sL https://deb.nodesource.com/setup_4.x | bash - \
&& apt-get -y install nodejs \
&& cd /root/myslice/myslice/web/static/js/src/ \
&& npm install \
&& npm i -g webpack \
&& webpack
# Here we need to configure pkey and cert:
echo "Creating pkey and cert folder /var/myslice"
mkdir /var/myslice
echo "Creating log folder /var/log/myslice"
mkdir /var/log/myslice
echo "Creating config folder /etc/myslice"
mkdir /etc/myslice
echo "Configure MySlice with default .cfg"
cp /root/myslice/dist/config/* /etc/myslice/
rename 's/.dist$//' /etc/myslice/*.dist
echo "Configure RethinkDB"
echo "bind=all" > /etc/rethinkdb/instances.d/myslice.conf
/etc/init.d/rethinkdb start
/root/myslice/myslice/bin/db-setup
cd /root/myslice/