-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-env.sh
executable file
·82 lines (67 loc) · 2.45 KB
/
prepare-env.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
77
78
79
80
81
82
#!/bin/bash
set -e
# This script prepares the software environment for all experiments (except for building Ceph)
# must have sudo privilege without password!
# update apt repository
sudo apt-get update
#########################
### install oltpbench ###
#########################
sudo apt-get install default-jdk -yy # get java
sudo apt-get install ant -yy # get apache ant
# GET OLTPBENCH
git clone https://github.com/oltpbenchmark/oltpbench.git
cd oltpbench/
ant bootstrap
ant resolve
ant build
cd ../
cp config/*.xml oltpbench/config/
#############################
### install docker engine ###
#############################
sudo apt-get remove docker docker-engine docker.io containerd runc || true # remove old versions
sudo apt-get install ca-certificates curl gnupg lsb-release -yy
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -yy
sudo usermod -aG docker $USER # use docker without sudo, need to re-login
################################################
### install python3, fio, and other packages ###
################################################
sudo apt-get install python3 -yy
sudo apt-get install python3-numpy python3-matplotlib python3-pandas -yy
sudo apt-get install bc -yy
sudo apt-get install fio -yy
######################
### compile ioutil ###
######################
cd ioutil/
make all
cd ../
######################
### pre-build Ceph ###
######################
git submodule update --init --recursive
cd ceph/
./install-deps.sh
ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" ./do_cmake.sh
cd ../
cp script/start-*.sh ceph/build/
cp script/make.sh ceph/build/
##########################################
### extract prepared docker disk image ###
##########################################
cd image/
cat docker-pg.tar.gz.p* > docker-pg.tar.gz
tar -xvf docker-pg.tar.gz
md5sum -c pg-sf2.md5sum
cd ../
# prepare for fig7
sudo mkdir -p /srv/pg
sudo chown $(id -u):$(id -g) /srv/pg
echo -e "\033[0;31m****** Preparation completed ******\033[0m"
echo -e "\033[0;31m****** Next, Please compile Ceph ******\033[0m"