Manage the cluster environment with Ansible.
# Install pipx
sudo apt install pipx
pipx ensurepath
# Reload ${PATH}
source .bashrc
# Install Ansible
pipx install --index-url "https://mirrors.ustc.edu.cn/pypi/simple" --include-deps ansible# Generate SSH key
ssh-keygen -t ed25519
# Add SSH key to ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# Copy SSH key to the all machines, don't forget to copy the key to the master machine
ssh-copy-id <username>@<target-machine>Required packages:
python-apt
!!! WARNING !!!
The following command will alter the target machines. Add --check to perform a dry-run to confirm what will be changed.
ansible-playbook -i hosts.ini playbook.yml -K --tags "clone-repo, <tag>, ..."| Required | Action | Tag |
|---|---|---|
| Yes | Clone this repository | clone-repo |
| No | Slurm | slurm |
| No | Copy slurm configuration | copy-slurm-config |
| No | Intel oneAPI HPC Toolkit | intel-oneapi-hpc-toolkit |
| No | Install docker | install-docker |