This playbook is used to perform the initial preparation of VMs (or physical hosts) on which Onezone or Oneprovider will be deployed. It requires an empty block device to be available. A logical volume (LVM) will be created on this device, for storing the persistent data of Onedata services.
Using an LVM volume simplifies deployment management, particularly when performing snapshot-based live backups.
- ssh access from the VM where ansible playbook is run to other nodes
- python3 on all nodes
The following packages are needed:
- python3
- ansible >=2.8.4
- jinja2 <3.10
- jmespath
The recommened way is to use Python virtual environment, like below:
sudo apt update
sudo apt install python3 python3-venv
python3 -m venv ~/.vm-prep
source ~/.vm-prep/bin/activate
python3 -m pip install ansible "Jinja2>=2.10,<3.1" jmespath
python3 -m venv ~/.vm-prep
source ~/.vm-prep/bin/activate
python3 -m pip install ansible "Jinja2>=2.10,<3.1" jmespath
Note: For a single-node installation, all steps can be performed on the same VM where the deployment is executed.
Place your node names and IP addresses into hosts. See the comments for example lines.
Edit group_vars/all.yml.
The semantics of variables is explained in the comments.
Make sure all nodes are reachable with SSH from the ansible host and the public key (of the user running the ansible) is added.
When running for a localhost node, one of the ways is to do this:
ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N "" # if not generated yet
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysor to use ssh-agent.
source ~/.vm-prep/bin/activate # make sure the python venv is activated
ansible-playbook -i hosts site.yml