File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ HOST_IP=172.18.4.10 # publicly routable ip to me
2+
13# change this to your master node's ip
2- SERVICE_HOST=172.18.3.6
4+ SERVICE_HOST=172.18.4.18 # contrail0
5+
6+ # allow floating ips from 172.18.4.240 to 172.18.4.255
7+ CONTRAIL_VGW_INTERFACE=vgw
8+ CONTRAIL_VGW_PUBLIC_SUBNET=172.18.4.240/28 # .240 to .255
9+ CONTRAIL_VGW_PUBLIC_NETWORK=default-domain:admin:public:public
310
411# the interface that contrail's vhost0 should take over
512PHYSICAL_INTERFACE=eth0
Original file line number Diff line number Diff line change 11# CONTRAIL MULTI_NODE master
2+ HOST_IP=192.168.122.251
3+
4+ # allow floating ips from 192.168.122.240 to 192.168.122.255
5+ CONTRAIL_VGW_INTERFACE=vgw
6+ CONTRAIL_VGW_PUBLIC_SUBNET=192.168.122.240/28 # .240 to .255
7+ CONTRAIL_VGW_PUBLIC_NETWORK=default-domain:admin:public:public
28
39ENABLE_CONTRAIL=yes
410PHYSICAL_INTERFACE=eth0
@@ -8,19 +14,23 @@ Q_PLUGIN=contrail
814
915STACK_DIR=$(cd $(dirname $0) && pwd)
1016
17+ # log all screen output to this directory
18+ SCREEN_LOGDIR=$STACK_DIR/log/screens
1119LOG=True
1220DEBUG=True
1321LOGFILE=$STACK_DIR/log/stack.log
1422LOGDAYS=1
1523
1624disable_service n-net
1725enable_service q-svc
18- enable_service q-agt
1926enable_service q-dhcp
20- enable_service q-l3
2127enable_service q-meta
2228enable_service neutron
2329enable_service rabbit
30+
31+ # not used by contrail
32+ disable_service q-l3
33+ disable_service q-agt
2434enable_service contrail
2535
2636DATABASE_PASSWORD=contrail123
Original file line number Diff line number Diff line change 1+ --- /etc/redis/redis.conf 2011-07-27 17:26:50.000000000 +0000
2+ +++ redis.conf 2013-11-19 19:28:06.266187000 +0000
3+ @@ -14,7 +14,7 @@
4+
5+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
6+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
7+ - daemonize yes
8+ + #daemonize yes
9+
10+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
11+ # default. You can specify a custom pid file location here.
12+ @@ -22,7 +22,8 @@
13+
14+ # Accept connections on the specified port, default is 6379.
15+ # If port 0 is specified Redis will not listen on a TCP socket.
16+ - port 6379
17+ + # contrail uses redis on 6382
18+ + port 6382
19+
20+ # If you want you can bind a single interface, if the bind option is not
21+ # specified all the interfaces will listen for incoming connections.
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ function apt_get() {
6363 $sudo DEBIAN_FRONTEND=noninteractive \
6464 http_proxy=$http_proxy https_proxy=$https_proxy \
6565 no_proxy=$no_proxy \
66- apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@"
66+ apt-get --option "Dpkg::Options::=--force-confold" --force-yes -- assume-yes "$@"
6767}
6868
6969
Original file line number Diff line number Diff line change @@ -333,6 +333,18 @@ function init_keystone() {
333333 sudo chown $STACK_USER $KEYSTONE_AUTH_CACHE_DIR
334334 rm -f $KEYSTONE_AUTH_CACHE_DIR/*
335335 fi
336+
337+ # Nova always speaks HTTPS, so keystone needs SSL certs
338+ if [ ${KEYSTONE_SERVICE_PROTOCOL} == 'https' ]; then
339+ $KEYSTONE_DIR/bin/keystone-manage ssl_setup
340+ iniset $KEYSTONE_CONF ssl enable True
341+ iniset $KEYSTONE_CONF ssl certfile ${KEYSTONE_CONF_DIR}/ssl/certs/keystone.pem
342+ iniset $KEYSTONE_CONF ssl keyfile ${KEYSTONE_CONF_DIR}/ssl/private/keystonekey.pem
343+ iniset $KEYSTONE_CONF ssl ca_certs ${KEYSTONE_CONF_DIR}/ssl/certs/ca.pem
344+ iniset $KEYSTONE_CONF ssl ca_key ${KEYSTONE_CONF_DIR}/ssl/private/cakey.pem
345+ else
346+ iniset $KEYSTONE_CONF ssl enable False
347+ fi
336348}
337349
338350# install_keystoneclient() - Collect source and prepare
@@ -372,7 +384,7 @@ function start_keystone() {
372384 fi
373385
374386 echo "Waiting for keystone to start..."
375- if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= curl -s http ://$SERVICE_HOST:$service_port/v$IDENTITY_API_VERSION/ >/dev/null; do sleep 1; done"; then
387+ if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= curl -k -s ${KEYSTONE_SERVICE_PROTOCOL} ://$SERVICE_HOST:$service_port/v$IDENTITY_API_VERSION/ >/dev/null; do sleep 1; done"; then
376388 die $LINENO "keystone did not start"
377389 fi
378390
Original file line number Diff line number Diff line change @@ -282,8 +282,17 @@ function start_contrail() {
282282 # Set a reasonable status bar
283283 screen -r $SCREEN_NAME -X hardstatus alwayslastline "$SCREEN_HARDSTATUS"
284284
285+ # redis: rebuild /etc/contrail/redis.conf to listen on port 6382
286+ rm -f /etc/contrail/redis.conf
287+ for f in /etc/redis.conf /etc/redis/redis.conf; do
288+ if [ -e $f ]; then
289+ cp -f $f /etc/contrail/redis.conf
290+ fi
291+ done
292+ patch -p0 -N -r - -d /etc/contrail < $TOP_DIR/contrail/redis.conf.patch
293+
285294 # launch ...
286- screen_it redis "sudo redis-server /etc/redis.conf"
295+ screen_it redis "sudo redis-server /etc/contrail/ redis.conf"
287296 screen_it cass "sudo /usr/sbin/cassandra -f"
288297 screen_it zk "cd $CONTRAIL_SRC/third_party/zookeeper-3.4.5; ./bin/zkServer.sh start"
289298 screen_it ifmap "cd $CONTRAIL_SRC/third_party/irond-0.3.0-bin; java -jar ./irond.jar"
Original file line number Diff line number Diff line change @@ -566,6 +566,22 @@ function create_nova_conf() {
566566 iniset $NOVA_CONF DEFAULT ec2_dmz_host "$EC2_DMZ_HOST"
567567 iniset_rpc_backend nova $NOVA_CONF DEFAULT
568568 iniset $NOVA_CONF DEFAULT glance_api_servers "$GLANCE_HOSTPORT"
569+
570+ # [keystone_authtoken]
571+ # Host providing the admin Identity API endpoint
572+ iniset $NOVA_CONF keystone_authtoken auth_host $KEYSTONE_SERVICE_HOST
573+ # Port of the admin Identity API endpoint
574+ iniset $NOVA_CONF keystone_authtoken auth_port $KEYSTONE_SERVICE_PORT
575+ # Protocol of the admin Identity API endpoint
576+ iniset $NOVA_CONF keystone_authtoken auth_protocol $KEYSTONE_SERVICE_PROTOCOL
577+ # Keystone service account tenant name to validate user tokens
578+ iniset $NOVA_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME
579+ # Keystone account username
580+ iniset $NOVA_CONF keystone_authtoken admin_user nova
581+ # Keystone account password
582+ iniset $NOVA_CONF keystone_authtoken admin_password $ADMIN_PASSWORD
583+ iniset $NOVA_CONF keystone_authtoken auth_version v2.0
584+
569585}
570586
571587function init_nova_cells() {
You can’t perform that action at this time.
0 commit comments