-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to use configure_user macro for external templates
Commit 79a2342 introduced an ability to build 'in-house'/'not-built-in' projects with Kolla. This commits extends this feature with an ability to use configure_user macro for 'not-built-in' users. The implementation is done the same way as for 'sources', i.e. engine after registers new section structure as soon as it finds unknown '<project>-user' section. In addition, the documentation and CI are extended to cover ``--docker-dir`` option. Change-Id: I690d9f3829083f2493bf286a1c45764b9699219b
- Loading branch information
1 parent
2941ea2
commit cfa266a
Showing
8 changed files
with
175 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/bring-configure_user-macro-to-custom-templates-61c143326a35c7ed.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
features: | ||
- | | ||
Extends the support of externally-managed projects provided by the | ||
``--docker-dir`` option with an ability to use ``configure_user`` | ||
jinja2 macros like Kolla built-in projects. | ||
The operator should specify "non-default" user details with | ||
``<custom_user_name>-user`` configuration section and include info for | ||
``uid`` and ``gid`` at least. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} | ||
|
||
{% block labels %} | ||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" | ||
{% endblock %} | ||
|
||
{% block releaser_header %}{% endblock %} | ||
|
||
{% import "macros.j2" as macros with context %} | ||
|
||
{{ macros.configure_user(name='releaser') }} | ||
|
||
COPY extend_start.sh /usr/local/bin/kolla_extend_start | ||
|
||
ADD releaser-archive /releaser-source | ||
|
||
RUN ln -s releaser-source/* /releaser \ | ||
&& {{ macros.install_pip(['/releaser'] | customizable("pip_packages")) }} \ | ||
&& mkdir -p /etc/releaser \ | ||
&& chown -R releaser: /etc/releaser \ | ||
&& chmod 750 /etc/sudoers.d \ | ||
&& touch /usr/local/bin/kolla_releaser_extend_start \ | ||
&& chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_releaser_extend_start | ||
|
||
{% block footer %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -d "/var/log/kolla/releaser" ]]; then | ||
mkdir -p /var/log/kolla/releaser | ||
fi | ||
|
||
if [[ $(stat -c %a /var/log/kolla/releaser) != "755" ]]; then | ||
chmod 755 /var/log/kolla/releaser | ||
fi | ||
|
||
. /usr/local/bin/kolla_releaser_extend_start |