Updated docker neutron.conf to have subnets

JIRA:NCP-1692

Configured redis

Made wait loop for neutron-server to start

Change-Id: I25bbcaef7f1e4de1e2cd194afdc2cf9430b97337
This commit is contained in:
Justin Hammond 2016-07-06 06:22:41 -05:00
parent aa060e2154
commit 9b2844f546
3 changed files with 31 additions and 5 deletions

View File

@ -19,7 +19,7 @@ max_overflow = 500
[QUARK] [QUARK]
public_net_id=00000000-0000-0000-0000-000000000000 public_net_id=00000000-0000-0000-0000-000000000000
net_driver=quark.drivers.unmanaged.UnmanagedDriver net_driver=quark.drivers.unmanaged.UnmanagedDriver
default_net_strategy='{"00000000-0000-0000-0000-000000000000": {"bridge": "publicnet"}, "11111111-1111-1111-1111-111111111111": {"bridge": "servicenet"}}' default_net_strategy='{"00000000-0000-0000-0000-000000000000": {"bridge": "publicnet", "subnets": {"4": "00000000-0000-0000-0000-000000000000", "6": "11111111-1111-1111-1111-111111111111"}}, "11111111-1111-1111-1111-111111111111": {"bridge": "servicenet", "subnets": {"4": "22222222-2222-2222-2222-222222222222", "6": "333333333-3333-3333-3333-333333333333"}}}'
default_network_type=UNMANAGED default_network_type=UNMANAGED
# IPAM recycling interval, in seconds # IPAM recycling interval, in seconds
ipam_reuse_after= 300 ipam_reuse_after= 300
@ -28,7 +28,10 @@ show_subnet_ip_policy_id = False
show_allocation_pools = True show_allocation_pools = True
pessimistic_connection_pooling = True pessimistic_connection_pooling = True
environment_capabilities = "" environment_capabilities = ""
redis_sentinel_hosts = docker-redis-sentinel:6380
redis_sentinel_master = mymaster
redis_min_other_sentinels = 0
[oslo_messaging_notifications] [oslo_messaging_notifications]
driver = messaging driver = messaging
transport_url = 'rabbit://admin:password@docker-rabbitmq:5672/' transport_url = 'rabbit://admin:password@docker-rabbitmq:5672/'

View File

@ -9,4 +9,17 @@ echo " "
echo "Neutron/Quark: Starting Container..." echo "Neutron/Quark: Starting Container..."
docker run -d -v $(pwd):/opt/quark -v ~/neutron:/opt/configs -p 9696:9696 --link mysql:docker-mysql --link kibana:docker-kibana --link rabbitmq:docker-rabbitmq --link redis-sentinel:docker-redis-sentinel --name quark stajkowski/quark docker run -d -v $(pwd):/opt/quark -v ~/neutron:/opt/configs -p 9696:9696 --link mysql:docker-mysql --link kibana:docker-kibana --link rabbitmq:docker-rabbitmq --link redis-sentinel:docker-redis-sentinel --name quark stajkowski/quark
echo "Neutron/Quark - Complete - http://localhost:9696" echo "Neutron/Quark: Waiting for Neutron to Start..."
# Need to wait for DB to standup
sleep 5
check_count=0
while [ $check_count -lt 175 ]; do
check=`curl -s http://localhost:9696/v2.0/networks | grep "networks" | wc -l`
if [ "$check" -gt 0 ]; then
echo "Seems to be alive!"
break
fi
sleep 1
check_count=$((check_count+1))
done
echo "Neutron/Quark - Complete - http://localhost:9696"

View File

@ -47,7 +47,17 @@ docker run -d -v $(pwd):/opt/quark -v ~/neutron:/opt/configs -p 9696:9696 --link
# docker run --entrypoint /bin/bash -v $(pwd):/opt/quark -v ~/neutron:/opt/configs -p 9696:9696 --link mysql:docker-mysql --link kibana:docker-kibana --link rabbitmq:docker-rabbitmq --link redis-sentinel:docker-redis-sentinel --name quark stajkowski/quark # docker run --entrypoint /bin/bash -v $(pwd):/opt/quark -v ~/neutron:/opt/configs -p 9696:9696 --link mysql:docker-mysql --link kibana:docker-kibana --link rabbitmq:docker-rabbitmq --link redis-sentinel:docker-redis-sentinel --name quark stajkowski/quark
echo "Neutron/Quark: Waiting for Neutron to Start..." echo "Neutron/Quark: Waiting for Neutron to Start..."
# Need to wait for DB to standup # Need to wait for DB to standup
sleep 180 sleep 5
check_count=0
while [ $check_count -lt 175 ]; do
check=`curl -s http://localhost:9696/v2.0/networks | grep "networks" | wc -l`
if [ "$check" -gt 0 ]; then
echo "Seems to be alive!"
break
fi
sleep 1
check_count=$((check_count+1))
done
echo "Neutron/Quark: Complete - http://localhost:9696" echo "Neutron/Quark: Complete - http://localhost:9696"
echo "------------------------------------------" echo "------------------------------------------"
echo " " echo " "
@ -82,4 +92,4 @@ echo " CIDR: 10.3.0.0/16 SEGMENT_ID: blah TENANT_ID: derp"
echo " CIDR: 10.4.0.0/16 SEGMENT_ID: blah TENANT_ID: derp" echo " CIDR: 10.4.0.0/16 SEGMENT_ID: blah TENANT_ID: derp"
echo "------------------------------------------" echo "------------------------------------------"
echo " COMPLETE!!" echo " COMPLETE!!"
echo "------------------------------------------" echo "------------------------------------------"