kvaps / kube-opennebula

Helm chart and OpenNebula images ready to deploy on Kubernetes
Apache License 2.0
48 stars 11 forks source link

Consider using augtool to process oned.conf #3

Open kvaps opened 4 years ago

kvaps commented 4 years ago

Example:

augtool -s <<EOT
rm /files/etc/one/oned.conf/DB
set /files/etc/one/oned.conf/DB/BACKEND "${DB_BACKEND}"
set /files/etc/one/oned.conf/DB/SERVER "${DB_SERVER}"
set /files/etc/one/oned.conf/DB/DB_PORT "${DB_PORT}"
set /files/etc/one/oned.conf/DB/USER "${DB_USER}"
set /files/etc/one/oned.conf/DB/PASSWD "${DB_PASSWD}"
set /files/etc/one/oned.conf/DB/DB_NAME "${DB_NAME}"
set /files/etc/one/oned.conf/DB/DB_CONNECTIONS "${DB_NAME}"
set /files/etc/one/oned.conf/DB/ENCODING "${DB_ENCODING}"
EOT
augtool -s <<EOT
rm /files/etc/one/oned.conf/FEDERATION
set /files/etc/one/oned.conf/FEDERATION/MODE "${FEDERATION_MODE}"
set /files/etc/one/oned.conf/FEDERATION/ZONE_ID "${FEDERATION_ZONE_ID}"
set /files/etc/one/oned.conf/FEDERATION/SERVER_ID "${FEDERATION_SERVER_ID}"
set /files/etc/one/oned.conf/FEDERATION/MASTER_ONED "${FEDERATION_MASTER_ONED}"
EOT

Script oned.aug already coming with opennebula package:

opennebula: /usr/share/augeas/lenses/oned.aug

so there is need only to install augeas-tools package for the augtool.