diff --git a/templates/template06-nextcloud-db-standalone/Vagrantfile b/templates/template06-nextcloud-db-standalone/Vagrantfile index ccd739e..e8896f0 100644 --- a/templates/template06-nextcloud-db-standalone/Vagrantfile +++ b/templates/template06-nextcloud-db-standalone/Vagrantfile @@ -4,26 +4,24 @@ Vagrant.configure("2") do |config| - config.vm.box = "hibox/focal64" + config.vm.box = "isc/lxc-ubuntu-22.04" config.vm.box_check_update = false - - ## This is the latest box version as of 17/06/2021 - config.vm.box_version = "1.0.1619509541" config.vm.provider 'lxd' do |lxd| lxd.api_endpoint = 'https://127.0.0.1:8443' lxd.timeout = 10 - lxd.name = 'nc-database' + lxd.name = 'your-container-name' + lxd.project = 'default' + lxd.profiles = ['default'] # lxd.nesting = nil # lxd.privileged = nil # lxd.ephemeral = false - # lxd.profiles = ['default'] # lxd.environment = {} # lxd.config = {} - end + end - config.vm.provision :shell, path: "provision.sh" - + config.vm.provision :shell, path: "provision.sh" + end diff --git a/templates/template06-nextcloud-db-standalone/provision.sh b/templates/template06-nextcloud-db-standalone/provision.sh index 138a855..5ebea08 100644 --- a/templates/template06-nextcloud-db-standalone/provision.sh +++ b/templates/template06-nextcloud-db-standalone/provision.sh @@ -6,17 +6,11 @@ echo "provisioning started: ${start_time}" -echo "provisioning started: ${start_time}" - #### The user must fill these variables - START -# Fully Qualified Name: ex. "nc.localenv.com" +# Fully Qualified Name MACHINE_HOSTNAME= -#### The user must fill these variables - END - -SYSTEM_USER=usrv - NEXTCLOUD_DB_NAME=nextcloud_db NEXTCLOUD_DB_USER=nextcloud_usr @@ -24,6 +18,9 @@ NEXTCLOUD_DB_PASSWORD=${NEXTCLOUD_DB_USER} NEXTCLOUD_DB_PORT=3306 +#### The user must fill these variables - END + +SYSTEM_USER=usrv NETWORK_INTERFACE=eth0 @@ -74,11 +71,11 @@ echo "START - Create the database" -mysql -u root -e 'create database nextcloud_db;' +mysql -u root -e "create database ${NEXTCLOUD_DB_NAME};" -mysql -u root -e "create user nextcloud_usr@'%' identified by 'nextcloud_usr'" +mysql -u root -e 'create user "'"${NEXTCLOUD_DB_USER}"'" identified by "'"${NEXTCLOUD_DB_PASSWORD}"'"' -mysql -u root -e "grant all privileges on nextcloud_db.* to 'nextcloud_usr'@'%'" +mysql -u root -e "grant all privileges on ${NEXTCLOUD_DB_NAME}.* to ${NEXTCLOUD_DB_USER}@'%'" echo "END - Create the database" diff --git a/templates/template07-glusterfs-server/Vagrantfile b/templates/template07-glusterfs-server/Vagrantfile index ac6c9df..e065af1 100644 --- a/templates/template07-glusterfs-server/Vagrantfile +++ b/templates/template07-glusterfs-server/Vagrantfile @@ -4,26 +4,24 @@ Vagrant.configure("2") do |config| - config.vm.box = "hibox/focal64" + config.vm.box = "isc/lxc-ubuntu-22.04" config.vm.box_check_update = false - - ## This is the latest box version as of 17/06/2021 - config.vm.box_version = "1.0.1619509541" config.vm.provider 'lxd' do |lxd| lxd.api_endpoint = 'https://127.0.0.1:8443' lxd.timeout = 10 - lxd.name = 'glusterfs-server' - # lxd.nesting = nil + lxd.name = 'your-container-name' + lxd.project = 'default' + lxd.profiles = ['default'] lxd.privileged = true + # lxd.nesting = nil # lxd.ephemeral = false - # lxd.profiles = ['default'] # lxd.environment = {} # lxd.config = {} - end + end - config.vm.provision :shell, path: "provision.sh" + config.vm.provision :shell, path: "provision.sh" end diff --git a/templates/template07-glusterfs-server/provision.sh b/templates/template07-glusterfs-server/provision.sh index ceb7863..0de4ca7 100644 --- a/templates/template07-glusterfs-server/provision.sh +++ b/templates/template07-glusterfs-server/provision.sh @@ -6,7 +6,11 @@ echo "provisioning started: ${start_time}" -MACHINE_HOSTNAME=glusterfs-server.localenv.com +#### The user must fill these variables - START + +MACHINE_HOSTNAME= + +#### The user must fill these variables - END SYSTEM_USER=usrv @@ -46,6 +50,8 @@ systemctl status glusterd +gluster volume info vol01 + echo "START - Cleanup" rm -rf /vagrant/artifacts/*