From da49b49b5ccbcbf450af42de6b03bd03d6f4a52f Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Tue, 13 Jun 2017 14:39:26 +0200 Subject: [PATCH] Use kuryr for zun network Zun made mandatory to use kuryr for networking. This change update zun config to use kuryr. Also updates documentation. Change-Id: I9a55e390709b7e21d3efbd4be17a36db85cd8521 --- ansible/roles/zun/templates/zun.conf.j2 | 17 ++++++++++++++++- doc/zun-guide.rst | 11 ++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ansible/roles/zun/templates/zun.conf.j2 b/ansible/roles/zun/templates/zun.conf.j2 index 5a662460a8..2901860a55 100644 --- a/ansible/roles/zun/templates/zun.conf.j2 +++ b/ansible/roles/zun/templates/zun.conf.j2 @@ -7,6 +7,9 @@ container_driver = docker.driver.DockerDriver image_driver_list = glance db_type = sql +[network] +driver = kuryr + [api] host_ip = {{ api_interface_address }} port = {{ zun_api_port }} @@ -65,8 +68,20 @@ password = {{ zun_keystone_password }} region_name = {{ openstack_region_name }} endpoint_type = internalURL api_version = 2 -{% if enable_osprofiler | bool %} +[neutron_client] +auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }} +auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }} +auth_type = password +project_domain_id = default +user_domain_id = default +project_name = service +username = {{ zun_keystone_user }} +password = {{ zun_keystone_password }} +region_name = {{ openstack_region_name }} +endpoint_type = internalURL + +{% if enable_osprofiler | bool %} [profiler] enabled = true trace_sqlalchemy = true diff --git a/doc/zun-guide.rst b/doc/zun-guide.rst index 2a2ca7b836..9f02692a35 100644 --- a/doc/zun-guide.rst +++ b/doc/zun-guide.rst @@ -8,12 +8,15 @@ workload on OpenStack." [1]. Preparation and Deployment -------------------------- +Zun requires kuryr and etcd services, for more information about how to +configure kuryr refer to `Kuryr Guide `_. + To allow Zun Compute connect to the Docker Daemon, add the following in the ``docker.service`` file on each zun-compute node. :: - ExecStart= -H tcp://:2375 -H unix:///var/run/docker.sock + ExecStart= -H tcp://:2375 -H unix:///var/run/docker.sock --cluster-store=etcd://:2379 --cluster-advertise=:2375 .. note:: @@ -22,11 +25,13 @@ To allow Zun Compute connect to the Docker Daemon, add the following in the By default zun is disabled in the ``group_vars/all.yml``. In order to enable it, you need to edit the file globals.yml and set the -following variable: +following variables: :: enable_zun: "yes" + enable_kuryr: "yes" + enable_etcd: "yes" Deploy the OpenStack cloud and zun. @@ -61,7 +66,7 @@ Create zun container. :: - $ zun create --name test --command "ping -c 4 8.8.8.8" cirros + $ zun create --name test cirros "ping -c 4 8.8.8.8" Verify container is created.