-
Notifications
You must be signed in to change notification settings - Fork 1
/
gen-localconf.sh
executable file
·83 lines (73 loc) · 1.67 KB
/
gen-localconf.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
83
#!/bin/bash
set -x
MY_IP=`ifconfig eth0| awk '/inet addr/{print substr($2,6)}'`
# Generate the local.conf file
if [ $MY_IP == $CTRL_IP ]; then
cat > local.conf << EOF
[[local|localrc]]
NOVNC_REPO=/opt/git/kanaka/noVNC.git
GIT_BASE=/opt/git
IMAGE_URLS=file:///opt/git/images/cirros-0.3.4-x86_64-uec.tar.gz
DOWNLOAD_DEFAULT_IMAGES=False
HOST_IP=$MY_IP
SERVICE_HOST=$MY_IP
DATABASE_PASSWORD=123
ADMIN_PASSWORD=123
MYSQL_PASSWORD=123
RABBIT_PASSWORD=guest
SERVICE_PASSWORD=123
SERVICE_TOKEN=ADMIN
#FIXED_RANGE=192.168.128.0/24
MULTI_HOST=True
disable_service n-net
disable_service tempest
disable_service heat
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service quantum
enable_service n-novnc
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL="http://$MY_IP:6080/vnc_auto.html"
VNCSERVER_LISTEN=0.0.0.0
VNCSERVER_PROXYCLIENT_ADDRESS=$MY_IP
RECLONE=False
#enable Logging
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs
EOF
else
cat > local.conf << EOF
[[local|localrc]]
NOVNC_REPO=/opt/git/kanaka/noVNC.git
GIT_BASE=/opt/git
HOST_IP=$MY_IP
SERVICE_HOST=$CTRL_IP
DATABASE_PASSWORD=123
ADMIN_PASSWORD=123
MYSQL_PASSWORD=123
RABBIT_PASSWORD=guest
SERVICE_PASSWORD=123
SERVICE_TOKEN=ADMIN
#FIXED_RANGE=192.168.128.0/24
MULTI_HOST=True
MYSQL_HOST=$CTRL_IP
RABBIT_HOST=$CTRL_IP
GLANCE_HOSTPORT=$CTRL_IP:9292
ENABLED_SERVICES=n-cpu,q-agt
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL="http://$CTRL_IP:6080/vnc_auto.html"
VNCSERVER_LISTEN=0.0.0.0
VNCSERVER_PROXYCLIENT_ADDRESS=$CTRL_IP
RECLONE=False
#enable Logging
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs
EOF
fi