Merge branch 'master' into platformvm-caching

This commit is contained in:
Stephen Buttolph 2020-04-30 18:14:01 -04:00 committed by GitHub
commit 9ac26bde32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 106 additions and 52 deletions

24
.github/workflows/ansible-lint.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Ansible Lint
on:
- pull_request
- push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lint Ansible playbooks
# Lastest commit, as of 30 Apr 2020
uses: ansible/ansible-lint-action@6c8c141
with:
targets: |
scripts/ansible/kill_playbook.yml
scripts/ansible/ping_playbook.yml
scripts/ansible/restart_playbook.yml
scripts/ansible/update_playbook.yml
args:
-c scripts/ansible/.ansible-lint

View File

@ -0,0 +1,7 @@
parsable: true
skip_list:
- '301' # Commands should not change things if nothing needs doing
- '204' # Lines should be no longer than 160 chars
- '502' # All tasks should be named
# vim: filetype=yaml

View File

@ -4,6 +4,5 @@
connection: ssh
gather_facts: false
hosts: all
tasks:
- name: Kill Node
command: killall ava
roles:
- name: ava-stop

View File

@ -6,6 +6,4 @@
hosts: all
tasks:
- name: Ping node
shell: "ls"
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
ping:

View File

@ -9,30 +9,8 @@
repo_folder: ~/go/src/github.com/ava-labs/gecko
repo_name: ava-labs/gecko-internal
repo_branch: platformvm-proposal-accept
tasks:
- name: Kill Node
command: killall ava
ignore_errors: yes
- git:
repo: ssh://git@github.com/{{ repo_name }}.git
dest: "{{ repo_folder }}"
version: "{{ repo_branch }}"
update: yes
- name: Build project
command: ./scripts/build.sh
args:
chdir: "{{ repo_folder }}"
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
- name: Remove previous database
file:
path: "{{ db_dir }}"
state: absent
- name: Remove previous logs
file:
path: "{{ log_dir }}"
state: absent
- name: Start node
shell: "nohup {{ ava_binary }} --network-id={{ network_id }} --api-admin-enabled={{ api_admin_enabled }} --api-keystore-enabled={{ api_keystore_enabled }} --api-metrics-enabled={{ api_metrics_enabled }} --ava-tx-fee={{ ava_tx_fee }} --assertions-enabled={{ assertions_enabled }} --signature-verification-enabled={{ signature_verification_enabled }} --db-enabled={{ db_enabled }} --db-dir={{ db_dir }} --http-port={{ http_port }} --http-tls-enabled={{ http_tls_enabled }} --http-tls-key-file={{ http_tls_key_file }} --http-tls-cert-file={{ http_tls_cert_file }} --bootstrap-ips={{ bootstrap_ips }} --bootstrap-ids={{ bootstrap_ids }} --public-ip={{ ansible_host }} --staking-port={{ staking_port }} --staking-tls-enabled={{ staking_tls_enabled }} --staking-tls-key-file={{ staking_tls_key_file }} --staking-tls-cert-file={{ staking_tls_cert_file }} --plugin-dir={{ plugin_dir }} --log-dir={{ log_dir }} --log-level={{ log_level }} --snow-sample-size={{ snow_sample_size }} --snow-quorum-size={{ snow_quorum_size }} --snow-virtuous-commit-threshold={{ snow_virtuous_commit_threshold }} --snow-rogue-commit-threshold={{ snow_rogue_commit_threshold }} --snow-avalanche-num-parents={{ snow_avalanche_num_parents }} --snow-avalanche-batch-size={{ snow_avalanche_batch_size }} --api-ipcs-enabled={{ api_ipcs_enabled }} --xput-server-enabled={{ xput_server_enabled }} --xput-server-port={{ xput_server_port }} >/dev/null 2>&1 &"
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
roles:
- name: ava-stop
- name: ava-build
- name: ava-reset
- name: ava-start

View File

@ -0,0 +1,13 @@
- name: Update git clone
git:
repo: ssh://git@github.com/{{ repo_name }}.git
dest: "{{ repo_folder }}"
version: "{{ repo_branch }}"
update: yes
- name: Build project
command: ./scripts/build.sh
args:
chdir: "{{ repo_folder }}"
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin

View File

@ -0,0 +1,9 @@
- name: Remove previous database
file:
path: "{{ db_dir }}"
state: absent
- name: Remove previous logs
file:
path: "{{ log_dir }}"
state: absent

View File

