forked from skywalker-nick/DevSwift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevswift-ubuntu.sh
executable file
·67 lines (52 loc) · 1.43 KB
/
devswift-ubuntu.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
#!/bin/bash
# load the common functions
source common.sh
# add swift user
add_user_ubuntu() {
deluser $user
delgroup $group
addgroup --gid $gid --quiet $group
useradd --gid $gid --uid $uid $user
}
add_user_ubuntu
# installing software packages and their dependencies
install_env_ubuntu() {
apt-get -y install python-software-properties software-properties-common
add-apt-repository ppa:swift-core/release
apt-get update
apt-get -y install curl gcc vim screen git-core memcached python-coverage python-dev python-nose python-setuptools python-pip python-simplejson python-xattr sqlite3 xfsprogs python-eventlet python-greenlet python-pastedeploy python-netifaces
pip install mock
pip install dnspython
}
install_env_ubuntu
prepare_loop_dev
prepare_boot_script
setup_rsync
config_rsync_service_ubuntu() {
sed -i 's/RSYNC_ENABLE=false/RSYNC_ENABLE=true/g' /etc/default/rsync
service rsync restart
}
config_rsync_service_ubuntu
# start memcached
setup_memcached_ubuntu() {
service memcached start
}
setup_memcached_ubuntu
# setup rsyslog for individual logging
setup_rsyslog
config_rsyslog_service_ubuntu() {
chown -R syslog.adm /var/log/swift
chmod -R g+w /var/log/swift
service rsyslog restart
}
config_rsyslog_service_ubuntu
# get the code and setting the environment
install_swift
# configure swift
config_swift
# setting up scripts for running swift
create_swift_scripts
# run unit tests for swift
init_test
# start swift processes
start_swift