Add the various sections in the documentation to fix missing auth_url errors. Change-Id: If9beca3a6dd79428b0ef2195eafc277fb5586394 Closes-Bug: #1686617
5.2 KiB
Install and configure a compute node for Ubuntu
This section describes how to install and configure the Container service on a compute node for Ubuntu 16.04 (LTS).
Prerequisites
Before you install and configure Zun, you must have Docker and Kuryr-libnetwork installed properly in the compute node. Refer Get Docker for Docker installation and Kuryr libnetwork installation guide
Install and configure components
Create zun user and necessary directories:
Create user:
# groupadd --system zun # useradd --home-dir "/var/lib/zun" \ --create-home \ --system \ --shell /bin/false \ -g zun \ zunCreate directories:
# mkdir -p /etc/zun # chown zun:zun /etc/zun
Clone and install zun:
# cd /var/lib/zun # git clone https://git.openstack.org/openstack/zun.git # chown -R zun:zun zun # cd zun # pip install -r requirements.txt # python setup.py installGenerate a sample configuration file:
# su -s /bin/sh -c "oslo-config-generator \ --config-file etc/zun/zun-config-generator.conf" zun # su -s /bin/sh -c "cp etc/zun/zun.conf.sample \ /etc/zun/zun.conf" zunEdit the
/etc/zun/zun.conf:In the
[DEFAULT]section, configureRabbitMQmessage queue access:[DEFAULT] ... transport_url = rabbit://openstack:RABBIT_PASS@controllerReplace
RABBIT_PASSwith the password you chose for theopenstackaccount inRabbitMQ.In the
[database]section, configure database access:[database] ... connection = mysql+pymysql://zun:ZUN_DBPASS@controller/zunReplace
ZUN_DBPASSwith the password you chose for the zun database.In the
[keystone_auth]section, configure Identity service access:[keystone_auth] memcached_servers = controller:11211 auth_uri = http://controller:5000 project_domain_name = default project_name = service user_domain_name = default password = ZUN_PASS username = zun auth_url = http://controller:35357 auth_type = password auth_version = v3 auth_protocol = http service_token_roles_required = True endpoint_type = internalURLIn the
[keystone_authtoken]section, configure Identity service access:[keystone_authtoken] ... memcached_servers = controller:11211 auth_uri = http://controller:5000 project_domain_name = default project_name = service user_domain_name = default password = ZUN_PASS username = zun auth_url = http://controller:35357 auth_type = passwordReplace ZUN_PASS with the password you chose for the zun user in the Identity service.
In the
[websocket_proxy]section, configure the URL of the websocket proxy. This URL must match the websocket configuration in controller node:[websocket_proxy] ... base_url = ws://controller:6784/In the
[oslo_concurrency]section, configure thelock_path:[oslo_concurrency] ... lock_path = /var/lib/zun/tmp
Note
Make sure that
/etc/zun/zun.confstill have the correct permissions. You can set the permissions again with:# chown zun:zun /etc/zun/zun.conf
Configure Docker:
Create the directory
/etc/systemd/system/docker.service.d# mkdir -p /etc/systemd/system/docker.service.dCreate the file
/etc/systemd/system/docker.service.d/docker.conf. Configure docker to listen to port 2375 as well as the the default unix socket. Also, configure docker to use etcd3 as storage backend:[Service] ExecStart= ExecStart=/usr/bin/dockerd --group zun -H tcp://compute1:2375 -H unix:///var/run/docker.sock --cluster-store etcd://controller:2379Restart Docker:
# systemctl daemon-reload # systemctl restart docker
Finalize installation
Create an upstart config, it could be named as
/etc/systemd/system/zun-compute.service:[Unit] Description = OpenStack Container Service Compute Agent [Service] ExecStart = /usr/local/bin/zun-compute User = zun [Install] WantedBy = multi-user.targetEnable and start zun-compute:
# systemctl enable zun-compute # systemctl start zun-computeVerify that zun-compute services are running:
# systemctl status zun-compute