From 452ea1f4a4fffe87687b40dc146884386ba16535 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Thu, 19 Jul 2018 17:25:37 +0530 Subject: Added tempest user for tempest container * Currently on using tempest container, everything is running as a root user under the container. All the test data when copied from container to host, have different permission. In order to consume those data we need to change permission. Adding tempest user to tempest container fix the issue. * New user can pass --user 'tempest' with docker run to consume it. * It does not affect the workflow of tempest container used in tripleo ci. Change-Id: I719b7b13197bcb1ace607f10448d76ccb1d8cdf7 --- docker/tempest/Dockerfile.j2 | 4 ++++ kolla/common/config.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docker/tempest/Dockerfile.j2 b/docker/tempest/Dockerfile.j2 index 18d753a31..8c01b70af 100644 --- a/docker/tempest/Dockerfile.j2 +++ b/docker/tempest/Dockerfile.j2 @@ -5,6 +5,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} +{{ macros.configure_user(name='tempest') }} + {% if install_type == 'binary' %} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} {% set tempest_packages = ['openstack-tempest-all'] %} @@ -52,3 +54,5 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start {% block tempest_footer %}{% endblock %} {% block footer %}{% endblock %} + +USER tempest diff --git a/kolla/common/config.py b/kolla/common/config.py index 97fa1eddd..0a9258d0a 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -1112,6 +1112,10 @@ USERS = { 'storm-user': { 'uid': 42479, 'gid': 42479, + }, + 'tempest-user': { + 'uid': 42480, + 'gid': 42480, } } -- cgit v1.2.3