Giter Club home page Giter Club logo

ansible-iri-playbook's Introduction

Ansible IRI Playbook

Install and configure:

Prerequisite

Install the Ansible>=2.4:

Ubuntu

$ sudo apt install ansible

macOS

$ brew install ansible

Clone this playbook:

$ git clone [email protected]:DLTcollab/ansible-iri-playbook.git

Install the third-party roles:

$ ansible-galaxy install --roles-path ~/.ansible/roles -r requirements.yml

Getting Started

Fullnode, Broker and Remote Worker

  1. Add your SSH public key to your fullnode, broker and remote-worker, and make sure you can access them via SSH.

For quickly adding the SSH public key to multiple remote workers, please check Optional: Set up Remote Worker SSH Public Key.

  1. According to your SSH settings, add fullnode, broker and remote-worker to inventory.

For example:

[fullnode]
node ansible_host=192.168.0.201 ansible_user=ubuntu
Keyword Description
[fullnode] The group name
node The service name
ansible_host=192.168.0.201 The hostname or the IP address of the service
ansible_user=ubuntu The ID for SSH logging in to the service hardware
  1. Test the connection:
$ ansible-playbook ping-all.yml

Build Infrastructure

  1. Modify the variables in group_vars/* and host_vars/* as you need.

Example:

Assign RabbitMQ broker service hostname or IP address File Variable
IRI ansible-iri-playbook/group_vars/fullnode/iri.yml iri_remote_broker_host
Remote Worker ansible-iri-playbook/group_vars/remote-worker/remote-worker.yml remote_worker_broker
  1. Build the whole infrastructure:

The default setting is to activate the RabbitMQ first, then the IRI and the remote workers. Beware that the RabbitMQ must be the first one, otherwise the connection between the services can not be set up.

$ ansible-playbook iri.yml

Optional: Set up Remote Worker SSH Public Key

If you are using de10nano-image system image to remote-worker, you could use the playbook to help you set up SSH access.

  1. Add your remote-worker to [remote-worker] group in inventory.

  2. Copy public key(~/.ssh/id_rsa.pub) to all remote worker:

$ ansible-playbook setup-fpga-boards.yml
  1. Test the connection:
$ ansible-playbook --limit remote-worker ping-all.yml

FAQ

After modifying the fullnode variables, overwrite the existing setting:

$ ansible-playbook iri.yml -e overwrite=yes

To change service status:

$ ansible-playbook manage.yml -e systemd_status=[status]

The acceptable [status] are

  • started
  • restarted
  • stopped

You could use the --limit to change the service status against one or more members.

$ ansible-playbook manage.yml --limit [group/host] -e systemd_status=[status]

The acceptable [group/host] are

  • fullnode
  • broker
  • remote-worker
  • node
  • remote-worker-1
  • remote-worker-2
  • remote-worker-3
  • remote-worker-4

ansible-iri-playbook's People

Contributors

ender503 avatar jserv avatar marktwtn avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.