pitabwire.ansible_role_microceph

Ansible Role: microceph

This role sets up a Ceph cluster using microceph.

Requirements

  • Ansible version 2.7 or higher
  • A compatible Linux distribution:
    • Debian Family
      • Ubuntu versions:
        • Xenial (16.04)
        • Bionic (18.04)
        • Focal (20.04) (untested)
        • Jammy (22.04) (untested)
    • Arch Linux (untested)

License

MIT

Usage

Role Variables

Here are some key variables you can set for this role. For the complete list, check [defaults/main.yml](defaults/main.yml).

  • microceph_version: The version to use, default is latest/edge.
  • microceph_cluster_nodes: Group of hosts that will make up the Ceph cluster.
  • microceph_seed_node: The node name that will start the cluster formation.
  • microceph_encrypt_data: Enables encryption for all data on the microceph drive at rest. See: Full disk encryption.
  • microceph_disk_devices: List of devices to add as OSDs when the nodes join. Make sure these devices exist beforehand, or the playbook will skip them.

Example Playbook

- hosts: servers
  roles:
    - role: pitabwire.microceph
      vars:
        microceph_cluster_nodes: ceph_nodes
        microceph_seed_node: ceph-node-1
        microceph_encrypt_data: False

Adding More Data Nodes

You can add extra nodes to the cluster at any time. All nodes in the microceph_cluster_nodes group will execute microceph cluster join <join token>. For more details, see: microceph join non primary node.

Testing

Using Molecule Wrapper and System Python

  • To lint: ./moleculew lint
  • To create instances: ./moleculew create
  • To list instances: ./moleculew list
  • To check status: ./moleculew check
  • To run tests: ./moleculew test

Using Python Virtual Environment

  • Set up a virtual environment:
    $ python3 -m venv venv
    
  • Activate the environment:
    $ . venv/bin/activate
    
  • Install Molecule with linting and Docker support:
    $ pip install molecule molecule-plugins[vagrant]
    
  • If needed, install the latest Ansible package:
    $ pip install ansible
    
  • Run the following test commands:
    • molecule lint
    • molecule create
    • molecule list
    • molecule check
    • molecule test
Installa
ansible-galaxy install pitabwire.ansible_role_microceph
Licenza
mit
Download
93
Proprietario