Merge "Improve nested k8s devstack install mechanism"

This commit is contained in:
Jenkins 2017-05-25 12:36:53 +00:00 committed by Gerrit Code Review
commit c8a8ead217
4 changed files with 14 additions and 9 deletions

View File

@ -72,15 +72,12 @@ running. 4GB memory and 2 vCPUs, is the minimum resource requirement for the VM:
2. Launch a VM with `Neutron trunk port. <https://wiki.openstack.org/wiki/Neutron/TrunkPort>`_
3. Inside VM, install and setup Kubernetes along with Kuryr using devstack:
- Since undercloud Neutron will be used by pods, neutron services should be
- Since undercloud Neutron will be used by pods, Neutron services should be
disabled in localrc.
- git clone kuryr-kubernetes at ``/opt/stack/``.
- In the ``devstack/plugin.sh``, comment out `configure_neutron_defaults <https://github.com/openstack/kuryr-kubernetes/blob/master/devstack/plugin.sh#L453>`_.
This method is getting UUID of default Neutron resources project, pod_subnet etc. using local neutron client
and setting those values in ``/etc/kuryr/kuryr.conf``.
This will not work at the moment because Neutron is running remotely. Thats why this is being commented out
and manually these variables will be configured in ``/etc/kuryr/kuryr.conf``
- Run devstack with ``devstack/local.conf.pod-in-vm.overcloud.sample``.
With this config devstack will not configure Neutron resources for the
local cloud. These variables have to be added manually
to ``/etc/kuryr/kuryr.conf``.
4. Once devstack is done and all services are up inside VM:
- Configure ``/etc/kuryr/kuryr.conf`` to set UUID of Neutron resources from undercloud Neutron::
@ -103,7 +100,9 @@ running. 4GB memory and 2 vCPUs, is the minimum resource requirement for the VM:
driver = kuryr.lib.binding.drivers.vlan
link_iface = <VM interface name eg. eth0>
- Restart kuryr-k8s-controller from within devstack screen.
- Restart kuryr-k8s-controller::
sudo systemctl restart devstack@kuryr-kubernetes.service
Now launch pods using kubectl, Undercloud Neutron will serve the networking.

View File

@ -22,6 +22,8 @@ KEYSTONE_SERVICE_HOST=$SERVICE_HOST
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
KURYR_CONFIGURE_NEUTRON_DEFAULTS=False
enable_service docker
enable_service etcd
enable_service kubernetes-api

View File

@ -468,7 +468,10 @@ if is_service_enabled kuryr-kubernetes; then
fi
if [[ "$1" == "stack" && "$2" == "extra" ]]; then
configure_neutron_defaults
KURYR_CONFIGURE_NEUTRON_DEFAULTS=$(trueorfalse True KURYR_CONFIGURE_NEUTRON_DEFAULTS)
if [ "$KURYR_CONFIGURE_NEUTRON_DEFAULTS" == "True" ]; then
configure_neutron_defaults
fi
# FIXME(limao): When Kuryr start up, it need to detect if neutron
# support tag plugin.
#

View File

@ -9,6 +9,7 @@ KURYR_AUTH_CACHE_DIR=${KURYR_AUTH_CACHE_DIR:-/var/cache/kuryr}
KURYR_DOCKER_ENGINE_SOCKET_FILE=${KURYR_DOCKER_ENGINE_SOCKET_FILE:-/var/run/docker.sock}
# Neutron defaults
KURYR_CONFIGURE_NEUTRON_DEFAULTS=${KURYR_CONFIGURE_NEUTRON_DEFAULTS:-True}
KURYR_NEUTRON_DEFAULT_PROJECT=demo
KURYR_NEUTRON_DEFAULT_POD_SUBNET=${PRIVATE_SUBNET_NAME}
KURYR_NEUTRON_DEFAULT_SERVICE_SUBNET=k8s-service-subnet