Merge "Add upgrade definition"
This commit is contained in:
commit
bfae7cec68
|
@ -0,0 +1,5 @@
|
|||
FROM {{ image_spec("murano-base") }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
RUN apt-get install -y --no-install-recommends mysql-client zip \
|
||||
&& apt-get clean
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash -ex
|
||||
set -o pipefail
|
||||
BACKUP_FILE="/var/ccp/backup/murano/backup-$(date "+%Y%m%d%H%M%S").sql"
|
||||
mysqldump {% if db.tls.enabled %} --ssl-mode REQUIRED {% endif %} -h {{ address(service.database) }} \
|
||||
-u {{ murano.db.username }} -p{{ murano.db.password }} \
|
||||
--single-transaction {{ murano.db.name }} > "${BACKUP_FILE}"
|
|
@ -74,7 +74,7 @@ service:
|
|||
--os-username {{ murano.username }}
|
||||
--os-password {{ murano.password }}
|
||||
--os-auth-url {{ address('keystone', keystone.public_port, with_scheme=True) }}
|
||||
--os-project-name service
|
||||
--os-project-name {{ service_account.project }}
|
||||
package-import --is-public /tmp/murano-core.zip
|
||||
|
||||
files:
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
upgrade:
|
||||
name: upgrade-murano
|
||||
image: murano-upgrade
|
||||
steps:
|
||||
- name: backup
|
||||
command: /opt/ccp/bin/backup.sh
|
||||
files:
|
||||
- backup-sh
|
||||
volumes:
|
||||
- name: backup-dir
|
||||
path: /var/ccp/backup/murano
|
||||
type: host
|
||||
readOnly: false
|
||||
topology_key: backup
|
||||
- name: kill-services
|
||||
type: kill-services
|
||||
- name: db-sync
|
||||
command: murano-db-manage --config-file /etc/murano/murano.conf upgrade
|
||||
files:
|
||||
- murano.conf
|
||||
- name: roll-api
|
||||
type: rolling-upgrade
|
||||
services:
|
||||
- murano-api
|
||||
- name: roll-engine
|
||||
type: rolling-upgrade
|
||||
services:
|
||||
- murano-engine
|
||||
- name: import-core
|
||||
command: cd /murano/meta/io.murano; zip -r /tmp/murano-core.zip *;
|
||||
murano --murano-url {{ address('murano-api', murano.api_port, with_scheme=True) }}
|
||||
--os-username {{ murano.username }}
|
||||
--os-password {{ murano.password }}
|
||||
--os-auth-url {{ address('keystone', keystone.public_port, with_scheme=True) }}
|
||||
--os-project-name {{ service_account.project }}
|
||||
package-import --is-public --exists-action=u /tmp/murano-core.zip
|
||||
|
||||
files:
|
||||
murano.conf:
|
||||
path: /etc/murano/murano.conf
|
||||
content: murano.conf.j2
|
||||
backup-sh:
|
||||
path: /opt/ccp/bin/backup.sh
|
||||
content: backup.sh.j2
|
||||
perm: "500"
|
Loading…
Reference in New Issue