This repository has been archived by the owner on Nov 24, 2022. It is now read-only.
forked from openstack/kolla
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d95e37
commit b3069e5
Showing
5 changed files
with
135 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
FROM {{ namespace }}/{{ image_prefix }}adjutant-base:{{ tag }} | ||
{% block labels %} | ||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" | ||
{% endblock %} | ||
|
||
{% block adjutant_api_header %}{% endblock %} | ||
|
||
{% import "macros.j2" as macros with context %} | ||
|
||
{% if install_type == 'binary' %} | ||
{% if base_package_type == 'rpm' %} | ||
|
||
{% set adjutant_api_packages = [ | ||
'httpd', | ||
'mod_ssl', | ||
'openstack-adjutant-api', | ||
'python3-mod_wsgi' | ||
] %} | ||
{{ macros.install_packages(adjutant_api_packages | customizable("packages")) }} | ||
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ | ||
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf | ||
|
||
{% elif base_package_type == 'deb' %} | ||
|
||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ | ||
&& /bin/false | ||
|
||
{% endif %} | ||
|
||
{% elif install_type == 'source' %} | ||
|
||
{% if base_package_type == 'rpm' %} | ||
{% set adjutant_api_packages = [ | ||
'httpd', | ||
'mod_ssl', | ||
'python3-mod_wsgi' | ||
] %} | ||
{{ macros.install_packages(adjutant_api_packages | customizable("packages")) }} | ||
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \ | ||
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf | ||
|
||
{% elif base_package_type == 'deb' %} | ||
{% set adjutant_api_packages = [ | ||
'apache2', | ||
'libapache2-mod-wsgi-py3' | ||
] %} | ||
{{ macros.install_packages(adjutant_api_packages | customizable("packages")) }} | ||
RUN echo > /etc/apache2/ports.conf | ||
|
||
{% endif %} | ||
|
||
{% endif %} | ||
|
||
COPY extend_start.sh /usr/local/bin/kolla_adjutant_extend_start | ||
RUN chmod 755 /usr/local/bin/kolla_adjutant_extend_start | ||
|
||
{% block adjutant_api_footer %}{% endblock %} | ||
{% 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 | ||
|
||
# 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 | ||
adjutant-api migrate | ||
exit 0 | ||
fi | ||
|
||
|
||
. /usr/local/bin/kolla_httpd_setup |
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,47 @@ | ||
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} | ||
{% block labels %} | ||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" | ||
{% endblock %} | ||
|
||
{% block adjutant_base_header %}{% endblock %} | ||
|
||
{% import "macros.j2" as macros with context %} | ||
|
||
{{ macros.configure_user(name='adjutant') }} | ||
|
||
{% if install_type == 'binary' %} | ||
{% if base_package_type == 'rpm' %} | ||
|
||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ | ||
&& /bin/false | ||
|
||
{% elif base_package_type == 'deb' %} | ||
|
||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ | ||
&& /bin/false | ||
|
||
{% endif %} | ||
|
||
{{ macros.install_packages(adjutant_base_packages | customizable("packages")) }} | ||
|
||
{% elif install_type == 'source' %} | ||
|
||
{% set adjutant_base_pip_packages = [ | ||
'/adjutant' | ||
] %} | ||
|
||
ADD adjutant-base-archive /adjutant-base-source | ||
RUN ln -s adjutant-base-source/* adjutant \ | ||
&& {{ macros.install_pip(adjutant_base_pip_packages | customizable("pip_packages")) }} \ | ||
&& mkdir -p /etc/adjutant \ | ||
&& cp -r /adjutant/etc/* /etc/adjutant/ \ | ||
&& chown -R adjutant: /etc/adjutant | ||
|
||
{% endif %} | ||
|
||
COPY extend_start.sh /usr/local/bin/kolla_extend_start | ||
|
||
RUN touch /usr/local/bin/kolla_adjutant_extend_start \ | ||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_adjutant_extend_start | ||
|
||
{% block adjutant_base_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,10 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -d "/var/log/kolla/adjutant" ]]; then | ||
mkdir -p /var/log/kolla/adjutant | ||
fi | ||
if [[ $(stat -c %a /var/log/kolla/adjutant) != "755" ]]; then | ||
chmod 755 /var/log/kolla/adjutant | ||
fi | ||
|
||
. /usr/local/bin/kolla_adjutant_extend_start |
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