Deploy Cyberwatch behind proxy with MicroK8s (deprecated)
This page describes how to deploy Cyberwatch on a machine that access internet through a proxy.
Ensure that the requirements are respected.
Connect to the machine that will host Cyberwatch with a
root
account.Configure the package manager to use the proxy.
Activate and start
snapd
service:systemctl enable snapd --now
Activate classic snaps:
test -d /snap || ln -s /var/lib/snapd/snap /snap
Check that environment variable
HTTP_PROXY
andHTTPS_PROXY
are configured:env | grep HTTP
If this is not the case, they need to be configured.
Configure snap to use the proxy:
snap set system proxy.http="$HTTP_PROXY" snap set system proxy.https="$HTTPS_PROXY"
Install
microk8s
using the snap package manager:snap install microk8s --classic
Add the machine hostname to the environment variables
no_proxy
andNO_PROXY
in file/etc/environment
according to the following example. ReplaceY.Y.Y.Y
by the IP address of the machine and<HOSTNAME>
by the hostname of the machine.HTTP_PROXY=http://X.X.X.X:3128 HTTPS_PROXY=http://X.X.X.X:3128 http_proxy=http://X.X.X.X:3128 https_proxy=http://X.X.X.X:3128 no_proxy=127.0.0.1,10.1.0.0./16,10.152.183.0/24,Y.Y.Y.Y,<HOSTNAME> NO_PROXY=127.0.0.1,10.1.0.0./16,10.152.183.0/24,Y.Y.Y.Y,<HOSTNAME>
Restart
microk8s
:/snap/bin/microk8s stop; /snap/bin/microk8s start
Install Cyberwatch:
For Debian-based distributions:
sudo install -m 0755 -d /etc/apt/keyrings curl https://dl.cyberwatch.fr/apt/APT-CYBERWATCH-GPG-KEY | sudo gpg --dearmor -o /etc/apt/keyrings/cyberwatch.gpg sudo chmod a+r /etc/apt/keyrings/cyberwatch.gpg echo "deb [signed-by=/etc/apt/keyrings/cyberwatch.gpg] https://dl.cyberwatch.fr/apt any main" | sudo tee /etc/apt/sources.list.d/cyberwatch.list > /dev/null sudo apt update sudo apt install cyberwatch
For Red Hat based distributions:
sudo dnf config-manager --add-repo https://dl.cyberwatch.fr/rpm/cyberwatch.repo sudo dnf install cyberwatch
Configure Cyberwatch:
sudo cyberwatch configure
A login and password will be prompted by the script. These credentials are available in the section Docker Credentials on the Cyberwatch license generated for you.
The first start of Cyberwatch can take few minutes because all the containers images needs to be pulled. To monitor the status of the containers, use the following command:
sudo cyberwatch status