Apache CloudStack for Arch Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.9 KiB

  1. source /usr/share/makepkg/util/message.sh
  2. post_install() {
  3. if [[ ! -d /var/lib/cloudstack/user ]]; then
  4. mkdir -p /var/lib/cloudstack/user
  5. fi
  6. chown cloud.cloud -R /var/lib/cloudstack/user
  7. chown cloud.cloud /var/log/cloudstack/management
  8. chown cloud.cloud /var/log/cloudstack/ipallocator
  9. chown cloud.cloud /var/lib/cloudstack/data/
  10. # Apply cloudbr0, cloudbr1 & cloudbr2 network interfaces
  11. systemctl restart systemd-networkd
  12. systemctl restart mysqld
  13. # Generate ssh keypair for user 'cloud'
  14. runuser -l cloud -s /bin/sh -c "ssh-keygen -N '' -f /var/lib/cloudstack/user/.ssh/id_rsa"
  15. msg2 "Configuration info: http://docs.cloudstack.apache.org/en/latest/installguide/management-server/"
  16. msg2 "System VM template files are located at '/usr/share/cloudstack-management/templates/systemvm/'"
  17. 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/"
  18. msg2 "Once the template is deployed, configure /etc/exports.d/cloudstack.exports file and restart NFS service"
  19. msg2 "Generate proper encryption file (/etc/cloudstack/management/key): sudo cloudstack-setup-encryption -e file -m <password> -k <password>"
  20. msg2 "Deploy local CloudStack database: sudo cloudstack-setup-databases cloud:cloud@localhost --deploy-as=root:<mysql-root-password>"
  21. msg2 "Be aware you can use a separate MySQL server for storing the data"
  22. msg2 "CloudStack UI: http://localhost:8080 ; Default login credentials are -> username: admin, password: <password> (used for /etc/cloudstack/management/key), domain: leave empty"
  23. }
  24. #post_upgrade() {
  25. #}
  26. post_remove() {
  27. msg2 "CloudStack logs are stored at '/var/log/cloudstack'"
  28. rm -rf /var/lib/cloudstack
  29. userdel cloud
  30. systemctl restart systemd-networkd
  31. }