Install Surfly on CentOS/RedHat 8
- CentOS/RedHat 8
- 4 core 2.5 GHz CPU
- 8 GB RAM
- 80 GB Disk space
- 100Mbps network connection
-
Make sure that the user on the system is able to run commands with sudo without providing the password:
- Add user to the wheel group
dnf install sudo usermod -a -G wheel <username>
- Create file
/etc/sudoers.d/surfly
with the following content<username> ALL = NOPASSWD : ALL
- Add user to the wheel group
-
Clone installation script to the server
sudo dnf install git git clone https://github.com/surfly/installc.git
-
Initialize server
-
Install basic dependencies
./preinit
-
Initialize container manager
ansible-playbook init.yml
-
Reboot machine
-
Configure container
./postinit
Default storage size is 50GB. You can modify it by passing a new value to
postinit
script:./postinit 60GB
-
-
Install Surfly
./setupc
The very first time you run
./setupc
command, it generatesconfig.yaml
file which contains a default Surfly configuration. Every time./setupc
command is executed,config.yaml
file is pushed inside the container and used to install/update Surfly.Check
certificates
configuration option here to configure Surfly to use correct certificates and use the command below to transfer certificates to the container
You can check the name of the Surfly container in
installc/.container_name
file or by runninglxc list
command
Surfly configuration is located in installc/config.yaml
. Please check all available configuration option here
lxc file push <file> <container_name>/home/client/install/
where <file>
is the path to the file on the host machine, <container_name>
is the name of the Surfly container
If file pull/push fails with the following error
Error: open /tmp/lxd_forkputfile_*: no such file or directory
try to restart lxdsudo snap resatrt lxd
lxc exec <container_name> -- sudo --login --user client
Navigate to installc directory and run
./setupc