@ -0,0 +1,38 @@
- name: Start node
shell:
nohup {{ ava_binary }}
--network-id="{{ network_id }}"
--api-admin-enabled="{{ api_admin_enabled }}"
--api-keystore-enabled="{{ api_keystore_enabled }}"
--api-metrics-enabled="{{ api_metrics_enabled }}"
--ava-tx-fee="{{ ava_tx_fee }}"
--assertions-enabled="{{ assertions_enabled }}"
--signature-verification-enabled="{{ signature_verification_enabled }}"
--db-enabled="{{ db_enabled }}"
--db-dir="{{ db_dir }}"
--http-port="{{ http_port }}"
--http-tls-enabled="{{ http_tls_enabled }}"
--http-tls-key-file="{{ http_tls_key_file }}"
--http-tls-cert-file="{{ http_tls_cert_file }}"
--bootstrap-ips="{{ bootstrap_ips }}"
--bootstrap-ids="{{ bootstrap_ids }}"
--public-ip="{{ ansible_host }}"
--staking-port="{{ staking_port }}"
--staking-tls-enabled="{{ staking_tls_enabled }}"
--staking-tls-key-file="{{ staking_tls_key_file }}"
--staking-tls-cert-file="{{ staking_tls_cert_file }}"
--plugin-dir="{{ plugin_dir }}"
--log-dir="{{ log_dir }}"
--log-level="{{ log_level }}"
--snow-sample-size="{{ snow_sample_size }}"
--snow-quorum-size="{{ snow_quorum_size }}"
--snow-virtuous-commit-threshold="{{ snow_virtuous_commit_threshold }}"
--snow-rogue-commit-threshold="{{ snow_rogue_commit_threshold }}"
--snow-avalanche-num-parents="{{ snow_avalanche_num_parents }}"
--snow-avalanche-batch-size="{{ snow_avalanche_batch_size }}"
--api-ipcs-enabled="{{ api_ipcs_enabled }}"
--xput-server-enabled="{{ xput_server_enabled }}"
--xput-server-port="{{ xput_server_port }}"
>/dev/null 2>&1 &
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin

View File

@ -0,0 +1,3 @@
- name: Kill Node
command: killall ava
ignore_errors: true

View File

@ -9,22 +9,7 @@
repo_folder: ~/go/src/github.com/ava-labs/gecko
repo_name: ava-labs/gecko-internal
repo_branch: platformvm-proposal-accept
tasks:
- name: Kill Node
command: killall ava
ignore_errors: yes
- git:
repo: ssh://git@github.com/{{ repo_name }}.git
dest: "{{ repo_folder }}"
version: "{{ repo_branch }}"
update: yes
- name: Build project
command: ./scripts/build.sh
args:
chdir: "{{ repo_folder }}"
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
- name: Start node
shell: "nohup {{ ava_binary }} --network-id={{ network_id }} --api-admin-enabled={{ api_admin_enabled }} --api-keystore-enabled={{ api_keystore_enabled }} --api-metrics-enabled={{ api_metrics_enabled }} --ava-tx-fee={{ ava_tx_fee }} --assertions-enabled={{ assertions_enabled }} --signature-verification-enabled={{ signature_verification_enabled }} --db-enabled={{ db_enabled }} --db-dir={{ db_dir }} --http-port={{ http_port }} --http-tls-enabled={{ http_tls_enabled }} --http-tls-key-file={{ http_tls_key_file }} --http-tls-cert-file={{ http_tls_cert_file }} --bootstrap-ips={{ bootstrap_ips }} --bootstrap-ids={{ bootstrap_ids }} --public-ip={{ ansible_host }} --staking-port={{ staking_port }} --staking-tls-enabled={{ staking_tls_enabled }} --staking-tls-key-file={{ staking_tls_key_file }} --staking-tls-cert-file={{ staking_tls_cert_file }} --plugin-dir={{ plugin_dir }} --log-dir={{ log_dir }} --log-level={{ log_level }} --snow-sample-size={{ snow_sample_size }} --snow-quorum-size={{ snow_quorum_size }} --snow-virtuous-commit-threshold={{ snow_virtuous_commit_threshold }} --snow-rogue-commit-threshold={{ snow_rogue_commit_threshold }} --snow-avalanche-num-parents={{ snow_avalanche_num_parents }} --snow-avalanche-batch-size={{ snow_avalanche_batch_size }} --api-ipcs-enabled={{ api_ipcs_enabled }} --xput-server-enabled={{ xput_server_enabled }} --xput-server-port={{ xput_server_port }} >/dev/null 2>&1 &"
environment:
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
roles:
- name: ava-stop
- name: ava-build
- name: ava-start