Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 3.59 KB

README.md

File metadata and controls

82 lines (59 loc) · 3.59 KB

Playbooks

This directory contains ansible playbooks for setting up an AIStore cluster in K8s.

Prerequisites

  1. Ansible installed locally See the Ansible installation guide.
  2. 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

Getting Started

The playbooks are broken up into multiple sections, which should be executed in order.

  1. host-config playbooks configure system settings on K8s nodes
  2. cloud playbooks set up credentials for accessing cloud backends, e.g. s3 and gcp
  3. ais-deployment playbooks configure resources in the AIS namespace including the operator and the AIS cluster pods
  4. 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.

Quick Setup

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 the AIS Cluster

Scaling your AIS cluster to meet changing demands is straightforward, whether you're adding new nodes or adjusting the existing setup.

Adding New Nodes to the AIS Cluster

To integrate new nodes into your cluster:

  1. 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.

  1. Run the Host Configuration Playbook: Execute the ais_host_config.yml playbook targeting the new_nodes group to configure the new hosts.

    ansible-playbook -i hosts.ini ais_host_config.yml -e ais_hosts=new_nodes
  2. 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 the new_nodes group is added at the bottom of the to list to avoid interference with the existing setup.

    [ais:children]
    controller
    new_nodes
  3. 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

Downscaling the AIS Cluster

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.