This commit is contained in:
ArseniiPetrovich 2018-04-20 14:03:42 +03:00
parent 35bad690ac
commit d111f94dca
17 changed files with 32 additions and 22 deletions

View File

@ -1,5 +1,7 @@
---
user: ubuntu
allow_bootnode_ssh: true
allow_bootnode_p2p: true
allow_bootnode_rpc: false

View File

@ -1,5 +1,7 @@
-----
user: ubuntu
allow_explorer_ssh: true
allow_explorer_p2p: true
allow_explorer_http: true

View File

@ -3,8 +3,8 @@
"name" : "explorer",
"script" : "./bin/www",
"log_date_format" : "YYYY-MM-DD HH:mm:SS Z",
"error_file" : "/home/{{ username }}/logs/explorer.err",
"out_file" : "/home/{{ username }}/logs/explorer.out",
"error_file" : "{{ home }}/logs/explorer.err",
"out_file" : "{{ home }}/logs/explorer.out",
"merge_logs" : false,
"watch" : false,
"max_restarts" : 100,

View File

@ -2,7 +2,7 @@ var web3 = require('web3');
var net = require('net');
var config = function () {
this.logFormat = "combined";
this.ipcPath = "/home/{{ username }}/parity_data/jsonrpc.ipc";
this.ipcPath = "{{ home }}/parity_data/jsonrpc.ipc";
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 = {

View File

@ -7,7 +7,7 @@ RemainAfterExit=true
User={{ username }}
Group={{ username }}
Environment=MYVAR=myval
WorkingDirectory=/home/{{ username }}/chain-explorer
WorkingDirectory={{ home }}/chain-explorer
ExecStart=/usr/bin/pm2 startOrRestart app.json
[Install]
WantedBy=multi-user.target

View File

@ -1,4 +1,6 @@
---
user: ubuntu
allow_moc_ssh: true
allow_moc_p2p: true

View File

@ -1,4 +1,6 @@
---
user: ubuntu
allow_netstat_ssh: true
allow_netstat_http: true

View File

@ -11,7 +11,7 @@
- name: install npm netstats
npm:
path: "/home/{{ username }}/eth-netstats"
path: "{{ home }}/eth-netstats"
become: true
become_user: "{{ username }}"
notify:
@ -23,16 +23,16 @@
global: yes
- name: run grunt process
shell: "cd /home/{{ username }}/eth-netstats; grunt"
shell: "cd {{ home }}/eth-netstats; grunt"
become: true
become_user: "{{ username }}"
args:
creates: "/home/{{ username }}/dist"
creates: "{{ home }}/dist"
- name: Config ws_secret.json file
copy:
content: '["{{ NETSTATS_SECRET }}"]'
dest: "/home/{{ username }}/eth-netstats/ws_secret.json"
dest: "{{ home }}/eth-netstats/ws_secret.json"
notify:
- restart poa-dashboard

View File

@ -5,7 +5,7 @@ After=network.target
User={{ username }}
Group={{ username }}
Environment=MYVAR=myval
WorkingDirectory=/home/{{ username }}/eth-netstats
WorkingDirectory={{ home }}/eth-netstats
Restart=always
ExecStart=/usr/bin/npm start
[Install]

View File

@ -1,4 +1,4 @@
/home/{{ username }}/logs/*.log {
{{ home }}/logs/*.log {
rotate 10
size 200M
missingok
@ -9,7 +9,7 @@
olddir old
}
/home/{{ username }}/logs/*.err {
{{ home }}/logs/*.err {
rotate 10
size 200M
missingok
@ -20,7 +20,7 @@
olddir old
}
/home/{{ username }}/logs/*.out {
{{ home }}/logs/*.out {
rotate 10
size 200M
missingok
@ -31,7 +31,7 @@
olddir old
}
/home/{{ username }}/.pm2/pm2.log {
{{ home }}/.pm2/pm2.log {
su {{ username }} {{ username }}
rotate 10
size 200M

View File

@ -1,2 +1,2 @@
#!/bin/bash
/usr/sbin/logrotate /home/{{ username }}/poa-logrotate.conf
/usr/sbin/logrotate {{ home }}/poa-logrotate.conf

View File

@ -31,7 +31,7 @@
- name: install npm netstats
npm:
path: "/home/{{ username }}/eth-net-intelligence-api"
path: "{{ home }}/eth-net-intelligence-api"
become: true
become_user: "{{ username }}"
notify:

View File

@ -3,8 +3,8 @@
"name" : "netstats_daemon",
"script" : "app.js",
"log_date_format" : "YYYY-MM-DD HH:mm:SS Z",
"error_file" : "/home/{{ username }}/logs/netstats_daemon.err",
"out_file" : "/home/{{ username }}/logs/netstats_daemon.out",
"error_file" : "{{ home }}/logs/netstats_daemon.err",
"out_file" : "{{ home }}/logs/netstats_daemon.out",
"merge_logs" : false,
"watch" : false,
"max_restarts" : 100,

View File

@ -7,7 +7,7 @@ RemainAfterExit=true
User={{ username }}
Group={{ username }}
Environment=MYVAR=myval
WorkingDirectory=/home/{{ username }}/eth-net-intelligence-api
WorkingDirectory={{ home }}/eth-net-intelligence-api
ExecStart=/usr/bin/pm2 startOrRestart app.json
[Install]
WantedBy=multi-user.target

View File

@ -4,7 +4,7 @@ After=poa-parity.service
[Service]
User={{ username }}
Group={{ username }}
WorkingDirectory=/home/{{ username }}
ExecStart=/home/{{ username }}/parity-orchestrator --config=parity-orchestrator.toml
WorkingDirectory={{ home }}
ExecStart={{ home }}/parity-orchestrator --config=parity-orchestrator.toml
[Install]
WantedBy=multi-user.target

View File

@ -3,8 +3,8 @@
"name" : "explorer",
"script" : "./bin/www",
"log_date_format" : "YYYY-MM-DD HH:mm:SS Z",
"error_file" : "/home/{{ username }}/logs/explorer.err",
"out_file" : "/home/{{ username }}/logs/explorer.out",
"error_file" : "{{ home }}/logs/explorer.err",
"out_file" : "{{ home }}/logs/explorer.out",
"merge_logs" : false,
"watch" : false,
"max_restarts" : 100,

View File

@ -1,5 +1,7 @@
---
user: ubuntu
allow_validator_ssh: true
allow_validator_p2p: true