My personal scripts for public use
Just a reminder for myself
curl -s <URL-to-your-file> |bash
nano /etc/netplan/00-installer-config.yaml
Replace
network:
ethernets:
enp1s0:
addresses: [192.168.0.XX/24]
gateway4: 192.168.0.254
nameservers:
addresses: [192.168.0.254]
# dhcp4: true
version: 2
Then apply the plan
netplan apply
- Jitsi-meet server
curl -s https://raw.githubusercontent.com/andzejsp/PublicScripts/main/sh/Jitsi-server-deployment |bash
- Mattermost server
curl -s https://raw.githubusercontent.com/andzejsp/PublicScripts/main/sh/Mattermost-omnibus-server-deployment |bash
- Jibri server
curl -s https://raw.githubusercontent.com/andzejsp/PublicScripts/main/sh/Jibri-server-deployment |bash
- Some finalize_recording scripts to download, that post a message on mattermost channel. Be sure to
cd /srv/
before youcurl
andnano finalize_recording.sh
before you deploy jibri:- For incomming webhooks use this sample:
curl -o finalize_recording_webhook.sh https://raw.githubusercontent.com/andzejsp/PublicScripts/main/sh/Jibri_finalize_recording_webhook
- For bot accounts use this sample:
curl -o finalize_recording_bot.sh https://raw.githubusercontent.com/andzejsp/PublicScripts/main/sh/Jibri_finalize_recording_bot
- For incomming webhooks use this sample:
As seen on RedHat
Procedure B.3. Creating an isolated network with libvirt
- Add and save the following XML in the
/tmp/isolated.xml
file on HOST. If the 192.168.254.0/24 network is already in use elsewhere on your network, you can choose a different network.
<network>
<name>isolated</name>
<ip address='192.168.254.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.254.2' end='192.168.254.254' />
</dhcp>
</ip>
</network>
- Create the network with this command:
virsh net-define /tmp/isolated.xml
, on HOST machine - Set the network to autostart with the virsh net-autostart isolated command.
- Start the network with the
virsh net-start isolated
command. - Using
virsh edit name_of_guest
, edit the configuration of each guest that uses macvtap for its network connection and add a new<interface>
in the<devices>
section similar to the following (note the line is optional to include):
<interface type='network'>
<source network='isolated'/>
<model type='virtio'/>
</interface>
- Shut down, then restart each of these guests.
The guests are now able to reach the host at the address 192.168.254.1, and the host will be able to reach the guests at the IP address they acquired from DHCP (alternatively, you can manually configure the IP addresses for the guests). Since this new network is isolated to only the host and guests, all other communication from the guests will use the macvtap interface.
To connect your Rasa bot to mattermost you have to have these in your rasa bot credentials.yml:
mattermost:
url: "http://mattermost server/api/v4"
token: "bot token not token ID"
webhook_url: "http://rasa x server:5005/webhooks/mattermost/webhook" # and this has to be set up in mattermost integrations as outgoing webhook and (Callback URLs (One Per Line)) must match the rasa x ip but the port has to be for some unknown reason 5005 not 5002
Adding custom location for Portainer and Pi-hole in the Advanced tab
location /portainer {
rewrite ^/portainer(/.*)$ /$1 break;
proxy_pass http://portainer:9000/;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /portainer/api {
proxy_set_header Upgrade $http_upgrade;
proxy_pass http://portainer:9000/api;
proxy_set_header Connection 'upgrade';
proxy_http_version 1.1;
}
location /pi-hole {
proxy_set_header Upgrade $http_upgrade;
proxy_pass http://pi-hole/admin/;
proxy_http_version 1.1;
proxy_set_header Connection "";
}