From 2f2bb366e0aa856803c0d21a7a541802d814d180 Mon Sep 17 00:00:00 2001 From: Daneyon Hansen Date: Thu, 26 Mar 2015 19:47:56 +0000 Subject: [PATCH] Adds neutron-server to neutron container-set Adds neutron-server components of the neutron container set. Partially Implements: blueprint compute-operation-neutron Change-Id: I63525ae85f4ead4e010cdb9b6bc8059bb9d252e7 --- compose/neutron-server.yml | 7 ++ docker/neutron/neutron-base/Dockerfile | 1 - docker/neutron/neutron-base/config-neutron.sh | 84 ++++++++++++------- docker/neutron/neutron-server/Dockerfile | 4 +- docker/neutron/neutron-server/start.sh | 49 ++++++----- docker/nova-base/config-nova.sh | 9 ++ docs/integration-guide.md | 8 ++ docs/minimal-environment-vars.md | 14 ++++ tools/genenv | 27 +++++- 9 files changed, 145 insertions(+), 58 deletions(-) create mode 100644 compose/neutron-server.yml diff --git a/compose/neutron-server.yml b/compose/neutron-server.yml new file mode 100644 index 0000000000..b2da8bd93b --- /dev/null +++ b/compose/neutron-server.yml @@ -0,0 +1,7 @@ +neutronserver: + image: kollaglue/centos-rdo-neutron-server:latest + name: neutron-server + net: "host" + restart: always + env_file: + - openstack.env diff --git a/docker/neutron/neutron-base/Dockerfile b/docker/neutron/neutron-base/Dockerfile index d4f89f3ae8..22922a04cb 100644 --- a/docker/neutron/neutron-base/Dockerfile +++ b/docker/neutron/neutron-base/Dockerfile @@ -5,4 +5,3 @@ RUN yum -y install openstack-neutron-ml2 && yum clean all RUN mkdir -p /opt/kolla COPY config-neutron.sh /opt/kolla/config-neutron.sh - diff --git a/docker/neutron/neutron-base/config-neutron.sh b/docker/neutron/neutron-base/config-neutron.sh index 6cbbc74ac3..a079364a2c 100644 --- a/docker/neutron/neutron-base/config-neutron.sh +++ b/docker/neutron/neutron-base/config-neutron.sh @@ -4,28 +4,33 @@ set -e . /opt/kolla/kolla-common.sh -: ${ADMIN_TENANT_NAME:=admin} +# Database : ${NEUTRON_DB_NAME:=neutron} : ${NEUTRON_DB_USER:=neutron} +: ${NEUTRON_DB_PASSWORD:=password} +# Keystone +: ${ADMIN_TENANT_NAME:=admin} : ${NEUTRON_KEYSTONE_USER:=neutron} +: ${NEUTRON_KEYSTONE_PASSWORD:=password} : ${KEYSTONE_AUTH_PROTOCOL:=http} +: ${KEYSTONE_ADMIN_SERVICE_HOST:=127.0.0.1} +: ${KEYSTONE_PUBLIC_SERVICE_HOST:=127.0.0.1} +: ${KEYSTONE_ADMIN_SERVICE_PORT:=35357} +: ${KEYSTONE_PUBLIC_SERVICE_PORT:=5000} +: ${KEYSTONE_REGION:=RegionOne} +# RabbitMQ : ${RABBIT_HOST:=$RABBITMQ_SERVICE_HOST} : ${RABBIT_USER:=guest} : ${RABBIT_PASSWORD:=guest} +# Logging : ${VERBOSE_LOGGING:=true} : ${DEBUG_LOGGING:=false} +# Networking +: ${NEUTRON_FLAT_NETWORK_NAME:=physnet1} check_required_vars NEUTRON_KEYSTONE_PASSWORD NEUTRON_LOG_DIR \ - KEYSTONE_PUBLIC_SERVICE_HOST RABBITMQ_SERVICE_HOST - -dump_vars - -cat > /openrc < /openrc < _ The IP Address where the Nova EC2 service is hosted NOVA_KEYSTONE_PASSWORD= - The Nova keystone password NOVA_KEYSTONE_USER= - The Nova keystone username + NEUTRON_DB_NAME= - The name of the Neutron database + NEUTRON_DB_USER= - The name used by Neutron to access the Neutron database + NEUTRON_DB_PASSWORD= The password used by Neutron to access the Neutron database + NEUTRON_KEYSTONE_USER= - The name used by Neutron to communicate with Keystone + NEUTRON_KEYSTONE_PASSWORD= - The password used by Neutron to communicate with Keystone + NEUTRON_SERVER_SERVICE_HOST=<$HOST_IP> - The IP address/hostname used to commuicate with the Neutron API + NEUTRON_SHARED_SECRET= - The shared secret used between Neutron/Nova to secure metadata communication + NEUTRON_API_PASTE_CONFIG= - Location of Neutron's API paste config file HEAT_DB_NAME= - The heat DB name HEAT_DB_PASSWORD= - The heat db password HEAT_KEYSTONE_PASSWORD= - The keystone password for the heat user diff --git a/docs/minimal-environment-vars.md b/docs/minimal-environment-vars.md index 713507f795..710ea443ac 100644 --- a/docs/minimal-environment-vars.md +++ b/docs/minimal-environment-vars.md @@ -231,3 +231,17 @@ In order for each service to function, there is a minimum set of required variab NOVA_EC2_NETWORK_SERVICE_HOST NOVA_EC2_SERVICE_HOST PUBLIC_IP + +# Neutron/Nova + + NEUTRON_SHARED_SECRET + +# Neutron Server + + NEUTRON_DB_NAME + NEUTRON_DB_USER + NEUTRON_DB_PASSWORD + NEUTRON_KEYSTONE_USER + NEUTRON_KEYSTONE_PASSWORD + NEUTRON_SERVER_SERVICE_HOST + NEUTRON_API_PASTE_CONFIG diff --git a/tools/genenv b/tools/genenv index bb349b5b0a..0f32260365 100755 --- a/tools/genenv +++ b/tools/genenv @@ -50,6 +50,9 @@ RABBITMQ_SERVICE_HOST=$HOST_IP RABBIT_USER=guest RABBIT_PASSWORD=guest +# Networking Options are nova or neutron +NETWORK_MANAGER=neutron + # Keystone KEYSTONE_ADMIN_TOKEN=$PASSWORD KEYSTONE_DB_PASSWORD=kolla @@ -77,7 +80,6 @@ NOVA_API_SERVICE_HOST=$HOST_IP NOVA_EC2_SERVICE_HOST=$HOST_IP NOVA_PUBLIC_INTERFACE=$MY_DEV NOVA_FLAT_INTERFACE=eth1 -CONFIG_NETWORK=True ENABLED_APIS=ec2,osapi_compute,metadata METADATA_HOST=$HOST_IP @@ -85,6 +87,18 @@ METADATA_HOST=$HOST_IP NEUTRON_FLAT_NETWORK_NAME=physnet1 NEUTRON_FLAT_NETWORK_INTERFACE=eth1 +# Neutron +NEUTRON_DB_NAME=neutron +NEUTRON_DB_USER=neutron +NEUTRON_DB_PASSWORD=password +NEUTRON_KEYSTONE_USER=neutron +NEUTRON_KEYSTONE_PASSWORD=neutron +NEUTRON_SERVER_SERVICE_HOST=$HOST_IP +NEUTRON_API_PASTE_CONFIG=/usr/share/neutron/api-paste.ini + +# Nova/Neutron +NEUTRON_SHARED_SECRET=sharedsecret + # Heat HEAT_DB_NAME=heat HEAT_DB_PASSWORD=kolla @@ -114,7 +128,6 @@ NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE=$NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE NEUTRON_METADATA_AGENT_LOG_FILE=$NEUTRON_METADATA_AGENT_LOG_FILE ADMIN_USER_PASSWORD=$ADMIN_USER_PASSWORD ADMIN_TENANT_NAME=$ADMIN_TENANT_NAME -CONFIG_NETWORK=$CONFIG_NETWORK DB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD FLAT_INTERFACE=$NOVA_FLAT_INTERFACE GLANCE_API_SERVICE_HOST=$GLANCE_API_SERVICE_HOST @@ -133,7 +146,7 @@ KEYSTONE_DB_PASSWORD=$KEYSTONE_DB_PASSWORD KEYSTONE_PUBLIC_SERVICE_HOST=$KEYSTONE_PUBLIC_SERVICE_HOST MARIADB_SERVICE_HOST=$HOST_IP MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD -NETWORK_MANAGER=nova +NETWORK_MANAGER=$NETWORK_MANAGER NOVA_API_SERVICE_HOST=$NOVA_API_SERVICE_HOST ENABLED_APIS=$ENABLED_APIS METADATA_HOST=$METADATA_HOST @@ -144,6 +157,14 @@ NOVA_EC2_API_SERVICE_HOST=$NOVA_EC2_SERVICE_HOST NOVA_EC2_SERVICE_HOST=$NOVA_EC2_SERVICE_HOST NOVA_KEYSTONE_PASSWORD=$NOVA_KEYSTONE_PASSWORD NOVA_KEYSTONE_USER=$NOVA_KEYSTONE_USER +NEUTRON_SHARED_SECRET:=$NEUTRON_SHARED_SECRET +NEUTRON_DB_NAME=$NEUTRON_DB_NAME +NEUTRON_DB_USER=$NEUTRON_DB_USER +NEUTRON_DB_PASSWORD=$NEUTRON_DB_PASSWORD +NEUTRON_KEYSTONE_USER=$NEUTRON_KEYSTONE_USER +NEUTRON_KEYSTONE_PASSWORD=$NEUTRON_KEYSTONE_PASSWORD +NEUTRON_SERVER_SERVICE_HOST=$NEUTRON_SERVER_SERVICE_HOST +NEUTRON_API_PASTE_CONFIG=$NEUTRON_API_PASTE_CONFIG HEAT_DB_NAME=$HEAT_DB_NAME HEAT_DB_PASSWORD=$HEAT_DB_PASSWORD HEAT_KEYSTONE_PASSWORD=$HEAT_KEYSTONE_PASSWORD