Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 3.56 KB

File metadata and controls

79 lines (56 loc) · 3.56 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.

Getting Started

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

  1. host-config playbooks configure K8s nodes to optimize the network and storage performance
  2. cloud playbooks set up K8s secrets with static credentials for accessing cloud backends, e.g. s3 and gcp
  3. (optional) security contains the os-hardening playbook 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.
  4. [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.

Quick Setup

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=ais

Scaling the AIS Cluster

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.