diff --git a/README.rst b/README.rst index 61e8dafd7..87d04019d 100644 --- a/README.rst +++ b/README.rst @@ -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. `_ 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 `_. - 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 = - - 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. diff --git a/devstack/local.conf.pod-in-vm.overcloud.sample b/devstack/local.conf.pod-in-vm.overcloud.sample index 6defe675b..05d930d5c 100644 --- a/devstack/local.conf.pod-in-vm.overcloud.sample +++ b/devstack/local.conf.pod-in-vm.overcloud.sample @@ -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 diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 6f6700a02..7d6418962 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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. # diff --git a/devstack/settings b/devstack/settings index 4098ebb36..290b678bc 100644 --- a/devstack/settings +++ b/devstack/settings @@ -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