I wrote an Ansible role to deploy easily the great xmr-stak mining tool on Linux operating system.
This role will install and configure the mining tool xmr-stak on Linux operating system. Using this role give you the possibility to configure xmr-stak with the needed backend from the latest official source code from GitHub.
Supported backend types:
- NVIDIA (CUDA 9.1)
- AMD/ATI (OpenCL)
- CPU
This role enables and configures the Linux Kernel hugepages to provide the best performances and so a better hashrate.
To increase security, a dedicated system user (miner) will be created, this user will have the Kernel hugepages configure for the soft and hard limits.
For a better redundancy, the xmr-stak process is handle by systemd. A unit will be created to run the process as a simple user and to make sure that the service is always started. We are offering two ways to manage the xmr-stak process (both via systemd):
- As daemon under the miner system user
- Within a screen session under the miner system user
With the screen method on RedHat family distributions some SELinux rules have to be applied to avoid a reject from SELinux complaining about screen and systemd. Don't worry, the role will apply the rules if needed.
By default we decided to let xmr-stak generate the correct CPU affinity/configuration, of course this could be changed by editing the cpu.txt configuration file in /etc/miner/ directory.
Supported algorithms:
- Cryptonigth (the one configured by default)
(Monero, Sumokin, Electroneum, Intense, etc...) - Cryptonigth-ligth
(AEON, etc...)
For more information about this role, please have a look here: https://github.com/cryptogrot/ansible-xmr-stak/
Feedback would be very appreciate, especially for NVIDIA and AMD/ATI backend.