diff --git a/devstack/lib/zun b/devstack/lib/zun index 56fbc95ea..fb116d370 100644 --- a/devstack/lib/zun +++ b/devstack/lib/zun @@ -47,6 +47,8 @@ ZUN_CONF_DIR=/etc/zun ZUN_CONF=$ZUN_CONF_DIR/zun.conf ZUN_API_PASTE=$ZUN_CONF_DIR/api-paste.ini +ENABLE_KATA_CONTAINERS=$(trueorfalse False ENABLE_KATA_CONTAINERS) + CNI_BIN_DIR=/opt/cni/bin if is_ssl_enabled_service "zun" || is_service_enabled tls-proxy; then @@ -247,6 +249,10 @@ function create_zun_conf { iniset $ZUN_CONF DEFAULT enabled_ssl_apis "$ZUN_ENABLED_APIS" fi + if [[ "$ENABLE_KATA_CONTAINERS" == "True" ]]; then + iniset $ZUN_CONF DEFAULT container_runtime "kata-runtime" + fi + if is_service_enabled n-cpu; then iniset $ZUN_CONF compute host_shared_with_nova "True" fi diff --git a/devstack/local.conf.sample b/devstack/local.conf.sample index 2056c4f3e..2993f1bea 100644 --- a/devstack/local.conf.sample +++ b/devstack/local.conf.sample @@ -14,6 +14,9 @@ enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-p # This enables CRI plugin for containerd ENABLE_CONTAINERD_CRI=True +# Optional: uncomment to enable Kata Container +# ENABLE_KATA_CONTAINERS=True + # In Kuryr, KURYR_CAPABILITY_SCOPE is `local` by default, # but we must change it to `global` in the multinode scenario. KURYR_CAPABILITY_SCOPE=global diff --git a/devstack/local.conf.subnode.sample b/devstack/local.conf.subnode.sample index 168b8f229..20c4e4136 100644 --- a/devstack/local.conf.subnode.sample +++ b/devstack/local.conf.subnode.sample @@ -10,6 +10,9 @@ ENABLE_CONTAINERD_CRI=True enable_plugin devstack-plugin-container https://opendev.org/openstack/devstack-plugin-container $TARGET_BRANCH enable_plugin zun https://opendev.org/openstack/zun $TARGET_BRANCH +# Optional: uncomment to enable Kata Container +# ENABLE_KATA_CONTAINERS=True + KURYR_CAPABILITY_SCOPE=global KURYR_PROCESS_EXTERNAL_CONNECTIVITY=False enable_plugin kuryr-libnetwork https://opendev.org/openstack/kuryr-libnetwork $TARGET_BRANCH diff --git a/devstack/settings b/devstack/settings index db33cf19d..0eb51ece4 100644 --- a/devstack/settings +++ b/devstack/settings @@ -17,6 +17,9 @@ # Configure Docker cluster store DOCKER_CLUSTER_STORE=${DOCKER_CLUSTER_STORE:-etcd://$SERVICE_HOST:$ETCD_PORT} +# Enable/Disable Kata Container +ENABLE_KATA_CONTAINERS=${ENABLE_KATA_CONTAINERS:-false} + # Configure CNI plugins CNI_PLUGINS_INSTALL_PLUGINS=loopback,zun-cni CNI_PLUGINS_CONF_SOURCE_DIR=$DEST/zun/etc/cni/net.d