diff --git a/templates/template13-talk-hpb/Readme.md b/templates/template13-talk-hpb/Readme.md index a062586..690f3ab 100644 --- a/templates/template13-talk-hpb/Readme.md +++ b/templates/template13-talk-hpb/Readme.md @@ -10,7 +10,6 @@ | `nextcloud-spreed-repository.list` | APT Source File for Talk HPB repositories | | `nextcloud-spreed-signaling-server.conf` | Signaling Server configuration file | | `talk-hpb-signaling-nginx-site.conf` | Nginx site 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/template13-talk-hpb/Vagrantfile b/templates/template13-talk-hpb/Vagrantfile index 479d09c..2975d89 100644 --- a/templates/template13-talk-hpb/Vagrantfile +++ b/templates/template13-talk-hpb/Vagrantfile @@ -4,21 +4,20 @@ 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 = 'talk-hpb' + lxd.name = 'your-container-name' + lxd.project = 'default' + lxd.profiles = ['default'] # lxd.nesting = nil + # lxd.ephemeral = false # lxd.privileged = nil - # lxd.ephemeral = false - # lxd.profiles = ['default'] + # lxd.ephemeral = false # lxd.environment = {} # lxd.config = {} end diff --git a/templates/template13-talk-hpb/artifacts/nextcloud-spreed-repository.list b/templates/template13-talk-hpb/artifacts/nextcloud-spreed-repository.list index fb7109c..5f2559d 100644 --- a/templates/template13-talk-hpb/artifacts/nextcloud-spreed-repository.list +++ b/templates/template13-talk-hpb/artifacts/nextcloud-spreed-repository.list @@ -1 +1 @@ -deb [arch=amd64] https://packages.struktur.de/nextcloud/spreed/d943d324-153a-443a-b850-64a48fe86e4e/ubuntu focal main +deb [arch=amd64] https://packages.struktur.de/nextcloud/spreed/d943d324-153a-443a-b850-64a48fe86e4e/ubuntu #OS_DIST# main diff --git a/templates/template13-talk-hpb/provision.sh b/templates/template13-talk-hpb/provision.sh index 5ffd984..9164511 100644 --- a/templates/template13-talk-hpb/provision.sh +++ b/templates/template13-talk-hpb/provision.sh @@ -8,10 +8,10 @@ #### The user must fill these variables -# Fully Qualified Name: ex. talki-hpb.localenv.com +# Fully Qualified Name: ex. talk-hpb.localenv.com MACHINE_HOSTNAME= -# URL of the Nextcloud instance to be used as backend for the Talk HPB +# URL of the Nextcloud instance to be used as backend for the Talk HPB. It must include 'https://'. NEXTCLOUD_URL= # Struktur AG-issued Customer ID to get access to apt repositories @@ -52,9 +52,14 @@ cp /vagrant/artifacts/nextcloud-spreed-repository.list /etc/apt/sources.list.d/ +OS_DIST=$(lsb_release -cs) + +sed -i "s|#OS_DIST#|${OS_DIST}|g" /etc/apt/sources.list.d/nextcloud-spreed-repository.list + apt update -apt install -y nextcloud-spreed-services-full +apt install -y nextcloud-spreed-services-full \ + mkcert cp /vagrant/artifacts/nextcloud-spreed-signaling-server.conf /etc/nextcloud-spreed-signaling/server.conf @@ -66,16 +71,13 @@ sed -i "s|#MACHINE_HOSTNAME#|${MACHINE_HOSTNAME}|g" /etc/nextcloud-spreed-signaling/server.conf -## Install the mkcert rootCA (see https://github.com/FiloSottile/mkcert#installing-the-ca-on-other-systems) -chmod u+x /vagrant/artifacts/mkcert - export CAROOT=/vagrant/artifacts/ -/vagrant/artifacts/mkcert -install +mkcert -install mkdir /etc/nginx/ssl/ -/vagrant/artifacts/mkcert --cert-file /etc/nginx/ssl/${MACHINE_HOSTNAME}.pem --key-file /etc/nginx/ssl/${MACHINE_HOSTNAME}-key.pem "${MACHINE_HOSTNAME}" +mkcert --cert-file /etc/nginx/ssl/${MACHINE_HOSTNAME}.pem --key-file /etc/nginx/ssl/${MACHINE_HOSTNAME}-key.pem "${MACHINE_HOSTNAME}" cp /vagrant/artifacts/talk-hpb-signaling-nginx-site.conf /etc/nginx/sites-available/talk-hpb-signaling-nginx-site.conf