(Fix) Rename mining and owner roles
This commit is contained in:
parent
eae1495d0e
commit
5e1c7f3de6
|
@ -3,8 +3,8 @@ files/*.pub
|
|||
group_vars/all
|
||||
group_vars/bootnode
|
||||
group_vars/explorer
|
||||
group_vars/mining
|
||||
group_vars/validator
|
||||
group_vars/netstat
|
||||
group_vars/owner
|
||||
group_vars/moc
|
||||
|
||||
hosts
|
||||
|
|
4
README
4
README
|
@ -31,9 +31,9 @@ A: We recommend type m5.large, but you are free to decide. Please see all instan
|
|||
|
||||
Usage:
|
||||
bootnode instance setup: ansible-playbook bootnode.yml
|
||||
mining instance setup: ansible-playbook mining.yml
|
||||
validator instance setup: ansible-playbook validator.yml
|
||||
netstat instance setup: ansible-playbook netstat.yml
|
||||
owner instance setup: ansible-playbook owner.yml
|
||||
moc instance setup: ansible-playbook moc.yml
|
||||
explorer instance setup: ansible-playbook explorer.yml
|
||||
|
||||
Before setting up instance or refreshing config, add server ip in file hosts and run: ansible-playbook -i hosts site.yml
|
||||
|
|
|
@ -34,11 +34,11 @@ MAIN_REPO_FETCH: "oraclesorg"
|
|||
TEMPLATES_BRANCH: "dev-mainnet"
|
||||
GENESIS_BRANCH: "master"
|
||||
|
||||
OWNER_ADDRESS: "_INSERT_"
|
||||
OWNER_KEYPASS: "_INSERT_"
|
||||
OWNER_KEYFILE: "_INSERT_"
|
||||
MOC_ADDRESS: "_INSERT_"
|
||||
MOC_KEYPASS: "_INSERT_"
|
||||
MOC_KEYFILE: "_INSERT_"
|
||||
|
||||
SCRIPTS_OWNER_BRANCH: "master"
|
||||
SCRIPTS_MOC_BRANCH: "master"
|
||||
SCRIPTS_VALIDATOR_BRANCH: "master"
|
||||
|
||||
TX_GAS_LIMIT: "6700000"
|
||||
|
@ -59,17 +59,17 @@ netstat_instance_name: "netstat"
|
|||
netstat_count_instances: "1"
|
||||
netstat_security_group: "netstat-security"
|
||||
|
||||
#mining
|
||||
mining_instance_type: "t2.large"
|
||||
mining_instance_name: "mining"
|
||||
mining_count_instances: "1"
|
||||
mining_security_group: "mining-security"
|
||||
#validator
|
||||
validator_instance_type: "t2.large"
|
||||
validator_instance_name: "validator"
|
||||
validator_count_instances: "1"
|
||||
validator_security_group: "validator-security"
|
||||
|
||||
#owner
|
||||
owner_instance_type: "t2.large"
|
||||
owner_instance_name: "owner"
|
||||
owner_count_instances: "1"
|
||||
owner_security_group: "owner-security"
|
||||
#moc
|
||||
moc_instance_type: "t2.large"
|
||||
moc_instance_name: "moc"
|
||||
moc_count_instances: "1"
|
||||
moc_security_group: "moc-security"
|
||||
|
||||
#explorer
|
||||
explorer_instance_type: "t2.large"
|
||||
|
|
|
@ -22,13 +22,13 @@ NODE_PWD: "node.pwd" # don't change this one
|
|||
NODE_SOURCE_DEB: "https://deb.nodesource.com/node_8.x"
|
||||
PARITY_BIN_LOC: "https://github.com/oraclesorg/binary-releases/releases/download/1.8.3/parity"
|
||||
|
||||
SCRIPTS_OWNER_BRANCH: "master"
|
||||
SCRIPTS_MOC_BRANCH: "master"
|
||||
SCRIPTS_VALIDATOR_BRANCH: "master"
|
||||
MAIN_REPO_FETCH: "oraclesorg"
|
||||
TEMPLATES_BRANCH: "dev-mainnet"
|
||||
GENESIS_BRANCH: "master"
|
||||
|
||||
OWNER_ADDRESS: "0xdd0bb0e2a1594240fed0c2f2c17c1e9ab4f87126"
|
||||
MOC_ADDRESS: "0xdd0bb0e2a1594240fed0c2f2c17c1e9ab4f87126"
|
||||
TX_GAS_LIMIT: "6700000"
|
||||
|
||||
#bootnode
|
||||
|
@ -43,17 +43,17 @@ netstat_instance_name: "netstat"
|
|||
netstat_count_instances: "1"
|
||||
netstat_security_group: "netstat-security"
|
||||
|
||||
#mining
|
||||
mining_instance_type: "t2.large"
|
||||
mining_instance_name: "mining"
|
||||
mining_count_instances: "1"
|
||||
mining_security_group: "mining-security"
|
||||
#validator
|
||||
validator_instance_type: "t2.large"
|
||||
validator_instance_name: "validator"
|
||||
validator_count_instances: "1"
|
||||
validator_security_group: "validator-security"
|
||||
|
||||
#owner
|
||||
owner_instance_type: "t2.large"
|
||||
owner_instance_name: "owner"
|
||||
owner_count_instances: "1"
|
||||
owner_security_group: "owner-security"
|
||||
#moc
|
||||
moc_instance_type: "t2.large"
|
||||
moc_instance_name: "moc"
|
||||
moc_count_instances: "1"
|
||||
moc_security_group: "moc-security"
|
||||
|
||||
#explorer
|
||||
explorer_instance_type: "t2.large"
|
||||
|
|
|
@ -10,5 +10,5 @@ NODE_ADMIN_EMAIL: "_INSERT@EMAIL_"
|
|||
NETSTATS_SERVER: "_INSERT FULL URL_"
|
||||
NETSTATS_SECRET: "_INSERT SECRET_"
|
||||
|
||||
OWNER_KEYPASS: "_INSERT_"
|
||||
OWNER_KEYFILE: "_INSERT_"
|
||||
MOC_KEYPASS: "_INSERT_"
|
||||
MOC_KEYFILE: "_INSERT_"
|
|
@ -10,17 +10,17 @@
|
|||
|
||||
[bootnode]
|
||||
|
||||
[owner]
|
||||
[moc]
|
||||
|
||||
[netstat]
|
||||
|
||||
[mining]
|
||||
[validator]
|
||||
|
||||
[explorer]
|
||||
|
||||
[oracles:children]
|
||||
bootnode
|
||||
owner
|
||||
moc
|
||||
netstat
|
||||
mining
|
||||
validator
|
||||
explorer
|
||||
|
|
18
owner.yml
18
owner.yml
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: Create owner security group
|
||||
- name: Create moc security group
|
||||
hosts: localhost
|
||||
gather_facts: False
|
||||
tasks:
|
||||
|
@ -7,7 +7,7 @@
|
|||
ec2_group:
|
||||
ec2_access_key: "{{ access_key }}"
|
||||
ec2_secret_key: "{{ secret_key }}"
|
||||
name: owner-security
|
||||
name: moc-security
|
||||
description: "Default security group"
|
||||
region: "{{ region }}"
|
||||
# purge_rules_egress: true
|
||||
|
@ -30,10 +30,10 @@
|
|||
from_port: all
|
||||
to_port: all
|
||||
cidr_ip: 0.0.0.0/0
|
||||
tags: owner
|
||||
tags: moc
|
||||
|
||||
|
||||
- name: Create owner
|
||||
- name: Create moc
|
||||
hosts: localhost
|
||||
gather_facts: False
|
||||
vars:
|
||||
|
@ -48,11 +48,11 @@
|
|||
ec2_secret_key: "{{ secret_key }}"
|
||||
key_name: "{{ awskeypair_name }}"
|
||||
instance_tags:
|
||||
Name: "{{ owner_instance_name }}"
|
||||
group: "{{ owner_security_group }}"
|
||||
instance_type: "{{ owner_instance_type }}"
|
||||
Name: "{{ moc_instance_name }}"
|
||||
group: "{{ moc_security_group }}"
|
||||
instance_type: "{{ moc_instance_type }}"
|
||||
image: "{{ image }}"
|
||||
count: "{{ owner_count_instances }}"
|
||||
count: "{{ moc_count_instances }}"
|
||||
wait: yes
|
||||
region: "{{ region }}"
|
||||
vpc_subnet_id: "{{ vpc_subnet_id }}"
|
||||
|
@ -65,7 +65,7 @@
|
|||
- name: Wait for SSH to come up
|
||||
wait_for: host={{ item.public_ip }} port=22 delay=90 timeout=320 state=started
|
||||
with_items: "{{ ec2.instances }}"
|
||||
tags: owner
|
||||
tags: moc
|
||||
|
||||
- name: Installing python
|
||||
hosts: all
|
||||
|
|
|
@ -6,7 +6,7 @@ var config = function () {
|
|||
this.provider = new web3.providers.IpcProvider(this.ipcPath, net);
|
||||
this.bootstrapUrl = "https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/yeti/bootstrap.min.css";
|
||||
this.names = {
|
||||
"{{ OWNER_ADDRESS|lower }}": "Master of Ceremony",
|
||||
"{{ MOC_ADDRESS|lower }}": "Master of Ceremony",
|
||||
};
|
||||
}
|
||||
module.exports = config;
|
||||
|
|
|
@ -44,20 +44,20 @@
|
|||
log_file = "{{ home }}/logs/parity.log"
|
||||
[account]
|
||||
password = ["{{ NODE_PWD }}"]
|
||||
unlock = ["{{ OWNER_ADDRESS }}"]
|
||||
unlock = ["{{ MOC_ADDRESS }}"]
|
||||
[mining]
|
||||
force_sealing = true
|
||||
engine_signer = "{{ OWNER_ADDRESS }}"
|
||||
engine_signer = "{{ MOC_ADDRESS }}"
|
||||
tx_gas_limit = "{{ TX_GAS_LIMIT }}"
|
||||
reseal_on_txs = "none"
|
||||
|
||||
- name: Install {{ NODE_PWD }} file
|
||||
template: src=node_pwd.j2 dest={{ home }}/{{ NODE_PWD }} owner={{ username }} group={{ username }} mode=0600
|
||||
|
||||
- name: Config OWNER_KEYFILE file
|
||||
shell: "echo '{{ OWNER_KEYFILE }}' > {{ home }}/parity_data/keys/OraclesPoA/{{ username }}.key"
|
||||
- name: Config MOC_KEYFILE file
|
||||
shell: "echo '{{ MOC_KEYFILE }}' > {{ home }}/parity_data/keys/OraclesPoA/{{ username }}.key"
|
||||
|
||||
- git: repo=https://github.com/{{ MAIN_REPO_FETCH }}/oracles-scripts-owner dest={{ home }}/oracles-scripts-owner version={{ SCRIPTS_OWNER_BRANCH }}
|
||||
- git: repo=https://github.com/{{ MAIN_REPO_FETCH }}/oracles-scripts-owner dest={{ home }}/oracles-scripts-owner version={{ SCRIPTS_MOC_BRANCH }}
|
||||
|
||||
- file: path={{ home }}/oracles-scripts-owner owner={{ username }} group={{ username }} recurse=yes
|
||||
|
|
@ -0,0 +1 @@
|
|||
{{ MOC_KEYPASS }}
|
|
@ -6,7 +6,7 @@ var config = function () {
|
|||
this.provider = new web3.providers.IpcProvider(this.ipcPath, net);
|
||||
this.bootstrapUrl = "https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/yeti/bootstrap.min.css";
|
||||
this.names = {
|
||||
"{{ OWNER_ADDRESS }}": "Owner",
|
||||
"{{ MOC_ADDRESS }}": "Owner",
|
||||
};
|
||||
}
|
||||
module.exports = config;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{{ OWNER_KEYPASS }}
|
|
@ -55,7 +55,7 @@
|
|||
template: src=node_pwd.j2 dest={{ home }}/{{ NODE_PWD }} owner={{ username }} group={{ username }} mode=0600
|
||||
|
||||
- name: Config MINING_KEYFILE file
|
||||
shell: "echo '{{ MINING_KEYFILE }}' > {{ home }}/parity_data/keys/OraclesPoA/mining.key.{{ MINING_ADDRESS }}"
|
||||
shell: "echo '{{ MINING_KEYFILE }}' > {{ home }}/parity_data/keys/OraclesPoA/validator.key.{{ MINING_ADDRESS }}"
|
||||
|
||||
- git: repo=https://github.com/{{ MAIN_REPO_FETCH }}/oracles-scripts-validator dest={{ home }}/oracles-scripts-validator version={{ SCRIPTS_VALIDATOR_BRANCH }}
|
||||
|
24
site.yml
24
site.yml
|
@ -29,12 +29,12 @@
|
|||
tags:
|
||||
- bootnode
|
||||
|
||||
- hosts: mining
|
||||
- hosts: validator
|
||||
vars:
|
||||
username: "mining"
|
||||
username: "validator"
|
||||
users:
|
||||
- name: "mining"
|
||||
home: "/home/mining"
|
||||
- name: "validator"
|
||||
home: "/home/validator"
|
||||
roles:
|
||||
- usermanager
|
||||
- nodejs
|
||||
|
@ -42,9 +42,9 @@
|
|||
- oracles-parity
|
||||
- oracles-pm2
|
||||
- oracles-netstats
|
||||
- mining
|
||||
- validator
|
||||
tags:
|
||||
- mining
|
||||
- validator
|
||||
|
||||
- hosts: netstat
|
||||
vars:
|
||||
|
@ -82,12 +82,12 @@
|
|||
tags:
|
||||
- explorer
|
||||
|
||||
- hosts: owner
|
||||
- hosts: moc
|
||||
vars:
|
||||
username: "owner"
|
||||
username: "moc"
|
||||
users:
|
||||
- name: "owner"
|
||||
home: "/home/owner"
|
||||
- name: "moc"
|
||||
home: "/home/moc"
|
||||
roles:
|
||||
- usermanager
|
||||
- nodejs
|
||||
|
@ -95,6 +95,6 @@
|
|||
- oracles-parity
|
||||
- oracles-pm2
|
||||
- oracles-netstats
|
||||
- owner
|
||||
- moc
|
||||
tags:
|
||||
- owner
|
||||
- moc
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: Create mining security group
|
||||
- name: Create validator security group
|
||||
hosts: localhost
|
||||
gather_facts: False
|
||||
tasks:
|
||||
|
@ -7,7 +7,7 @@
|
|||
ec2_group:
|
||||
ec2_access_key: "{{ access_key }}"
|
||||
ec2_secret_key: "{{ secret_key }}"
|
||||
name: mining-security
|
||||
name: validator-security
|
||||
description: "Default security group"
|
||||
region: "{{ region }}"
|
||||
# purge_rules_egress: true
|
||||
|
@ -30,10 +30,10 @@
|
|||
from_port: all
|
||||
to_port: all
|
||||
cidr_ip: 0.0.0.0/0
|
||||
tags: mining
|
||||
tags: validator
|
||||
|
||||
|
||||
- name: Create mining
|
||||
- name: Create validator
|
||||
hosts: localhost
|
||||
gather_facts: False
|
||||
vars:
|
||||
|
@ -48,11 +48,11 @@
|
|||
ec2_secret_key: "{{ secret_key }}"
|
||||
key_name: "{{ awskeypair_name }}"
|
||||
instance_tags:
|
||||
Name: "{{ mining_instance_name }}"
|
||||
group: "{{ mining_security_group }}"
|
||||
instance_type: "{{ mining_instance_type }}"
|
||||
Name: "{{ validator_instance_name }}"
|
||||
group: "{{ validator_security_group }}"
|
||||
instance_type: "{{ validator_instance_type }}"
|
||||
image: "{{ image }}"
|
||||
count: "{{ mining_count_instances }}"
|
||||
count: "{{ validator_count_instances }}"
|
||||
wait: yes
|
||||
region: "{{ region }}"
|
||||
vpc_subnet_id: "{{ vpc_subnet_id }}"
|
||||
|
@ -65,7 +65,7 @@
|
|||
- name: Wait for SSH to come up
|
||||
wait_for: host={{ item.public_ip }} port=22 delay=90 timeout=320 state=started
|
||||
with_items: "{{ ec2.instances }}"
|
||||
tags: mining
|
||||
tags: validator
|
||||
|
||||
- name: Installing python
|
||||
hosts: all
|
Loading…
Reference in New Issue