├── roles ├── hosts ├── .gitkeep ├── vars │ └── .gitkeep ├── lacchain-bootnode │ ├── files │ │ ├── static_nodes.json │ │ ├── java-bin.sh │ │ ├── java-path.sh │ │ ├── static-nodes.json │ │ ├── orion.service │ │ ├── pantheon.service │ │ ├── clean-docker-logs.sh │ │ └── permissions_config.toml │ ├── tests │ │ ├── inventory │ │ └── test.yml │ ├── templates │ │ ├── startorion.j2 │ │ ├── java.j2 │ │ ├── startpantheon.j2 │ │ ├── orion.j2 │ │ └── pantheon-config.j2 │ ├── tasks │ │ ├── update.yaml │ │ ├── main.yml │ │ ├── stop-node.yaml │ │ ├── stop-orion.yaml │ │ ├── start-orion.yaml │ │ ├── start-node.yaml │ │ ├── clean-files.yaml │ │ ├── ubuntu-dependencies.yml │ │ ├── install-java-centos.yaml │ │ ├── ubuntu-install-libsodium.yaml │ │ ├── rhel-dependencies.yml │ │ ├── start-ethstats-client.yaml │ │ ├── install-orion.yaml │ │ ├── install-docker-ubuntu.yaml │ │ ├── install-java-ubuntu.yaml │ │ ├── install-docker-redhat.yaml │ │ ├── init-orion.yaml │ │ ├── install.yaml │ │ ├── ubuntu-install-leveldb.yaml │ │ ├── ubuntu-install-fix-libsodium.yaml │ │ ├── install-besu.yaml │ │ ├── update-orion.yaml │ │ └── update-besu.yaml │ ├── handlers │ │ └── main.yml │ ├── defaults │ │ ├── java-debian-ubuntu.yml │ │ ├── java-redhat.yml │ │ └── main.yml │ ├── vars │ │ └── main.yml │ ├── README.md │ └── meta │ │ └── main.yml ├── lacchain-validator-node │ ├── tests │ │ ├── inventory │ │ └── test.yml │ ├── files │ │ ├── java-bin.sh │ │ ├── nodeAddress │ │ ├── java-path.sh │ │ ├── static-nodes.json │ │ ├── orion.service │ │ ├── pantheon.service │ │ ├── clean-docker-logs.sh │ │ └── rotation-validator.service │ ├── templates │ │ ├── startorion.j2 │ │ ├── java.j2 │ │ ├── startpantheon.j2 │ │ ├── rotation-validator-config.j2 │ │ ├── orion.j2 │ │ └── pantheon-config.j2 │ ├── handlers │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ ├── stop-node.yaml │ │ ├── stop-orion.yaml │ │ ├── start-orion.yaml │ │ ├── start-node.yaml │ │ ├── start-rotation-validator.yaml │ │ ├── clean-files.yaml │ │ ├── update.yaml │ │ ├── ubuntu-dependencies.yml │ │ ├── install-java-centos.yaml │ │ ├── init-rotation-validator.yaml │ │ ├── ubuntu-install-libsodium.yaml │ │ ├── install-rotation-validator.yaml │ │ ├── start-ethstats-client.yaml │ │ ├── rhel-dependencies.yml │ │ ├── install-docker-ubuntu.yaml │ │ ├── install-java-ubuntu.yaml │ │ ├── install-docker-redhat.yaml │ │ ├── install.yaml │ │ ├── install-orion.yaml │ │ ├── ubuntu-install-leveldb.yaml │ │ ├── install-besu.yaml │ │ └── init-orion.yaml │ ├── vars │ │ ├── permissions_config.toml │ │ └── main.yml │ ├── defaults │ │ ├── java-debian-ubuntu.yml │ │ ├── java-redhat.yml │ │ └── main.yml │ ├── README.md │ └── meta │ │ └── main.yml ├── lacchain-orion-node │ ├── files │ │ ├── java-bin.sh │ │ ├── java-path.sh │ │ ├── health-check.service │ │ ├── orion.service │ │ ├── nginx-rhel.conf │ │ ├── nginx-ubuntu.conf │ │ └── nginx.repo │ ├── templates │ │ ├── startorion.j2 │ │ ├── java.j2 │ │ ├── health-check.j2 │ │ ├── orion.j2 │ │ └── ssl.conf.j2 │ ├── handlers │ │ └── main.yml │ ├── tests │ │ └── test.yml │ ├── tasks │ │ ├── stop-orion.yaml │ │ ├── start-orion.yaml │ │ ├── stop-health-check.yaml │ │ ├── start-health-check.yaml │ │ ├── agreements-acceptance.yml │ │ ├── install-go.yaml │ │ ├── prepare-health-check.yaml │ │ ├── install-nginx-rhel.yml │ │ ├── init-tuning.yaml │ │ ├── install-java-centos.yaml │ │ ├── prepare-nginx.yml │ │ ├── main.yml │ │ ├── ubuntu-install-libsodium.yaml │ │ ├── build-executable.yaml │ │ ├── rhel-dependencies.yml │ │ ├── install-nginx-ubuntu.yml │ │ ├── create-self-signed-certificate.yaml │ │ ├── init-health-check.yaml │ │ ├── ubuntu-dependencies.yml │ │ ├── install-orion.yaml │ │ ├── install-java-ubuntu.yaml │ │ ├── configure-nginx.yml │ │ ├── install.yaml │ │ ├── update.yaml │ │ ├── init-orion.yaml │ │ ├── ubuntu-install-leveldb.yaml │ │ ├── init-orion-certificate.yaml │ │ └── update-orion.yaml │ ├── defaults │ │ ├── java-debian-ubuntu.yml │ │ ├── java-redhat.yml │ │ └── main.yml │ ├── vars │ │ └── main.yml │ ├── README.md │ └── meta │ │ └── main.yml ├── lacchain-tessera-node │ ├── files │ │ ├── java-bin.sh │ │ ├── java-path.sh │ │ ├── tessera.service │ │ ├── nginx-rhel.conf │ │ ├── nginx-ubuntu.conf │ │ └── nginx.repo │ ├── handlers │ │ └── main.yml │ ├── tests │ │ └── test.yml │ ├── templates │ │ ├── starttessera.j2 │ │ ├── java.j2 │ │ ├── health-check.j2 │ │ ├── ssl.conf.j2 │ │ └── tessera.j2 │ ├── tasks │ │ ├── stop-tessera.yaml │ │ ├── start-tessera.yaml │ │ ├── stop-health-check.yaml │ │ ├── start-health-check.yaml │ │ ├── agreements-acceptance.yml │ │ ├── install-go.yaml │ │ ├── prepare-health-check.yaml │ │ ├── install-nginx-rhel.yml │ │ ├── init-tuning.yaml │ │ ├── install-java-centos.yaml │ │ ├── prepare-nginx.yml │ │ ├── main.yml │ │ ├── ubuntu-install-libsodium.yaml │ │ ├── build-executable.yaml │ │ ├── rhel-dependencies.yml │ │ ├── install-nginx-ubuntu.yml │ │ ├── create-self-signed-certificate.yaml │ │ ├── init-health-check.yaml │ │ ├── ubuntu-dependencies.yml │ │ ├── install-java-ubuntu.yaml │ │ ├── install-tessera.yaml │ │ ├── configure-nginx.yml │ │ ├── install.yaml │ │ ├── update.yaml │ │ ├── ubuntu-install-leveldb.yaml │ │ ├── init-tessera.yaml │ │ ├── init-tessera-certificate.yaml │ │ └── update-tessera.yaml │ ├── defaults │ │ ├── java-debian-ubuntu.yml │ │ ├── java-redhat.yml │ │ └── main.yml │ ├── vars │ │ └── main.yml │ ├── README.md │ └── meta │ │ └── main.yml └── lacchain-writer-node │ ├── files │ ├── java-bin.sh │ ├── nodeAddress │ ├── nodeKey.pub │ ├── java-path.sh │ ├── static-nodes.json │ ├── pantheon.service │ ├── clean-docker-logs.sh │ ├── nginx-rhel.conf │ ├── nginx-ubuntu.conf │ ├── nginx.repo │ └── permissions_config.toml │ ├── handlers │ └── main.yml │ ├── tests │ └── test.yml │ ├── templates │ ├── java.j2 │ ├── startpantheon.j2 │ ├── ssl.conf.j2 │ ├── pantheon-config.j2 │ └── pantheon-orion-config.j2 │ ├── tasks │ ├── stop-node.yaml │ ├── start-node.yaml │ ├── agreements-acceptance.yml │ ├── clean-files.yaml │ ├── install-nginx-rhel.yml │ ├── init-tuning.yaml │ ├── install-java-centos.yaml │ ├── prepare-nginx.yml │ ├── update.yaml │ ├── main.yml │ ├── rhel-dependencies.yml │ ├── start-ethstats-client.yaml │ ├── install-nginx-ubuntu.yml │ ├── create-self-signed-certificate.yaml │ ├── ubuntu-dependencies.yml │ ├── install-docker-ubuntu.yaml │ ├── install-java-ubuntu.yaml │ ├── configure-nginx.yml │ ├── install-docker-redhat.yaml │ ├── install.yaml │ ├── install-besu.yaml │ ├── init-besu.yaml │ └── update-besu.yaml │ ├── defaults │ ├── java-debian-ubuntu.yml │ ├── java-redhat.yml │ └── main.yml │ ├── vars │ └── main.yml │ ├── README.md │ └── meta │ └── main.yml ├── Gemfile ├── .gitignore ├── _layouts ├── lacnet.png └── default.html ├── docs └── images │ ├── stacks.png │ ├── tx_pool.png │ ├── discovery.png │ ├── log_blocks.PNG │ ├── topology.png │ ├── topology1.png │ ├── topology2.png │ ├── boot_config.png │ ├── event_consumer.png │ ├── log_connections.PNG │ ├── general_architecture.png │ └── transaction_manager.png ├── site-lacchain-update-bootnode.yml ├── site-lacchain-update-validator.yml ├── site-lacchain-orion.yml ├── site-lacchain-tessera.yml ├── site-lacchain-bootnode.yml ├── site-lacchain-update-orion.yml ├── site-lacchain-update-writer.yml ├── site-lacchain-validator.yml ├── _config.yml ├── site-lacchain-backup.yml ├── site-lacchain-update.yml ├── NODE_AGREEMENT.md ├── site-lacchain-cloud.yml ├── site-lacchain-writer.yml ├── PERMISSIONING_PROCESS.md └── inventory.example /roles/hosts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/vars/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/static_nodes.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # gem "bulma-clean-theme" 2 | # gem minima 3 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Inventory file copied from inventory.example 2 | inventory 3 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/java-bin.sh: -------------------------------------------------------------------------------- 1 | export PATH=$PATH:/usr/local/java/bin -------------------------------------------------------------------------------- /roles/lacchain-orion-node/files/java-bin.sh: -------------------------------------------------------------------------------- 1 | export PATH=$PATH:/usr/local/java/bin -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/files/java-bin.sh: -------------------------------------------------------------------------------- 1 | export PATH=$PATH:/usr/local/java/bin -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/java-bin.sh: -------------------------------------------------------------------------------- 1 | export PATH=$PATH:/usr/local/java/bin -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/java-bin.sh: -------------------------------------------------------------------------------- 1 | export PATH=$PATH:/usr/local/java/bin -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/nodeAddress: -------------------------------------------------------------------------------- 1 | 0x18af5bfa9222e79fb2793a2008ed0b3c8e900999 -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/nodeKey.pub: -------------------------------------------------------------------------------- 1 | dMe6bRaLXjAYeh65QEhDNbt3c1kcuYUJs+wnq1czsQI= -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/nodeAddress: -------------------------------------------------------------------------------- 1 | 0x18af5bfa9222e79fb2793a2008ed0b3c8e900999 -------------------------------------------------------------------------------- /_layouts/lacnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/_layouts/lacnet.png -------------------------------------------------------------------------------- /docs/images/stacks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/stacks.png -------------------------------------------------------------------------------- /docs/images/tx_pool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/tx_pool.png -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/java-path.sh: -------------------------------------------------------------------------------- 1 | export JAVAPATH=$HOME/java 2 | export PATH=$JAVAPATH/bin:$PATH -------------------------------------------------------------------------------- /roles/lacchain-bootnode/templates/startorion.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | orion /root/lacchain/orion/orion.conf -------------------------------------------------------------------------------- /roles/lacchain-orion-node/files/java-path.sh: -------------------------------------------------------------------------------- 1 | export JAVAPATH=$HOME/java 2 | export PATH=$JAVAPATH/bin:$PATH -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/files/java-path.sh: -------------------------------------------------------------------------------- 1 | export JAVAPATH=$HOME/java 2 | export PATH=$JAVAPATH/bin:$PATH -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/java-path.sh: -------------------------------------------------------------------------------- 1 | export JAVAPATH=$HOME/java 2 | export PATH=$JAVAPATH/bin:$PATH -------------------------------------------------------------------------------- /docs/images/discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/discovery.png -------------------------------------------------------------------------------- /docs/images/log_blocks.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/log_blocks.PNG -------------------------------------------------------------------------------- /docs/images/topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/topology.png -------------------------------------------------------------------------------- /docs/images/topology1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/topology1.png -------------------------------------------------------------------------------- /docs/images/topology2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/topology2.png -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update Besu Node 3 | import_tasks: "update-besu.yaml" -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/java-path.sh: -------------------------------------------------------------------------------- 1 | export JAVAPATH=$HOME/java 2 | export PATH=$JAVAPATH/bin:$PATH -------------------------------------------------------------------------------- /roles/lacchain-validator-node/templates/startorion.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | orion /root/lacchain/orion/orion.conf -------------------------------------------------------------------------------- /docs/images/boot_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/boot_config.png -------------------------------------------------------------------------------- /docs/images/event_consumer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/event_consumer.png -------------------------------------------------------------------------------- /docs/images/log_connections.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/log_connections.PNG -------------------------------------------------------------------------------- /roles/lacchain-orion-node/templates/startorion.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | orion --clear-known-nodes /root/lacchain/orion/orion.conf -------------------------------------------------------------------------------- /docs/images/general_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/general_architecture.png -------------------------------------------------------------------------------- /docs/images/transaction_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lacchain/besu-pro-testnet/HEAD/docs/images/transaction_manager.png -------------------------------------------------------------------------------- /roles/lacchain-bootnode/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for lacchain-writer-node 3 | - name: run ldconfig 4 | shell: ldconfig 5 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for lacchain-orion-node 3 | - name: run ldconfig 4 | shell: ldconfig 5 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - lacchain-orion-node 6 | -------------------------------------------------------------------------------- /site-lacchain-update-bootnode.yml: -------------------------------------------------------------------------------- 1 | - hosts: bootnodes 2 | gather_facts: yes 3 | become: yes 4 | roles: 5 | - lacchain-bootnode 6 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - lacchain-validator-node 6 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for lacchain-tessera-node 3 | - name: run ldconfig 4 | shell: ldconfig 5 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - lacchain-tessera-node 6 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for lacchain-writer-node 3 | - name: run ldconfig 4 | shell: ldconfig 5 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for lacchain-writer-node 3 | - name: run ldconfig 4 | shell: ldconfig 5 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - lacchain-writer-node 6 | -------------------------------------------------------------------------------- /site-lacchain-update-validator.yml: -------------------------------------------------------------------------------- 1 | - hosts: validators 2 | gather_facts: yes 3 | become: yes 4 | roles: 5 | - lacchain-validator-node 6 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - lacchain-validator-node 6 | -------------------------------------------------------------------------------- /site-lacchain-orion.yml: -------------------------------------------------------------------------------- 1 | - hosts: orion 2 | gather_facts: yes 3 | become: yes 4 | vars: 5 | install: true 6 | roles: 7 | - lacchain-orion-node -------------------------------------------------------------------------------- /site-lacchain-tessera.yml: -------------------------------------------------------------------------------- 1 | - hosts: tessera 2 | gather_facts: yes 3 | become: yes 4 | vars: 5 | install: true 6 | roles: 7 | - lacchain-tessera-node -------------------------------------------------------------------------------- /site-lacchain-bootnode.yml: -------------------------------------------------------------------------------- 1 | - hosts: bootnodes 2 | gather_facts: yes 3 | become: yes 4 | vars: 5 | install: true 6 | roles: 7 | - lacchain-bootnode 8 | -------------------------------------------------------------------------------- /site-lacchain-update-orion.yml: -------------------------------------------------------------------------------- 1 | - hosts: orion 2 | gather_facts: yes 3 | become: yes 4 | vars: 5 | update: true 6 | roles: 7 | - lacchain-orion-node 8 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/templates/starttessera.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -jar /usr/local/tessera/tessera-app.jar -configfile /root/lacchain/tessera/tessera.conf 4 | -------------------------------------------------------------------------------- /site-lacchain-update-writer.yml: -------------------------------------------------------------------------------- 1 | - hosts: writer 2 | gather_facts: yes 3 | become: yes 4 | vars: 5 | update: true 6 | roles: 7 | - lacchain-writer-node 8 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/templates/java.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GOHOME="{{ javahome }}" 4 | export GOPATH="$HOME/workspace" 5 | 6 | export PATH=$PATH:{{ javahome }}/bin -------------------------------------------------------------------------------- /roles/lacchain-orion-node/templates/java.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GOHOME="{{ javahome }}" 4 | export GOPATH="$HOME/workspace" 5 | 6 | export PATH=$PATH:{{ javahome }}/bin -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/templates/java.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GOHOME="{{ javahome }}" 4 | export GOPATH="$HOME/workspace" 5 | 6 | export PATH=$PATH:{{ javahome }}/bin -------------------------------------------------------------------------------- /roles/lacchain-writer-node/templates/java.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GOHOME="{{ javahome }}" 4 | export GOPATH="$HOME/workspace" 5 | 6 | export PATH=$PATH:{{ javahome }}/bin -------------------------------------------------------------------------------- /site-lacchain-validator.yml: -------------------------------------------------------------------------------- 1 | - hosts: validators 2 | gather_facts: yes 3 | become: yes 4 | vars: 5 | install: true 6 | roles: 7 | - lacchain-validator-node 8 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/templates/java.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GOHOME="{{ javahome }}" 4 | export GOPATH="$HOME/workspace" 5 | 6 | export PATH=$PATH:{{ javahome }}/bin -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install Bootnode 3 | import_tasks: "install.yaml" 4 | when: install 5 | 6 | - name: Update Bootnode 7 | import_tasks: "update.yaml" 8 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install Validator Node 3 | import_tasks: "install.yaml" 4 | when: install 5 | 6 | - name: Update Validator Node 7 | import_tasks: "update.yaml" -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/static-nodes.json: -------------------------------------------------------------------------------- 1 | [ 2 | "enode://8b417b77f371836458da853d7e33241ee0f1e379e28045ac7adaeca2697b64bfa7b4cadcd5c8da6f5b39c1b503f4253a0c7f35643cef08b1aaf301b50995971c@34.74.191.37:60606" 3 | ] 4 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/stop-node.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Besu Node 3 | debug: 4 | msg: Stopping Besu Node 5 | 6 | - name: Stop Pantheon service 7 | service: 8 | name: pantheon 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/stop-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Orion Enclave 3 | debug: 4 | msg: Stopping Orion Node 5 | 6 | - name: Stop Orion service 7 | service: 8 | name: orion 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/stop-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Orion Enclave 3 | debug: 4 | msg: Stopping Orion Node 5 | 6 | - name: Stop Orion service 7 | service: 8 | name: orion 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/static-nodes.json: -------------------------------------------------------------------------------- 1 | [ 2 | "enode://8b417b77f371836458da853d7e33241ee0f1e379e28045ac7adaeca2697b64bfa7b4cadcd5c8da6f5b39c1b503f4253a0c7f35643cef08b1aaf301b50995971c@34.74.191.37:60606" 3 | ] 4 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/stop-node.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Besu Node 3 | debug: 4 | msg: Stopping Besu Node 5 | 6 | - name: Stop Besu service 7 | service: 8 | name: pantheon 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/start-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Orion Enclave 3 | debug: 4 | msg: Starting Orion Node 5 | 6 | - name: Execute Orion service 7 | service: 8 | name: orion 9 | state: started -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/start-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Orion Enclave 3 | debug: 4 | msg: Starting Orion Node 5 | 6 | - name: Execute Orion service 7 | service: 8 | name: orion 9 | state: started -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/static-nodes.json: -------------------------------------------------------------------------------- 1 | [ 2 | "enode://8b417b77f371836458da853d7e33241ee0f1e379e28045ac7adaeca2697b64bfa7b4cadcd5c8da6f5b39c1b503f4253a0c7f35643cef08b1aaf301b50995971c@34.74.191.37:60606" 3 | ] 4 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/stop-node.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Besu Node 3 | debug: 4 | msg: Stopping Besu Node 5 | 6 | - name: Stop Pantheon service 7 | service: 8 | name: pantheon 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/stop-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Orion Enclave 3 | debug: 4 | msg: Stopping Orion Node 5 | 6 | - name: Stop Orion service 7 | service: 8 | name: orion 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/start-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Orion Enclave 3 | debug: 4 | msg: Starting Orion Node 5 | 6 | - name: Execute Orion service 7 | service: 8 | name: orion 9 | state: started -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/orion.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Orion client 3 | 4 | [Service] 5 | Type=simple 6 | Restart=always 7 | ExecStart=/root/lacchain/start-orion.sh 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/stop-tessera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Tessera Enclave 3 | debug: 4 | msg: Stopping Tessera Node 5 | 6 | - name: Stop Tessera service 7 | service: 8 | name: tessera 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/start-tessera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Tessera Enclave 3 | debug: 4 | msg: Starting Tessera Node 5 | 6 | - name: Execute Tessera service 7 | service: 8 | name: tessera 9 | state: started -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/orion.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Orion client 3 | 4 | [Service] 5 | Type=simple 6 | Restart=always 7 | ExecStart=/root/lacchain/start-orion.sh 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/start-node.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Besu Node 3 | debug: 4 | msg: Starting Besu Node 5 | 6 | - name: Execute Besu service 7 | service: 8 | name: pantheon 9 | state: started 10 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/start-node.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Pantheon Node 3 | debug: 4 | msg: Starting Pantheon Node 5 | 6 | - name: Execute Pantheon service 7 | service: 8 | name: pantheon 9 | state: started 10 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/stop-health-check.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Health Node 3 | debug: 4 | msg: Stopping Health Check Service Node 5 | 6 | - name: Stop Health Check 7 | service: 8 | name: health-check 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/pantheon.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ethereum Pantheon client 3 | 4 | [Service] 5 | Type=simple 6 | Restart=always 7 | ExecStart=/root/lacchain/start-pantheon.sh 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/stop-health-check.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Stop Health Node 3 | debug: 4 | msg: Stopping Health Check Service Node 5 | 6 | - name: Stop Health Check 7 | service: 8 | name: health-check 9 | state: stopped -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/start-health-check.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Health Node 3 | debug: 4 | msg: Starting Health Check Service Node 5 | 6 | - name: Starting Health Check 7 | service: 8 | name: health-check 9 | state: restarted -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/start-health-check.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Health Node 3 | debug: 4 | msg: Starting Health Check Service Node 5 | 6 | - name: Starting Health Check 7 | service: 8 | name: health-check 9 | state: restarted -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/pantheon.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ethereum Pantheon client 3 | 4 | [Service] 5 | Type=simple 6 | Restart=always 7 | ExecStart=/root/lacchain/start-pantheon.sh 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/start-node.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Pantheon Node 3 | debug: 4 | msg: Starting Pantheon Node 5 | 6 | - name: Execute Pantheon service 7 | service: 8 | name: pantheon 9 | state: started 10 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/files/health-check.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=health-check service 3 | 4 | [Service] 5 | Type=notify 6 | ExecStart=/root/lacchain/health-check/health-check 7 | Restart=always 8 | 9 | [Install] 10 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/files/tessera.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Tessera client 3 | 4 | [Service] 5 | Type=simple 6 | Restart=always 7 | ExecStart=/root/lacchain/start-tessera.sh 8 | MemoryLimit=2048M 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/pantheon.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ethereum Pantheon client 3 | 4 | [Service] 5 | Type=simple 6 | Restart=always 7 | ExecStart=/root/lacchain/start-pantheon.sh 8 | MemoryLimit=4096M 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/agreements-acceptance.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - fail: 3 | msg: 'Plase Accept the conditions by typing Y when prompted.' 4 | when: " (haveRead != 'Y' and haveRead != 'y') or ( isAgree != 'Y' and isAgree != 'y' ) " 5 | 6 | - debug: 7 | msg: "Starting Installation" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/files/orion.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Orion client 3 | PartOf=health-check.service 4 | 5 | [Service] 6 | Type=simple 7 | Restart=always 8 | ExecStart=/root/lacchain/start-orion.sh 9 | MemoryLimit=2048M 10 | 11 | [Install] 12 | WantedBy=default.target 13 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/install-go.yaml: -------------------------------------------------------------------------------- 1 | - name: install go 2 | package: 3 | name="golang" 4 | state=present 5 | become: yes 6 | 7 | - name: "Preparing GOPATH" 8 | shell: mkdir -p /root/go/src/github 9 | args: 10 | warn: false 11 | ignore_errors: yes 12 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/agreements-acceptance.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - fail: 3 | msg: 'Plase Accept the conditions by typing Y when prompted.' 4 | when: " (haveRead != 'Y' and haveRead != 'y') or ( isAgree != 'Y' and isAgree != 'y' ) " 5 | 6 | - debug: 7 | msg: "Starting Installation" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/install-go.yaml: -------------------------------------------------------------------------------- 1 | - name: install go 2 | package: 3 | name="golang" 4 | state=present 5 | become: yes 6 | 7 | - name: "Preparing GOPATH" 8 | shell: mkdir -p /root/go/src/github 9 | args: 10 | warn: false 11 | ignore_errors: yes 12 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/start-rotation-validator.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Start Rotation Validator Process 3 | debug: 4 | msg: Starting Rotation Validator Process 5 | 6 | - name: Starting Rotation Validator 7 | service: 8 | name: rotationvalidator 9 | state: started -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/agreements-acceptance.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - fail: 3 | msg: 'Please Accept the conditions by typing Y when prompted.' 4 | when: " (haveRead != 'Y' and haveRead != 'y') or ( isAgree != 'Y' and isAgree != 'y' ) " 5 | 6 | - debug: 7 | msg: "Starting Installation" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/prepare-health-check.yaml: -------------------------------------------------------------------------------- 1 | - name: Install Golang program 2 | import_tasks: "install-go.yaml" 3 | 4 | - name: build executable health-check 5 | import_tasks: "build-executable.yaml" 6 | 7 | - name: Init health check service 8 | import_tasks: "init-health-check.yaml" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/prepare-health-check.yaml: -------------------------------------------------------------------------------- 1 | - name: Install Golang program 2 | import_tasks: "install-go.yaml" 3 | 4 | - name: build executable health-check 5 | import_tasks: "build-executable.yaml" 6 | 7 | - name: Init health check service 8 | import_tasks: "init-health-check.yaml" -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/clean-docker-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for containerId in `sudo docker ps | grep "alethio/ethstats" | awk '{print $1}'`;do 3 | log=`sudo docker inspect -f '{{.LogPath}}' $containerId`; 4 | echo "truncating logs found in: $log ..."; 5 | sudo truncate -s 0 $log; 6 | done -------------------------------------------------------------------------------- /roles/lacchain-orion-node/files/nginx-rhel.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | # multi_accept on; 9 | } 10 | 11 | http { 12 | include /etc/nginx/conf.d/ssl.conf; 13 | } 14 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/clean-docker-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for containerId in `sudo docker ps | grep "alethio/ethstats" | awk '{print $1}'`;do 3 | log=`sudo docker inspect -f '{{.LogPath}}' $containerId`; 4 | echo "truncating logs found in: $log ..."; 5 | sudo truncate -s 0 $log; 6 | done -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/clean-docker-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for containerId in `sudo docker ps | grep "alethio/ethstats" | awk '{print $1}'`;do 3 | log=`sudo docker inspect -f '{{.LogPath}}' $containerId`; 4 | echo "truncating logs found in: $log ..."; 5 | sudo truncate -s 0 $log; 6 | done -------------------------------------------------------------------------------- /roles/lacchain-orion-node/files/nginx-ubuntu.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | # multi_accept on; 9 | } 10 | 11 | http { 12 | include /etc/nginx/conf.d/ssl.conf; 13 | } 14 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/files/nginx-rhel.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | # multi_accept on; 9 | } 10 | 11 | http { 12 | include /etc/nginx/conf.d/ssl.conf; 13 | } 14 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/nginx-rhel.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | # multi_accept on; 9 | } 10 | 11 | http { 12 | include /etc/nginx/conf.d/ssl.conf; 13 | } 14 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/files/nginx-ubuntu.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | # multi_accept on; 9 | } 10 | 11 | http { 12 | include /etc/nginx/conf.d/ssl.conf; 13 | } 14 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/nginx-ubuntu.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | # multi_accept on; 9 | } 10 | 11 | http { 12 | include /etc/nginx/conf.d/ssl.conf; 13 | } 14 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/clean-files.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Remove old constellation file 3 | file: 4 | path: ~/lacchain/tmp/permissioned-nodes_general.json 5 | state: absent 6 | 7 | - name: Remove old permissioned nodes file 8 | file: 9 | path: ~/lacchain/tmp/permissioned-nodes_validator.json 10 | state: absent 11 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/clean-files.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Remove old constellation file 3 | file: 4 | path: ~/lacchain/tmp/permissioned-nodes_general.json 5 | state: absent 6 | 7 | - name: Remove old permissioned nodes file 8 | file: 9 | path: ~/lacchain/tmp/permissioned-nodes_validator.json 10 | state: absent 11 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/clean-files.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Remove old constellation file 3 | file: 4 | path: ~/lacchain/tmp/permissioned-nodes_general.json 5 | state: absent 6 | 7 | - name: Remove old permissioned nodes file 8 | file: 9 | path: ~/lacchain/tmp/permissioned-nodes_validator.json 10 | state: absent 11 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # basic 2 | title: LACNet Networks 3 | description: LACChain Networks 4 | baseurl: 5 | url: 6 | 7 | # build settings 8 | markdown: kramdown 9 | 10 | github: 11 | # key: value 12 | # another_url: value 13 | 14 | remote_theme: pages-themes/minimal@v0.2.0 15 | plugins: 16 | - jekyll-remote-theme 17 | - jekyll-github-metadata 18 | 19 | 20 | -------------------------------------------------------------------------------- /site-lacchain-backup.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: yes 3 | become: yes 4 | vars_prompt: 5 | - name: "backup" 6 | prompt: "Would you like to backup your node? (yes/no)" 7 | private: no 8 | - name: "restore" 9 | prompt: "Would you like to restore your node? (yes/no)" 10 | private: no 11 | roles: 12 | - lacchain-backup-node 13 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/templates/startpantheon.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --config-file=/root/lacchain/config.toml -------------------------------------------------------------------------------- /roles/lacchain-validator-node/templates/startpantheon.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --config-file=/root/lacchain/config.toml -------------------------------------------------------------------------------- /site-lacchain-update.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: yes 3 | become: yes 4 | vars_prompt: 5 | - name: "backup" 6 | prompt: "Would you like to update a validator node? (yes/no)" 7 | private: no 8 | - name: "restore" 9 | prompt: "Would you like to update a writer node? (yes/no)" 10 | private: no 11 | roles: 12 | - lacchain-update-node 13 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/templates/startpantheon.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --config-file=/root/lacchain/config.toml --bootnodes -------------------------------------------------------------------------------- /roles/lacchain-validator-node/templates/rotation-validator-config.j2: -------------------------------------------------------------------------------- 1 | [application] 2 | wsURL = "ws://localhost:4546" 3 | rpcURL = "http://localhost:4545" 4 | timeout = 5 5 | contractAddress = "{{validator_rotation_address}}" 6 | accountContractAddress = "0x1CaFf993d5f0053156761682263c1614c7C37D7C" 7 | nodeKeyPath = "/root/lacchain/data/key" 8 | nodeAddressPath = "/root/lacchain/data/nodeAddress" -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update Besu Node 3 | import_tasks: "update-besu.yaml" 4 | 5 | - name: Install Rotation Validator 6 | import_tasks: "install-rotation-validator.yaml" 7 | 8 | - name: Init Rotation Validator 9 | import_tasks: "init-rotation-validator.yaml" 10 | 11 | - name: Start Rotation Validator 12 | import_tasks: "start-rotation-validator.yaml" -------------------------------------------------------------------------------- /roles/lacchain-bootnode/templates/orion.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nodeurl = "http://127.0.0.1:4040/" 4 | nodeport = 4040 5 | nodenetworkinterface = "0.0.0.0" 6 | clienturl = "http://127.0.0.1:4444/" 7 | clientport = 4444 8 | publickeys = ["/root/lacchain/orion/keystore/nodeKey.pub"] 9 | privatekeys = ["/root/lacchain/orion/keystore/nodeKey.key"] 10 | passwords = "/root/lacchain/tmp/.account_pass" 11 | tls = "off" 12 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/templates/orion.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nodeurl = "http://127.0.0.1:4040/" 4 | nodeport = 4040 5 | nodenetworkinterface = "0.0.0.0" 6 | clienturl = "http://127.0.0.1:4444/" 7 | clientport = 4444 8 | publickeys = ["/root/lacchain/orion/keystore/nodeKey.pub"] 9 | privatekeys = ["/root/lacchain/orion/keystore/nodeKey.key"] 10 | passwords = "/root/lacchain/tmp/.account_pass" 11 | tls = "off" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/install-nginx-rhel.yml: -------------------------------------------------------------------------------- 1 | - name: install nginx prerequisites 2 | package: 3 | name: yum-utils 4 | state: present 5 | 6 | - name: Setup nginx repository 7 | copy: 8 | src: "{{ role_path }}/files/nginx.repo" 9 | dest: /etc/yum.repos.d 10 | mode: 0644 11 | 12 | - name: install nginx 13 | package: 14 | name: nginx 15 | state: present 16 | disable_gpg_check: yes 17 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/install-nginx-rhel.yml: -------------------------------------------------------------------------------- 1 | - name: install nginx prerequisites 2 | package: 3 | name: yum-utils 4 | state: present 5 | 6 | - name: Setup nginx repository 7 | copy: 8 | src: "{{ role_path }}/files/nginx.repo" 9 | dest: /etc/yum.repos.d 10 | mode: 0644 11 | 12 | - name: install nginx 13 | package: 14 | name: nginx 15 | state: present 16 | disable_gpg_check: yes 17 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install-nginx-rhel.yml: -------------------------------------------------------------------------------- 1 | - name: install nginx prerequisites 2 | package: 3 | name: yum-utils 4 | state: present 5 | 6 | - name: Setup nginx repository 7 | copy: 8 | src: "{{ role_path }}/files/nginx.repo" 9 | dest: /etc/yum.repos.d 10 | mode: 0644 11 | 12 | - name: install nginx 13 | package: 14 | name: nginx 15 | state: present 16 | disable_gpg_check: yes 17 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/files/permissions_config.toml: -------------------------------------------------------------------------------- 1 | accounts-whitelist=["0x18af5bfa9222e79fb2793a2008ed0b3c8e900999"] 2 | nodes-whitelist=["enode://0fd7b7570bd37eb0bb21dabe543a811b8d4bb886af44db79e1990a1e5bc55c4ab9d42293dbcb550935ba5cde7d596176781301ce87d995159cc8537acc0a40f5@34.74.191.37:60606","enode://8b417b77f371836458da853d7e33241ee0f1e379e28045ac7adaeca2697b64bfa7b4cadcd5c8da6f5b39c1b503f4253a0c7f35643cef08b1aaf301b50995971c@34.73.199.100:60606"] 3 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/vars/permissions_config.toml: -------------------------------------------------------------------------------- 1 | accounts-whitelist=["0x18af5bfa9222e79fb2793a2008ed0b3c8e900999"] 2 | nodes-whitelist=["enode://0fd7b7570bd37eb0bb21dabe543a811b8d4bb886af44db79e1990a1e5bc55c4ab9d42293dbcb550935ba5cde7d596176781301ce87d995159cc8537acc0a40f5@34.74.191.37:60606","enode://8b417b77f371836458da853d7e33241ee0f1e379e28045ac7adaeca2697b64bfa7b4cadcd5c8da6f5b39c1b503f4253a0c7f35643cef08b1aaf301b50995971c@34.73.199.100:60606"] 3 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/init-tuning.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Init Tunning 3 | debug: 4 | msg: "Init Tuning" 5 | 6 | - name: Set Overcommit memory 7 | shell: "echo vm.overcommit_memory = 2 >> /etc/sysctl.conf" 8 | 9 | - name: Set Overcommit ratio 10 | shell: "echo vm.overcommit_ratio = 100 >> /etc/sysctl.conf" 11 | 12 | - name: Set max map count 13 | shell: "sysctl -w vm.max_map_count=131072" 14 | 15 | - name: Set Overcommit 16 | shell: "sysctl -p" -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/init-tuning.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Init Tunning 3 | debug: 4 | msg: "Init Tuning" 5 | 6 | - name: Set Overcommit memory 7 | shell: "echo vm.overcommit_memory = 2 >> /etc/sysctl.conf" 8 | 9 | - name: Set Overcommit ratio 10 | shell: "echo vm.overcommit_ratio = 100 >> /etc/sysctl.conf" 11 | 12 | - name: Set max map count 13 | shell: "sysctl -w vm.max_map_count=131072" 14 | 15 | - name: Set Overcommit 16 | shell: "sysctl -p" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/init-tuning.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Init Tunning 3 | debug: 4 | msg: "Init Tuning" 5 | 6 | - name: Set Overcommit memory 7 | shell: "echo vm.overcommit_memory = 2 >> /etc/sysctl.conf" 8 | 9 | - name: Set Overcommit ratio 10 | shell: "echo vm.overcommit_ratio = 100 >> /etc/sysctl.conf" 11 | 12 | - name: Set max map count 13 | shell: "sysctl -w vm.max_map_count=131072" 14 | 15 | - name: Set Overcommit 16 | shell: "sysctl -p" -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/ubuntu-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install dependencies for {{ ansible_distribution }} 3 | apt: 4 | name: 5 | - software-properties-common 6 | - unzip 7 | - wget 8 | - git 9 | - make 10 | - gcc 11 | # - libsodium-dev 12 | - build-essential 13 | - libdb-dev 14 | - zlib1g-dev 15 | - libtinfo-dev 16 | - sysvbanner 17 | - psmisc 18 | - libdb5.3-dev 19 | - cron 20 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/files/nginx.repo: -------------------------------------------------------------------------------- 1 | [nginx-stable] 2 | name=nginx stable repo 3 | baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ 4 | gpgcheck=1 5 | enabled=1 6 | gpgkey=https://nginx.org/keys/nginx_signing.key 7 | module_hotfixes=true 8 | 9 | [nginx-mainline] 10 | name=nginx mainline repo 11 | baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ 12 | gpgcheck=1 13 | enabled=0 14 | gpgkey=https://nginx.org/keys/nginx_signing.key 15 | module_hotfixes=true -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/files/nginx.repo: -------------------------------------------------------------------------------- 1 | [nginx-stable] 2 | name=nginx stable repo 3 | baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ 4 | gpgcheck=1 5 | enabled=1 6 | gpgkey=https://nginx.org/keys/nginx_signing.key 7 | module_hotfixes=true 8 | 9 | [nginx-mainline] 10 | name=nginx mainline repo 11 | baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ 12 | gpgcheck=1 13 | enabled=0 14 | gpgkey=https://nginx.org/keys/nginx_signing.key 15 | module_hotfixes=true -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/nginx.repo: -------------------------------------------------------------------------------- 1 | [nginx-stable] 2 | name=nginx stable repo 3 | baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ 4 | gpgcheck=1 5 | enabled=1 6 | gpgkey=https://nginx.org/keys/nginx_signing.key 7 | module_hotfixes=true 8 | 9 | [nginx-mainline] 10 | name=nginx mainline repo 11 | baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ 12 | gpgcheck=1 13 | enabled=0 14 | gpgkey=https://nginx.org/keys/nginx_signing.key 15 | module_hotfixes=true -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/ubuntu-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install dependencies for {{ ansible_distribution }} 3 | apt: 4 | name: 5 | - software-properties-common 6 | - unzip 7 | - wget 8 | - git 9 | - make 10 | - gcc 11 | # - libsodium-dev 12 | - build-essential 13 | - libdb-dev 14 | - zlib1g-dev 15 | - libtinfo-dev 16 | - sysvbanner 17 | - psmisc 18 | - libdb5.3-dev 19 | - cron 20 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/install-java-centos.yaml: -------------------------------------------------------------------------------- 1 | - name: Get java version 2 | shell: ls | grep "jdk-11" | grep "_linux-x64_bin.rpm" 3 | args: 4 | chdir: "{{oracle_java_dir_source}}" 5 | register: oracle_java_rpm_filename 6 | 7 | - name: Print found Java version 8 | debug: 9 | msg: "Found java version: {{ oracle_java_rpm_filename.stdout}}" 10 | 11 | 12 | - name: install java 13 | package: 14 | name="{{ oracle_java_dir_source }}/{{ oracle_java_rpm_filename.stdout }}" 15 | state=present 16 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/install-java-centos.yaml: -------------------------------------------------------------------------------- 1 | - name: Get java version 2 | shell: ls | grep "jdk-11" | grep "_linux-x64_bin.rpm" 3 | args: 4 | chdir: "{{oracle_java_dir_source}}" 5 | register: oracle_java_rpm_filename 6 | 7 | - name: Print found Java version 8 | debug: 9 | msg: "Found java version: {{ oracle_java_rpm_filename.stdout}}" 10 | 11 | 12 | - name: install java 13 | package: 14 | name="{{ oracle_java_dir_source }}/{{ oracle_java_rpm_filename.stdout }}" 15 | state=present 16 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/install-java-centos.yaml: -------------------------------------------------------------------------------- 1 | - name: Get java version 2 | shell: ls | grep "jdk-11" | grep "_linux-x64_bin.rpm" 3 | args: 4 | chdir: "{{oracle_java_dir_source}}" 5 | register: oracle_java_rpm_filename 6 | 7 | - name: Print found Java version 8 | debug: 9 | msg: "Found java version: {{ oracle_java_rpm_filename.stdout}}" 10 | 11 | 12 | - name: install java 13 | package: 14 | name="{{ oracle_java_dir_source }}/{{ oracle_java_rpm_filename.stdout }}" 15 | state=present 16 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install-java-centos.yaml: -------------------------------------------------------------------------------- 1 | - name: Get java version 2 | shell: ls | grep "jdk-11" | grep "_linux-x64_bin.rpm" 3 | args: 4 | chdir: "{{oracle_java_dir_source}}" 5 | register: oracle_java_rpm_filename 6 | 7 | - name: Print found Java version 8 | debug: 9 | msg: "Found java version: {{ oracle_java_rpm_filename.stdout}}" 10 | 11 | 12 | - name: install java 13 | package: 14 | name="{{ oracle_java_dir_source }}/{{ oracle_java_rpm_filename.stdout }}" 15 | state=present 16 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install-java-centos.yaml: -------------------------------------------------------------------------------- 1 | - name: Get java version 2 | shell: ls | grep "jdk-11" | grep "_linux-x64_bin.rpm" 3 | args: 4 | chdir: "{{oracle_java_dir_source}}" 5 | register: oracle_java_rpm_filename 6 | 7 | - name: Print found Java version 8 | debug: 9 | msg: "Found java version: {{ oracle_java_rpm_filename.stdout}}" 10 | 11 | 12 | - name: install java 13 | package: 14 | name="{{ oracle_java_dir_source }}/{{ oracle_java_rpm_filename.stdout }}" 15 | state=present 16 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-validator-node/files/rotation-validator.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=RotationValidator service 3 | ConditionPathExists=/root/lacchain/rotation-validator/client/client 4 | After=network.target 5 | 6 | [Service] 7 | Type=simple 8 | User=root 9 | Group=root 10 | LimitNOFILE=1024 11 | 12 | Restart=on-failure 13 | RestartSec=10 14 | startLimitIntervalSec=60 15 | 16 | WorkingDirectory=/root/lacchain/rotation-validator/client 17 | ExecStart=/root/lacchain/rotation-validator/client/client 18 | 19 | [Install] 20 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /roles/lacchain-orion-node/templates/health-check.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #eval `./healthCheckexe` 3 | ###################### 4 | #0 => Do nothing 5 | #1 => restart orion 6 | ###################### 7 | 8 | INPUT_STRING=$(./healthCheckexe) 9 | case $INPUT_STRING in 10 | "0") 11 | echo "Successful response from Orion service" 12 | ;; 13 | "1") 14 | echo "Orion isn't responding, restarting Orion..." 15 | systemctl restart orion 16 | break 17 | ;; 18 | *) 19 | echo "Unexpected response from golang program, please check health check program" 20 | ;; 21 | esac -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/templates/health-check.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #eval `./healthCheckexe` 3 | ###################### 4 | #0 => Do nothing 5 | #1 => restart orion 6 | ###################### 7 | 8 | INPUT_STRING=$(./healthCheckexe) 9 | case $INPUT_STRING in 10 | "0") 11 | echo "Successful response from Orion service" 12 | ;; 13 | "1") 14 | echo "Orion isn't responding, restarting Orion..." 15 | systemctl restart orion 16 | break 17 | ;; 18 | *) 19 | echo "Unexpected response from golang program, please check health check program" 20 | ;; 21 | esac -------------------------------------------------------------------------------- /roles/lacchain-bootnode/defaults/java-debian-ubuntu.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: laccchain-validator-node/defaults/java-debian-ubuntu.yml 3 | # 4 | # Default java variables for Ubuntu Linux distributions. 5 | # 6 | oracle_java_apt_repository: "ppa:linuxuprising/java" 7 | oracle_java_cache_valid_time: 3600 8 | oracle_java_deb_package: "oracle-java11-installer-local" 9 | oracle_java_debconf_package_default: "oracle-java11-set-default" 10 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 11 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 12 | oracle_java_state: latest 13 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/prepare-nginx.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install nginx for {{ ansible_distribution }} 3 | import_tasks: "install-nginx-ubuntu.yml" 4 | when: ansible_distribution |lower == 'ubuntu' 5 | 6 | - name: Install nginx for {{ ansible_distribution }} 7 | import_tasks: "install-nginx-rhel.yml" 8 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 9 | 10 | - name: Create Certificates 11 | import_tasks: "create-self-signed-certificate.yaml" 12 | 13 | - name: Configure nginx 14 | import_tasks: "configure-nginx.yml" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/defaults/java-debian-ubuntu.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: laccchain-validator-node/defaults/java-debian-ubuntu.yml 3 | # 4 | # Default java variables for Ubuntu Linux distributions. 5 | # 6 | oracle_java_apt_repository: "ppa:linuxuprising/java" 7 | oracle_java_cache_valid_time: 3600 8 | oracle_java_deb_package: "oracle-java11-installer-local" 9 | oracle_java_debconf_package_default: "oracle-java11-set-default" 10 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 11 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 12 | oracle_java_state: latest 13 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/defaults/java-debian-ubuntu.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: laccchain-validator-node/defaults/java-debian-ubuntu.yml 3 | # 4 | # Default java variables for Ubuntu Linux distributions. 5 | # 6 | oracle_java_apt_repository: "ppa:linuxuprising/java" 7 | oracle_java_cache_valid_time: 3600 8 | oracle_java_deb_package: "oracle-java11-installer-local" 9 | oracle_java_debconf_package_default: "oracle-java11-set-default" 10 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 11 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 12 | oracle_java_state: latest 13 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/prepare-nginx.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install nginx for {{ ansible_distribution }} 3 | import_tasks: "install-nginx-ubuntu.yml" 4 | when: ansible_distribution |lower == 'ubuntu' 5 | 6 | - name: Install nginx for {{ ansible_distribution }} 7 | import_tasks: "install-nginx-rhel.yml" 8 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 9 | 10 | - name: Create Certificates 11 | import_tasks: "create-self-signed-certificate.yaml" 12 | 13 | - name: Configure nginx 14 | import_tasks: "configure-nginx.yml" -------------------------------------------------------------------------------- /roles/lacchain-validator-node/defaults/java-debian-ubuntu.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: laccchain-validator-node/defaults/java-debian-ubuntu.yml 3 | # 4 | # Default java variables for Ubuntu Linux distributions. 5 | # 6 | oracle_java_apt_repository: "ppa:linuxuprising/java" 7 | oracle_java_cache_valid_time: 3600 8 | oracle_java_deb_package: "oracle-java11-installer-local" 9 | oracle_java_debconf_package_default: "oracle-java11-set-default" 10 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 11 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 12 | oracle_java_state: latest 13 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/defaults/java-debian-ubuntu.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: laccchain-validator-node/defaults/java-debian-ubuntu.yml 3 | # 4 | # Default java variables for Ubuntu Linux distributions. 5 | # 6 | oracle_java_apt_repository: "ppa:linuxuprising/java" 7 | oracle_java_cache_valid_time: 3600 8 | oracle_java_deb_package: "oracle-java11-installer-local" 9 | oracle_java_debconf_package_default: "oracle-java11-set-default" 10 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 11 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 12 | oracle_java_state: latest 13 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/prepare-nginx.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install nginx for {{ ansible_distribution }} 3 | import_tasks: "install-nginx-ubuntu.yml" 4 | when: ansible_distribution |lower == 'ubuntu' 5 | 6 | - name: Install nginx for {{ ansible_distribution }} 7 | import_tasks: "install-nginx-rhel.yml" 8 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 9 | 10 | - name: Create Certificates 11 | import_tasks: "create-self-signed-certificate.yaml" 12 | 13 | - name: Configure nginx 14 | import_tasks: "configure-nginx.yml" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: get public ip 3 | shell: dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null || curl -s --retry 2 icanhazip.com 4 | register: ip_address 5 | when: node_ip is not defined 6 | 7 | - name: setting ip to use 8 | set_fact: 9 | node_ip: "{{ip_address.stdout}}" 10 | when: node_ip is not defined 11 | 12 | - name: Install Orion Node 13 | import_tasks: "install.yaml" 14 | when: install | default(False) | bool 15 | 16 | - name: Update Writer Node 17 | import_tasks: "update.yaml" 18 | when: update | default(False) | bool -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: get public ip 3 | shell: dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null || curl -s --retry 2 icanhazip.com 4 | register: ip_address 5 | when: node_ip is not defined 6 | 7 | - name: setting ip to use 8 | set_fact: 9 | node_ip: "{{ip_address.stdout}}" 10 | when: node_ip is not defined 11 | 12 | - name: Install Tessera Node 13 | import_tasks: "install.yaml" 14 | when: install | default(False) | bool 15 | 16 | - name: Update Writer Node 17 | import_tasks: "update.yaml" 18 | when: update | default(False) | bool -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/init-rotation-validator.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Init Rotation Validator 3 | debug: 4 | msg: Configuring Rotation Validator Process 5 | 6 | - name: Copy service file to systemd 7 | copy: 8 | src: "{{ role_path }}/files/rotation-validator.service" 9 | dest: /lib/systemd/system/rotationvalidator.service 10 | mode: 0775 11 | 12 | - name: Reload systemctl daemon 13 | shell: systemctl daemon-reload 14 | args: 15 | warn: false 16 | 17 | - name: Enable service Rotation Validator 18 | service: 19 | name: rotationvalidator 20 | enabled: yes -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/ubuntu-install-libsodium.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Installing libsodium 3 | - name: Download libsodium tar 4 | get_url: 5 | url: "{{libsodium_base_url}}/{{libsodium_version}}" 6 | dest: "/tmp/{{libsodium_version}}" 7 | mode: 0440 8 | 9 | - name: Extract the libsodium tarball 10 | unarchive: 11 | src: "/tmp/{{libsodium_version}}" 12 | dest: /usr/local 13 | copy: no 14 | 15 | - name: "Installing libsodium" 16 | shell: sh ./configure && make && make check && make install 17 | args: 18 | chdir: "/usr/local/libsodium-stable" 19 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/ubuntu-install-libsodium.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Installing libsodium 3 | - name: Download libsodium tar 4 | get_url: 5 | url: "{{libsodium_base_url}}/{{libsodium_version}}" 6 | dest: "/tmp/{{libsodium_version}}" 7 | mode: 0440 8 | 9 | - name: Extract the libsodium tarball 10 | unarchive: 11 | src: "/tmp/{{libsodium_version}}" 12 | dest: /usr/local 13 | copy: no 14 | 15 | - name: "Installing libsodium" 16 | shell: sh ./configure && make && make check && make install 17 | args: 18 | chdir: "/usr/local/libsodium-stable" 19 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/ubuntu-install-libsodium.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Installing libsodium 3 | - name: Download libsodium tar 4 | get_url: 5 | url: "{{libsodium_base_url}}/{{libsodium_version}}" 6 | dest: "/tmp/{{libsodium_version}}" 7 | mode: 0440 8 | 9 | - name: Extract the libsodium tarball 10 | unarchive: 11 | src: "/tmp/{{libsodium_version}}" 12 | dest: /usr/local 13 | copy: no 14 | 15 | - name: "Installing libsodium" 16 | shell: sh ./configure && make && make check && make install 17 | args: 18 | chdir: "/usr/local/libsodium-stable" 19 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/ubuntu-install-libsodium.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Installing libsodium 3 | - name: Download libsodium tar 4 | get_url: 5 | url: "{{libsodium_base_url}}/{{libsodium_version}}" 6 | dest: "/tmp/{{libsodium_version}}" 7 | mode: 0440 8 | 9 | - name: Extract the libsodium tarball 10 | unarchive: 11 | src: "/tmp/{{libsodium_version}}" 12 | dest: /usr/local 13 | copy: no 14 | 15 | - name: "Installing libsodium" 16 | shell: sh ./configure && make && make check && make install 17 | args: 18 | chdir: "/usr/local/libsodium-stable" 19 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/defaults/java-redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: lacchain-validator-node/defaults/java-redhat.yml 3 | # 4 | # Default variables for Redhat-based Linux distributions. 5 | # 6 | 7 | oracle_java_dir_source: "/usr/local/src" 8 | oracle_java_download_timeout: 60 9 | oracle_java_rpm_filename: "jdk-11.0.2_linux-x64_bin.rpm" 10 | oracle_java_home: "/usr/java/default" 11 | oracle_java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.rpm" 12 | oracle_java_rpm_validate_certs: yes 13 | oracle_java_version: 11 14 | oracle_java_version_string: 11.0.2 15 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/defaults/java-redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: lacchain-validator-node/defaults/java-redhat.yml 3 | # 4 | # Default variables for Redhat-based Linux distributions. 5 | # 6 | 7 | oracle_java_dir_source: "/usr/local/src" 8 | oracle_java_download_timeout: 60 9 | oracle_java_rpm_filename: "jdk-11.0.2_linux-x64_bin.rpm" 10 | oracle_java_home: "/usr/java/default" 11 | oracle_java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.rpm" 12 | oracle_java_rpm_validate_certs: yes 13 | oracle_java_version: 11 14 | oracle_java_version_string: 11.0.2 15 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/defaults/java-redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: lacchain-validator-node/defaults/java-redhat.yml 3 | # 4 | # Default variables for Redhat-based Linux distributions. 5 | # 6 | 7 | oracle_java_dir_source: "/usr/local/src" 8 | oracle_java_download_timeout: 60 9 | oracle_java_rpm_filename: "jdk-11.0.2_linux-x64_bin.rpm" 10 | oracle_java_home: "/usr/java/default" 11 | oracle_java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.rpm" 12 | oracle_java_rpm_validate_certs: yes 13 | oracle_java_version: 11 14 | oracle_java_version_string: 11.0.2 15 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/build-executable.yaml: -------------------------------------------------------------------------------- 1 | - name: Download health-check source code 2 | git: 3 | repo: "https://github.com/lacchain/node-health-check.git" 4 | dest: "/root/go/src/healthCheck" 5 | 6 | - name: install health-dependencies for {{ ansible_distribution }} 7 | yum: 8 | name: 9 | - "systemd-devel" 10 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 11 | 12 | - name: Build health check executable program 13 | shell: export GO111MODULE=off && go get ./... && go build -o health-check 14 | args: 15 | chdir: "/root/go/src/healthCheck" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/defaults/java-redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: lacchain-validator-node/defaults/java-redhat.yml 3 | # 4 | # Default variables for Redhat-based Linux distributions. 5 | # 6 | 7 | oracle_java_dir_source: "/usr/local/src" 8 | oracle_java_download_timeout: 60 9 | oracle_java_rpm_filename: "jdk-11.0.2_linux-x64_bin.rpm" 10 | oracle_java_home: "/usr/java/default" 11 | oracle_java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.rpm" 12 | oracle_java_rpm_validate_certs: yes 13 | oracle_java_version: 11 14 | oracle_java_version_string: 11.0.2 15 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/build-executable.yaml: -------------------------------------------------------------------------------- 1 | - name: Download health-check source code 2 | git: 3 | repo: "https://github.com/lacchain/node-health-check.git" 4 | dest: "/root/go/src/healthCheck" 5 | 6 | - name: install health-dependencies for {{ ansible_distribution }} 7 | yum: 8 | name: 9 | - "systemd-devel" 10 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 11 | 12 | - name: Build health check executable program 13 | shell: export GO111MODULE=off && go get ./... && go build -o health-check 14 | args: 15 | chdir: "/root/go/src/healthCheck" -------------------------------------------------------------------------------- /roles/lacchain-validator-node/defaults/java-redhat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: lacchain-validator-node/defaults/java-redhat.yml 3 | # 4 | # Default variables for Redhat-based Linux distributions. 5 | # 6 | 7 | oracle_java_dir_source: "/usr/local/src" 8 | oracle_java_download_timeout: 60 9 | oracle_java_rpm_filename: "jdk-11.0.2_linux-x64_bin.rpm" 10 | oracle_java_home: "/usr/java/default" 11 | oracle_java_rpm_url: "http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.rpm" 12 | oracle_java_rpm_validate_certs: yes 13 | oracle_java_version: 11 14 | oracle_java_version_string: 11.0.2 15 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: stop Besu 3 | import_tasks: "stop-node.yaml" 4 | 5 | - name: Update Besu Node 6 | import_tasks: "update-besu.yaml" 7 | 8 | - name: Verifying certificate is created 9 | shell: ls /root/lacchain/orion/certificates | grep orion_cer.pem 10 | register: certificate 11 | ignore_errors: yes 12 | 13 | - name: Verifiying nginx is installed 14 | shell: ls /lib/systemd/system/ | grep nginx.service 15 | register: nginx 16 | ignore_errors: yes 17 | 18 | - name: install nginx 19 | import_tasks: "prepare-nginx.yml" 20 | when: (nginx.stdout != 'nginx.service') 21 | 22 | - name: start besu 23 | import_tasks: "start-node.yaml" -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install-rotation-validator.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Checking if rotation validator exists 3 | stat: 4 | path: "/root/lacchain/rotation-validator/client/config.toml" 5 | register: rotation_validator 6 | 7 | - name: Download rotation validator 8 | git: 9 | repo: "https://github.com/lacchain/rotation-validator.git" 10 | dest: "/root/lacchain/rotation-validator" 11 | when: not rotation_validator.stat.exists 12 | 13 | - name: Generate Rotation Validator configuration file 14 | template: 15 | src: "rotation-validator-config.j2" 16 | dest: "~/lacchain/rotation-validator/client/config.toml" 17 | mode: 0644 18 | when: not rotation_validator.stat.exists 19 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/start-ethstats-client.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: copy script to clean logs 3 | copy: 4 | src: "{{ role_path }}/files/clean-docker-logs.sh" 5 | dest: ~/lacchain/scripts/clean-docker-logs.sh 6 | mode: 0755 7 | 8 | - name: set crontab 9 | cron: 10 | name: "clean docker logs" 11 | minute: "0" 12 | hour: "13" 13 | job: "/root/lacchain/scripts/clean-docker-logs.sh" 14 | 15 | - name: start docker ethstats client 16 | shell: mkdir -p /opt/ethstats-cli && docker run -d --restart always --net host -v /opt/ethstats-cli/:/root/.config/configstore/ alethio/ethstats-cli --register --account-email {{node_email}} --node-name "{{node_name}}" --server-url http://35.236.236.77:3000 --client-url ws://127.0.0.1:4546 -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: get public ip 3 | shell: dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null || curl -s --retry 2 icanhazip.com 4 | register: ip_address 5 | when: node_ip is not defined 6 | 7 | - name: setting ip to use 8 | set_fact: 9 | node_ip: "{{ip_address.stdout}}" 10 | when: node_ip is not defined 11 | 12 | - name: setting orion ip 13 | set_fact: 14 | node_ip_orion: "{%for host in groups['orion']%}{{hostvars[host]['node_ip']}}{% endfor %}" 15 | when: orion | bool 16 | 17 | - name: Install Writer Node 18 | import_tasks: "install.yaml" 19 | when: install | default(False) | bool 20 | 21 | - name: Update Writer Node 22 | import_tasks: "update.yaml" 23 | when: update | default(False) | bool -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/rhel-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download epel repository 3 | get_url: 4 | url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" 5 | dest: "/tmp/epel-release-latest-7.noarch.rpm" 6 | 7 | - name: install epel repository 8 | yum: 9 | name: "/tmp/epel-release-latest-7.noarch.rpm" 10 | 11 | - name: install dependencies for {{ ansible_distribution }} 12 | yum: 13 | name: 14 | - "*" 15 | - "gmp-devel" 16 | - "gcc" 17 | - "gcc-c++" 18 | - "make" 19 | - "openssl-devel" 20 | - "libdb-devel" 21 | - "ncurses-devel" 22 | - "wget" 23 | - "nmap-ncat" 24 | - "libsodium-devel" 25 | - "libdb-devel" 26 | - "leveldb-devel" 27 | - "git" 28 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/rhel-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download epel repository 3 | get_url: 4 | url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" 5 | dest: "/tmp/epel-release-latest-7.noarch.rpm" 6 | 7 | - name: install epel repository 8 | yum: 9 | name: "/tmp/epel-release-latest-7.noarch.rpm" 10 | 11 | - name: install dependencies for {{ ansible_distribution }} 12 | yum: 13 | name: 14 | - "*" 15 | - "gmp-devel" 16 | - "gcc" 17 | - "gcc-c++" 18 | - "make" 19 | - "openssl-devel" 20 | - "libdb-devel" 21 | - "ncurses-devel" 22 | - "wget" 23 | - "nmap-ncat" 24 | - "libsodium-devel" 25 | - "libdb-devel" 26 | - "leveldb-devel" 27 | - "git" -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/start-ethstats-client.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: copy script to clean logs 3 | copy: 4 | src: "{{ role_path }}/files/clean-docker-logs.sh" 5 | dest: ~/lacchain/scripts/clean-docker-logs.sh 6 | mode: 0755 7 | 8 | - name: set crontab 9 | cron: 10 | name: "clean docker logs" 11 | minute: "0" 12 | hour: "13" 13 | job: "/root/lacchain/scripts/clean-docker-logs.sh" 14 | 15 | - name: start docker ethstats client 16 | shell: mkdir -p /opt/ethstats-cli && docker run -d --restart always --net host -v /opt/ethstats-cli/:/root/.config/configstore/ alethio/ethstats-cli --register --account-email {{node_email}} --node-name "{{node_name}}" --server-url http://35.236.236.77:3000 --client-url ws://127.0.0.1:4546 17 | args: 18 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/rhel-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download epel repository 3 | get_url: 4 | url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" 5 | dest: "/tmp/epel-release-latest-7.noarch.rpm" 6 | 7 | - name: install epel repository 8 | yum: 9 | name: "/tmp/epel-release-latest-7.noarch.rpm" 10 | 11 | - name: install dependencies for {{ ansible_distribution }} 12 | yum: 13 | name: 14 | - "*" 15 | - "gmp-devel" 16 | - "gcc" 17 | - "gcc-c++" 18 | - "make" 19 | - "openssl-devel" 20 | - "libdb-devel" 21 | - "ncurses-devel" 22 | - "wget" 23 | - "nmap-ncat" 24 | - "libsodium-devel" 25 | - "libdb-devel" 26 | - "leveldb-devel" 27 | - "git" -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/start-ethstats-client.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: copy script to clean logs 3 | copy: 4 | src: "{{ role_path }}/files/clean-docker-logs.sh" 5 | dest: ~/lacchain/scripts/clean-docker-logs.sh 6 | mode: 0755 7 | 8 | - name: set crontab 9 | cron: 10 | name: "clean docker logs" 11 | minute: "0" 12 | hour: "13" 13 | job: "/root/lacchain/scripts/clean-docker-logs.sh" 14 | 15 | - name: start docker ethstats client 16 | shell: mkdir -p /opt/ethstats-cli && docker run -d --restart always --net host -v /opt/ethstats-cli/:/root/.config/configstore/ alethio/ethstats-cli --register --account-email {{node_email}} --node-name "{{node_name}}" --server-url http://35.236.236.77:3000 --client-url ws://127.0.0.1:4546 17 | args: 18 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/rhel-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download epel repository 3 | get_url: 4 | url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" 5 | dest: "/tmp/epel-release-latest-7.noarch.rpm" 6 | 7 | - name: install epel repository 8 | yum: 9 | name: "/tmp/epel-release-latest-7.noarch.rpm" 10 | 11 | - name: install dependencies for {{ ansible_distribution }} 12 | yum: 13 | name: 14 | - "*" 15 | - "gmp-devel" 16 | - "gcc" 17 | - "gcc-c++" 18 | - "make" 19 | - "openssl-devel" 20 | - "libdb-devel" 21 | - "ncurses-devel" 22 | - "wget" 23 | - "nmap-ncat" 24 | - "libsodium-devel" 25 | - "libdb-devel" 26 | - "leveldb-devel" 27 | - "git" 28 | - "openssl" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/rhel-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download epel repository 3 | get_url: 4 | url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" 5 | dest: "/tmp/epel-release-latest-7.noarch.rpm" 6 | 7 | - name: install epel repository 8 | yum: 9 | name: "/tmp/epel-release-latest-7.noarch.rpm" 10 | 11 | - name: install dependencies for {{ ansible_distribution }} 12 | yum: 13 | name: 14 | - "*" 15 | - "gmp-devel" 16 | - "gcc" 17 | - "gcc-c++" 18 | - "make" 19 | - "openssl-devel" 20 | - "libdb-devel" 21 | - "ncurses-devel" 22 | - "wget" 23 | - "nmap-ncat" 24 | - "libsodium-devel" 25 | - "libdb-devel" 26 | - "leveldb-devel" 27 | - "git" 28 | - "openssl" -------------------------------------------------------------------------------- /roles/lacchain-bootnode/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for docker-ce-ansible-role 3 | 4 | docker_state: present 5 | 6 | docker_cleanup_packages_EL: 7 | - "docker" 8 | - "docker-common" 9 | - "docker-client" 10 | - "docker-engine" 11 | 12 | docker_cleanup_packages_Ubuntu: 13 | - "docker.io" 14 | - "docker-engine" 15 | - "containerd" 16 | 17 | docker_prerequisite_packages_Ubuntu: 18 | - "apt-transport-https" 19 | - "ca-certificates" 20 | - "curl" 21 | - "software-properties-common" 22 | 23 | docker_prerequisite_packages_EL: 24 | - "device-mapper-persistent-data" 25 | - "lvm2" 26 | 27 | docker_prerequisite_packages_EL_RHEL: 28 | - "container-selinux" 29 | 30 | docker_prerequisite_packages_Ubuntu_1404: 31 | - "linux-image-extra-{{ ansible_kernel }}" 32 | - "linux-image-extra-virtual" 33 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for docker-ce-ansible-role 3 | 4 | docker_state: present 5 | 6 | docker_cleanup_packages_EL: 7 | - "docker" 8 | - "docker-common" 9 | - "docker-client" 10 | - "docker-engine" 11 | 12 | docker_cleanup_packages_Ubuntu: 13 | - "docker.io" 14 | - "docker-engine" 15 | - "containerd" 16 | 17 | docker_prerequisite_packages_Ubuntu: 18 | - "apt-transport-https" 19 | - "ca-certificates" 20 | - "curl" 21 | - "software-properties-common" 22 | 23 | docker_prerequisite_packages_EL: 24 | - "device-mapper-persistent-data" 25 | - "lvm2" 26 | 27 | docker_prerequisite_packages_EL_RHEL: 28 | - "container-selinux" 29 | 30 | docker_prerequisite_packages_Ubuntu_1404: 31 | - "linux-image-extra-{{ ansible_kernel }}" 32 | - "linux-image-extra-virtual" 33 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for docker-ce-ansible-role 3 | 4 | docker_state: present 5 | 6 | docker_cleanup_packages_EL: 7 | - "docker" 8 | - "docker-common" 9 | - "docker-client" 10 | - "docker-engine" 11 | 12 | docker_cleanup_packages_Ubuntu: 13 | - "docker.io" 14 | - "docker-engine" 15 | - "containerd" 16 | 17 | docker_prerequisite_packages_Ubuntu: 18 | - "apt-transport-https" 19 | - "ca-certificates" 20 | - "curl" 21 | - "software-properties-common" 22 | 23 | docker_prerequisite_packages_EL: 24 | - "device-mapper-persistent-data" 25 | - "lvm2" 26 | 27 | docker_prerequisite_packages_EL_RHEL: 28 | - "container-selinux" 29 | 30 | docker_prerequisite_packages_Ubuntu_1404: 31 | - "linux-image-extra-{{ ansible_kernel }}" 32 | - "linux-image-extra-virtual" 33 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for docker-ce-ansible-role 3 | 4 | docker_state: present 5 | 6 | docker_cleanup_packages_EL: 7 | - "docker" 8 | - "docker-common" 9 | - "docker-client" 10 | - "docker-engine" 11 | 12 | docker_cleanup_packages_Ubuntu: 13 | - "docker.io" 14 | - "docker-engine" 15 | - "containerd" 16 | 17 | docker_prerequisite_packages_Ubuntu: 18 | - "apt-transport-https" 19 | - "ca-certificates" 20 | - "curl" 21 | - "software-properties-common" 22 | 23 | docker_prerequisite_packages_EL: 24 | - "device-mapper-persistent-data" 25 | - "lvm2" 26 | 27 | docker_prerequisite_packages_EL_RHEL: 28 | - "container-selinux" 29 | 30 | docker_prerequisite_packages_Ubuntu_1404: 31 | - "linux-image-extra-{{ ansible_kernel }}" 32 | - "linux-image-extra-virtual" 33 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for docker-ce-ansible-role 3 | 4 | docker_state: present 5 | 6 | docker_cleanup_packages_EL: 7 | - "docker" 8 | - "docker-common" 9 | - "docker-client" 10 | - "docker-engine" 11 | 12 | docker_cleanup_packages_Ubuntu: 13 | - "docker.io" 14 | - "docker-engine" 15 | - "containerd" 16 | 17 | docker_prerequisite_packages_Ubuntu: 18 | - "apt-transport-https" 19 | - "ca-certificates" 20 | - "curl" 21 | - "software-properties-common" 22 | 23 | docker_prerequisite_packages_EL: 24 | - "device-mapper-persistent-data" 25 | - "lvm2" 26 | 27 | docker_prerequisite_packages_EL_RHEL: 28 | - "container-selinux" 29 | 30 | docker_prerequisite_packages_Ubuntu_1404: 31 | - "linux-image-extra-{{ ansible_kernel }}" 32 | - "linux-image-extra-virtual" 33 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/install-nginx-ubuntu.yml: -------------------------------------------------------------------------------- 1 | - name: install dependencies for nginx 2 | apt: 3 | name: 4 | - gnupg2 5 | - curl 6 | - ca-certificates 7 | - lsb-release 8 | - name: 9 | shell: echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list 10 | 11 | - name: Add official nginx signing key 12 | shell: curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - 13 | args: 14 | warn: false 15 | 16 | - name: Verify nignx proper key is configured 17 | shell: apt-key fingerprint ABF5BD827BD9BF62 18 | become: true 19 | 20 | - name: Update apt packages 21 | become: true 22 | apt: 23 | update_cache: yes 24 | 25 | - name: Install nginx 26 | apt: 27 | name: nginx 28 | state: latest 29 | install_recommends: no -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/install-nginx-ubuntu.yml: -------------------------------------------------------------------------------- 1 | - name: install dependencies for nginx 2 | apt: 3 | name: 4 | - gnupg2 5 | - curl 6 | - ca-certificates 7 | - lsb-release 8 | - name: 9 | shell: echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list 10 | 11 | - name: Add official nginx signing key 12 | shell: curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - 13 | args: 14 | warn: false 15 | 16 | - name: Verify nignx proper key is configured 17 | shell: apt-key fingerprint ABF5BD827BD9BF62 18 | become: true 19 | 20 | - name: Update apt packages 21 | become: true 22 | apt: 23 | update_cache: yes 24 | 25 | - name: Install nginx 26 | apt: 27 | name: nginx 28 | state: latest 29 | install_recommends: no -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install-nginx-ubuntu.yml: -------------------------------------------------------------------------------- 1 | - name: install dependencies for nginx 2 | apt: 3 | name: 4 | - gnupg2 5 | - curl 6 | - ca-certificates 7 | - lsb-release 8 | - name: 9 | shell: echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list 10 | 11 | - name: Add official nginx signing key 12 | shell: curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - 13 | args: 14 | warn: false 15 | 16 | - name: Verify nignx proper key is configured 17 | shell: apt-key fingerprint ABF5BD827BD9BF62 18 | become: true 19 | 20 | - name: Update apt packages 21 | become: true 22 | apt: 23 | update_cache: yes 24 | 25 | - name: Install nginx 26 | apt: 27 | name: nginx 28 | state: latest 29 | install_recommends: no -------------------------------------------------------------------------------- /roles/lacchain-orion-node/templates/orion.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nodeurl = "https://{{node_ip}}:4040/" 4 | nodeport = 4040 5 | nodenetworkinterface = "0.0.0.0" 6 | clientnetworkinterface = "0.0.0.0" 7 | clienturl = "http://{{node_ip}}:4444/" 8 | clientport = 4444 9 | publickeys = ["/root/lacchain/orion/keystore/nodeKey.pub"] 10 | privatekeys = ["/root/lacchain/orion/keystore/nodeKey.key"] 11 | passwords = "/root/lacchain/tmp/.account_pass" 12 | othernodes = [] 13 | tls = "strict" 14 | 15 | tlsservercert = "/root/lacchain/orion/certificates/orion_cer.pem" 16 | tlsserverchain = ["/root/lacchain/orion/certificates/orion_ca.pem"] 17 | tlsserverkey = "/root/lacchain/orion/certificates/orion_cer.key" 18 | 19 | tlsclientcert = "/root/lacchain/orion/certificates/orion_cer.pem" 20 | tlsclientchain = ["/root/lacchain/orion/certificates/orion_ca.pem"] 21 | tlsclientkey = "/root/lacchain/orion/certificates/orion_cer.key" 22 | 23 | tlsservertrust = "ca" 24 | tlsclienttrust = "ca" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/create-self-signed-certificate.yaml: -------------------------------------------------------------------------------- 1 | - name: Create nginx ssl directory 2 | file: 3 | path: ~/lacchain/nginx 4 | state: directory 5 | mode: '0644' 6 | force: yes 7 | 8 | - name: Create private directory 9 | file: 10 | path: /etc/ssl/private 11 | state: directory 12 | mode: '0644' 13 | force: no 14 | 15 | - name: generate configuration openssl file 16 | template: 17 | src: "openssl.j2" 18 | dest: "~/lacchain/nginx/openssl.cnf" 19 | force: yes 20 | 21 | - name: Create self signed certificate 22 | shell: openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt -subj "/C=US/ST=Washington/L=Seatle/O=Lacchain/OU=Network/CN={{dns_name}}" -config /root/lacchain/nginx/openssl.cnf 23 | become: yes 24 | 25 | - name: Create Diffie Hellman Group 26 | shell: openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 27 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/create-self-signed-certificate.yaml: -------------------------------------------------------------------------------- 1 | - name: Create nginx ssl directory 2 | file: 3 | path: ~/lacchain/nginx 4 | state: directory 5 | mode: '0644' 6 | force: yes 7 | 8 | - name: Create private directory 9 | file: 10 | path: /etc/ssl/private 11 | state: directory 12 | mode: '0644' 13 | force: no 14 | 15 | - name: generate configuration openssl file 16 | template: 17 | src: "openssl.j2" 18 | dest: "~/lacchain/nginx/openssl.cnf" 19 | force: yes 20 | 21 | - name: Create self signed certificate 22 | shell: openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt -subj "/C=US/ST=Washington/L=Seatle/O=Lacchain/OU=Network/CN={{dns_name}}" -config /root/lacchain/nginx/openssl.cnf 23 | become: yes 24 | 25 | - name: Create Diffie Hellman Group 26 | shell: openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 27 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/create-self-signed-certificate.yaml: -------------------------------------------------------------------------------- 1 | - name: Create nginx ssl directory 2 | file: 3 | path: ~/lacchain/nginx 4 | state: directory 5 | mode: '0644' 6 | force: yes 7 | 8 | - name: Create private directory 9 | file: 10 | path: /etc/ssl/private 11 | state: directory 12 | mode: '0644' 13 | force: no 14 | 15 | - name: generate configuration openssl file 16 | template: 17 | src: "openssl.j2" 18 | dest: "~/lacchain/nginx/openssl.cnf" 19 | force: yes 20 | 21 | - name: Create self signed certificate 22 | shell: openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt -subj "/C=US/ST=Washington/L=Seatle/O=Lacchain/OU=Network/CN={{dns_name}}" -config /root/lacchain/nginx/openssl.cnf 23 | become: yes 24 | 25 | - name: Create Diffie Hellman Group 26 | shell: openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 27 | become: yes -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/init-health-check.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Health Check 3 | debug: 4 | msg: Configuring Health Check Service 5 | 6 | - name: create Health Check directory 7 | file: 8 | path: "/root/lacchain/health-check" 9 | mode: "0755" 10 | state: directory 11 | 12 | - name: Move executable health-check program 13 | shell: mv /root/go/src/healthCheck/health-check /root/lacchain/health-check/ 14 | args: 15 | warn: false 16 | 17 | - name: Copy service file to systemd 18 | copy: 19 | src: "{{ role_path }}/files/health-check.service" 20 | dest: /lib/systemd/system/health-check.service 21 | mode: 0775 22 | 23 | - name: Reload systemctl daemon 24 | shell: systemctl daemon-reload 25 | args: 26 | warn: false 27 | 28 | - name: Enable service Health-Check 29 | service: 30 | name: health-check 31 | enabled: yes 32 | 33 | - name: Start Health check service 34 | service: 35 | name: health-check 36 | state: restarted -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/init-health-check.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Health Check 3 | debug: 4 | msg: Configuring Health Check Service 5 | 6 | - name: create Health Check directory 7 | file: 8 | path: "/root/lacchain/health-check" 9 | mode: "0755" 10 | state: directory 11 | 12 | - name: Move executable health-check program 13 | shell: mv /root/go/src/healthCheck/health-check /root/lacchain/health-check/ 14 | args: 15 | warn: false 16 | 17 | - name: Copy service file to systemd 18 | copy: 19 | src: "{{ role_path }}/files/health-check.service" 20 | dest: /lib/systemd/system/health-check.service 21 | mode: 0775 22 | 23 | - name: Reload systemctl daemon 24 | shell: systemctl daemon-reload 25 | args: 26 | warn: false 27 | 28 | - name: Enable service Health-Check 29 | service: 30 | name: health-check 31 | enabled: yes 32 | 33 | - name: Start Health check service 34 | service: 35 | name: health-check 36 | state: restarted -------------------------------------------------------------------------------- /roles/lacchain-writer-node/files/permissions_config.toml: -------------------------------------------------------------------------------- 1 | nodes-whitelist=["enode://26c79b1c307a40b14f86a020590703aa60ecd20c5faca9ddfc2a2513a25c1976c3fb37dadecc18162134e408d17ae9421b22dd30f09600f288a1ce8cc37a7b29@35.247.241.166:60606","enode://916b8cc76db4a19035a352976622bf0c2185d36af83c11eabcf387372fccfb6aacb47e9ce0ba6e331436ce8fe8faa00547b1a7074d02865a0fbe42f75e3a4b06@35.197.76.152:60606","enode://fe50d1c3d1ebbc37cdfb54f6c767e3510a415b91e60c1a6c495b9f91bbf2eb74011cfb0e60547d90dc189a3f74703e847bd8daff93a58c494767bc7a6b94762d@52.3.231.99:60606","enode://b9c327c9d9c32be2ed9131b386a695f7998de1f7cd472d3ae3601e33cd91262ae4ddade2d4e66cc20b1d73e454bf5907a3682be851381741fb5d322f27c64077@40.71.193.134:60606","enode://140626be59e4f2c57ab9787481dd571bc8ed87764a5b035fa33f38f746d770484cfc0eca0dc5d00c7bfb18caa057477462f7af216a84bd9faea68e446e4ed1c7@35.196.221.232:60606","enode://b97f1b94e3a5e78de9a6318bfaf5e97eda84aeda20b5407c3694c39e79cfc8cb7088bb92f73635f7c64da9ee4a347212b61a3070c584946b9dae0a37e4af8009@34.75.95.21:60606"] 2 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/ubuntu-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install dependencies for {{ ansible_distribution }} 3 | apt: 4 | name: 5 | - software-properties-common 6 | - unzip 7 | - wget 8 | - git 9 | - make 10 | - gcc 11 | - build-essential 12 | - libdb-dev 13 | - zlib1g-dev 14 | - libtinfo-dev 15 | - sysvbanner 16 | - psmisc 17 | - libdb5.3-dev 18 | - cron 19 | 20 | - name: install Gradle 21 | get_url: 22 | url: https://services.gradle.org/distributions/gradle-6.0-bin.zip 23 | dest: /tmp/ 24 | force: yes 25 | owner: root 26 | group: root 27 | mode: 0644 28 | 29 | - name: unzip Gradle 30 | unarchive: 31 | src: "/tmp/gradle-6.0-bin.zip" 32 | dest: /usr/local 33 | copy: no 34 | 35 | - name: Symbolic link for gradle 36 | file: 37 | src: "/usr/local/gradle-6.0/bin/{{ item.src }}" 38 | dest: "/usr/bin/{{ item.dest }}" 39 | state: link 40 | with_items: 41 | - { src: "gradle", dest: "gradle" } 42 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/ubuntu-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install dependencies for {{ ansible_distribution }} 3 | apt: 4 | name: 5 | - software-properties-common 6 | - unzip 7 | - wget 8 | - git 9 | - make 10 | - gcc 11 | # - libsodium-dev 12 | - build-essential 13 | - libdb-dev 14 | - zlib1g-dev 15 | - libtinfo-dev 16 | - sysvbanner 17 | - psmisc 18 | - libdb5.3-dev 19 | 20 | - name: install Gradle 21 | get_url: 22 | url: https://services.gradle.org/distributions/gradle-6.0-bin.zip 23 | dest: /tmp/ 24 | force: yes 25 | owner: root 26 | group: root 27 | mode: 0644 28 | 29 | - name: unzip Gradle 30 | unarchive: 31 | src: "/tmp/gradle-6.0-bin.zip" 32 | dest: /usr/local 33 | copy: no 34 | 35 | - name: Symbolic link for pantheon 36 | file: 37 | src: "/usr/local/gradle-6.0/bin/{{ item.src }}" 38 | dest: "/usr/bin/{{ item.dest }}" 39 | state: link 40 | with_items: 41 | - { src: "gradle", dest: "gradle" } -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/install-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install orion 3 | debug: 4 | msg: "Installing Orion" 5 | 6 | - name: Include installation libsodium for {{ ansible_distribution }} 7 | import_tasks: "ubuntu-install-libsodium.yaml" 8 | when: ansible_distribution |lower == 'ubuntu' 9 | 10 | - name: Include installation leveldb for {{ ansible_distribution }} 11 | import_tasks: "ubuntu-install-leveldb.yaml" 12 | when: ansible_distribution |lower == 'ubuntu' 13 | 14 | - name: Download Orion Binaries 15 | get_url: 16 | url: "https://bintray.com/consensys/binaries/download_file?file_path=orion-1.3.2.tar.gz" 17 | dest: "/tmp" 18 | 19 | - name: Extract the Orion tarball 20 | unarchive: 21 | src: "/tmp/orion-1.3.2.tar.gz" 22 | dest: /usr/local 23 | copy: no 24 | 25 | - name: Symbolic link for orion 26 | file: 27 | src: "/usr/local/orion-1.3.2/bin/{{ item.src }}" 28 | dest: "/usr/bin/{{ item.dest }}" 29 | state: link 30 | with_items: 31 | - { src: "orion", dest: "orion" } 32 | - { src: "orion.bat", dest: "orion.bat" } 33 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/ubuntu-dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install dependencies for {{ ansible_distribution }} 3 | apt: 4 | name: 5 | - software-properties-common 6 | - unzip 7 | - wget 8 | - git 9 | - make 10 | - gcc 11 | # - libsodium-dev 12 | - build-essential 13 | - libdb-dev 14 | - zlib1g-dev 15 | - libtinfo-dev 16 | - sysvbanner 17 | - psmisc 18 | - libdb5.3-dev 19 | 20 | #- name: install Gradle 21 | # get_url: 22 | # url: https://services.gradle.org/distributions/gradle-6.0-bin.zip 23 | # dest: /tmp/ 24 | # force: yes 25 | # owner: root 26 | # group: root 27 | # mode: 0644 28 | 29 | #- name: unzip Gradle 30 | # unarchive: 31 | # src: "/tmp/gradle-6.0-bin.zip" 32 | # dest: /usr/local 33 | # copy: no 34 | 35 | #- name: Symbolic link for pantheon 36 | # file: 37 | # src: "/usr/local/gradle-6.0/bin/{{ item.src }}" 38 | # dest: "/usr/bin/{{ item.dest }}" 39 | # state: link 40 | # with_items: 41 | # - { src: "gradle", dest: "gradle" } -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/install-docker-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for docker-ce-ansible-role 3 | 4 | - name: Remove previous docker installation 5 | apt: 6 | name: "{{ docker_cleanup_packages_Ubuntu }}" 7 | state: absent 8 | 9 | - name: Install prerequisite packages 10 | apt: 11 | name: "{{ docker_prerequisite_packages_Ubuntu }}" 12 | state: present 13 | 14 | - name: Install prerequisite packages (for Ubuntu 14.04 only) 15 | apt: 16 | name: "{{ docker_prerequisite_packages_Ubuntu_1404 }}" 17 | state: present 18 | when: ansible_distribution_version == "14.04" 19 | 20 | - name: Import Docker CE repository gpg key 21 | apt_key: 22 | url: https://download.docker.com/linux/ubuntu/gpg 23 | state: present 24 | id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 25 | 26 | - name: Add Docker CE repository 27 | apt_repository: 28 | repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" 29 | state: present 30 | 31 | - name: Install Docker CE 32 | apt: 33 | name: docker-ce 34 | state: present 35 | update_cache: yes 36 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install-docker-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for docker-ce-ansible-role 3 | 4 | - name: Remove previous docker installation 5 | apt: 6 | name: "{{ docker_cleanup_packages_Ubuntu }}" 7 | state: absent 8 | 9 | - name: Install prerequisite packages 10 | apt: 11 | name: "{{ docker_prerequisite_packages_Ubuntu }}" 12 | state: present 13 | 14 | - name: Install prerequisite packages (for Ubuntu 14.04 only) 15 | apt: 16 | name: "{{ docker_prerequisite_packages_Ubuntu_1404 }}" 17 | state: present 18 | when: ansible_distribution_version == "14.04" 19 | 20 | - name: Import Docker CE repository gpg key 21 | apt_key: 22 | url: https://download.docker.com/linux/ubuntu/gpg 23 | state: present 24 | id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 25 | 26 | - name: Add Docker CE repository 27 | apt_repository: 28 | repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" 29 | state: present 30 | 31 | - name: Install Docker CE 32 | apt: 33 | name: docker-ce 34 | state: present 35 | update_cache: yes 36 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install-docker-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for docker-ce-ansible-role 3 | 4 | - name: Remove previous docker installation 5 | apt: 6 | name: "{{ docker_cleanup_packages_Ubuntu }}" 7 | state: absent 8 | 9 | - name: Install prerequisite packages 10 | apt: 11 | name: "{{ docker_prerequisite_packages_Ubuntu }}" 12 | state: present 13 | 14 | - name: Install prerequisite packages (for Ubuntu 14.04 only) 15 | apt: 16 | name: "{{ docker_prerequisite_packages_Ubuntu_1404 }}" 17 | state: present 18 | when: ansible_distribution_version == "14.04" 19 | 20 | - name: Import Docker CE repository gpg key 21 | apt_key: 22 | url: https://download.docker.com/linux/ubuntu/gpg 23 | state: present 24 | id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 25 | 26 | - name: Add Docker CE repository 27 | apt_repository: 28 | repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" 29 | state: present 30 | 31 | - name: Install Docker CE 32 | apt: 33 | name: docker-ce 34 | state: present 35 | update_cache: yes 36 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/install-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install orion 3 | debug: 4 | msg: "Installing Orion" 5 | 6 | - name: Include installation libsodium for {{ ansible_distribution }} 7 | import_tasks: "ubuntu-install-libsodium.yaml" 8 | when: ansible_distribution |lower == 'ubuntu' 9 | 10 | - name: Include installation leveldb for {{ ansible_distribution }} 11 | import_tasks: "ubuntu-install-leveldb.yaml" 12 | when: ansible_distribution |lower == 'ubuntu' 13 | 14 | - name: Download Orion Binaries 15 | get_url: 16 | url: "https://bintray.com/consensys/binaries/download_file?file_path=orion-{{ orion_release_version}}.tar.gz" 17 | dest: "/tmp/orion.tar.gz" 18 | 19 | - name: Extract the Orion tarball 20 | unarchive: 21 | src: "/tmp/orion.tar.gz" 22 | dest: /usr/local 23 | copy: no 24 | 25 | - name: Symbolic link for orion 26 | file: 27 | src: "/usr/local/orion-{{ orion_release_version}}/bin/{{ item.src }}" 28 | dest: "/usr/bin/{{ item.dest }}" 29 | state: link 30 | with_items: 31 | - { src: "orion", dest: "orion" } 32 | - { src: "orion.bat", dest: "orion.bat" } 33 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |

