diff --git a/cloudstack/PKGBUILD b/cloudstack/PKGBUILD index 9ddd206..4337787 100644 --- a/cloudstack/PKGBUILD +++ b/cloudstack/PKGBUILD @@ -63,6 +63,7 @@ depends=( 'iptables-nft' 'ipmitool' + 'nfs-utils' ) makedepends=( # CloudStack source retrieval @@ -95,10 +96,13 @@ optdepends=( source=( "${pkgbase}::git+https://github.com/apache/${pkgbase}.git#commit=${_commit}" "cloudstack.sysuser.conf" + "cloudstack.mysql.conf" "uefi.properties" + + "cloudstack-nfs.exports" + "patch_domr-path.patch" "patch_python3.patch" - "cloudstack.mysql.conf" "cloudbr0.netdev" "cloudbr0.network" @@ -122,10 +126,11 @@ fi sha256sums=('SKIP' '1ad0d6b9a15889763bea92c71ecf9dc44e11e408260cdc54efa4d7acd849230f' + '69b315a10f88c24d6fe2b248b0593691d656f8992e6e37f8b0a4d2d4a9caca40' '2ac98910f320785ebbc682a426f4eef6d8b4ca5c8c55195dc4c048072fa93fb6' + '099a4e36ced56cebb8e0d4c058582bc549a1b75b87f889bbd3bb7f83c17134db' '8691b6b47164d11d3c1eff90a0108e694427463fb3d49608628a5d0121b6a5d4' '2515da6f9195c7e3bce321bd328743ee4c685ccd01ddb4099202637036eab40e' - '69b315a10f88c24d6fe2b248b0593691d656f8992e6e37f8b0a4d2d4a9caca40' '4d5d5c4d923ceec434403fc416a4d09a820fdb49ece6e4f6d0b32a05014446be' 'e3be7fda05b639c1b82db854347262f8206639f78f13d5f207b52c9f6a126a8d' 'dfc16a17e57b9d174aae8abee6c04b8a6b02ffc96909315f302199e43dea9b9e' @@ -292,7 +297,7 @@ libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.BridgeVifDriver package_cloudstack-management() { - depends=('python' 'jre11-openjdk' 'mysql' 'systemd' 'ipmitool') + depends=('python' 'jre11-openjdk' 'mysql' 'systemd' 'ipmitool' 'nfs-utils') pkgdesc='Management for Apache CloudStack' install=cloudstack-management.install noextract=( @@ -318,6 +323,9 @@ package_cloudstack-management() { mkdir -p ${pkgdir}/var/log/cloudstack/{management,ipallocator} mkdir -p ${pkgdir}/var/lib/cloudstack/{management,mnt} + # Fix: Allocate paths for NFS exports + mkdir -p ${pkgdir}/var/lib/cloudstack/data/storage/{primary,secondary} + cp -r client/target/utilities/scripts/db/* ${pkgdir}/usr/share/cloudstack-management/setup/ cp -r ui/dist/* ${pkgdir}/usr/share/cloudstack-management/webapp/ cp -r client/target/classes/META-INF/webapp/WEB-INF ${pkgdir}/usr/share/cloudstack-management/webapp/ @@ -368,6 +376,10 @@ package_cloudstack-management() { mkdir -p ${pkgdir}/usr/lib/sysusers.d install -Dm0644 ${srcdir}/cloudstack.sysuser.conf ${pkgdir}/usr/lib/sysusers.d/cloudstack.conf + # Fix: Add missing NFS exports file + mkdir -p ${pkgdir}/etc/exports.d + install -Dm0644 ${srcdir}/cloudstack-nfs.exports ${pkgdir}/etc/exports.d/cloudstack.exports + # Fix: Set global database configuration values mkdir -p ${pkgdir}/etc/mysql/conf.d/ install -Dm0644 ${srcdir}/cloudstack.mysql.conf ${pkgdir}/etc/mysql/conf.d/cloudstack.cf diff --git a/cloudstack/cloudstack-management.install b/cloudstack/cloudstack-management.install index 6828123..332ebc3 100644 --- a/cloudstack/cloudstack-management.install +++ b/cloudstack/cloudstack-management.install @@ -8,22 +8,24 @@ post_install() { fi chown cloud.cloud /var/log/cloudstack -# chown cloud.cloud /run/cloudstack-management.pid + chown cloud.cloud /var/lib/cloudstack/data/ - # Apply cloudbr0 & cloudbr1 network interfaces + # Apply cloudbr0, cloudbr1 & cloudbr2 network interfaces systemctl restart systemd-networkd systemctl restart mysqld msg2 "Configuration info: http://docs.cloudstack.apache.org/en/latest/installguide/management-server/" msg2 "System VM template files are located at '/usr/share/cloudstack-management/templates/systemvm/'" - msg2 "Install it by issuing command: sudo /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -o localhost -r cloud -d cloud -h kvm -f /usr/share/cloudstack-management/templates/systemvm/systemvmtemplate-4.16.0-kvm.qcow2.bz2 -m " + msg2 "Install the template by issuing command: sudo /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -o localhost -r cloud -d cloud -h kvm -f /usr/share/cloudstack-management/templates/systemvm/systemvmtemplate-4.16.0-kvm.qcow2.bz2 -m /var/lib/cloudstack/data/storage/secondary/" + msg2 "Once the template is deployed, configure /etc/exports.d/cloudstack.exports file and restart NFS service" msg2 "Generate proper encryption file (/etc/cloudstack/management/key): sudo cloudstack-setup-encryption -e file -m -k " - msg2 "Configure local database: sudo cloudstack-setup-databases cloud:cloud@localhost --deploy-as=root:" + msg2 "Deploy local CloudStack database: sudo cloudstack-setup-databases cloud:cloud@localhost --deploy-as=root:" + msg2 "Be aware you can use a separate MySQL server for storing the data" - msg2 "http://localhost:8080 default login credentials are -> username: admin, password: (used for /etc/cloudstack/management/key), domain: leave empty" + msg2 "CloudStack UI: http://localhost:8080 ; Default login credentials are -> username: admin, password: (used for /etc/cloudstack/management/key), domain: leave empty" } #post_upgrade() { diff --git a/cloudstack/cloudstack-nfs.exports b/cloudstack/cloudstack-nfs.exports new file mode 100644 index 0000000..87606cc --- /dev/null +++ b/cloudstack/cloudstack-nfs.exports @@ -0,0 +1,12 @@ +# Apache CloudStack NFS exports + +# Sample configuration file. Configure for your needs. + +# The async flag improves performance by allowing the NFS server to respond before writes are committed to the disk. +# Remove the async flag in your mission critical production deployment. + +# Primary storage +/var/lib/cloudstack/data/storage/primary/ 10.71.0.0/16(rw,async,no_root_squash,no_subtree_check) + +# Secondary storage +/var/lib/cloudstack/data/storage/secondary/ 10.71.0.0/16(rw,async,no_root_squash,no_subtree_check)