-
Notifications
You must be signed in to change notification settings - Fork 11
/
99-devstack
executable file
·75 lines (61 loc) · 1.92 KB
/
99-devstack
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
#!/usr/bin/env bash
add-apt-repository -y cloud-archive:train
apt dist-upgrade -y
# Install devstack
git clone --depth=1 https://opendev.org/openstack/devstack \
/opt/devstack
mv /tmp/local.conf /opt/devstack/
mkdir /opt/stack
pushd /opt/stack
for repo in $(cat /tmp/openstack_git_repos.txt); do
git clone --depth 1 $repo
done
# Cache all the PIP packages
pip3 install setuptools wheel --upgrade
for repo in *; do
(
cd "$repo" || return
cat *constraints*.txt > /tmp/constraints-$repo.txt
cat global-requirements.txt requirements.txt > /tmp/requirements-$repo.txt
pip3 install -r --upgrade /tmp/requirements-$repo.txt -c /tmp/constraints-$repo.txt
rm -rf /tmp/{constraints,requirements}-$repo.txt
)
done
pip3 install -r --upgrade /tmp/requirements.txt
rm -rf /root/.cache/pip
popd
pushd /opt/devstack/files/
wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
popd
# su ubuntu -c '/opt/devstack/stack.sh'
# # Enable OFFLINE mode for next invoking stack.sh to be faster
# su ubuntu -c 'sed -i "s/#OFFLINE=/OFFLINE=/" /opt/devstack/local.conf'
# Configure mysql to operate with less memory
# sudo tee -a /etc/mysql/my.cnf << EOF
# # Courtesy of Morgan Tocker
# # http://www.tocker.ca/2014/03/10/configuring-mysql-to-use-minimal-memory.html
# [mysqld]
# innodb_buffer_pool_size=5M
# innodb_log_buffer_size=256K
# query_cache_size=0
# key_buffer_size=8
# thread_cache_size=0
# host_cache_size=0
# innodb_ft_cache_size=1600000
# innodb_ft_total_cache_size=32000000
# per thread or per operation settings
# thread_stack=131072
# sort_buffer_size=32K
# read_buffer_size=8200
# read_rnd_buffer_size=8200
# max_heap_table_size=16K
# tmp_table_size=1K
# bulk_insert_buffer_size=0
# join_buffer_size=128
# net_buffer_length=1K
# innodb_sort_buffer_size=64K
#settings that relate to the binary log (if enabled)
# binlog_cache_size=4K
# binlog_stmt_cache_size=4K
# EOF
# sudo service mysql restart