{{ site.title | default: site.github.repository_name }}

15 | 16 | {% if site.logo %} 17 | Logo 18 | {% endif %} 19 | 20 | 21 | 22 |
23 | {{ LACNet logo}} 24 |
25 | 26 |
27 |
28 | 29 | {{ content }} 30 | 31 |
32 |
34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/install-java-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: oracle-java/tasks/installation/debian/main.yml 3 | # 4 | # Task file to install Oracle Java Development Kit in a system with a Debian based Linux distribution. 5 | # 6 | 7 | - name: debian | ensure the apt repository key is present 8 | apt_key: id="{{ oracle_java_apt_repository_key }}" 9 | keyserver=keyserver.ubuntu.com 10 | state=present 11 | when: oracle_java_apt_repository_key is defined 12 | 13 | #become: yes 14 | - name: debian | ensure the apt repository is present 15 | apt_repository: repo="{{ oracle_java_apt_repository }}" 16 | update_cache=yes 17 | state=present 18 | 19 | #become: yes 20 | - name: debian | set license as accepted 21 | debconf: name="{{ oracle_java_deb_package }}" 22 | question="{{ oracle_java_license_version }}" 23 | value='true' 24 | vtype='select' 25 | 26 | #become: yes 27 | - name: debian | ensure Java is installed 28 | apt: name="{{ oracle_java_deb_package }}" 29 | state={{ oracle_java_state }} 30 | cache_valid_time={{ oracle_java_cache_valid_time }} 31 | update_cache=yes 32 | register: oracle_java_task_apt_install 33 | #become: yes 34 | 35 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install-java-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: oracle-java/tasks/installation/debian/main.yml 3 | # 4 | # Task file to install Oracle Java Development Kit in a system with a Debian based Linux distribution. 5 | # 6 | 7 | - name: debian | ensure the apt repository key is present 8 | apt_key: id="{{ oracle_java_apt_repository_key }}" 9 | keyserver=keyserver.ubuntu.com 10 | state=present 11 | when: oracle_java_apt_repository_key is defined 12 | 13 | #become: yes 14 | - name: debian | ensure the apt repository is present 15 | apt_repository: repo="{{ oracle_java_apt_repository }}" 16 | update_cache=yes 17 | state=present 18 | 19 | #become: yes 20 | - name: debian | set license as accepted 21 | debconf: name="{{ oracle_java_deb_package }}" 22 | question="{{ oracle_java_license_version }}" 23 | value='true' 24 | vtype='select' 25 | 26 | #become: yes 27 | - name: debian | ensure Java is installed 28 | apt: name="{{ oracle_java_deb_package }}" 29 | state={{ oracle_java_state }} 30 | cache_valid_time={{ oracle_java_cache_valid_time }} 31 | update_cache=yes 32 | register: oracle_java_task_apt_install 33 | #become: yes 34 | 35 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/install-java-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: oracle-java/tasks/installation/debian/main.yml 3 | # 4 | # Task file to install Oracle Java Development Kit in a system with a Debian based Linux distribution. 5 | # 6 | 7 | - name: debian | ensure the apt repository key is present 8 | apt_key: id="{{ oracle_java_apt_repository_key }}" 9 | keyserver=keyserver.ubuntu.com 10 | state=present 11 | when: oracle_java_apt_repository_key is defined 12 | 13 | #become: yes 14 | - name: debian | ensure the apt repository is present 15 | apt_repository: repo="{{ oracle_java_apt_repository }}" 16 | update_cache=yes 17 | state=present 18 | 19 | #become: yes 20 | - name: debian | set license as accepted 21 | debconf: name="{{ oracle_java_deb_package }}" 22 | question="{{ oracle_java_license_version }}" 23 | value='true' 24 | vtype='select' 25 | 26 | #become: yes 27 | - name: debian | ensure Java is installed 28 | apt: name="{{ oracle_java_deb_package }}" 29 | state={{ oracle_java_state }} 30 | cache_valid_time={{ oracle_java_cache_valid_time }} 31 | update_cache=yes 32 | register: oracle_java_task_apt_install 33 | #become: yes 34 | 35 | -------------------------------------------------------------------------------- /NODE_AGREEMENT.md: -------------------------------------------------------------------------------- 1 | # REGISTRATION AGREEMENT FOR NODE DEPLOYMENT 2 | 3 | We understand that this is an agreement form required for the deployment of nodes in the LACChain Blockchain Networks at Test-Net stages. 4 | 5 | The entity accountable for the deployment of the nodes will be ___NAME_OF_THE_ENTITY_____ residing at _____ADDRESS_____. The technical person responsible for the administration of the nodes will be __NAME____ reachable at the e-mail address ____E-MAIL_ADDRESS_____ and at the phone number ____PHONE_NUMER_INCLUDING_COUNTRY_CODE____. The point of contact from your organization for communications of general purpose related to LACChain will be __NAME____ reachable at the e-mail address ____E-MAIL_ADDRESS_____ and at the phone number ___PHONE_NUMER_INCLUDING_COUNTRY_CODE____. 6 | 7 | We hereby declare that we have read and agree with the [Terms and Conditions for LACChain Test Networks for Writer Nodes](https://github.com/lacchain/pantheon-network/blob/master/TERMS_AND_COND_WRITER_NODE.md), and the [Terms and Conditions for LACChain Test Networks for Validator Nodes](https://github.com/lacchain/pantheon-network/blob/master/TERMS_AND_COND_VAL_NODE.md). 8 | 9 | Signature: 10 | 11 | Name: 12 | 13 | Date: 14 | 15 | Place: 16 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # initdb 3 | leveldburi: "https://src.fedoraproject.org/lookaside/pkgs/leveldb/" 4 | leveldbtempnumber: "c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2" 5 | leveldb_version: "leveldb-1.20.tar.gz" 6 | leveldb_release: "leveldb-1.20" 7 | 8 | # vars node 9 | node_type: "validator" 10 | net_id: 648529 11 | time: '{{lookup(''pipe'',''date "+%Y-%m-%d %H:%M:%S"'')}}' 12 | 13 | # vars for libsodium 14 | libsodium_base_url: https://download.libsodium.org/libsodium/releases 15 | libsodium_version: libsodium-1.0.17-stable.tar.gz 16 | 17 | # vars file for java 18 | java_rel: "java11.02" 19 | javahome: "/usr/local/java" 20 | file_owner: pantheon 21 | 22 | oracle_java_apt_repository: "ppa:linuxuprising/java" 23 | oracle_java_cache_valid_time: 3600 24 | oracle_java_deb_package: "oracle-java11-installer-local" 25 | oracle_java_debconf_package_default: "oracle-java11-set-default" 26 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 27 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 28 | oracle_java_state: latest 29 | 30 | #CENTOS -REDHAT 31 | oracle_java_dir_source: '/usr/local/src' 32 | 33 | #### 34 | mode: "auto" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # initdb 3 | leveldburi: "https://src.fedoraproject.org/lookaside/pkgs/leveldb/" 4 | leveldbtempnumber: "c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2" 5 | leveldb_version: "leveldb-1.20.tar.gz" 6 | leveldb_release: "leveldb-1.20" 7 | 8 | # vars node 9 | node_type: "validator" 10 | net_id: 648529 11 | time: '{{lookup(''pipe'',''date "+%Y-%m-%d %H:%M:%S"'')}}' 12 | 13 | # vars for libsodium 14 | libsodium_base_url: https://download.libsodium.org/libsodium/releases 15 | libsodium_version: libsodium-1.0.17-stable.tar.gz 16 | 17 | # vars file for java 18 | java_rel: "java9.02" 19 | javahome: "/usr/local/java" 20 | file_owner: pantheon 21 | 22 | oracle_java_apt_repository: "ppa:linuxuprising/java" 23 | oracle_java_cache_valid_time: 3600 24 | oracle_java_deb_package: "oracle-java11-installer-local" 25 | oracle_java_debconf_package_default: "oracle-java11-set-default" 26 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 27 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 28 | oracle_java_state: latest 29 | 30 | #CENTOS -REDHAT 31 | oracle_java_dir_source: '/usr/local/src' 32 | 33 | #### 34 | mode: "auto" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # initdb 3 | leveldburi: "https://src.fedoraproject.org/lookaside/pkgs/leveldb/" 4 | leveldbtempnumber: "c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2" 5 | leveldb_version: "leveldb-1.20.tar.gz" 6 | leveldb_release: "leveldb-1.20" 7 | 8 | # vars node 9 | node_type: "validator" 10 | net_id: 648529 11 | time: '{{lookup(''pipe'',''date "+%Y-%m-%d %H:%M:%S"'')}}' 12 | 13 | # vars for libsodium 14 | libsodium_base_url: https://download.libsodium.org/libsodium/releases 15 | libsodium_version: libsodium-1.0.17-stable.tar.gz 16 | 17 | # vars file for java 18 | java_rel: "java9.02" 19 | javahome: "/usr/local/java" 20 | file_owner: pantheon 21 | 22 | oracle_java_apt_repository: "ppa:linuxuprising/java" 23 | oracle_java_cache_valid_time: 3600 24 | oracle_java_deb_package: "oracle-java11-installer-local" 25 | oracle_java_debconf_package_default: "oracle-java11-set-default" 26 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 27 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 28 | oracle_java_state: latest 29 | 30 | #CENTOS -REDHAT 31 | oracle_java_dir_source: '/usr/local/src' 32 | 33 | #### 34 | mode: "auto" -------------------------------------------------------------------------------- /roles/lacchain-writer-node/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # initdb 3 | leveldburi: "https://src.fedoraproject.org/lookaside/pkgs/leveldb/" 4 | leveldbtempnumber: "c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2" 5 | leveldb_version: "leveldb-1.20.tar.gz" 6 | leveldb_release: "leveldb-1.20" 7 | 8 | # vars node 9 | node_type: "validator" 10 | net_id: 648529 11 | time: '{{lookup(''pipe'',''date "+%Y-%m-%d %H:%M:%S"'')}}' 12 | 13 | # vars for libsodium 14 | libsodium_base_url: https://download.libsodium.org/libsodium/releases 15 | libsodium_version: libsodium-1.0.17-stable.tar.gz 16 | 17 | # vars file for java 18 | java_rel: "java9.02" 19 | javahome: "/usr/local/java" 20 | file_owner: pantheon 21 | 22 | oracle_java_apt_repository: "ppa:linuxuprising/java" 23 | oracle_java_cache_valid_time: 3600 24 | oracle_java_deb_package: "oracle-java11-installer-local" 25 | oracle_java_debconf_package_default: "oracle-java11-set-default" 26 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 27 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 28 | oracle_java_state: latest 29 | 30 | #CENTOS -REDHAT 31 | oracle_java_dir_source: '/usr/local/src' 32 | 33 | #### 34 | mode: "auto" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/install-tessera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install tessera 3 | debug: 4 | msg: "Installing Tessera" 5 | 6 | - name: Include installation libsodium for {{ ansible_distribution }} 7 | import_tasks: "ubuntu-install-libsodium.yaml" 8 | when: ansible_distribution |lower == 'ubuntu' 9 | 10 | - name: Include installation leveldb for {{ ansible_distribution }} 11 | import_tasks: "ubuntu-install-leveldb.yaml" 12 | when: ansible_distribution |lower == 'ubuntu' 13 | 14 | - name: create lacchain directories 15 | file: 16 | path: "{{ item.dest }}" 17 | mode: "{{ item.mode }}" 18 | state: directory 19 | with_items: 20 | - { dest: "/usr/local/tessera", mode: "0440" } 21 | 22 | - name: Download Tessera Binaries 23 | get_url: 24 | url: " https://oss.sonatype.org/service/local/repositories/releases/content/net/consensys/quorum/tessera/tessera-app/{{ tessera_release_version}}/tessera-app-{{ tessera_release_version}}-app.jar" 25 | dest: "/tmp/tessera-app.jar" 26 | 27 | - name: moving files to /usr 28 | shell: mv /tmp/tessera-app.jar /usr/local/tessera 29 | 30 | - name: clearing unnecessary folders 31 | shell: rm -rf /tmp/transit /tmp/tessera-app.jar 32 | args: 33 | warn: false 34 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/templates/ssl.conf.j2: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 http2 ssl; 3 | listen [::]:443 http2 ssl; 4 | 5 | server_name {{node_ip}}; 6 | 7 | ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; 8 | ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; 9 | ssl_dhparam /etc/ssl/certs/dhparam.pem; 10 | 11 | 12 | ######################################################################## 13 | # Strong SSL security # 14 | ######################################################################## 15 | 16 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 17 | ssl_prefer_server_ciphers on; 18 | ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; 19 | ssl_ecdh_curve secp384r1; 20 | ssl_session_cache shared:SSL:10m; 21 | ssl_session_tickets off; 22 | ssl_stapling on; 23 | ssl_stapling_verify on; 24 | resolver 8.8.8.8 8.8.4.4 valid=300s; 25 | resolver_timeout 5s; 26 | 27 | add_header Strict-Transport-Security "max-age=63072000; includeSubdomains"; 28 | add_header X-Frame-Options DENY; 29 | add_header X-Content-Type-Options nosniff; 30 | 31 | ################################## 32 | location / { 33 | proxy_pass http://localhost:4545; 34 | } 35 | } -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/templates/ssl.conf.j2: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 http2 ssl; 3 | listen [::]:443 http2 ssl; 4 | 5 | server_name {{node_ip}}; 6 | 7 | ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; 8 | ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; 9 | ssl_dhparam /etc/ssl/certs/dhparam.pem; 10 | 11 | 12 | ######################################################################## 13 | # Strong SSL security # 14 | ######################################################################## 15 | 16 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 17 | ssl_prefer_server_ciphers on; 18 | ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; 19 | ssl_ecdh_curve secp384r1; 20 | ssl_session_cache shared:SSL:10m; 21 | ssl_session_tickets off; 22 | ssl_stapling on; 23 | ssl_stapling_verify on; 24 | resolver 8.8.8.8 8.8.4.4 valid=300s; 25 | resolver_timeout 5s; 26 | 27 | add_header Strict-Transport-Security "max-age=63072000; includeSubdomains"; 28 | add_header X-Frame-Options DENY; 29 | add_header X-Content-Type-Options nosniff; 30 | 31 | ################################## 32 | location / { 33 | proxy_pass http://localhost:4545; 34 | } 35 | } -------------------------------------------------------------------------------- /roles/lacchain-writer-node/templates/ssl.conf.j2: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 http2 ssl; 3 | listen [::]:443 http2 ssl; 4 | 5 | server_name {{node_ip}}; 6 | 7 | ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; 8 | ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; 9 | ssl_dhparam /etc/ssl/certs/dhparam.pem; 10 | 11 | 12 | ######################################################################## 13 | # Strong SSL security # 14 | ######################################################################## 15 | 16 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 17 | ssl_prefer_server_ciphers on; 18 | ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; 19 | ssl_ecdh_curve secp384r1; 20 | ssl_session_cache shared:SSL:10m; 21 | ssl_session_tickets off; 22 | ssl_stapling on; 23 | ssl_stapling_verify on; 24 | resolver 8.8.8.8 8.8.4.4 valid=300s; 25 | resolver_timeout 5s; 26 | 27 | add_header Strict-Transport-Security "max-age=63072000; includeSubdomains"; 28 | add_header X-Frame-Options DENY; 29 | add_header X-Content-Type-Options nosniff; 30 | 31 | ################################## 32 | location / { 33 | proxy_pass http://localhost:4545; 34 | } 35 | } -------------------------------------------------------------------------------- /roles/lacchain-validator-node/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # initdb 3 | leveldburi: "https://src.fedoraproject.org/lookaside/pkgs/leveldb/" 4 | leveldbtempnumber: "c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2" 5 | leveldb_version: "leveldb-1.20.tar.gz" 6 | leveldb_release: "leveldb-1.20" 7 | 8 | # vars node 9 | node_type: "validator" 10 | net_id: 648529 11 | time: '{{lookup(''pipe'',''date "+%Y-%m-%d %H:%M:%S"'')}}' 12 | validator_rotation_address: "0xe6BAC76Cf6c46C83E0ff6c51d7C67D2d04cF08E4" 13 | 14 | # vars for libsodium 15 | libsodium_base_url: https://download.libsodium.org/libsodium/releases 16 | libsodium_version: libsodium-1.0.17-stable.tar.gz 17 | 18 | # vars file for java 19 | java_rel: "java9.02" 20 | javahome: "/usr/local/java" 21 | file_owner: pantheon 22 | 23 | oracle_java_apt_repository: "ppa:linuxuprising/java" 24 | oracle_java_cache_valid_time: 3600 25 | oracle_java_deb_package: "oracle-java11-installer-local" 26 | oracle_java_debconf_package_default: "oracle-java11-set-default" 27 | oracle_java_home: "/usr/lib/jvm/java-11-oracle" 28 | oracle_java_license_version: "shared/accepted-oracle-license-v1-2" 29 | oracle_java_state: latest 30 | 31 | #CENTOS -REDHAT 32 | oracle_java_dir_source: '/usr/local/src' 33 | 34 | #### 35 | mode: "auto" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/configure-nginx.yml: -------------------------------------------------------------------------------- 1 | - name: Delete previous nginx.conf 2 | file: 3 | path: /etc/nginx/nginx.conf 4 | state: absent 5 | 6 | - name: Copy ubuntu ngix.conf file 7 | template: 8 | src: "{{ role_path }}/files/nginx-ubuntu.conf" 9 | dest: /etc/nginx/nginx.conf 10 | mode: 0644 11 | when: ansible_distribution |lower == 'ubuntu' 12 | 13 | - name: Copy centos ngix.conf file 14 | template: 15 | src: "{{ role_path }}/files/nginx-rhel.conf" 16 | dest: /etc/nginx/nginx.conf 17 | mode: 0644 18 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 19 | 20 | - name: Copy ssl config file 21 | template: 22 | src: "ssl.conf.j2" 23 | dest: "/etc/nginx/conf.d/ssl.conf" 24 | mode: 0644 25 | 26 | - name: Configure nginx.service(always restart) 27 | shell: cp /lib/systemd/system/nginx.service tempservice && cat tempservice | sed -E 's/vice]/vice]\nRestart=always/' > /lib/systemd/system/nginx.service && rm tempservice 28 | become: true 29 | 30 | - name: Reload systemctl daemon 31 | shell: systemctl daemon-reload 32 | become: true 33 | 34 | - name: Enable nginx service 35 | service: 36 | name: nginx 37 | enabled: yes 38 | 39 | - name: Restart nginx service 40 | service: 41 | name: nginx 42 | state: restarted -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/configure-nginx.yml: -------------------------------------------------------------------------------- 1 | - name: Delete previous nginx.conf 2 | file: 3 | path: /etc/nginx/nginx.conf 4 | state: absent 5 | 6 | - name: Copy ubuntu ngix.conf file 7 | template: 8 | src: "{{ role_path }}/files/nginx-ubuntu.conf" 9 | dest: /etc/nginx/nginx.conf 10 | mode: 0644 11 | when: ansible_distribution |lower == 'ubuntu' 12 | 13 | - name: Copy centos ngix.conf file 14 | template: 15 | src: "{{ role_path }}/files/nginx-rhel.conf" 16 | dest: /etc/nginx/nginx.conf 17 | mode: 0644 18 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 19 | 20 | - name: Copy ssl config file 21 | template: 22 | src: "ssl.conf.j2" 23 | dest: "/etc/nginx/conf.d/ssl.conf" 24 | mode: 0644 25 | 26 | - name: Configure nginx.service(always restart) 27 | shell: cp /lib/systemd/system/nginx.service tempservice && cat tempservice | sed -E 's/vice]/vice]\nRestart=always/' > /lib/systemd/system/nginx.service && rm tempservice 28 | become: true 29 | 30 | - name: Reload systemctl daemon 31 | shell: systemctl daemon-reload 32 | become: true 33 | 34 | - name: Enable nginx service 35 | service: 36 | name: nginx 37 | enabled: yes 38 | 39 | - name: Restart nginx service 40 | service: 41 | name: nginx 42 | state: restarted -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/configure-nginx.yml: -------------------------------------------------------------------------------- 1 | - name: Delete previous nginx.conf 2 | file: 3 | path: /etc/nginx/nginx.conf 4 | state: absent 5 | 6 | - name: Copy ubuntu ngix.conf file 7 | template: 8 | src: "{{ role_path }}/files/nginx-ubuntu.conf" 9 | dest: /etc/nginx/nginx.conf 10 | mode: 0644 11 | when: ansible_distribution |lower == 'ubuntu' 12 | 13 | - name: Copy centos ngix.conf file 14 | template: 15 | src: "{{ role_path }}/files/nginx-rhel.conf" 16 | dest: /etc/nginx/nginx.conf 17 | mode: 0644 18 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 19 | 20 | - name: Copy ssl config file 21 | template: 22 | src: "ssl.conf.j2" 23 | dest: "/etc/nginx/conf.d/ssl.conf" 24 | mode: 0644 25 | 26 | - name: Configure nginx.service(always restart) 27 | shell: cp /lib/systemd/system/nginx.service tempservice && cat tempservice | sed -E 's/vice]/vice]\nRestart=always/' > /lib/systemd/system/nginx.service && rm tempservice 28 | become: true 29 | 30 | - name: Reload systemctl daemon 31 | shell: systemctl daemon-reload 32 | become: true 33 | 34 | - name: Enable nginx service 35 | service: 36 | name: nginx 37 | enabled: yes 38 | 39 | - name: Restart nginx service 40 | service: 41 | name: nginx 42 | state: restarted -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | #- name: Acceptance Verification 3 | # import_tasks: "agreements-acceptance.yml" 4 | # when: orion | bool 5 | 6 | - name: install dependencies for {{ ansible_distribution }} 7 | import_tasks: "ubuntu-dependencies.yml" 8 | when: ansible_distribution |lower == 'ubuntu' 9 | 10 | - name: install dependencies for {{ ansible_distribution }} 11 | import_tasks: "rhel-dependencies.yml" 12 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 13 | 14 | - name: install java for {{ ansible_distribution }} 15 | import_tasks: "install-java-ubuntu.yaml" 16 | when: ansible_distribution |lower == 'ubuntu' 17 | 18 | - name: install java for {{ ansible_distribution }} 19 | import_tasks: "install-java-centos.yaml" 20 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 21 | 22 | - name: install orion 23 | import_tasks: "install-orion.yaml" 24 | 25 | - name: init orion 26 | import_tasks: "init-orion.yaml" 27 | 28 | - name: Prepare Health Check Service 29 | import_tasks: "prepare-health-check.yaml" 30 | 31 | - name: install nginx 32 | import_tasks: "prepare-nginx.yml" 33 | 34 | - name: init tunning 35 | import_tasks: "init-tuning.yaml" 36 | 37 | - name: start Orion 38 | import_tasks: "start-orion.yaml" -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | #- name: Acceptance Verification 3 | # import_tasks: "agreements-acceptance.yml" 4 | # when: orion | bool 5 | 6 | - name: install dependencies for {{ ansible_distribution }} 7 | import_tasks: "ubuntu-dependencies.yml" 8 | when: ansible_distribution |lower == 'ubuntu' 9 | 10 | - name: install dependencies for {{ ansible_distribution }} 11 | import_tasks: "rhel-dependencies.yml" 12 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 13 | 14 | - name: install java for {{ ansible_distribution }} 15 | import_tasks: "install-java-ubuntu.yaml" 16 | when: ansible_distribution |lower == 'ubuntu' 17 | 18 | - name: install java for {{ ansible_distribution }} 19 | import_tasks: "install-java-centos.yaml" 20 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 21 | 22 | - name: install tessera 23 | import_tasks: "install-tessera.yaml" 24 | 25 | - name: init tessera 26 | import_tasks: "init-tessera.yaml" 27 | 28 | #- name: Prepare Health Check Service 29 | # import_tasks: "prepare-health-check.yaml" 30 | 31 | - name: install nginx 32 | import_tasks: "prepare-nginx.yml" 33 | 34 | - name: init tunning 35 | import_tasks: "init-tuning.yaml" 36 | 37 | - name: start Tessera 38 | import_tasks: "start-tessera.yaml" -------------------------------------------------------------------------------- /site-lacchain-cloud.yml: -------------------------------------------------------------------------------- 1 | - name: Compute Engine Instance 2 | hosts: localhost 3 | vars: 4 | service_account_email: "adriancc5.5@gmail.com" 5 | credentials_file: "/home/adrian/.ssh/google_compute_engine" 6 | project_id: "everisconf" 7 | tasks: 8 | - name: create multiple instances 9 | gce: 10 | instance_names: test1 11 | zone: us-east1-b 12 | machine_type: n1-standard-1 13 | image: ubuntu-1804-bionic-v20180823 14 | state: present 15 | service_account_email: "{{ service_account_email }}" 16 | credentials_file: "{{ credentials_file }}" 17 | project_id: "{{ project_id }}" 18 | metadata: '{ "startup-script" : "apt-get update" }' 19 | register: gce 20 | 21 | - name: Save host data 22 | add_host: 23 | hostname: "{{ item.public_ip }}" 24 | groupname: gce_instances_ips 25 | with_items: "{{ gce.instance_data }}" 26 | 27 | - name: Wait for SSH for instances 28 | wait_for: 29 | delay: 1 30 | host: "{{ item.public_ip }}" 31 | port: 22 32 | state: started 33 | timeout: 30 34 | with_items: "{{ gce.instance_data }}" 35 | 36 | - name: Configure Hosts 37 | hosts: gce_instances_ips 38 | become: yes 39 | become_method: sudo 40 | roles: 41 | - lacchain-validator-node 42 | tags: 43 | - config 44 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/install-java-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: oracle-java/tasks/installation/debian/main.yml 3 | # 4 | # Task file to install Oracle Java Development Kit in a system with a Debian based Linux distribution. 5 | # 6 | 7 | - name: debian | ensure the apt repository key is present 8 | apt_key: id="{{ oracle_java_apt_repository_key }}" 9 | keyserver=keyserver.ubuntu.com 10 | state=present 11 | when: oracle_java_apt_repository_key is defined 12 | 13 | #become: yes 14 | - name: debian | ensure the apt repository is present 15 | apt_repository: repo="{{ oracle_java_apt_repository }}" 16 | update_cache=yes 17 | state=present 18 | 19 | #become: yes 20 | - name: debian | set license as accepted 21 | debconf: name="{{ oracle_java_deb_package }}" 22 | question="{{ oracle_java_license_version }}" 23 | value='true' 24 | vtype='select' 25 | 26 | #become: yes 27 | - name: debian | ensure Java is installed 28 | apt: name="{{ oracle_java_deb_package }}" 29 | state={{ oracle_java_state }} 30 | cache_valid_time={{ oracle_java_cache_valid_time }} 31 | update_cache=yes 32 | register: oracle_java_task_apt_install 33 | #become: yes 34 | 35 | #- name: debian | set Java version as default 36 | # apt: name="{{ oracle_java_debconf_package_default }}" 37 | # state=latest 38 | # register: oracle_java_task_set_default 39 | # when: oracle_java_set_as_default 40 | # become: yes 41 | 42 | -------------------------------------------------------------------------------- /site-lacchain-writer.yml: -------------------------------------------------------------------------------- 1 | - hosts: writer 2 | gather_facts: yes 3 | become: yes 4 | vars: 5 | install: true 6 | vars_prompt: 7 | - name: "Please read the terms and conditions before installing this software: https://github.com/lacchain/pantheon-network/blob/master/TERMS_AND_COND_WRITER_NODE.md .Press ENTER " 8 | 9 | - name: "haveRead" 10 | prompt: "Have you read the Terms and Conditions of use of LACChain Test Network? [Y/N]" 11 | private: no 12 | 13 | - name: "isAgree" 14 | prompt: "Do you agree with the Terms and Conditions of use of LACChain Test Network? [Y/N]" 15 | private: no 16 | 17 | tasks: 18 | - fail: 19 | msg: 'Please Accept the conditions by typing Y when prompted.' 20 | when: " (haveRead != 'Y' and haveRead != 'y') or ( isAgree != 'Y' and isAgree != 'y' ) " 21 | 22 | - debug: 23 | msg: "Starting Installation" 24 | 25 | - hosts: orion 26 | gather_facts: yes 27 | become: yes 28 | vars: 29 | install: true 30 | 31 | roles: 32 | - role: lacchain-orion-node 33 | when: orion | bool 34 | 35 | - hosts: tessera 36 | gather_facts: yes 37 | become: yes 38 | vars: 39 | install: true 40 | 41 | roles: 42 | - role: lacchain-tessera-node 43 | when: tessera | bool 44 | 45 | - hosts: writer 46 | gather_facts: yes 47 | become: yes 48 | vars: 49 | install: true 50 | roles: 51 | - lacchain-writer-node -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install-java-ubuntu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # file: oracle-java/tasks/installation/debian/main.yml 3 | # 4 | # Task file to install Oracle Java Development Kit in a system with a Debian based Linux distribution. 5 | # 6 | 7 | - name: debian | ensure the apt repository key is present 8 | apt_key: id="{{ oracle_java_apt_repository_key }}" 9 | keyserver=keyserver.ubuntu.com 10 | state=present 11 | when: oracle_java_apt_repository_key is defined 12 | 13 | #become: yes 14 | - name: debian | ensure the apt repository is present 15 | apt_repository: repo="{{ oracle_java_apt_repository }}" 16 | update_cache=yes 17 | state=present 18 | 19 | #become: yes 20 | - name: debian | set license as accepted 21 | debconf: name="{{ oracle_java_deb_package }}" 22 | question="{{ oracle_java_license_version }}" 23 | value='true' 24 | vtype='select' 25 | 26 | #become: yes 27 | - name: debian | ensure Java is installed 28 | apt: name="{{ oracle_java_deb_package }}" 29 | state={{ oracle_java_state }} 30 | cache_valid_time={{ oracle_java_cache_valid_time }} 31 | update_cache=yes 32 | register: oracle_java_task_apt_install 33 | #become: yes 34 | 35 | #- name: debian | set Java version as default 36 | # apt: name="{{ oracle_java_debconf_package_default }}" 37 | # state=latest 38 | # register: oracle_java_task_set_default 39 | # when: oracle_java_set_as_default 40 | # become: yes 41 | 42 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/install-docker-redhat.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for docker-ce-ansible-role 3 | 4 | - name: Remove previous docker installation 5 | yum: 6 | name: "{{ docker_cleanup_packages_EL }}" 7 | state: absent 8 | 9 | - name: Install prerequisite packages 10 | yum: 11 | name: "{{ docker_prerequisite_packages_EL }}" 12 | state: present 13 | 14 | - name: Enable additional repository (for RHEL only) 15 | rhsm_repository: 16 | name: "rhel-7-server-extras-rpms" 17 | state: present 18 | when: ansible_distribution == "RedHat" 19 | 20 | - name: Install additional prerequisite packages (for RHEL only) 21 | yum: 22 | name: "{{ docker_prerequisite_packages_EL_RHEL }}" 23 | state: present 24 | when: ansible_distribution == "RedHat" 25 | 26 | - name: Import Docker CE repository gpg key 27 | rpm_key: 28 | key: https://download.docker.com/linux/centos/gpg 29 | state: present 30 | 31 | - name: Add Docker CE repository 32 | get_url: 33 | url: https://download.docker.com/linux/centos/docker-ce.repo 34 | dest: /etc/yum.repos.d/docker-ce.repo 35 | force: yes 36 | owner: root 37 | group: root 38 | mode: 0644 39 | 40 | - name: Install Docker CE 41 | yum: 42 | name: docker-ce 43 | state: present 44 | update_cache: yes 45 | 46 | - name: Enable docker 47 | shell: systemctl enable docker.service 48 | become: yes 49 | 50 | - name: Start docker 51 | shell: systemctl start docker.service 52 | become: yes 53 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install-docker-redhat.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for docker-ce-ansible-role 3 | 4 | - name: Remove previous docker installation 5 | yum: 6 | name: "{{ docker_cleanup_packages_EL }}" 7 | state: absent 8 | 9 | - name: Install prerequisite packages 10 | yum: 11 | name: "{{ docker_prerequisite_packages_EL }}" 12 | state: present 13 | 14 | - name: Enable additional repository (for RHEL only) 15 | rhsm_repository: 16 | name: "rhel-7-server-extras-rpms" 17 | state: present 18 | when: ansible_distribution == "RedHat" 19 | 20 | - name: Install additional prerequisite packages (for RHEL only) 21 | yum: 22 | name: "{{ docker_prerequisite_packages_EL_RHEL }}" 23 | state: present 24 | when: ansible_distribution == "RedHat" 25 | 26 | - name: Import Docker CE repository gpg key 27 | rpm_key: 28 | key: https://download.docker.com/linux/centos/gpg 29 | state: present 30 | 31 | - name: Add Docker CE repository 32 | get_url: 33 | url: https://download.docker.com/linux/centos/docker-ce.repo 34 | dest: /etc/yum.repos.d/docker-ce.repo 35 | force: yes 36 | owner: root 37 | group: root 38 | mode: 0644 39 | 40 | - name: Install Docker CE 41 | yum: 42 | name: docker-ce 43 | state: present 44 | update_cache: yes 45 | 46 | - name: Enable docker 47 | shell: systemctl enable docker.service 48 | become: yes 49 | 50 | - name: Start docker 51 | shell: systemctl start docker.service 52 | become: yes 53 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install-docker-redhat.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for docker-ce-ansible-role 3 | 4 | - name: Remove previous docker installation 5 | yum: 6 | name: "{{ docker_cleanup_packages_EL }}" 7 | state: absent 8 | 9 | - name: Install prerequisite packages 10 | yum: 11 | name: "{{ docker_prerequisite_packages_EL }}" 12 | state: present 13 | 14 | - name: Enable additional repository (for RHEL only) 15 | rhsm_repository: 16 | name: "rhel-7-server-extras-rpms" 17 | state: present 18 | when: ansible_distribution == "RedHat" 19 | 20 | - name: Install additional prerequisite packages (for RHEL only) 21 | yum: 22 | name: "{{ docker_prerequisite_packages_EL_RHEL }}" 23 | state: present 24 | when: ansible_distribution == "RedHat" 25 | 26 | - name: Import Docker CE repository gpg key 27 | rpm_key: 28 | key: https://download.docker.com/linux/centos/gpg 29 | state: present 30 | 31 | - name: Add Docker CE repository 32 | get_url: 33 | url: https://download.docker.com/linux/centos/docker-ce.repo 34 | dest: /etc/yum.repos.d/docker-ce.repo 35 | force: yes 36 | owner: root 37 | group: root 38 | mode: 0644 39 | 40 | - name: Install Docker CE 41 | yum: 42 | name: docker-ce 43 | state: present 44 | update_cache: yes 45 | 46 | - name: Enable docker 47 | shell: systemctl enable docker.service 48 | become: yes 49 | 50 | - name: Start docker 51 | shell: systemctl start docker.service 52 | become: yes 53 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/init-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: initializing constellation 3 | debug: 4 | msg: initializing constellation 5 | 6 | - name: get public ip 7 | shell: dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null || curl -s --retry 2 icanhazip.com 8 | register: node_ip 9 | 10 | - name: create orion directories 11 | file: 12 | path: "{{ item.dest }}" 13 | mode: "{{ item.mode }}" 14 | state: directory 15 | with_items: 16 | - { dest: "~/lacchain/orion", mode: "0440" } 17 | - { dest: "~/lacchain/orion/keystore", mode: "0440" } 18 | 19 | - name: copy password to file 20 | copy: 21 | dest: ~/lacchain/tmp/.account_pass 22 | content: | 23 | {{password}} 24 | 25 | - name: generate configuration orion file 26 | template: 27 | src: "orion.j2" 28 | dest: "~/lacchain/orion/orion.conf" 29 | force: yes 30 | 31 | - name: generate pair keys 32 | shell: cat ~/lacchain/tmp/.account_pass | orion --generatekeys nodeKey 33 | args: 34 | chdir: ~/lacchain/orion/keystore 35 | 36 | - name: Generate shell script to execute orion service 37 | template: 38 | src: "startorion.j2" 39 | dest: "~/lacchain/start-orion.sh" 40 | mode: 0775 41 | force: yes 42 | 43 | - name: Copy service file to systemd 44 | copy: 45 | src: "{{ role_path }}/files/orion.service" 46 | dest: /lib/systemd/system/orion.service 47 | mode: 0775 48 | 49 | - name: Enable service orion 50 | service: 51 | name: orion 52 | enabled: yes 53 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install dependencies for {{ ansible_distribution }} 3 | import_tasks: "ubuntu-dependencies.yml" 4 | when: ansible_distribution |lower == 'ubuntu' 5 | 6 | - name: install dependencies for {{ ansible_distribution }} 7 | import_tasks: "rhel-dependencies.yml" 8 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 9 | 10 | - name: install java for {{ ansible_distribution }} 11 | import_tasks: "install-java-ubuntu.yaml" 12 | when: ansible_distribution |lower == 'ubuntu' 13 | 14 | - name: install java for {{ ansible_distribution }} 15 | import_tasks: "install-java-centos.yaml" 16 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 17 | 18 | - name: install docker for {{ ansible_distribution }} 19 | import_tasks: "install-docker-ubuntu.yaml" 20 | when: ansible_distribution |lower == 'ubuntu' 21 | 22 | - name: install docker for {{ ansible_distribution }} 23 | import_tasks: "install-docker-redhat.yaml" 24 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 25 | 26 | - name: install besu 27 | import_tasks: "install-besu.yaml" 28 | 29 | - name: init besu 30 | import_tasks: "init-besu.yaml" 31 | 32 | - name: start node 33 | import_tasks: "start-node.yaml" 34 | when: first_node|bool 35 | 36 | - name: start ethstats client 37 | import_tasks: "start-ethstats-client.yaml" 38 | 39 | - name: clean files 40 | import_tasks: "clean-files.yaml" 41 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install dependencies for {{ ansible_distribution }} 3 | import_tasks: "ubuntu-dependencies.yml" 4 | when: ansible_distribution |lower == 'ubuntu' 5 | 6 | - name: install dependencies for {{ ansible_distribution }} 7 | import_tasks: "rhel-dependencies.yml" 8 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 9 | 10 | - name: install java for {{ ansible_distribution }} 11 | import_tasks: "install-java-ubuntu.yaml" 12 | when: ansible_distribution |lower == 'ubuntu' 13 | 14 | - name: install java for {{ ansible_distribution }} 15 | import_tasks: "install-java-centos.yaml" 16 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 17 | 18 | - name: install docker for {{ ansible_distribution }} 19 | import_tasks: "install-docker-ubuntu.yaml" 20 | when: ansible_distribution |lower == 'ubuntu' 21 | 22 | - name: install docker for {{ ansible_distribution }} 23 | import_tasks: "install-docker-redhat.yaml" 24 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 25 | 26 | - name: install besu 27 | import_tasks: "install-besu.yaml" 28 | 29 | - name: init besu 30 | import_tasks: "init-besu.yaml" 31 | 32 | - name: start node 33 | import_tasks: "start-node.yaml" 34 | when: first_node 35 | 36 | - name: start ethstats client 37 | import_tasks: "start-ethstats-client.yaml" 38 | 39 | - name: clean files 40 | import_tasks: "clean-files.yaml" -------------------------------------------------------------------------------- /roles/lacchain-bootnode/templates/pantheon-config.j2: -------------------------------------------------------------------------------- 1 | # RPC 2 | rpc-http-enabled=true 3 | graphql-http-enabled=true 4 | rpc-ws-enabled=true 5 | rpc-http-port=4545 6 | graphql-http-port=4547 7 | rpc-ws-port=4546 8 | rpc-http-api=["ETH","NET","IBFT","EEA","PRIV"] 9 | ## Uncomment the following lines to allow RPC from remote locations (risky) 10 | # host-whitelist=["*"] 11 | # rpc-http-host="0.0.0.0" 12 | # graphql-http-host="0.0.0.0" 13 | 14 | # Orion 15 | #privacy-enabled=false 16 | #privacy-url="http://127.0.0.1:4444" 17 | #privacy-public-key-file="/root/lacchain/orion/keystore/nodeKey.pub" 18 | 19 | # Networking 20 | p2p-host="{{node_ip.stdout}}" 21 | p2p-port=60606 22 | 23 | # Bootnodes 24 | bootnodes=["enode://fe50d1c3d1ebbc37cdfb54f6c767e3510a415b91e60c1a6c495b9f91bbf2eb74011cfb0e60547d90dc189a3f74703e847bd8daff93a58c494767bc7a6b94762d@52.3.231.99:60606","enode://b9c327c9d9c32be2ed9131b386a695f7998de1f7cd472d3ae3601e33cd91262ae4ddade2d4e66cc20b1d73e454bf5907a3682be851381741fb5d322f27c64077@40.71.193.134:60606","enode://140626be59e4f2c57ab9787481dd571bc8ed87764a5b035fa33f38f746d770484cfc0eca0dc5d00c7bfb18caa057477462f7af216a84bd9faea68e446e4ed1c7@35.196.221.232:60606","enode://9100f954583d3d74528165f07d842ce544139d9ad4bc3f2cf06abe6fb4cf459201eb06d38120bf21f40f39107ba37bc7a1e1142728bd21c33b6457d25a7b8f8d@52.249.249.38:60606"] 25 | 26 | # Gas 27 | min-gas-price=0 28 | 29 | #Metrics 30 | metrics-push-enabled=true 31 | metrics-push-port=9091 32 | metrics-push-host="146.148.100.227" 33 | metrics-push-interval=5 34 | metrics-push-prometheus-job="{{node_name}}" -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Verifiying health check daemon is installed 3 | shell: ls /lib/systemd/system/ | grep health-check.service 4 | register: healthCheck 5 | ignore_errors: yes 6 | 7 | - name: Stopping Health Check Daemon before updating 8 | import_tasks: "stop-health-check.yaml" 9 | when: (healthCheck.stdout == 'health-check.service') 10 | 11 | - name: stop enclave 12 | import_tasks: "stop-orion.yaml" 13 | 14 | - name: Update Orion Node 15 | import_tasks: "update-orion.yaml" 16 | 17 | - name: Copy service file to systemd 18 | copy: 19 | src: "{{ role_path }}/files/orion.service" 20 | dest: /lib/systemd/system/orion.service 21 | mode: 0775 22 | 23 | - name: Enable service orion 24 | service: 25 | name: orion 26 | enabled: yes 27 | 28 | - name: Verifying certificate is created 29 | shell: ls /root/lacchain/orion/certificates | grep orion_cer.pem 30 | register: certificate 31 | ignore_errors: yes 32 | 33 | - name: Create Orion Certificate 34 | import_tasks: "init-orion-certificate.yaml" 35 | when: (certificate.stdout != 'orion_cer.pem') 36 | 37 | - name: Verifiying nginx is installed 38 | shell: ls /lib/systemd/system/ | grep nginx.service 39 | register: nginx 40 | ignore_errors: yes 41 | 42 | - name: install nginx 43 | import_tasks: "prepare-nginx.yml" 44 | when: (nginx.stdout != 'nginx.service') 45 | 46 | - name: Restarting Health Check Daemon 47 | import_tasks: "start-health-check.yaml" 48 | when: (healthCheck.stdout == 'health-check.service') 49 | 50 | - name: start orion 51 | import_tasks: "start-orion.yaml" 52 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install orion 3 | debug: 4 | msg: "Installing Orion" 5 | 6 | - name: Include installation libsodium for {{ ansible_distribution }} 7 | import_tasks: "ubuntu-install-libsodium.yaml" 8 | when: ansible_distribution |lower == 'ubuntu' 9 | 10 | #- name: Fix Libsodium for {{ ansible_distribution }} 11 | # import_tasks: "rhel-install-libsodium.yaml" 12 | # when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 13 | 14 | - name: Include installation leveldb for {{ ansible_distribution }} 15 | import_tasks: "ubuntu-install-leveldb.yaml" 16 | when: ansible_distribution |lower == 'ubuntu' 17 | 18 | #- name: Download orion source code 19 | # git: 20 | # repo: "https://github.com/PegaSysEng/orion.git" 21 | # dest: "/tmp/orion" 22 | # version: 65749f00ada641c4dfd5982b293a4e59962be695 23 | 24 | #- name: Building Orion 25 | # shell: "gradle build -x test" 26 | # args: 27 | # chdir: /tmp/orion/ 28 | - name: Download Orion Binaries 29 | get_url: 30 | url: "https://bintray.com/consensys/binaries/download_file?file_path=orion-1.3.2.tar.gz" 31 | dest: "/tmp" 32 | 33 | - name: Extract the Orion tarball 34 | unarchive: 35 | src: "/tmp/orion-1.3.2.tar.gz" 36 | dest: /usr/local 37 | copy: no 38 | 39 | - name: Symbolic link for pantheon 40 | file: 41 | src: "/usr/local/orion-1.3.2/bin/{{ item.src }}" 42 | dest: "/usr/bin/{{ item.dest }}" 43 | state: link 44 | with_items: 45 | - { src: "orion", dest: "orion" } 46 | - { src: "orion.bat", dest: "orion.bat" } 47 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | #- name: Verifiying health check daemon is installed 3 | # shell: ls /lib/systemd/system/ | grep health-check.service 4 | # register: healthCheck 5 | # ignore_errors: yes 6 | 7 | #- name: Stopping Health Check Daemon before updating 8 | # import_tasks: "stop-health-check.yaml" 9 | # when: (healthCheck.stdout == 'health-check.service') 10 | 11 | - name: stop enclave 12 | import_tasks: "stop-tessera.yaml" 13 | 14 | - name: Update Tessera Node 15 | import_tasks: "update-tessera.yaml" 16 | 17 | - name: Copy service file to systemd 18 | copy: 19 | src: "{{ role_path }}/files/tessera.service" 20 | dest: /lib/systemd/system/tessera.service 21 | mode: 0775 22 | 23 | - name: Enable service tessera 24 | service: 25 | name: tessera 26 | enabled: yes 27 | 28 | - name: Verifying certificate is created 29 | shell: ls /root/lacchain/tessera/certificates | grep tessera_cer.pem 30 | register: certificate 31 | ignore_errors: yes 32 | 33 | - name: Create Tessera Certificate 34 | import_tasks: "init-tessera-certificate.yaml" 35 | when: (certificate.stdout != 'tessera_cer.pem') 36 | 37 | - name: Verifiying nginx is installed 38 | shell: ls /lib/systemd/system/ | grep nginx.service 39 | register: nginx 40 | ignore_errors: yes 41 | 42 | - name: install nginx 43 | import_tasks: "prepare-nginx.yml" 44 | when: (nginx.stdout != 'nginx.service') 45 | 46 | #- name: Restarting Health Check Daemon 47 | # import_tasks: "start-health-check.yaml" 48 | # when: (healthCheck.stdout == 'health-check.service') 49 | 50 | - name: start tessera 51 | import_tasks: "start-tessera.yaml" 52 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/init-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: initializing Orion 3 | debug: 4 | msg: initializing Orion 5 | 6 | - name: create orion directories 7 | file: 8 | path: "{{ item.dest }}" 9 | mode: "{{ item.mode }}" 10 | state: directory 11 | with_items: 12 | - { dest: "~/lacchain/orion", mode: "0440" } 13 | - { dest: "~/lacchain/orion/keystore", mode: "0440" } 14 | - { dest: "~/lacchain/tmp", mode: "0440" } 15 | 16 | - name: copy password to file 17 | copy: 18 | dest: ~/lacchain/tmp/.account_pass 19 | content: | 20 | {{password}} 21 | 22 | - name: create certificates 23 | import_tasks: "init-orion-certificate.yaml" 24 | 25 | - name: generate configuration orion file 26 | template: 27 | src: "orion.j2" 28 | dest: "~/lacchain/orion/orion.conf" 29 | force: yes 30 | 31 | - name: generate pair keys 32 | shell: cat ~/lacchain/tmp/.account_pass | orion --generatekeys nodeKey 33 | args: 34 | chdir: ~/lacchain/orion/keystore 35 | 36 | - name: Copy Key Public from Orion 37 | fetch: 38 | src: ~/lacchain/orion/keystore/nodeKey.pub 39 | dest: "{{ playbook_dir }}/roles/lacchain-writer-node/files/" 40 | flat: yes 41 | 42 | - name: Generate shell script to execute orion service 43 | template: 44 | src: "startorion.j2" 45 | dest: "~/lacchain/start-orion.sh" 46 | mode: 0775 47 | force: yes 48 | 49 | - name: Copy service file to systemd 50 | copy: 51 | src: "{{ role_path }}/files/orion.service" 52 | dest: /lib/systemd/system/orion.service 53 | mode: 0775 54 | 55 | - name: Enable service orion 56 | service: 57 | name: orion 58 | enabled: yes 59 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/ubuntu-install-leveldb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download leveldb 3 | get_url: 4 | url: "{{leveldburi}}/{{leveldb_version}}/sha512/{{ leveldbtempnumber }}/{{leveldb_version}}" 5 | dest: "/tmp/{{leveldb_version}}" 6 | 7 | - name: Extract leveldb 8 | unarchive: 9 | src: "/tmp/{{leveldb_version}}" 10 | dest: "/tmp" 11 | copy: no 12 | 13 | - name: Set command Shell 14 | lineinfile: 15 | path: /tmp/{{leveldb_release}}/Makefile 16 | regexp: '^(.*)./build_detect_platform(.*)$' 17 | line: ' sh ./build_detect_platform build_config.mk ./)' 18 | backrefs: yes 19 | 20 | - name: make leveldb 21 | shell: make 22 | args: 23 | chdir: "/tmp/{{leveldb_release}}" 24 | 25 | - name: move ibleveldb.* 26 | copy: 27 | src: "/tmp/{{leveldb_release}}/out-static/{{ item }}" 28 | dest: "/usr/local/lib" 29 | remote_src: yes 30 | with_items: 31 | - libleveldb.a 32 | - libmemenv.a 33 | 34 | - name: move ibleveldb.* 35 | copy: 36 | src: "/tmp/{{leveldb_release}}/out-shared/{{ item }}" 37 | dest: "/usr/local/lib" 38 | remote_src: yes 39 | with_items: 40 | - libleveldb.so.1.20 41 | - libleveldb.so 42 | - libleveldb.so.1 43 | 44 | #- name: symbolic link for liblevel 45 | # file: 46 | # src: "/usr/local/lib/libleveldb.so.1.9" 47 | # dest: "/usr/local/lib/{{ item }}" 48 | # state: link 49 | # with_items: 50 | # - "libleveldb.so" 51 | # - "libleveldb.so.1" 52 | 53 | - name: move leveldb folder 54 | command: "cp -R leveldb /usr/local/lib" 55 | args: 56 | chdir: "/tmp/{{leveldb_release}}/include" 57 | notify: run ldconfig 58 | 59 | - meta: flush_handlers 60 | -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/ubuntu-install-leveldb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download leveldb 3 | get_url: 4 | url: "{{leveldburi}}/{{leveldb_version}}/sha512/{{ leveldbtempnumber }}/{{leveldb_version}}" 5 | dest: "/tmp/{{leveldb_version}}" 6 | 7 | - name: Extract leveldb 8 | unarchive: 9 | src: "/tmp/{{leveldb_version}}" 10 | dest: "/tmp" 11 | copy: no 12 | 13 | - name: Set command Shell 14 | lineinfile: 15 | path: /tmp/{{leveldb_release}}/Makefile 16 | regexp: '^(.*)./build_detect_platform(.*)$' 17 | line: ' sh ./build_detect_platform build_config.mk ./)' 18 | backrefs: yes 19 | 20 | - name: make leveldb 21 | shell: make 22 | args: 23 | chdir: "/tmp/{{leveldb_release}}" 24 | 25 | - name: move ibleveldb.* 26 | copy: 27 | src: "/tmp/{{leveldb_release}}/out-static/{{ item }}" 28 | dest: "/usr/local/lib" 29 | remote_src: yes 30 | with_items: 31 | - libleveldb.a 32 | - libmemenv.a 33 | 34 | - name: move ibleveldb.* 35 | copy: 36 | src: "/tmp/{{leveldb_release}}/out-shared/{{ item }}" 37 | dest: "/usr/local/lib" 38 | remote_src: yes 39 | with_items: 40 | - libleveldb.so.1.20 41 | - libleveldb.so 42 | - libleveldb.so.1 43 | 44 | #- name: symbolic link for liblevel 45 | # file: 46 | # src: "/usr/local/lib/libleveldb.so.1.9" 47 | # dest: "/usr/local/lib/{{ item }}" 48 | # state: link 49 | # with_items: 50 | # - "libleveldb.so" 51 | # - "libleveldb.so.1" 52 | 53 | - name: move leveldb folder 54 | command: "cp -R leveldb /usr/local/lib" 55 | args: 56 | chdir: "/tmp/{{leveldb_release}}/include" 57 | notify: run ldconfig 58 | 59 | - meta: flush_handlers 60 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/ubuntu-install-leveldb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download leveldb 3 | get_url: 4 | url: "{{leveldburi}}/{{leveldb_version}}/sha512/{{ leveldbtempnumber }}/{{leveldb_version}}" 5 | dest: "/tmp/{{leveldb_version}}" 6 | 7 | - name: Extract leveldb 8 | unarchive: 9 | src: "/tmp/{{leveldb_version}}" 10 | dest: "/tmp" 11 | copy: no 12 | 13 | - name: Set command Shell 14 | lineinfile: 15 | path: /tmp/{{leveldb_release}}/Makefile 16 | regexp: '^(.*)./build_detect_platform(.*)$' 17 | line: ' sh ./build_detect_platform build_config.mk ./)' 18 | backrefs: yes 19 | 20 | - name: make leveldb 21 | shell: make 22 | args: 23 | chdir: "/tmp/{{leveldb_release}}" 24 | 25 | - name: move ibleveldb.* 26 | copy: 27 | src: "/tmp/{{leveldb_release}}/out-static/{{ item }}" 28 | dest: "/usr/local/lib" 29 | remote_src: yes 30 | with_items: 31 | - libleveldb.a 32 | - libmemenv.a 33 | 34 | - name: move ibleveldb.* 35 | copy: 36 | src: "/tmp/{{leveldb_release}}/out-shared/{{ item }}" 37 | dest: "/usr/local/lib" 38 | remote_src: yes 39 | with_items: 40 | - libleveldb.so.1.20 41 | - libleveldb.so 42 | - libleveldb.so.1 43 | 44 | #- name: symbolic link for liblevel 45 | # file: 46 | # src: "/usr/local/lib/libleveldb.so.1.9" 47 | # dest: "/usr/local/lib/{{ item }}" 48 | # state: link 49 | # with_items: 50 | # - "libleveldb.so" 51 | # - "libleveldb.so.1" 52 | 53 | - name: move leveldb folder 54 | command: "cp -R leveldb /usr/local/lib" 55 | args: 56 | chdir: "/tmp/{{leveldb_release}}/include" 57 | notify: run ldconfig 58 | 59 | - meta: flush_handlers 60 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/ubuntu-install-leveldb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: download leveldb 3 | get_url: 4 | url: "{{leveldburi}}/{{leveldb_version}}/sha512/{{ leveldbtempnumber }}/{{leveldb_version}}" 5 | dest: "/tmp/{{leveldb_version}}" 6 | 7 | - name: Extract leveldb 8 | unarchive: 9 | src: "/tmp/{{leveldb_version}}" 10 | dest: "/tmp" 11 | copy: no 12 | 13 | - name: Set command Shell 14 | lineinfile: 15 | path: /tmp/{{leveldb_release}}/Makefile 16 | regexp: '^(.*)./build_detect_platform(.*)$' 17 | line: ' sh ./build_detect_platform build_config.mk ./)' 18 | backrefs: yes 19 | 20 | - name: make leveldb 21 | shell: make 22 | args: 23 | chdir: "/tmp/{{leveldb_release}}" 24 | 25 | - name: move ibleveldb.* 26 | copy: 27 | src: "/tmp/{{leveldb_release}}/out-static/{{ item }}" 28 | dest: "/usr/local/lib" 29 | remote_src: yes 30 | with_items: 31 | - libleveldb.a 32 | - libmemenv.a 33 | 34 | - name: move ibleveldb.* 35 | copy: 36 | src: "/tmp/{{leveldb_release}}/out-shared/{{ item }}" 37 | dest: "/usr/local/lib" 38 | remote_src: yes 39 | with_items: 40 | - libleveldb.so.1.20 41 | - libleveldb.so 42 | - libleveldb.so.1 43 | 44 | #- name: symbolic link for liblevel 45 | # file: 46 | # src: "/usr/local/lib/libleveldb.so.1.9" 47 | # dest: "/usr/local/lib/{{ item }}" 48 | # state: link 49 | # with_items: 50 | # - "libleveldb.so" 51 | # - "libleveldb.so.1" 52 | 53 | - name: move leveldb folder 54 | command: "cp -R leveldb /usr/local/lib" 55 | args: 56 | chdir: "/tmp/{{leveldb_release}}/include" 57 | notify: run ldconfig 58 | 59 | - meta: flush_handlers 60 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/templates/pantheon-config.j2: -------------------------------------------------------------------------------- 1 | # RPC 2 | rpc-http-enabled=true 3 | graphql-http-enabled=true 4 | rpc-ws-enabled=true 5 | rpc-http-port=4545 6 | graphql-http-port=4547 7 | rpc-ws-port=4546 8 | rpc-http-api=["ETH","NET","IBFT","EEA","PRIV"] 9 | ## Uncomment the following lines to allow RPC from remote locations (risky) 10 | # host-whitelist=["*"] 11 | # rpc-http-host="0.0.0.0" 12 | # graphql-http-host="0.0.0.0" 13 | 14 | 15 | # Orion 16 | #privacy-enabled=true 17 | #privacy-url="http://127.0.0.1:4444" 18 | #privacy-public-key-file="/root/lacchain/orion/keystore/nodeKey.pub" 19 | 20 | # Networking 21 | p2p-host="{{node_ip.stdout}}" 22 | p2p-port=60606 23 | bootnodes=["enode://fe50d1c3d1ebbc37cdfb54f6c767e3510a415b91e60c1a6c495b9f91bbf2eb74011cfb0e60547d90dc189a3f74703e847bd8daff93a58c494767bc7a6b94762d@52.3.231.99:60606","enode://140626be59e4f2c57ab9787481dd571bc8ed87764a5b035fa33f38f746d770484cfc0eca0dc5d00c7bfb18caa057477462f7af216a84bd9faea68e446e4ed1c7@35.196.221.232:60606","enode://9100f954583d3d74528165f07d842ce544139d9ad4bc3f2cf06abe6fb4cf459201eb06d38120bf21f40f39107ba37bc7a1e1142728bd21c33b6457d25a7b8f8d@52.249.249.38:60606","enode://b97f1b94e3a5e78de9a6318bfaf5e97eda84aeda20b5407c3694c39e79cfc8cb7088bb92f73635f7c64da9ee4a347212b61a3070c584946b9dae0a37e4af8009@34.75.95.21:60606","enode://9639ef4c952086ca568c59f69a228e6d36d81891b0ffd726fdb36ef004138d715908c1cda5ab9a040f3c4b290961e7d4309782b9eab22b572941e1b0d9a3e1dc@13.72.98.253:60606"] 24 | 25 | # Gas 26 | min-gas-price=0 27 | 28 | #Metrics 29 | metrics-push-enabled=true 30 | metrics-push-port=9091 31 | metrics-push-host="146.148.100.227" 32 | metrics-push-interval=5 33 | metrics-push-prometheus-job="{{node_name}}" 34 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/templates/pantheon-config.j2: -------------------------------------------------------------------------------- 1 | # RPC 2 | rpc-http-enabled=true 3 | graphql-http-enabled=true 4 | rpc-ws-enabled=true 5 | rpc-http-port=4545 6 | graphql-http-port=4547 7 | rpc-ws-port=4546 8 | rpc-http-api=["ETH","NET","IBFT","WEB3","EEA","PRIV"] 9 | ## Uncomment the following lines to allow RPC from remote locations (risky) 10 | # host-whitelist=["*"] 11 | # rpc-http-host="0.0.0.0" 12 | # rpc-http-cors-origins=["*"] 13 | # graphql-http-host="0.0.0.0" 14 | 15 | 16 | # Orion 17 | #privacy-enabled=true 18 | #privacy-url="http://127.0.0.1:4444" 19 | #privacy-public-key-file="/root/lacchain/orion/keystore/nodeKey.pub" 20 | 21 | # Networking 22 | p2p-host="{{node_ip}}" 23 | p2p-port=60606 24 | bootnodes=["enode://fe50d1c3d1ebbc37cdfb54f6c767e3510a415b91e60c1a6c495b9f91bbf2eb74011cfb0e60547d90dc189a3f74703e847bd8daff93a58c494767bc7a6b94762d@52.3.231.99:60606","enode://140626be59e4f2c57ab9787481dd571bc8ed87764a5b035fa33f38f746d770484cfc0eca0dc5d00c7bfb18caa057477462f7af216a84bd9faea68e446e4ed1c7@35.196.221.232:60606","enode://9100f954583d3d74528165f07d842ce544139d9ad4bc3f2cf06abe6fb4cf459201eb06d38120bf21f40f39107ba37bc7a1e1142728bd21c33b6457d25a7b8f8d@52.249.249.38:60606","enode://b97f1b94e3a5e78de9a6318bfaf5e97eda84aeda20b5407c3694c39e79cfc8cb7088bb92f73635f7c64da9ee4a347212b61a3070c584946b9dae0a37e4af8009@34.75.95.21:60606","enode://9639ef4c952086ca568c59f69a228e6d36d81891b0ffd726fdb36ef004138d715908c1cda5ab9a040f3c4b290961e7d4309782b9eab22b572941e1b0d9a3e1dc@13.72.98.253:60606"] 25 | 26 | # Gas 27 | min-gas-price=0 28 | 29 | #Metrics 30 | metrics-push-enabled=true 31 | metrics-push-port=9091 32 | metrics-push-host="146.148.100.227" 33 | metrics-push-interval=5 34 | metrics-push-prometheus-job="{{node_name}}" 35 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | #- name: Acceptance Verification 3 | # import_tasks: "agreements-acceptance.yml" 4 | # when: orion | bool == false 5 | 6 | - name: install dependencies for {{ ansible_distribution }} 7 | import_tasks: "ubuntu-dependencies.yml" 8 | when: ansible_distribution |lower == 'ubuntu' 9 | 10 | - name: install dependencies for {{ ansible_distribution }} 11 | import_tasks: "rhel-dependencies.yml" 12 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 13 | 14 | - name: install java for {{ ansible_distribution }} 15 | import_tasks: "install-java-ubuntu.yaml" 16 | when: ansible_distribution |lower == 'ubuntu' 17 | 18 | - name: install java for {{ ansible_distribution }} 19 | import_tasks: "install-java-centos.yaml" 20 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 21 | 22 | - name: install docker for {{ ansible_distribution }} 23 | import_tasks: "install-docker-ubuntu.yaml" 24 | when: ansible_distribution |lower == 'ubuntu' 25 | 26 | - name: install docker for {{ ansible_distribution }} 27 | import_tasks: "install-docker-redhat.yaml" 28 | when: (ansible_distribution |lower == 'redhat') or (ansible_distribution |lower == 'centos') 29 | 30 | - name: install Besu 31 | import_tasks: "install-besu.yaml" 32 | 33 | - name: init besu 34 | import_tasks: "init-besu.yaml" 35 | 36 | - name: install nginx 37 | import_tasks: "prepare-nginx.yml" 38 | 39 | - name: init tunning 40 | import_tasks: "init-tuning.yaml" 41 | 42 | - name: start node 43 | import_tasks: "start-node.yaml" 44 | 45 | - name: start ethstats client 46 | import_tasks: "start-ethstats-client.yaml" 47 | 48 | 49 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/templates/pantheon-orion-config.j2: -------------------------------------------------------------------------------- 1 | # RPC 2 | rpc-http-enabled=true 3 | graphql-http-enabled=true 4 | rpc-ws-enabled=true 5 | rpc-http-port=4545 6 | graphql-http-port=4547 7 | rpc-ws-port=4546 8 | rpc-http-api=["ETH","NET","IBFT","WEB3","EEA","PRIV"] 9 | ## Uncomment the following lines to allow RPC from remote locations (risky) 10 | # host-whitelist=["*"] 11 | # rpc-http-host="0.0.0.0" 12 | # rpc-http-cors-origins=["*"] 13 | # graphql-http-host="0.0.0.0" 14 | 15 | 16 | # Orion 17 | privacy-enabled=true 18 | privacy-url="http://{{node_ip_orion}}:4444" 19 | privacy-public-key-file="/root/lacchain/orion/keystore/nodeKey.pub" 20 | 21 | # Networking 22 | p2p-host="{{node_ip}}" 23 | p2p-port=60606 24 | bootnodes=["enode://fe50d1c3d1ebbc37cdfb54f6c767e3510a415b91e60c1a6c495b9f91bbf2eb74011cfb0e60547d90dc189a3f74703e847bd8daff93a58c494767bc7a6b94762d@52.3.231.99:60606","enode://140626be59e4f2c57ab9787481dd571bc8ed87764a5b035fa33f38f746d770484cfc0eca0dc5d00c7bfb18caa057477462f7af216a84bd9faea68e446e4ed1c7@35.196.221.232:60606","enode://9100f954583d3d74528165f07d842ce544139d9ad4bc3f2cf06abe6fb4cf459201eb06d38120bf21f40f39107ba37bc7a1e1142728bd21c33b6457d25a7b8f8d@52.249.249.38:60606","enode://b97f1b94e3a5e78de9a6318bfaf5e97eda84aeda20b5407c3694c39e79cfc8cb7088bb92f73635f7c64da9ee4a347212b61a3070c584946b9dae0a37e4af8009@34.75.95.21:60606","enode://9639ef4c952086ca568c59f69a228e6d36d81891b0ffd726fdb36ef004138d715908c1cda5ab9a040f3c4b290961e7d4309782b9eab22b572941e1b0d9a3e1dc@13.72.98.253:60606"] 25 | 26 | # Gas 27 | min-gas-price=0 28 | 29 | #Metrics 30 | metrics-push-enabled=true 31 | metrics-push-port=9091 32 | metrics-push-host="146.148.100.227" 33 | metrics-push-interval=5 34 | metrics-push-prometheus-job="{{node_name}}" 35 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/init-tessera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: initializing Tessera 3 | debug: 4 | msg: initializing Tessera 5 | 6 | - name: create tessera directories 7 | file: 8 | path: "{{ item.dest }}" 9 | mode: "{{ item.mode }}" 10 | state: directory 11 | with_items: 12 | - { dest: "~/lacchain/tessera", mode: "0440" } 13 | - { dest: "~/lacchain/tessera/keystore", mode: "0440" } 14 | - { dest: "~/lacchain/tmp", mode: "0440" } 15 | 16 | - name: copy password to file 17 | copy: 18 | dest: ~/lacchain/tmp/.account_pass 19 | content: | 20 | {{password}} 21 | 22 | - name: create certificates 23 | import_tasks: "init-tessera-certificate.yaml" 24 | 25 | - name: generate configuration tessera file 26 | template: 27 | src: "tessera.j2" 28 | dest: "~/lacchain/tessera/tessera.conf" 29 | force: yes 30 | 31 | - name: generate pair keys 32 | shell: cat ~/lacchain/tmp/.account_pass | java -jar /usr/local/tessera/tessera-app.jar -keygen -filename nodeKey 33 | args: 34 | chdir: ~/lacchain/tessera/keystore 35 | 36 | - name: Copy Key Public from Tessera 37 | fetch: 38 | src: ~/lacchain/tessera/keystore/nodeKey.pub 39 | dest: "{{ playbook_dir }}/roles/lacchain-writer-node/files/" 40 | flat: yes 41 | 42 | - name: Generate shell script to execute tessera service 43 | template: 44 | src: "starttessera.j2" 45 | dest: "~/lacchain/start-tessera.sh" 46 | mode: 0775 47 | force: yes 48 | 49 | - name: Copy service file to systemd 50 | copy: 51 | src: "{{ role_path }}/files/tessera.service" 52 | dest: /lib/systemd/system/tessera.service 53 | mode: 0775 54 | 55 | - name: Enable tessera service 56 | service: 57 | name: tessera 58 | enabled: yes 59 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/ubuntu-install-fix-libsodium.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: get packages and verify if libsodium is already installed 3 | shell: dpkg --get-selections | grep -w install |grep libsodium | awk '{print $1}' 4 | register: list_packages 5 | when: ansible_distribution |lower == 'ubuntu' 6 | 7 | - name: Copy deb packages of libsodium on Ubuntu equal to 16.04 8 | copy: 9 | src: "{{ role_path }}/files/{{ item }}" 10 | dest: "/tmp/{{ item }}" 11 | with_items: 12 | - "libsodium18_1.0.8-5_amd64.deb" 13 | - "libsodium-dev_1.0.8-5_amd64.deb" 14 | when: ( ansible_distribution |lower == 'ubuntu' and ansible_distribution_version | truncate(2, True, '') > 16 ) 15 | 16 | - name: Install libsodium on Ubuntu > 16.04 17 | shell: "dpkg -i /tmp/{{ item }}" 18 | with_items: 19 | - "libsodium18_1.0.8-5_amd64.deb" 20 | - "libsodium-dev_1.0.8-5_amd64.deb" 21 | when: ( ansible_distribution |lower == 'ubuntu' and ansible_distribution_version | truncate(2, True, '') > 16 ) or 22 | ( list_packages.stdout.split() == '') 23 | 24 | - debug: 25 | msg: 26 | - "Package {{ item }} is already installed" 27 | with_items: 28 | - "{{ list_packages.stdout.split() }}" 29 | when: ansible_distribution |lower == 'ubuntu' 30 | 31 | - name: Install libsodium on Ubuntu equal to 16.04 32 | apt: 33 | name: "{{ item }}" 34 | with_items: 35 | - libleveldb-dev 36 | - libsodium-dev 37 | when: ( ansible_distribution |lower == 'ubuntu' and ansible_distribution_version | truncate(2, True, '') == 16 ) 38 | 39 | - name: set symbolic links to libsodium 40 | file: 41 | src: "/usr/lib/x86_64-linux-gnu/libsodium.so" 42 | dest: "/lib64/libsodium.so.18" 43 | state: link 44 | when: ( ansible_distribution |lower == 'ubuntu' ) -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/init-orion-certificate.yaml: -------------------------------------------------------------------------------- 1 | - name: create orion directories 2 | file: 3 | path: "{{ item.dest }}" 4 | mode: "{{ item.mode }}" 5 | state: directory 6 | with_items: 7 | - { dest: "~/lacchain/orion/certificates", mode: "0440" } 8 | - { dest: "~/lacchain/orion/certificates/CAs", mode: "0440" } 9 | 10 | - name: generate configuration openssl file 11 | template: 12 | src: "openssl.j2" 13 | dest: "~/lacchain/orion/openssl.cnf" 14 | force: yes 15 | 16 | - name: generating CA Key 17 | shell: openssl genrsa -out orion_ca.key 2048 18 | args: 19 | chdir: ~/lacchain/orion/certificates 20 | 21 | - name: generating CA Certificate 22 | shell: openssl req -x509 -new -nodes -key /root/lacchain/orion/certificates/orion_ca.key -sha256 -days 1024 -out orion_ca.pem -subj "/C=US/ST=Washington/L=Seatle/O=Lacchain/OU=Network/CN=Lacchain CA" 23 | args: 24 | chdir: ~/lacchain/orion/certificates 25 | 26 | - name: generating Orion Certificate Key 27 | shell: openssl genrsa -out orion_cer.key 2048 28 | args: 29 | chdir: ~/lacchain/orion/certificates 30 | 31 | - name: generating Certificate Signig Request 32 | shell: openssl req -new -key /root/lacchain/orion/certificates/orion_cer.key -out orion_cer.csr -subj "/C=US/ST=Washington/L=Seatle/O=Lacchain/OU=Network/CN={{dns_name}}" -config /root/lacchain/orion/openssl.cnf 33 | args: 34 | chdir: ~/lacchain/orion/certificates 35 | 36 | - name: Signing CSR using CA key 37 | shell: openssl x509 -req -in /root/lacchain/orion/certificates/orion_cer.csr -CA /root/lacchain/orion/certificates/orion_ca.pem -CAkey /root/lacchain/orion/certificates/orion_ca.key -CAcreateserial -out orion_cer.pem -days 500 -sha256 -extfile /root/lacchain/orion/openssl.cnf -extensions v3_req 38 | args: 39 | chdir: ~/lacchain/orion/certificates -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/init-tessera-certificate.yaml: -------------------------------------------------------------------------------- 1 | - name: create tessera directories 2 | file: 3 | path: "{{ item.dest }}" 4 | mode: "{{ item.mode }}" 5 | state: directory 6 | with_items: 7 | - { dest: "~/lacchain/tessera/certificates", mode: "0440" } 8 | - { dest: "~/lacchain/tessera/certificates/CAs", mode: "0440" } 9 | 10 | - name: generate configuration openssl file 11 | template: 12 | src: "openssl.j2" 13 | dest: "~/lacchain/tessera/openssl.cnf" 14 | force: yes 15 | 16 | - name: generating CA Key 17 | shell: openssl genrsa -out tessera_ca.key 2048 18 | args: 19 | chdir: ~/lacchain/tessera/certificates 20 | 21 | - name: generating CA Certificate 22 | shell: openssl req -x509 -new -nodes -key /root/lacchain/tessera/certificates/tessera_ca.key -sha256 -days 1024 -out tessera_ca.pem -subj "/C=US/ST=Washington/L=Seatle/O=Lacchain/OU=Network/CN=Lacchain CA" 23 | args: 24 | chdir: ~/lacchain/tessera/certificates 25 | 26 | - name: generating Tessera Certificate Key 27 | shell: openssl genrsa -out tessera_cer.key 2048 28 | args: 29 | chdir: ~/lacchain/tessera/certificates 30 | 31 | - name: generating Certificate Signig Request 32 | shell: openssl req -new -key /root/lacchain/tessera/certificates/tessera_cer.key -out tessera_cer.csr -subj "/C=US/ST=Washington/L=Seatle/O=Lacchain/OU=Network/CN={{dns_name}}" -config /root/lacchain/tessera/openssl.cnf 33 | args: 34 | chdir: ~/lacchain/tessera/certificates 35 | 36 | - name: Signing CSR using CA key 37 | shell: openssl x509 -req -in /root/lacchain/tessera/certificates/tessera_cer.csr -CA /root/lacchain/tessera/certificates/tessera_ca.pem -CAkey /root/lacchain/tessera/certificates/tessera_ca.key -CAcreateserial -out tessera_cer.pem -days 500 -sha256 -extfile /root/lacchain/tessera/openssl.cnf -extensions v3_req 38 | args: 39 | chdir: ~/lacchain/tessera/certificates -------------------------------------------------------------------------------- /roles/lacchain-orion-node/tasks/update-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update orion 3 | debug: 4 | msg: "Updating Orion" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/orion && mkdir /tmp/orion 8 | args: 9 | warn: false 10 | 11 | - name: pull orion binaries 12 | get_url: 13 | url: "https://bintray.com/consensys/binaries/download_file?file_path=orion-{{ orion_release_version}}.tar.gz" 14 | dest: "/tmp/orion/orion.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Orion tarball 22 | unarchive: 23 | src: "/tmp/orion/orion.tar.gz" 24 | dest: /tmp/transit #/usr/local 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * orion 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: Deleting old folders 33 | shell: rm -rf /usr/local/orion 34 | args: 35 | warn: false 36 | 37 | - name: moving files to /usr 38 | shell: mv /tmp/transit/orion /usr/local 39 | 40 | - name: Deleting old installed versions of orion 41 | file: 42 | path: /usr/bin/{{ item.dest }} 43 | state: absent 44 | with_items: 45 | - { dest: "orion" } 46 | - { dest: "orion.bat" } 47 | 48 | - name: Support for deployments prior to centos support 49 | file: 50 | path: /usr/local/bin/{{ item.dest }} 51 | state: absent 52 | with_items: 53 | - { dest: "orion" } 54 | - { dest: "orion.bat" } 55 | 56 | - name: Symbolic link for orion 57 | file: 58 | src: "/usr/local/orion/bin/{{ item.src }}" 59 | dest: "/usr/bin/{{ item.dest }}" 60 | state: link 61 | with_items: 62 | - { src: "orion", dest: "orion" } 63 | - { src: "orion.bat", dest: "orion.bat" } 64 | 65 | - name: clearing unnecessary folders 66 | shell: rm -rf /tmp/transit && rm -rf /tmp/orion 67 | args: 68 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/tasks/update-tessera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update orion 3 | debug: 4 | msg: "Updating Orion" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/orion && mkdir /tmp/orion 8 | args: 9 | warn: false 10 | 11 | - name: pull orion binaries 12 | get_url: 13 | url: "https://bintray.com/consensys/binaries/download_file?file_path=orion-{{ orion_release_version}}.tar.gz" 14 | dest: "/tmp/orion/orion.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Orion tarball 22 | unarchive: 23 | src: "/tmp/orion/orion.tar.gz" 24 | dest: /tmp/transit #/usr/local 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * orion 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: Deleting old folders 33 | shell: rm -rf /usr/local/orion 34 | args: 35 | warn: false 36 | 37 | - name: moving files to /usr 38 | shell: mv /tmp/transit/orion /usr/local 39 | 40 | - name: Deleting old installed versions of orion 41 | file: 42 | path: /usr/bin/{{ item.dest }} 43 | state: absent 44 | with_items: 45 | - { dest: "orion" } 46 | - { dest: "orion.bat" } 47 | 48 | - name: Support for deployments prior to centos support 49 | file: 50 | path: /usr/local/bin/{{ item.dest }} 51 | state: absent 52 | with_items: 53 | - { dest: "orion" } 54 | - { dest: "orion.bat" } 55 | 56 | - name: Symbolic link for orion 57 | file: 58 | src: "/usr/local/orion/bin/{{ item.src }}" 59 | dest: "/usr/bin/{{ item.dest }}" 60 | state: link 61 | with_items: 62 | - { src: "orion", dest: "orion" } 63 | - { src: "orion.bat", dest: "orion.bat" } 64 | 65 | - name: clearing unnecessary folders 66 | shell: rm -rf /tmp/transit && rm -rf /tmp/orion 67 | args: 68 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-orion-node/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Adrian Pareja 3 | description: install orion node 4 | company: everis 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: license (GPLv2, CC-BY, etc) 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: 48 | [] 49 | # List tags for your role here, one per line. A tag is a keyword that describes 50 | # and categorizes the role. Users find roles by searching for tags. Be sure to 51 | # remove the '[]' above, if you add tags to this list. 52 | # 53 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 54 | # Maximum 20 tags per role. 55 | 56 | dependencies: 57 | [] 58 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 59 | # if you add dependencies to this list. 60 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Adrian Pareja 3 | description: install pantheon node 4 | company: everis 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: license (GPLv2, CC-BY, etc) 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: 48 | [] 49 | # List tags for your role here, one per line. A tag is a keyword that describes 50 | # and categorizes the role. Users find roles by searching for tags. Be sure to 51 | # remove the '[]' above, if you add tags to this list. 52 | # 53 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 54 | # Maximum 20 tags per role. 55 | 56 | dependencies: 57 | [] 58 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 59 | # if you add dependencies to this list. 60 | -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Adrian Pareja 3 | description: install tessera node 4 | company: IDB 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: license (GPLv2, CC-BY, etc) 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: 48 | [] 49 | # List tags for your role here, one per line. A tag is a keyword that describes 50 | # and categorizes the role. Users find roles by searching for tags. Be sure to 51 | # remove the '[]' above, if you add tags to this list. 52 | # 53 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 54 | # Maximum 20 tags per role. 55 | 56 | dependencies: 57 | [] 58 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 59 | # if you add dependencies to this list. 60 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Adrian Pareja 3 | description: install pantheon node 4 | company: everis 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: license (GPLv2, CC-BY, etc) 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: 48 | [] 49 | # List tags for your role here, one per line. A tag is a keyword that describes 50 | # and categorizes the role. Users find roles by searching for tags. Be sure to 51 | # remove the '[]' above, if you add tags to this list. 52 | # 53 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 54 | # Maximum 20 tags per role. 55 | 56 | dependencies: 57 | [] 58 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 59 | # if you add dependencies to this list. 60 | -------------------------------------------------------------------------------- /roles/lacchain-validator-node/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Adrian Pareja 3 | description: install pantheon node 4 | company: everis 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: license (GPLv2, CC-BY, etc) 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: 48 | [] 49 | # List tags for your role here, one per line. A tag is a keyword that describes 50 | # and categorizes the role. Users find roles by searching for tags. Be sure to 51 | # remove the '[]' above, if you add tags to this list. 52 | # 53 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 54 | # Maximum 20 tags per role. 55 | 56 | dependencies: 57 | [] 58 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 59 | # if you add dependencies to this list. 60 | -------------------------------------------------------------------------------- /PERMISSIONING_PROCESS.md: -------------------------------------------------------------------------------- 1 | # PERMISSIONING PROCESS 2 | 3 | As public blockchain networks, LACChain Test Networks are open to any entity in Latin America and the Caribbean. As permissioned networks, entities must be authenticated and commit to comply with law, policies, and regulations in order to be permissioned. 4 | 5 | ### WRITER NODES 6 | 7 | For an entity to be permissioned to run a writer node, it is required to follow the following steps: 8 | 9 | 1. Read, understand and agree with the [Terms and Conditions for Writer Nodes for LACChain Test Networks](https://github.com/lacchain/pantheon-network/blob/master/TERMS_AND_COND_WRITER_NODE.md) that includes the Privacy Policy, and the Forbidden Use Cases as annexes. 10 | 2. Fill the [Node Agreement](https://github.com/lacchain/besu-network/blob/master/NODE_AGREEMENT.md) and send it signed to marcosal@iadb.org and info@lacchain.net (as a PDF). 11 | 3. Follow the [instructions](https://github.com/lacchain/pantheon-network/blob/master/DEPLOY_NODE.md) to deploy a writer node, and send us the enode you get at the end of the process to info@lacchain.net and marcosal@iadb.org to permission your node. 12 | 13 | 14 | ### VALIDATOR NODES 15 | 16 | For an entity to be permissioned to run a validator node, it is required to follow the following steps: 17 | 18 | 1. Become a partner of the LACChain Alliance. 19 | 2. Read, understand and agree with the [Terms and Conditions for Validator Nodes for LACChain Test Networks](https://github.com/lacchain/pantheon-network/blob/master/TERMS_AND_COND_VAL_NODE.md) that includes the Privacy Policy, and the Forbidden Use Cases as annexes. 20 | 3. Fill the [Node Agreement](https://github.com/lacchain/besu-network/blob/master/NODE_AGREEMENT.md) and send it signed to marcosal@iadb.org and info@lacchain.net (as a PDF). 21 | 4. Follow the [instructions](https://github.com/lacchain/pantheon-network/blob/master/DEPLOY_NODE.md) to deploy a validator node, and send us the enode you get at the end of the process to info@lacchain.net and marcosal@iadb.org to permission your node. 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /inventory.example: -------------------------------------------------------------------------------- 1 | # ***Choose one of these roles for installing a new node or updating an existing one *** 2 | [bootnodes] 3 | # 23.251.144.110 node_name=bootnode1 4 | # 35.229.76.38 node_name=bootnode2 5 | # 35.247.241.166 node_name=bootnode3 6 | # 35.197.76.152 node_name=bootnode4 7 | 8 | [writer] 9 | # 35.198.58.193 node_ip=35.198.58.193 node_name=sat-everis-ar 10 | ## Add your node by changing the line below 11 | # node_ip= password= node_name= node_email= dns_name= 12 | 13 | [validators] 14 | # 35.194.50.229 node_name=validator1 15 | # 35.222.76.196 node_name=validator2 16 | # 35.199.81.31 node_name=validator3 17 | # 35.230.184.146 node_name=validator4 18 | # 35.230.37.255 node_name=validator5 19 | # 35.236.23.216 node_name=validator6 20 | # 35.198.6.207 node_name=validator7 21 | 22 | [orion] 23 | #35.237.111.174 24 | 25 | [tessera] 26 | #35.237.111.174 27 | 28 | #When you want to update, you can customize the version to update by typing the sha commit of the orion and Besu release 29 | #eg: 30 | [writer] ##it can also be [bootnodes] or [validators] 31 | #35.222.239.124 node_ip= besu_release_version='1.5.2' orion_release_version='1.6.0' 32 | 33 | #Current Besu commit sha obtained from: https://github.com/hyperledger/besu/releases 34 | #Tested BESU versions: 35 | # 21.1.6 36 | # 20.10.4 37 | # 1.5.3 38 | # 1.5.2 39 | # 1.4.4 40 | # 1.3.6 41 | # 1.3.5 42 | # 1.2.4 43 | 44 | #Current orion commit sha versions obtained from: https://github.com/PegaSysEng/orion/releases 45 | #Tested orion versions: 46 | # 21.1.0 47 | # 20.10.0 48 | # 1.6.0 49 | # 1.5.2 50 | # 1.4.0 51 | # 1.3.2 52 | # 1.4.0 53 | 54 | 55 | ###### 56 | ## You don't need to touch anything below this point 57 | ###### 58 | 59 | [all:vars] 60 | password=default_password 61 | node_email=default@email 62 | bootnode=false 63 | validator=false 64 | first_node=false 65 | install=false 66 | besu_release_version='21.1.6' 67 | orion_release_version='21.1.0' 68 | tessera_release_version='21.1.1' 69 | dns_name=lacchain.com 70 | orion=false 71 | tessera=false 72 | 73 | [bootnodes:vars] 74 | bootnode=true 75 | 76 | [validators:vars] 77 | validator=true 78 | -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/install-besu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install besu 3 | debug: 4 | msg: "Installing Besu" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/besu && mkdir /tmp/besu 8 | args: 9 | warn: false 10 | 11 | - name: pull besu binaries 12 | get_url: 13 | url: "https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/{{ besu_release_version}}/besu-{{ besu_release_version}}.tar.gz" 14 | dest: "/tmp/besu/besu.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Besu tarball 22 | unarchive: 23 | src: "/tmp/besu/besu.tar.gz" 24 | dest: /tmp/transit 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * besu 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: Deleting old folders 33 | shell: rm -rf /usr/local/besu 34 | args: 35 | warn: false 36 | 37 | - name: moving files to /usr 38 | shell: mv /tmp/transit/besu /usr/local 39 | 40 | #removing old link 41 | - name: Deleting old installed versions of besu or pantheon 42 | file: 43 | path: /usr/bin/{{ item.dest }} 44 | state: absent 45 | with_items: 46 | - { dest: "pantheon" } 47 | - { dest: "pantheon.bat" } 48 | - { dest: "besu"} 49 | - { dest: "besu.bat"} 50 | 51 | - name: Support for deployments prior to centos support 52 | file: 53 | path: /usr/local/bin/{{ item.dest }} 54 | state: absent 55 | with_items: 56 | - { dest: "pantheon" } 57 | - { dest: "pantheon.bat" } 58 | - { dest: "besu"} 59 | - { dest: "besu.bat"} 60 | 61 | - name: Symbolic link for besu (pantheon and besu are linked to BESU) 62 | file: 63 | src: "/usr/local/besu/bin/{{ item.src }}" 64 | dest: "/usr/bin/{{ item.dest }}" 65 | state: link 66 | with_items: 67 | - { src: "besu", dest: "pantheon" } 68 | - { src: "besu.bat", dest: "pantheon.bat" } 69 | - { src: "besu", dest: "besu" } 70 | - { src: "besu.bat", dest: "besu.bat" } 71 | 72 | - name: clearing unnecessary folders 73 | shell: rm -rf /tmp/transit /tmp/besu 74 | args: 75 | warn: false 76 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/install-besu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install besu 3 | debug: 4 | msg: "Installing Besu" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/besu && mkdir /tmp/besu 8 | args: 9 | warn: false 10 | 11 | - name: pull besu binaries 12 | get_url: 13 | url: "https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/{{ besu_release_version}}/besu-{{ besu_release_version}}.tar.gz" 14 | dest: "/tmp/besu/besu.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Besu tarball 22 | unarchive: 23 | src: "/tmp/besu/besu.tar.gz" 24 | dest: /tmp/transit #/usr/local 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * besu 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: Deleting old folders 33 | shell: rm -rf /usr/local/besu 34 | args: 35 | warn: false 36 | 37 | - name: moving files to /usr 38 | shell: mv /tmp/transit/besu /usr/local 39 | 40 | #removing old link 41 | - name: Deleting old installed versions of besu or pantheon 42 | file: 43 | path: /usr/bin/{{ item.dest }} 44 | state: absent 45 | with_items: 46 | - { dest: "pantheon" } 47 | - { dest: "pantheon.bat" } 48 | - { dest: "besu"} 49 | - { dest: "besu.bat"} 50 | 51 | - name: Support for deployments prior to centos support 52 | file: 53 | path: /usr/local/bin/{{ item.dest }} 54 | state: absent 55 | with_items: 56 | - { dest: "pantheon" } 57 | - { dest: "pantheon.bat" } 58 | - { dest: "besu"} 59 | - { dest: "besu.bat"} 60 | 61 | - name: Symbolic link for besu (pantheon and besu are linked to BESU) 62 | file: 63 | src: "/usr/local/besu/bin/{{ item.src }}" 64 | dest: "/usr/bin/{{ item.dest }}" 65 | state: link 66 | with_items: 67 | - { src: "besu", dest: "pantheon" } 68 | - { src: "besu.bat", dest: "pantheon.bat" } 69 | - { src: "besu", dest: "besu" } 70 | - { src: "besu.bat", dest: "besu.bat" } 71 | 72 | - name: clearing unnecessary folders 73 | shell: rm -rf /tmp/transit /tmp/besu 74 | args: 75 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/install-besu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install besu 3 | debug: 4 | msg: "Installing Besu" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/besu && mkdir /tmp/besu 8 | args: 9 | warn: false 10 | 11 | - name: pull besu binaries 12 | get_url: 13 | url: "https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/{{ besu_release_version}}/besu-{{ besu_release_version}}.tar.gz" 14 | dest: "/tmp/besu/besu.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Besu tarball 22 | unarchive: 23 | src: "/tmp/besu/besu.tar.gz" 24 | dest: /tmp/transit #/usr/local 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * besu 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: Deleting old folders 33 | shell: rm -rf /usr/local/besu 34 | args: 35 | warn: false 36 | 37 | - name: moving files to /usr 38 | shell: mv /tmp/transit/besu /usr/local 39 | 40 | #removing old link 41 | - name: Deleting old installed versions of besu or pantheon 42 | file: 43 | path: /usr/bin/{{ item.dest }} 44 | state: absent 45 | with_items: 46 | - { dest: "pantheon" } 47 | - { dest: "pantheon.bat" } 48 | - { dest: "besu"} 49 | - { dest: "besu.bat"} 50 | 51 | - name: Support for deployments prior to centos support 52 | file: 53 | path: /usr/local/bin/{{ item.dest }} 54 | state: absent 55 | with_items: 56 | - { dest: "pantheon" } 57 | - { dest: "pantheon.bat" } 58 | - { dest: "besu"} 59 | - { dest: "besu.bat"} 60 | 61 | - name: Symbolic link for besu (pantheon and besu are linked to BESU) 62 | file: 63 | src: "/usr/local/besu/bin/{{ item.src }}" 64 | dest: "/usr/bin/{{ item.dest }}" 65 | state: link 66 | with_items: 67 | - { src: "besu", dest: "pantheon" } 68 | - { src: "besu.bat", dest: "pantheon.bat" } 69 | - { src: "besu", dest: "besu" } 70 | - { src: "besu.bat", dest: "besu.bat" } 71 | 72 | - name: clearing unnecessary folders 73 | shell: rm -rf /tmp/transit /tmp/besu 74 | args: 75 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-validator-node/tasks/init-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: initializing constellation 3 | debug: 4 | msg: initializing constellation 5 | 6 | - name: get public ip 7 | shell: dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null || curl -s --retry 2 icanhazip.com 8 | register: node_ip 9 | 10 | - name: create orion directories 11 | file: 12 | path: "{{ item.dest }}" 13 | mode: "{{ item.mode }}" 14 | state: directory 15 | with_items: 16 | - { dest: "~/lacchain/orion", mode: "0440" } 17 | - { dest: "~/lacchain/orion/keystore", mode: "0440" } 18 | 19 | - name: copy password to file 20 | copy: 21 | dest: ~/lacchain/tmp/.account_pass 22 | content: | 23 | {{password}} 24 | 25 | #- name: Copy constellation nodes file 26 | # copy: 27 | # src: "{{ role_path }}/files/constellation-nodes.json" 28 | # dest: ~/lacchain/tmp/constellation-nodes.json 29 | # mode: 0755 30 | 31 | #- name: update constellation node files 32 | # replace: 33 | # path: ~/lacchain/tmp/constellation-nodes.json 34 | # regexp: '9000/"$' 35 | # replace: '9000/",' 36 | 37 | #- name: update constellation nodes file 38 | # lineinfile: 39 | # path: ~/lacchain/tmp/constellation-nodes.json 40 | # regexp: "$]$" 41 | # insertbefore: "^]$" 42 | # line: ' "https://{{node_ip.stdout}}:9000/"' 43 | 44 | #- name: Fetch constellation_nodes updated 45 | # fetch: 46 | # src: ~/lacchain/tmp/constellation-nodes.json 47 | # dest: "{{ role_path }}/files/" 48 | # flat: yes 49 | 50 | - name: generate configuration orion file 51 | template: 52 | src: "orion.j2" 53 | dest: "~/lacchain/orion/orion.conf" 54 | force: yes 55 | 56 | - name: generate pair keys 57 | shell: cat ~/lacchain/tmp/.account_pass | orion --generatekeys nodeKey 58 | args: 59 | chdir: ~/lacchain/orion/keystore 60 | 61 | - name: Generate shell script to execute orion service 62 | template: 63 | src: "startorion.j2" 64 | dest: "~/lacchain/start-orion.sh" 65 | mode: 0775 66 | force: yes 67 | 68 | - name: Copy service file to systemd 69 | copy: 70 | src: "{{ role_path }}/files/orion.service" 71 | dest: /lib/systemd/system/orion.service 72 | mode: 0775 73 | 74 | - name: Enable service orion 75 | service: 76 | name: orion 77 | enabled: yes 78 | -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/update-orion.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update orion 3 | debug: 4 | msg: "Updating Orion" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/orion && mkdir /tmp/orion 8 | args: 9 | warn: false 10 | 11 | - name: pull orion binaries 12 | get_url: 13 | url: "https://bintray.com/consensys/binaries/download_file?file_path=orion-{{ orion_release_version}}.tar.gz" 14 | dest: "/tmp/orion/orion.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Orion tarball 22 | unarchive: 23 | src: "/tmp/orion/orion.tar.gz" 24 | dest: /tmp/transit #/usr/local 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * orion 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: stop enclave #stopping node before starting the update process 33 | import_tasks: "stop-orion.yaml" 34 | 35 | - name: stop pantheon #stopping node before starting the update process 36 | import_tasks: "stop-node.yaml" 37 | 38 | - name: Deleting old folders 39 | shell: rm -rf /usr/local/orion 40 | args: 41 | warn: false 42 | 43 | - name: moving files to /usr 44 | shell: mv /tmp/transit/orion /usr/local 45 | 46 | - name: Deleting old installed versions of orion 47 | file: 48 | path: /usr/bin/{{ item.dest }} 49 | state: absent 50 | with_items: 51 | - { dest: "orion" } 52 | - { dest: "orion.bat" } 53 | 54 | - name: Support for deployments prior to centos support 55 | file: 56 | path: /usr/local/bin/{{ item.dest }} 57 | state: absent 58 | with_items: 59 | - { dest: "orion" } 60 | - { dest: "orion.bat" } 61 | 62 | - name: Symbolic link for orion 63 | file: 64 | src: "/usr/local/orion/bin/{{ item.src }}" 65 | dest: "/usr/bin/{{ item.dest }}" 66 | state: link 67 | with_items: 68 | - { src: "orion", dest: "orion" } 69 | - { src: "orion.bat", dest: "orion.bat" } 70 | 71 | - name: start orion 72 | import_tasks: "start-orion.yaml" 73 | 74 | - name: start besu 75 | import_tasks: "start-node.yaml" 76 | 77 | - name: clearing unnecessary folders 78 | shell: rm -rf /tmp/transit && rm -rf /tmp/orion 79 | args: 80 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/init-besu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Init besu 3 | debug: 4 | msg: "Init Besu" 5 | 6 | - name: create lacchain directories 7 | file: 8 | path: "{{ item.dest }}" 9 | mode: "{{ item.mode }}" 10 | state: directory 11 | with_items: 12 | - { dest: "~/lacchain/data/keystore", mode: "0440" } 13 | - { dest: "~/lacchain/logs", mode: "0440" } 14 | - { dest: "~/lacchain/tmp", mode: "0440" } 15 | - { dest: "~/lacchain/orion/keystore", mode: "0440"} 16 | - { dest: "~/lacchain/scripts", mode: "0440"} 17 | 18 | - name: initializing besu from genesis.json 19 | debug: 20 | msg: Initializing Besu 21 | 22 | - name: Copy genesis ibft2.0 file 23 | copy: 24 | src: "{{ role_path }}/files/genesis.json" 25 | dest: ~/lacchain/data/genesis.json 26 | mode: 0755 27 | 28 | - name: Generate node key 29 | shell: pantheon --data-path=/root/lacchain/data public-key export-address --to=/root/lacchain/data/nodeAddress | grep -oE "0x[A-Fa-f0-9]*" | sed 's/0x//' 30 | register: enode_key 31 | 32 | - name: print enode key 33 | debug: 34 | msg: enode://{{enode_key.stdout}}@{{node_ip}}:60606 35 | 36 | - name: Generate shell script to execute besu service 37 | template: 38 | src: "startpantheon.j2" 39 | dest: "~/lacchain/start-pantheon.sh" 40 | mode: 0775 41 | force: yes 42 | 43 | - name: Generate Besu configuration file when Orion is Enabled 44 | template: 45 | src: "pantheon-orion-config.j2" 46 | dest: "~/lacchain/config.toml" 47 | mode: 0775 48 | when: orion | bool 49 | 50 | - name: Generate Besu configuration file when Orion is Disabled 51 | template: 52 | src: "pantheon-config.j2" 53 | dest: "~/lacchain/config.toml" 54 | mode: 0775 55 | when: orion | bool == false 56 | 57 | - name: Copy service file to systemd 58 | copy: 59 | src: "{{ role_path }}/files/pantheon.service" 60 | dest: /lib/systemd/system/pantheon.service 61 | mode: 0775 62 | 63 | - name: Copy Log configuration file to lacchain 64 | copy: 65 | src: "{{ role_path }}/files/log.xml" 66 | dest: "~/lacchain/log.xml" 67 | mode: 0775 68 | 69 | - name: Copy Orion Public Key 70 | copy: 71 | src: "{{ role_path }}/files/nodeKey.pub" 72 | dest: ~/lacchain/orion/keystore/nodeKey.pub 73 | mode: 0644 74 | when: orion | bool 75 | 76 | - name: Enable service Besu 77 | service: 78 | name: pantheon 79 | enabled: yes -------------------------------------------------------------------------------- /roles/lacchain-tessera-node/templates/tessera.j2: -------------------------------------------------------------------------------- 1 | { 2 | "type" : "config", 3 | "version" : "20.10.2-SNAPSHOT", 4 | "useWhiteList" : false, 5 | "disablePeerDiscovery" : false, 6 | "bootstrapNode" : false, 7 | "jdbc" : { 8 | "username" : "user1", 9 | "password" : "Password", 10 | "url" : "jdbc:h2:/root/lacchain/tessera/tessera", 11 | "autoCreateTables" : true, 12 | "fetchSize" : 0 13 | }, 14 | "serverConfigs" : [ { 15 | "app" : "Q2T", 16 | "communicationType" : "REST", 17 | "bindingAddress" : "http://0.0.0.0:4444", 18 | "serverAddress" : "http://{{node_ip}}:4444/", 19 | "properties" : { 20 | } 21 | }, { 22 | "app" : "P2P", 23 | "communicationType" : "REST", 24 | "sslConfig" : { 25 | "tls" : "OFF", 26 | "generateKeyStoreIfNotExisted" : false, 27 | "serverTlsKeyPath" : "/root/lacchain/orion/certificates/orion_cer.key", 28 | "serverTlsCertificatePath" : "/root/lacchain/orion/certificates/orion_cer.pem", 29 | "serverTrustCertificates" : [ "/root/lacchain/orion/certificates/orion_ca.pem"], 30 | "serverTrustMode" : "CA", 31 | "clientTlsKeyPath" : "/root/lacchain/orion/certificates/orion_cer.key", 32 | "clientTlsCertificatePath" : "/root/lacchain/orion/certificates/orion_cer.pem", 33 | "clientTrustCertificates" : [ "/root/lacchain/orion/certificates/orion_ca.pem"], 34 | "clientTrustMode" : "CA", 35 | "knownClientsFile" : "/root/lacchain/orion/tls-known-clients", 36 | "knownServersFile" : "/root/lacchain/orion/tls-known-servers", 37 | "clientAuth" : true 38 | }, 39 | "bindingAddress" : "http://0.0.0.0:4040", 40 | "serverAddress" : "http://{{node_ip}}:4040/", 41 | "properties" : { 42 | } 43 | } ], 44 | "peer" : { 45 | "url" : "http://192.168.1.1:4040" 46 | }, 47 | "keys" : { 48 | "passwordFile" : "/root/lacchain/tmp/.account_pass", 49 | "keyData" : { 50 | "privateKeyPath" : "/root/lacchain/tessera/keystore/nodeKey.key", 51 | "publicKeyPath" : "/root/lacchain/tessera/keystore/nodeKey.pub" 52 | } 53 | }, 54 | "alwaysSendTo" : [ ], 55 | "features" : { 56 | "enableRemoteKeyValidation" : false, 57 | "enablePrivacyEnhancements" : false 58 | }, 59 | "encryptor" : { 60 | "type" : "NACL" 61 | }, 62 | "mode" : "orion" 63 | } -------------------------------------------------------------------------------- /roles/lacchain-writer-node/tasks/update-besu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update besu 3 | debug: 4 | msg: "Updating Besu" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/besu && mkdir /tmp/besu 8 | args: 9 | warn: false 10 | 11 | - name: pull besu binaries 12 | get_url: 13 | url: "https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/{{ besu_release_version}}/besu-{{ besu_release_version}}.tar.gz" 14 | dest: "/tmp/besu/besu.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Besu tarball 22 | unarchive: 23 | src: "/tmp/besu/besu.tar.gz" 24 | dest: /tmp/transit #/usr/local 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * besu 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: Deleting old folders 33 | shell: rm -rf /usr/local/besu 34 | args: 35 | warn: false 36 | 37 | - name: moving files to /usr 38 | shell: mv /tmp/transit/besu /usr/local 39 | 40 | #removing old link 41 | - name: Deleting old installed versions of besu or pantheon 42 | file: 43 | path: /usr/bin/{{ item.dest }} 44 | state: absent 45 | with_items: 46 | - { dest: "pantheon" } 47 | - { dest: "pantheon.bat" } 48 | - { dest: "besu"} 49 | - { dest: "besu.bat"} 50 | 51 | - name: Support for deployments prior to centos support 52 | file: 53 | path: /usr/local/bin/{{ item.dest }} 54 | state: absent 55 | with_items: 56 | - { dest: "pantheon" } 57 | - { dest: "pantheon.bat" } 58 | - { dest: "besu"} 59 | - { dest: "besu.bat"} 60 | 61 | - name: Symbolic link for besu (pantheon and besu are linked to BESU) 62 | file: 63 | src: "/usr/local/besu/bin/{{ item.src }}" 64 | dest: "/usr/bin/{{ item.dest }}" 65 | state: link 66 | with_items: 67 | - { src: "besu", dest: "pantheon" } 68 | - { src: "besu.bat", dest: "pantheon.bat" } 69 | - { src: "besu", dest: "besu" } 70 | - { src: "besu.bat", dest: "besu.bat" } 71 | 72 | - name: Copy latest genesis ibft2.0 file 73 | copy: 74 | src: "{{ role_path }}/files/genesis.json" 75 | dest: ~/lacchain/data/genesis.json 76 | mode: 0755 77 | 78 | - name: clearing unnecessary folders 79 | shell: rm -rf /tmp/transit /tmp/besu 80 | args: 81 | warn: false -------------------------------------------------------------------------------- /roles/lacchain-bootnode/tasks/update-besu.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update besu 3 | debug: 4 | msg: "Updating Besu" 5 | 6 | - name: previous clearing 7 | shell: rm -rf /tmp/besu && mkdir /tmp/besu 8 | args: 9 | warn: false 10 | 11 | - name: pull besu binaries 12 | get_url: 13 | url: "https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/{{ besu_release_version}}/besu-{{ besu_release_version}}.tar.gz" 14 | dest: "/tmp/besu/besu.tar.gz" 15 | 16 | - name: Preparing temporal folder 17 | shell: rm -rf /tmp/transit/ && mkdir /tmp/transit #deleting and creating a new 18 | args: 19 | warn: false 20 | 21 | - name: Extract the Besu tarball 22 | unarchive: 23 | src: "/tmp/besu/besu.tar.gz" 24 | dest: /tmp/transit #/usr/local 25 | copy: no 26 | 27 | - name: Renaming extracted file 28 | shell: mv * besu 29 | args: 30 | chdir: /tmp/transit 31 | 32 | - name: stop besu #stopping node before starting the update process 33 | import_tasks: "stop-node.yaml" 34 | 35 | - name: Deleting old folders 36 | shell: rm -rf /usr/local/besu 37 | args: 38 | warn: false 39 | 40 | - name: moving files to /usr 41 | shell: mv /tmp/transit/besu /usr/local 42 | 43 | #removing old link 44 | - name: Deleting old installed versions of besu or pantheon 45 | file: 46 | path: /usr/bin/{{ item.dest }} 47 | state: absent 48 | with_items: 49 | - { dest: "pantheon" } 50 | - { dest: "pantheon.bat" } 51 | - { dest: "besu"} 52 | - { dest: "besu.bat"} 53 | 54 | - name: Support for deployments prior to centos support 55 | file: 56 | path: /usr/local/bin/{{ item.dest }} 57 | state: absent 58 | with_items: 59 | - { dest: "pantheon" } 60 | - { dest: "pantheon.bat" } 61 | - { dest: "besu"} 62 | - { dest: "besu.bat"} 63 | 64 | - name: Symbolic link for besu (pantheon and besu are linked to BESU) 65 | file: 66 | src: "/usr/local/besu/bin/{{ item.src }}" 67 | dest: "/usr/bin/{{ item.dest }}" 68 | state: link 69 | with_items: 70 | - { src: "besu", dest: "pantheon" } 71 | - { src: "besu.bat", dest: "pantheon.bat" } 72 | - { src: "besu", dest: "besu" } 73 | - { src: "besu.bat", dest: "besu.bat" } 74 | 75 | - name: start node 76 | import_tasks: "start-node.yaml" 77 | 78 | - name: clearing unnecessary folders 79 | shell: rm -rf /tmp/transit /tmp/besu 80 | args: 81 | warn: false --------------------------------------------------------------------------------