This directory contains ansible playbooks for setting up an AIStore cluster in K8s.
- Ansible installed locally See the Ansible installation guide.
The playbooks are broken up into multiple sections, which should be executed in order.
- host-config playbooks configure K8s nodes to optimize the network and storage performance
- cloud playbooks set up K8s secrets with static credentials for accessing cloud backends, e.g. s3 and gcp
- (optional) security contains the
os-hardeningplaybook 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. - [DEPRECATED -- Use Helm Charts] ais-deployment playbooks configure resources in the AIS namespace including the AIStore custom resource, managed by the operator
An example hosts file is provided, hosts-example.ini. You will need to set this up with your own hosts before running the playbooks.
Make sure to specify the controller node in the hosts.ini file and configure the controller host with kubectl access.
Deprecation Notice:
Deployment with Ansible Playbooks is no longer actively supported.
Refer to the documentation for recommended deployment options
Before deploying with the playbook below, the AIS K8s Operator must be installed. See the operator installation docs for instructions.
To deploy the AIS Cluster:
ansible-playbook -i hosts.ini ais_deploy.yml -e cluster=aisTo integrate new nodes into your cluster:
- Configure New Hosts: First, add any new nodes to the hosts.ini file under a
new_nodesgroup, 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.ymlplaybook targeting thenew_nodesgroup 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_nodesgroup under[ais:children]in the hosts.ini file. NOTE: Ensure that thenew_nodesgroup 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_clusterplaybook 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.