Skip to content

Commit

Permalink
Merge "Improve nested k8s devstack install mechanism"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed May 25, 2017
2 parents f9837df + 37e8b65 commit c8a8ead
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 7 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand All @@ -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 [email protected]

Now launch pods using kubectl, Undercloud Neutron will serve the networking.

Expand Down
2 changes: 2 additions & 0 deletions devstack/local.conf.pod-in-vm.overcloud.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion devstack/plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
1 change: 1 addition & 0 deletions devstack/settings
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c8a8ead

Please sign in to comment.