Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/klaytn/klaytn-ansible

Ansible modules for installing and using Klaytn.
https://github.com/klaytn/klaytn-ansible

ansible ansible-collection ansible-galaxy blockchain

Last synced: about 2 months ago
JSON representation

Ansible modules for installing and using Klaytn.

Awesome Lists containing this project

README

        

# Ansible : klaytn_ansible collection

## Description

Kakao’s global public blockchain project Klaytn is an enterprise-grade, service-centric platform that brings user-friendly blockchain experience to millions. It combines the best features of both public blockchains (decentralized data & control, distributed governance) and private blockchains (low latency, high scalability) via an efficient 'hybrid' design. Klaytn is secured by participation from numerous highly-reputable brands around the globe, working together to create a reliable business platform atop a robust system of decentralized trust. Klaytn enables businesses and entrepreneurs today to capture value using blockchain technology. Klaytn is the future, designed by Ground X. [https://www.klaytn.com/](https://www.klaytn.com/)

Klaytn provides advanced tooling that allows you to quickly build, operate & govern and grow blockchain networks. [https://docs.klaytn.com/](https://docs.klaytn.com/)


### Installation
```
ansible-galaxy collection install klaytndev.klaytn_ansible
```

### Role list
No | role name | description
------------ | ------------- | -------------
1 | [klaytn_node](https://github.com/klaytn/klaytn-ansible/tree/master/roles/klaytn_node) | install / configuration Klaytn packages
2 | [klaytn_bridge](https://github.com/klaytn/klaytn-ansible/tree/master/roles/klaytn_bridge) | configure bridge between two chains
3 | [klaytn_grafana](https://github.com/klaytn/klaytn-ansible/tree/master/roles/klaytn_grafana) | install / configure grafana

## Launch Ansible
### Preparation
First, update inventory.

```
[ServiceChainCN]
SCN1 ansible_user=MY_USER ansible_host=1.2.3.4

[controller]
builder ansible_host=localhost ansible_connecion=local ansible_user=YOUR_USER
```
Also, update Klaytn version to the latest one.
Refer to [Klaytn Download page](https://docs.klaytn.com/node/download)
for the latest version of Klaytn.

```
klaytn_homi:
version: v1.7.3
```

### Using docker
You can use provided docker image for Klaytn ansible. The docker image is inside of `docker` directory.

* **STEP 1:** Copy your private SSH key for the ansible image.

   `cp /YOUR/KEY/PATH docker/keys/ansible.key`

* **STEP 2:** Lauch docker image using `docker-compose` command.

    `docker-compose up -d `


**Docker includes the following packages**

Package Name | Package Version
-------------------------- | -------------
net-tools | latest
software-properties-common | latest
ansible | latest
python-pip | latest
python-dev | latest
build-essential | latest
groff | latest
boto3 | latest
awscli | latest


### Using your local ansible plugins

You are also able to use your own `Ansible`, `Ansible AWX` or `Ansible Towner`

For example,
```
$ cp roles/klaytn_node/tutorial/service_chain_SCN_setup.yml .
$ ansible-playbook -i roles/klaytn_node/inventory service_chain_SCN_setup.yml
```

Or you can use the provided script.
```
$ ./test_roles.sh node
$ ./test_roles.sh bridge
$ ./test_roles.sh grafana
```

**NOTE** If you are not using SSH-agent, you might need to provide Ansible with SSH keys
to access remote hotst. You can either use `--key-file` option in the command line,
or use `ansible_ssh_private_key_file` in the inventory file.

```
# In command line
$ ansible-playbook -i roles/klaytn_node/inventory service_chain_SCN_setup.yml --key-file /path/to/your/ssh-key
# In inventory file
SCN1 ansible_user=MY_USER ansible_host=1.2.3.4 ansible_ssh_private_key_file=/path/to/your/ssh-key
```