Adding db sync script for venus

The script for database synchronization is missing in the venus-api image,
which makes it impossible to create the required database tables during
venus deployment.

Closes-Bug: #2029915
Change-Id: Ibbf75fa73b8397ea3686b42cec6cad6d8f6d3858
This commit is contained in:
howardlee 2023-08-04 16:46:52 +08:00 committed by Michal Nasiadka
parent bd68acb60f
commit 772de9662c
3 changed files with 11 additions and 2 deletions

View File

@ -5,6 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% block venus_api_header %}{% endblock %}
COPY extend_start.sh /usr/local/bin/kolla_venus_extend_start
RUN chmod 644 /usr/local/bin/kolla_venus_extend_start
{% block venus_api_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -0,0 +1,8 @@
#!/bin/bash
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
venus_manager db sync
exit 0
fi

View File

@ -5,8 +5,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% block venus_manager_header %}{% endblock %}
RUN chmod 644 /usr/local/bin/kolla_venus_extend_start
{% block venus_manager_footer %}{% endblock %}
{% block footer %}{% endblock %}