From 48504c3ceb4911404433b6758c182c9af24f3f7f Mon Sep 17 00:00:00 2001 From: Polkachu Date: Wed, 14 Sep 2022 11:36:33 -0700 Subject: [PATCH] finish hermes/rly installation playbooks --- ansible.cfg | 2 ++ group_vars/all.yml | 5 +++++ inventory.sample | 11 +++++++++++ main_hermes_install.yml | 7 +++++++ main_rly_install.yml | 7 +++++++ roles/hermes_install/tasks/main.yml | 21 +++++++++++++++++++++ roles/rly_install/tasks/main.yml | 21 +++++++++++++++++++++ 7 files changed, 74 insertions(+) create mode 100644 ansible.cfg create mode 100644 group_vars/all.yml create mode 100644 inventory.sample create mode 100644 main_hermes_install.yml create mode 100644 main_rly_install.yml create mode 100644 roles/hermes_install/tasks/main.yml create mode 100644 roles/rly_install/tasks/main.yml diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..601c6ea --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +inventory=inventory.ini \ No newline at end of file diff --git a/group_vars/all.yml b/group_vars/all.yml new file mode 100644 index 0000000..6aa5d55 --- /dev/null +++ b/group_vars/all.yml @@ -0,0 +1,5 @@ +# hermes +hermes_version: '1.0.0' + +# rly +rly_version: '2.0.0' diff --git a/inventory.sample b/inventory.sample new file mode 100644 index 0000000..451a22e --- /dev/null +++ b/inventory.sample @@ -0,0 +1,11 @@ +[relayer] +10.0.0.1 + +[all:vars] +ansible_user=ubuntu +ansible_port=22 +ansible_ssh_private_key_file="~/.ssh/id_rsa" +relayer1_ip="10.0.0.2" +relayer2_ip="10.0.0.3" +relayer3_ip="10.0.0.4" +relayer4_ip="10.0.0.5" diff --git a/main_hermes_install.yml b/main_hermes_install.yml new file mode 100644 index 0000000..68b580c --- /dev/null +++ b/main_hermes_install.yml @@ -0,0 +1,7 @@ +--- +- name: Main + hosts: 'relayer' + gather_facts: false + become: true + roles: + - hermes_install diff --git a/main_rly_install.yml b/main_rly_install.yml new file mode 100644 index 0000000..bbf75cb --- /dev/null +++ b/main_rly_install.yml @@ -0,0 +1,7 @@ +--- +- name: Main + hosts: 'relayer' + gather_facts: false + become: true + roles: + - rly_install diff --git a/roles/hermes_install/tasks/main.yml b/roles/hermes_install/tasks/main.yml new file mode 100644 index 0000000..1045750 --- /dev/null +++ b/roles/hermes_install/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: download hermes + get_url: + url: 'https://github.com/informalsystems/ibc-rs/releases/download/v1.0.0/hermes-v{{ hermes_version }}-x86_64-unknown-linux-gnu.tar.gz' + dest: '/tmp/hermes.tar.gz' + mode: '0700' + +- name: unarchive hermes + unarchive: + src: '/tmp/hermes.tar.gz' + remote_src: yes + dest: '/tmp' + +- name: copy hermes binary + copy: + src: '/tmp/hermes' + dest: '/usr/local/bin/' + remote_src: true + owner: root + group: root + mode: 755 diff --git a/roles/rly_install/tasks/main.yml b/roles/rly_install/tasks/main.yml new file mode 100644 index 0000000..7bc3a42 --- /dev/null +++ b/roles/rly_install/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: download rly + get_url: + url: 'https://github.com/cosmos/relayer/releases/download/v{{ rly_version }}/Cosmos.Relayer_{{ rly_version }}_linux_amd64.tar.gz' + dest: '/tmp/rly.tar.gz' + mode: '0700' + +- name: unarchive rly + unarchive: + src: '/tmp/rly.tar.gz' + remote_src: yes + dest: '/tmp' + +- name: copy rly binary + copy: + src: "/tmp/Cosmos\ Relayer" + dest: '/usr/local/bin/rly' + remote_src: true + owner: root + group: root + mode: 755