Merge branch 'main' into 'main'
add ganache fixes to nodejs and yarn. update requirements.yml, add two install... See merge request shopglue/ziion-tools!1
This commit is contained in:
commit
09f71a15ae
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ansible/roles/geerlingguy.docker/
|
|
@ -13,4 +13,4 @@ crowdfunding page:
|
||||||
***
|
***
|
||||||
|
|
||||||
## 1st Round: Primary Sponsors (400,000 SATS or more):
|
## 1st Round: Primary Sponsors (400,000 SATS or more):
|
||||||
Bryan Black (Website: https://bringyourwallet.com)
|
Bryan Black (Website: https://example.com)
|
||||||
|
|
12
ansible/ansible.cfg
Normal file
12
ansible/ansible.cfg
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[defaults]
|
||||||
|
|
||||||
|
# some basic default values...
|
||||||
|
|
||||||
|
interpreter_python = auto
|
||||||
|
inventory = ./inventory/
|
||||||
|
roles_path = ./roles/
|
||||||
|
stdout_callback = default
|
||||||
|
|
||||||
|
#[ssh_connection]
|
||||||
|
#ssh_args=-o ControlMaster=auto -o ControlPersist=60s -o ControlPath=/tmp/ansible-ssh-%h-%p-%r -o ForwardAgent=yes
|
||||||
|
|
5
ansible/inventory/hosts
Normal file
5
ansible/inventory/hosts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[localhost]
|
||||||
|
127.0.0.1 ansible_connection=local
|
||||||
|
|
||||||
|
[vagrant]
|
||||||
|
10.0.0.159:3322 ansible_user=ziion
|
20
ansible/plays/evm-tools.yml
Normal file
20
ansible/plays/evm-tools.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
- hosts: vagrant
|
||||||
|
vars:
|
||||||
|
ziionos_user: ziion
|
||||||
|
bash_line: "export PATH=$PATH:$HOME/.local/bin" # pipx support for user install
|
||||||
|
bash_line_state: present
|
||||||
|
docker_users:
|
||||||
|
- ziion
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- common
|
||||||
|
- geerlingguy.docker
|
||||||
|
- truffle
|
||||||
|
- solc
|
||||||
|
- solc-select
|
||||||
|
- brownie
|
||||||
|
- manticore
|
||||||
|
- mythril
|
||||||
|
- ganache
|
||||||
|
- remix
|
9
ansible/roles/brownie/tasks/install-python3venv.yml
Normal file
9
ansible/roles/brownie/tasks/install-python3venv.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
- name: Install python3-venv
|
||||||
|
become_user: root
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 604800
|
||||||
|
pkg:
|
||||||
|
- python3-venv
|
16
ansible/roles/brownie/tasks/main.yml
Normal file
16
ansible/roles/brownie/tasks/main.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
- name: Install pipx package for brownie
|
||||||
|
become_user: "{{ ziionos_user }}"
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name: pipx
|
||||||
|
extra_args: --user
|
||||||
|
|
||||||
|
- import_tasks: install-python3venv.yml
|
||||||
|
tags:
|
||||||
|
- install-python3venv
|
||||||
|
|
||||||
|
- name: pipx install eth-brownie
|
||||||
|
become_user: "{{ ziionos_user }}"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.shell: "/home/{{ ziionos_user }}/.local/bin/pipx install eth-brownie==1.18.2"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
6
ansible/roles/common/tasks/install-bashrc.yml
Normal file
6
ansible/roles/common/tasks/install-bashrc.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
- name: Configure bashrc lines
|
||||||
|
lineinfile:
|
||||||
|
path: "/home/{{ ziionos_user }}/.bashrc"
|
||||||
|
line: "{{ bash_line }}"
|
||||||
|
state: "{{ bash_line_state |default('present') }}"
|
||||||
|
backup: yes
|
40
ansible/roles/common/tasks/install-node.yml
Normal file
40
ansible/roles/common/tasks/install-node.yml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
- name: Install curl
|
||||||
|
become_user: root
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 604800
|
||||||
|
pkg:
|
||||||
|
- curl
|
||||||
|
|
||||||
|
- name: Remove nodejs
|
||||||
|
become_user: root
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
state: absent
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 604800
|
||||||
|
pkg:
|
||||||
|
- nodejs
|
||||||
|
|
||||||
|
- name: add nodejs apt repository
|
||||||
|
become_user: root
|
||||||
|
become: true
|
||||||
|
ansible.builtin.shell: "curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - "
|
||||||
|
|
||||||
|
- name: Install nodejs
|
||||||
|
become_user: root
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 604800
|
||||||
|
pkg:
|
||||||
|
- nodejs
|
||||||
|
|
||||||
|
- name:
|
||||||
|
become_user: root
|
||||||
|
become: true
|
||||||
|
ansible.builtin.shell: "corepack enable"
|
||||||
|
|
9
ansible/roles/common/tasks/install-pip.yml
Normal file
9
ansible/roles/common/tasks/install-pip.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
- name: Install pip3
|
||||||
|
become_user: root
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 604800
|
||||||
|
pkg:
|
||||||
|
- python3-pip
|
12
ansible/roles/common/tasks/main.yml
Normal file
12
ansible/roles/common/tasks/main.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- import_tasks: install-node.yml
|
||||||
|
tags:
|
||||||
|
- install-node
|
||||||
|
|
||||||
|
- import_tasks: install-pip.yml
|
||||||
|
tags:
|
||||||
|
- install-pip
|
||||||
|
|
||||||
|
- import_tasks: install-bashrc.yml
|
||||||
|
tags:
|
||||||
|
- install-bashrc
|
8
ansible/roles/ganache/tasks/install-via-docker.yml
Normal file
8
ansible/roles/ganache/tasks/install-via-docker.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: Create ganache
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: ganache
|
||||||
|
image: trufflesuite/ganache:v7.1.0
|
||||||
|
state: started
|
||||||
|
restart: true
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:8545:8545" # discuss if this should be bind all gitlab.com/reel/ziion-tools/-/issues/4
|
7
ansible/roles/ganache/tasks/install-via-npm.yml
Normal file
7
ansible/roles/ganache/tasks/install-via-npm.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
- name: Install ganache
|
||||||
|
community.general.npm:
|
||||||
|
name: ganache
|
||||||
|
version: '7.1.0'
|
||||||
|
path: /usr/local/ganache
|
||||||
|
global: true
|
||||||
|
state: present
|
7
ansible/roles/ganache/tasks/main.yml
Normal file
7
ansible/roles/ganache/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
#- import_tasks: install-via-npm.yml
|
||||||
|
# tags: install-via-npm
|
||||||
|
|
||||||
|
- import_tasks: install-via-docker.yml
|
||||||
|
tags: install-via-docker
|
6
ansible/roles/manticore/tasks/install-via-docker.yml
Normal file
6
ansible/roles/manticore/tasks/install-via-docker.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
- name: Create manticore
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: manticore
|
||||||
|
image: trailofbits/manticore:0.3.7
|
||||||
|
state: started
|
||||||
|
restart: true
|
4
ansible/roles/manticore/tasks/install-via-pip.yml
Normal file
4
ansible/roles/manticore/tasks/install-via-pip.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: Install manticore python package
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name: manticore==0.3.7
|
||||||
|
state: present
|
6
ansible/roles/manticore/tasks/main.yml
Normal file
6
ansible/roles/manticore/tasks/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
#- import_tasks: install-via-pip.yml
|
||||||
|
# tags: install-via-pip
|
||||||
|
|
||||||
|
- import_tasks: install-via-docker.yml
|
||||||
|
tags: install-via-docker
|
6
ansible/roles/mythril/tasks/install-via-docker.yml
Normal file
6
ansible/roles/mythril/tasks/install-via-docker.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
- name: Create mythril
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: manticore
|
||||||
|
image: mythril/myth:0.23.1
|
||||||
|
state: started
|
||||||
|
restart: true
|
4
ansible/roles/mythril/tasks/install-via-pip.yml
Normal file
4
ansible/roles/mythril/tasks/install-via-pip.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: Install mythril python package
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name: mythril==0.23.1
|
||||||
|
state: present
|
9
ansible/roles/mythril/tasks/main.yml
Normal file
9
ansible/roles/mythril/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
#- import_tasks: install-via-pip.yml
|
||||||
|
# tags: install-via-pip
|
||||||
|
# UNTESTED
|
||||||
|
|
||||||
|
|
||||||
|
- import_tasks: install-via-docker.yml
|
||||||
|
tags: install-via-docker
|
||||||
|
|
9
ansible/roles/remix/tasks/main.yml
Normal file
9
ansible/roles/remix/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
- name: Create remix-ide
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: remix-ide
|
||||||
|
image: remixproject/remix-ide
|
||||||
|
state: started
|
||||||
|
restart: true
|
||||||
|
ports:
|
||||||
|
# Publish container port 80 as host port 8080
|
||||||
|
- "127.0.0.1:8080:80"
|
8
ansible/roles/requirements.yml
Normal file
8
ansible/roles/requirements.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
# ansible-galaxy install -r roles/requirements.yml
|
||||||
|
collections:
|
||||||
|
- community.docker
|
||||||
|
|
||||||
|
|
||||||
|
- src: geerlingguy.docker
|
||||||
|
name: geerlingguy.docker
|
4
ansible/roles/solc-select/tasks/main.yml
Normal file
4
ansible/roles/solc-select/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: Install solc-select python package
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name: solc-select
|
||||||
|
# name: solc-select==1.0.1
|
7
ansible/roles/solc/tasks/main.yml
Normal file
7
ansible/roles/solc/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
- name: Install solc-js
|
||||||
|
community.general.npm:
|
||||||
|
name: solc
|
||||||
|
version: '0.8.14-fixed'
|
||||||
|
path: /usr/local/solc
|
||||||
|
global: true
|
||||||
|
state: present
|
7
ansible/roles/truffle/tasks/main.yml
Normal file
7
ansible/roles/truffle/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
- name: Install truffle
|
||||||
|
community.general.npm:
|
||||||
|
name: truffle
|
||||||
|
version: '5.5.14'
|
||||||
|
path: /usr/local/truffle
|
||||||
|
global: true
|
||||||
|
state: present
|
Loading…
Reference in a new issue