Skip to content

vesoft-inc/nebula-ansible

Repository files navigation

nebula-ansible

English | 中文

Attention: Now nebula-ansible is only usable for CentOS 7

Introduction

nebula-ansible is a Nebula cluster deployment tool based on ansible playbook.

Usage

Prepare

Prepare linux user, nebula directory on deployment machine.

useradd nebula
passwd nebula
# nebula directory is  '/home/nebula/nebula' by default. Could change it by yourself.
mkdir -p /data
chown -R nebula:nebula /data

Perform SSH login without password on control machine.

ssh-keygen
ssh-copy-id nebula@{your_deployment_machine}

Install ansible

sudo yum install ansible

Execute

ansible --version

and make sure your ansible version is > 2.5.

Other installation methods can be seen here

Config ansible-playbook

  • Git clone the project.

  • Change inventory.ini

    • install_source_type, choose nebula package type, GA or nightly.
    • ansible_ssh_user, the Linux ssh user, e.g. nebula
    • packages_dir, RPM download directory on control machine.
    • deploy_dir, nebula directory on deployment machine. e.g. /home/nebula/nebula
  • Change templates configuration if needed. IMPORTANT, DO NOT CHANGE --local_ip and --meta_server_addrs

  • Run ansible -m ping all to verify if all machines can be reached via SSH.

Run playbooks

# install
ansible-playbook install.yml

# start
ansible-playbook start.yml

# stop
ansible-playbook stop.yml

# status
ansible-playbook status.yml

# remove
# remote binary firstly, then remove the whole directory.
ansible-playbook remove.yml

playing other inventory

ansible-playbook -i inventory.qa61 install.yml