RemoteLabz's front update guide¶
Save your .env file¶
All configuration variables are saved in the file .env.local
or if you don't have this file, in the file .env
If you don't have a .env.local, save your .env to .env.local
sudo -u remotelabz cp .env .env.local
Update the code¶
cd /opt/remotelabz
git fetch
git pull
Info
To choose a specific version :
git checkout tags/2.X.Y
git checkout dev
Compare your .env.local
file with the .env
file to be sure we have the same parameters defined
sudo composer update
sudo yarn encore prod
sudo php bin/console doctrine:migrations:migrate
sudo php bin/console cache:clear
sudo chown remotelabz:www-data * -R
sudo chmod g+w /opt/remotelabz/var -R
sudo chmod g+w /opt/remotelabz/public/uploads -R
sudo chmod g+r config/jwt/private.pem
sudo systemctl daemon-reload
sudo service remotelabz restart
Migration from 2.4.3 to 2.5.0 (dev version until version 2.5.0 is released)¶
The RabbitMQ configuration need to be modified to manage multiples workers.
sudo rabbitmqctl set_user_tags remotelabz-amqp administrator
sudo rabbitmq-plugins enable rabbitmq_management
sudo rabbitmqadmin delete exchange name=worker
You have to do the following task :
cd /opt/remotelabz;
sudo chmod 664 config/packages/messenger.yaml;
sudo chown www-data:www-data config/templates;
sudo chmod 664 config/templates;
sudo mkdir backups;
sudo chmod 644 backups;
sudo apt-get update;
sudo apt-get install tmux;
Migration from 2.4.1.5 to 2.4.2.4¶
A new feature is introduce to define with protocol can be used to access to the console of the device : vnc
, serial
or login
. So we have to add this protocol to each device. You can have many procotol to the same device. For example, we can use vnc to a qemu vm and a serial to do telnet on the serial line of the VM is the OS is configured.
The main usage is :
- vnc
for qemu VM
- login
for container lxc
- serial
for network device like firewalls, switchs, routers, ...
Migration from 2.4.1.1 to 2.4.1.3¶
In your device, you have a device with the name "Migration". This container will be used to configure a new container, called "Service" to provide a DHCP service to each lab you will build.
First : in the sandbox, start the "Migration" device. In the console, configure the network of the device (show the log to know it) and next, type the following command :
apt-get update; apt-get -y upgrade; apt-get install -y dnsmasq;
echo "dhcp-range=RANGE_TO_DEFINED" >> /etc/dnsmasq.conf;
echo "dhcp-option=3,GW_TO_DEFINED" >> /etc/dnsmasq.conf;
sync;
systemctl enable dnsmasq;
Cmnd_Alias REMOTELABZ_CMDS = /bin/systemctl start remotelabz*, /bin/systemctl stop remotelabz*, /bin/systemctl status remotelabz*
%www-data ALL=(ALL) NOPASSWD: REMOTELABZ_CMDS
Migration from 2.4.0 to 2.4.1.1¶
To update from 2.4.0 to 2.4.1.1, on the worker, you have to :
sudo lxc-create -t download -n Migration -- -d debian -r bullseye -a amd64 --keyserver hkp://keyserver.ubuntu.com
a18d566a-6023-43df-a16e-4367065c5ecf
and on the worker, with the command lxc-ls -f
, we can see this container.
Install in this container a dhcp server. The following example used the previous uuid.
sudo lxc-attach -n "a18d566a-6023-43df-a16e-4367065c5ecf"
echo "nameserver 1.1.1.3" > /etc/resolv.conf
apt-get update
apt-get upgrade
apt-get install dnsmasq
echo "dhcp-range=RANGE_TO_DEFINED" >> /etc/dnsmasq.conf
A new operating system and device is created with the name "Service" but the name of the image of the operating system is wrong. It's "service_" following a date. You have to edit the Operating System called "Service" with the Edit button.
Change the image filename "service_" to "Service"
Now, you can create a new lab with this device to offer IPv4 addresses to all other device, with the DHCP server installed in this container. The IPv4 of the DHCP will be the (last IPv4 - 1). The last IP is always the gateway of your laboratory.
Migration from 2.3 to 2.4.0¶
To update from 2.3 to 2.4.0, you can add default image to all labs with the following command :
sudo find /opt/remotelabz/public/uploads/lab/banner/* -type d -exec cp /opt/remotelabz/public/build/images/logo/nopic.jpg {}/nopic.jpg \;