Copy placement database migration script
mysql-migrate-db.sh script is not bundled in packages nor installed with pip. So will need to copy over some path in the host to run the db migration. Change-Id: I116277c5e11b484748784134be50c18675b28103
This commit is contained in:
parent
ac5103ee1a
commit
8c99d5300e
@ -4,6 +4,7 @@
|
||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
placement-manage db sync
|
||||
placement-manage db online_data_migrations
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -11,19 +11,39 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
{% if base_package_type == 'rpm' %}
|
||||
|
||||
{% set placement_base_packages = [
|
||||
'mariadb',
|
||||
'openstack-placement-common',
|
||||
] %}
|
||||
|
||||
{% elif base_package_type == 'deb' %}
|
||||
|
||||
{% set placement_base_packages = [] %}
|
||||
|
||||
{% set placement_base_packages = [
|
||||
'mariadb-client',
|
||||
'placement-common',
|
||||
] %}
|
||||
{% endif %}
|
||||
|
||||
{{ macros.install_packages(placement_base_packages | customizable("packages")) }}
|
||||
{{ macros.install_packages(placement_base_packages | customizable("packages")) }} \
|
||||
&& cp /usr/share/placement/mysql-migrate-db.sh /opt/ \
|
||||
&& chmod 755 /opt/mysql-migrate-db.sh
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set placement_base_packages = [
|
||||
'mariadb',
|
||||
] %}
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
{% set placement_base_packages = [
|
||||
'mariadb-client',
|
||||
] %}
|
||||
|
||||
{% endif %}
|
||||
{{ macros.install_packages(placement_base_packages | customizable("packages")) }}
|
||||
|
||||
ADD placement-base-archive /placement-base-source
|
||||
ADD plugins-archive /
|
||||
|
||||
@ -35,7 +55,9 @@ RUN ln -s placement-base-source/* placement \
|
||||
&& {{ macros.install_pip(placement_base_pip_packages | customizable("pip_packages")) }} \
|
||||
&& mkdir -p /etc/placement/ \
|
||||
&& cp -r /placement/etc/placement/* /etc/placement/ \
|
||||
&& chown -R placement: /etc/placement/
|
||||
&& chown -R placement: /etc/placement/ \
|
||||
&& cp /placement/tools/mysql-migrate-db.sh /opt/ \
|
||||
&& chmod 755 /opt/mysql-migrate-db.sh
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user