diff --git a/README.md b/README.md index 426b0af..bd7cc51 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -| :zap: June 2022: This is a mirrored repository of a private repository. The project is currently in a testing stage, please contact the project developer at pietro.marini@nextcloud.com, if you want to start collaborating.| +| :zap: February 2023: This is a mirrored repository of a private repository. The project is currently in a testing stage, please contact the project developer at pietro.marini@nextcloud.com, if you want to start collaborating.| |----------------------------------------------------------------------------------------------------| @@ -14,6 +14,28 @@ * Try features or troubleshoot issues without any manual installation * Learn and explore the integration of Nextcloud with common enterprise systems, such as LDAP, Single Sign On or an Office Editing Service +### Available Templates + +The following table summarizes the list of available templates: + +|Template | Description| +| --- | --- | +| `template00-clean-server` | Clean server | +| `template01-nextcloud-standalone` | Nextcloud standalone server | +| `template02-collabora-online` | Collabora Online server - CODE or Enterprise | +| `template03-keycloak` | Keycloak standalone server | +| `template04-ldap` | OpenLDAP server | +| `template05-elasticsearch` | Elastic Search server | +| `template06-nextcloud-db-standalone` | Database node (to be used in a cluster) | +| `template07-glusterfs-server` | GlusterFS node (to be used in a cluster) | +| `template08-haproxy-server` | Haproxy (to be used in a cluster) | +| `template09-web-server-node` | Web Server Node (to be used in a cluster) | +| `template10-redis-server` | Redis server(to be used in a cluster) | +| `template11-minio-storage-server` | MinIO Storage Server | +| `template13-talk-hpb` | Talk High Performance Backend | +| `template14-self-hosted-appstore` | Nextcloud Self-Hosted Appstore | + + ### Setup the environment #### Install and configure LXD @@ -129,22 +151,3 @@ Afterwards, the environment is ready to be used. -### Available Templates - -|Template | Description| -| --- | --- | -| `template00-clean-server` | Clean server | -| `template01-nextcloud-standalone` | Nextcloud standalone server | -| `template02-collabora-online` | Collabora Online server - CODE or Enterprise | -| `template03-keycloak` | Keycloak standalone server | -| `template04-ldap` | OpenLDAP server | -| `template05-elasticsearch` | Elastic Search server | -| `template06-nextcloud-db-standalone` | Database node (to be used in a cluster) | -| `template07-glusterfs-server` | GlusterFS node (to be used in a cluster) | -| `template08-haproxy-server` | Haproxy (to be used in a cluster) | -| `template09-web-server-node` | Web Server Node (to be used in a cluster) | -| `template10-redis-server` | Redis server(to be used in a cluster) | -| `template11-minio-storage-server` | MinIO Storage Server | -| `template12-lookup-server` | Nextcloud lookup server | -| `template13-talk-hpb` | Talk High Performance Backend | -| `template14-self-hosted-appstore` | Nextcloud Self-Hosted Appstore | diff --git a/templates/template00-clean-server/Vagrantfile b/templates/template00-clean-server/Vagrantfile index 7bb5363..77f1ec0 100644 --- a/templates/template00-clean-server/Vagrantfile +++ b/templates/template00-clean-server/Vagrantfile @@ -12,7 +12,7 @@ lxd.api_endpoint = 'https://127.0.0.1:8443' lxd.timeout = 10 lxd.name = 'your-container-name' - lxd.project = ['default'] + lxd.project = 'default' lxd.profiles = ['default'] # lxd.nesting = nil # lxd.privileged = nil @@ -24,4 +24,3 @@ config.vm.provision :shell, path: "provision.sh" end - diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/action_provision b/templates/template04-ldap/.vagrant/machines/default/lxd/action_provision deleted file mode 100644 index fdb9451..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/action_provision +++ /dev/null @@ -1 +0,0 @@ -1.5:test-ldap-server \ No newline at end of file diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/box_meta b/templates/template04-ldap/.vagrant/machines/default/lxd/box_meta deleted file mode 100644 index 2074f9f..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/box_meta +++ /dev/null @@ -1 +0,0 @@ -{"name":"hibox/focal64","version":"1.0.1619509541","provider":"lxc","directory":"boxes/hibox-VAGRANTSLASH-focal64/1.0.1619509541/lxc"} \ No newline at end of file diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/creator_uid b/templates/template04-ldap/.vagrant/machines/default/lxd/creator_uid deleted file mode 100644 index e37d32a..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/creator_uid +++ /dev/null @@ -1 +0,0 @@ -1000 \ No newline at end of file diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/id b/templates/template04-ldap/.vagrant/machines/default/lxd/id deleted file mode 100644 index 95d91d1..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/id +++ /dev/null @@ -1 +0,0 @@ -test-ldap-server \ No newline at end of file diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/index_uuid b/templates/template04-ldap/.vagrant/machines/default/lxd/index_uuid deleted file mode 100644 index 7649355..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/index_uuid +++ /dev/null @@ -1 +0,0 @@ -25b1bb9842654902900e9add1a7877aa \ No newline at end of file diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/private_key b/templates/template04-ldap/.vagrant/machines/default/lxd/private_key deleted file mode 100644 index ddb5855..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/private_key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEA9HrOm+9g3OXS5nyW41jFFyD/5WKj1VQvIZfnf7sdJXlPDO7W -/a8OzhCZfksnNfMO+V4cja7WHfFQ5zT+m9wlpwSOxu5W56g5+98Onl5uureJOMVJ -YdY7lf7XRJUgfu810BktQjTHl4wmFLFoh81iekeVF0PsAfsqLM9JFZLy/lkGJMpd -8HWLAqGAuE1U7/gBEihsWndMVRmAuh7nSCz8jXrdYpo/mlnakBLIZ/EPpp8wTj91 -9bANsiEQyE2vfzZVGEe4JByXe5m5TyN493HvDNm1SVAQXu3r7pJWX7LA7irQr7/T -pnoziLGAuhIqUObXo3xyHG2WPAdjuFM/ag6h9QIDAQABAoIBAFQnfb0hbic7mRgr -pMjHQriObGdqR9jj7IFUx6QpJYRDuJlMEYcrXh5CioN1nR6t9uaRpaSDnUKbUWz0 -yfuekPtnzzncyt9dAfCYPHD5MoZlLP/0sSjTVJlyKml6J8Bp2Q0zzWdvwZCB9o3C -76dnZFGRGFn00GVyLndUNuUNO0WfdQfHrmAC3FbVMa3HRRWiQzTgs0lPR9SCh1La -EYh+xSu3J+0ASaVJmn3VoDM5CZyocfWCmq9unOX0VsnoTSZ2hmayJ/ScwXw44xa2 -RfARIbR/J4Id4azzrFYnk8Wq5A0y9bTEY+aZLzhOFz/rR+oefNS6ruddSMi43OpS -8vsNs4ECgYEA/JRKqFP6PYoh/3R7HxHBc3bZwVCJg9I6a+nZvDKOf+2zjW1R5T// -Vpt+tCsHV5oXWHMMDiWi135EpLJ2BhwHDc1u7wf+hvsIImfUkxw4dam8yZQGPjz6 -oDBS/BH2h71yT1H/D5X00HBxIfZgiAmklBEXs8rVlG80zcJGBITIzqECgYEA98pv -DHvdYSyhaDKMzrcx1Y0xAKXsdDWKu70Wa+L4LIwHgDVIdYZhjcFOhtIUeuutbqNO -L0PdulUej7celg2XGmLAMskE56B8iQ1an9XPiwDlvyFLXdQiDst92N2Ho83Prdeb -YL8tbj6JQJE2PMbxNKKpJ0mRj0aaKuPz//zs9tUCgYA1iimZLNPqn5E9WS+QEm9z -TkoyVCQSMUn4/gUNg5n5PCXHYNjvQ3WYojVlc4mG5D72nMx9YzT1gOqEDuA9w0sr -fdR6DrPBYQ0EXgYNePnu1yARirMYFkz6D8RHcndTprDIZ5UtdJgEZxFUJamorIKa -cFUZ43EKmdgTlY7J/muigQKBgGQBbYQqUZSwgIwfKrkbMp+vlkFetenI2i8fB3eP -aP4Bnd1eo9na3HBrvhenneBmUd6/RgTJbSmQxP7Xtx50abGafVuBydr56IkfvJ2Z -m2PMfuz+sP4zaXNzKV1nOyEfJVxSEkGfpuRBlP9cG/m3iQ3nQEG87WRX6Ey7J3T/ -TVvpAoGAfjRYPIX7UzkfYg5xQ2TTq4piM/kuMHESQz0UKByF0I1Aq86TTuK80jLA -gzodVT5l3zGgSHQr1vZHcOJBYITrg8uVxYBC7A/FAwKQL2wu0O8aV4BV+rNyDrwR -bSt4sc5grsSL1igyGo0rj0B1zX0Ee+tKDbtzBqXjcRgFZeB5PCQ= ------END RSA PRIVATE KEY----- diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/synced_folders b/templates/template04-ldap/.vagrant/machines/default/lxd/synced_folders deleted file mode 100644 index d40c2ca..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/synced_folders +++ /dev/null @@ -1 +0,0 @@ -{"lxd":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/pietro/_tmp/test-lxc-env","disabled":false,"__vagrantfile":true,"config":{}}}} \ No newline at end of file diff --git a/templates/template04-ldap/.vagrant/machines/default/lxd/vagrant_cwd b/templates/template04-ldap/.vagrant/machines/default/lxd/vagrant_cwd deleted file mode 100644 index f0b864f..0000000 --- a/templates/template04-ldap/.vagrant/machines/default/lxd/vagrant_cwd +++ /dev/null @@ -1 +0,0 @@ -/home/pietro/_tmp/test-lxc-env \ No newline at end of file diff --git a/templates/template04-ldap/.vagrant/rgloader/loader.rb b/templates/template04-ldap/.vagrant/rgloader/loader.rb deleted file mode 100644 index c3c05b0..0000000 --- a/templates/template04-ldap/.vagrant/rgloader/loader.rb +++ /dev/null @@ -1,9 +0,0 @@ -# This file loads the proper rgloader/loader.rb file that comes packaged -# with Vagrant so that encoded files can properly run with Vagrant. - -if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"] - require File.expand_path( - "rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]) -else - raise "Encoded files can't be read outside of the Vagrant installer." -end diff --git a/templates/template08-haproxy-server/Readme.md b/templates/template08-haproxy-server/Readme.md index 2b8fbe8..ad3654d 100644 --- a/templates/template08-haproxy-server/Readme.md +++ b/templates/template08-haproxy-server/Readme.md @@ -8,7 +8,6 @@ |File name | Description| | --- | --- | | haproxy.cfg | haproxy configuration file | -| `mkcert` | mkcert command line utility to be downloaded [here](https://github.com/FiloSottile/mkcert/releases). Pick the latest binary for amd64 and rename it to `mkcert` | | `rootCA.pem` | The rootCA previously created in your host machine | | `rootCA-key.pem` | The rootCA key previously created in your host machine | diff --git a/templates/template08-haproxy-server/Vagrantfile b/templates/template08-haproxy-server/Vagrantfile index a135374..8091bec 100644 --- a/templates/template08-haproxy-server/Vagrantfile +++ b/templates/template08-haproxy-server/Vagrantfile @@ -4,21 +4,19 @@ 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 = 'haproxy-server' + 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 diff --git a/templates/template08-haproxy-server/provision.sh b/templates/template08-haproxy-server/provision.sh index 0ee39b5..2ec70b1 100644 --- a/templates/template08-haproxy-server/provision.sh +++ b/templates/template08-haproxy-server/provision.sh @@ -45,10 +45,11 @@ adduser ${SYSTEM_USER} sudo ## Install Haproxy - latest version: https://www.haproxy.com/blog/how-to-install-haproxy-on-ubuntu/ +apt update -apt install -y --no-install-recommends software-properties-common +apt install -y --no-install-recommends software-properties-common gnupg-agent -add-apt-repository -y ppa:vbernat/haproxy-2.4 +add-apt-repository -y ppa:vbernat/haproxy-2.7 apt update @@ -57,7 +58,7 @@ apt install -y haproxy ## Install the mkcert rootCA (see https://github.com/FiloSottile/mkcert#installing-the-ca-on-other-systems) -chmod u+x /vagrant/artifacts/mkcert +apt install mkcert export CAROOT=/vagrant/artifacts/ diff --git a/templates/template09-web-server-node/Readme.md b/templates/template09-web-server-node/Readme.md index efa6ee8..a80f6d1 100644 --- a/templates/template09-web-server-node/Readme.md +++ b/templates/template09-web-server-node/Readme.md @@ -21,6 +21,13 @@ * Open `provision.sh` * change the value of variable `MACHINE_HOSTNAME`. It makes sense to give the same name as the folder, plus the domain, in this example `nc-instance.localenv.com`. * change the value of variable `NEXTCLOUD_INSTALLER_ARCHIVE` to match the name of the installer archive you are using. + * change the value of DATABASE_MACHINE_HOSTNAME + * change the value of DATABASE_ALREADY_EXIST + * change the value of REDIS_MACHINE_HOSTNAME + * change the value of REDIS_MACHINE_PORT + * change the value of GLUSTERFS_MACHINE_HOSTNAME + * change the value of GLUSTERFS_VOLUME + * Run `vagrant up > log/provisioning.log` * Make sure your system is able to resolve the domain name that you specified in variable `MACHINE_HOSTNAME`, for example by adding an entry in `/etc/hosts` * Start using your environment diff --git a/templates/template09-web-server-node/Vagrantfile b/templates/template09-web-server-node/Vagrantfile index 428d542..8091bec 100644 --- a/templates/template09-web-server-node/Vagrantfile +++ b/templates/template09-web-server-node/Vagrantfile @@ -4,21 +4,19 @@ 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 = '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 diff --git a/templates/template09-web-server-node/provision.sh b/templates/template09-web-server-node/provision.sh index 41bab31..1499442 100644 --- a/templates/template09-web-server-node/provision.sh +++ b/templates/template09-web-server-node/provision.sh @@ -34,12 +34,17 @@ #### The user must fill these variables - END +## NC<24 => PHP=7.4 +## NC>=24 => PHP=8.1 OR PHP=7.4 +## https://www.linuxcapable.com/how-to-install-php-7-4-on-ubuntu-22-04-lts/ +PHP_VERSION=8.1 + NEXTCLOUD_USER=usrv NETWORK_INTERFACE=eth0 -PHP_INI=/etc/php/7.4/apache2/php.ini +PHP_INI=/etc/php/${PHP_VERSION}/apache2/php.ini hostnamectl set-hostname ${MACHINE_HOSTNAME} @@ -89,20 +94,37 @@ fi ## Install the needed packages from apt repositories + +if [ "${PHP_VERSION}" == "7.4" ]; then + + apt update + + apt install -y software-properties-common apt-transport-https + + add-apt-repository ppa:ondrej/php -y + +fi + apt update -apt install -y apache2 libapache2-mod-php7.4 imagemagick - -apt install -y php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-intl - -apt install -y php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip - -apt install -y php-redis php-apcu - -apt install -y glusterfs-client - -apt install -y mysql-client - +apt install -y apache2 \ + mariadb-server \ + libapache2-mod-php${PHP_VERSION} \ + imagemagick \ + php${PHP_VERSION}-gd \ + php${PHP_VERSION}-mysql \ + php${PHP_VERSION}-curl \ + php${PHP_VERSION}-mbstring \ + php${PHP_VERSION}-intl \ + php${PHP_VERSION}-gmp \ + php${PHP_VERSION}-bcmath \ + php${PHP_VERSION}-imagick \ + php${PHP_VERSION}-xml \ + php${PHP_VERSION}-zip \ + php${PHP_VERSION}-redis \ + php${PHP_VERSION}-apcu \ + mysql-client \ + glusterfs-client ## Expand the installer archive and move the content to the web server root folder (/var/www) diff --git a/templates/template10-redis-server/Vagrantfile b/templates/template10-redis-server/Vagrantfile index 3aabecf..8091bec 100644 --- a/templates/template10-redis-server/Vagrantfile +++ b/templates/template10-redis-server/Vagrantfile @@ -4,21 +4,19 @@ 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 = 'redis-server' + 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