This directory contains ansible playbooks for setting up an AIStore cluster in K8s.
- Ansible installed locally See the Ansible installation guide.
- Requirements playbook Some of our playbooks require additional ansible collections or additional Python packages on the controller host. From this directory, run
ansible-playbook -i hosts.ini ais-deployment/install_requirements.yml
The playbooks are broken up into multiple sections, which should be executed in order.
- host-config playbooks configure system settings on K8s nodes
- cloud playbooks set up credentials for accessing cloud backends, e.g. s3 and gcp
- ais-deployment playbooks configure resources in the AIS namespace including the operator and the AIS cluster pods
- security contains
os-hardening
playbook are used to harden the OS for CISCAT scans. This includes various security measures such as configuring sysctl settings, journald, sshd, and ensuring audit logs and AIDE setup.
An example hosts file is provided, hosts-example.ini. You will need to set this up with your own hosts before running the playbooks.
For a streamlined setup, we offer playbooks for configuring hosts and deploying the AIS Operator and Cluster with recommended settings:
-
To configure hosts for AIS Deployment:
ansible-playbook -i hosts.ini ais_host_config.yml -e ais_hosts=ais
-
To deploy the AIS Cluster:
ansible-playbook -i hosts.ini ais_deploy.yml -e cluster=ais
Scaling your AIS cluster to meet changing demands is straightforward, whether you're adding new nodes or adjusting the existing setup.
To integrate new nodes into your cluster:
- Configure New Hosts: First, add any new nodes to the hosts.ini file under a
new_nodes
group, providing the necessary host details.... [new_nodes] new_worker ansible_host=x.x.x.x ...
Note: You can skip step 2 if your nodes are already setup correctly for AIS.
-
Run the Host Configuration Playbook: Execute the
ais_host_config.yml
playbook targeting thenew_nodes
group to configure the new hosts.ansible-playbook -i hosts.ini ais_host_config.yml -e ais_hosts=new_nodes
-
Update the Hosts File: After setting up the new hosts, include the
new_nodes
group under[ais:children]
in the hosts.ini file. NOTE: Ensure that thenew_nodes
group is added at the bottom of the to list to avoid interference with the existing setup.[ais:children] controller new_nodes
-
Deploy the Cluster: With the new nodes configured, run the
ais_deploy_cluster
playbook to update your AIS cluster.ansible-playbook -i hosts.ini ais-deployment/ais_deploy_cluster.yml -e cluster=ais
To decrease the number of nodes in your current AIS Cluster, use this playbook -
ansible-playbook -i hosts.ini ais-deployment/ais_downscale_cluster.yml -e size=X
For additional ansible config tweaks, you can create an ansible.cfg
file. Check the Ansible documentation for this, as options may change with new versions.