-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
716 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Build docker image | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
# push: | ||
# branches: [main] | ||
workflow_dispatch: | ||
|
||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Snapshots | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 */2 * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
generate-snapshots: | ||
name: Generate snapshot | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
playbook: | ||
- snapshots_crab | ||
- snapshots_darwinia | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run playbook | ||
uses: dawidd6/action-ansible-playbook@v2 | ||
with: | ||
playbook: ansible/playbooks/${{ matrix.playbook }}/playbook.yml | ||
key: "${{ secrets.SSH_PRIVATE_KEY }}" | ||
options: --user ansible --verbose --diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.retry | ||
.DS_Store | ||
*.local.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# ansible-playbooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[defaults] | ||
inventory = inventories/hosts.ini | ||
roles_path = ~/.ansible/roles:./roles | ||
|
||
stdout_callback = debug | ||
callbacks_enabled = profile_tasks | ||
|
||
force_color = 1 | ||
host_key_checking = False | ||
hash_behaviour = merge | ||
|
||
[privilege_escalation] | ||
become = True | ||
|
||
[connection] | ||
pipelining = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[crab_nodes] | ||
g1.crab2.darwinia.network | ||
|
||
[darwinia_nodes] | ||
g1.darwinia2.darwinia.network | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
- name: Install essentials packages | ||
tags: | ||
- apt | ||
apt: | ||
name: "{{ item }}" | ||
state: present | ||
cache_valid_time: 3600 | ||
update_cache: true | ||
loop: | ||
- curl | ||
- nload | ||
- unzip # required by unarchive module | ||
- gnupg # required by apt_repository module | ||
- parted # required by parted module | ||
- zstd # required by unarchive module (.tar.zst files) | ||
- jq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- hosts: all:!skip_essentials | ||
gather_facts: false | ||
tasks: | ||
- include_tasks: _essentials/tools.yml | ||
|
16 changes: 16 additions & 0 deletions
16
ansible/playbooks/snapshots_crab/host_vars/g1.crab2.darwinia.network.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
|
||
snapshots: | ||
gcp_project: darwinia2 | ||
gcp_snapshots_source_disk: crab-g1-data | ||
gcp_snapshots_zone: asia-southeast1-c | ||
gcp_snapshots_name: snapshots-crab-g1 | ||
gcp_snapshots_storage_location: asia-southeast1 | ||
|
||
chain_name: crab2 | ||
data_path: crab2/data | ||
mounted_device: /dev/sdc | ||
work_server: crab-g1 | ||
snapshots_workdir: /mnt/snapshots | ||
bucket_name: snapshots.crab.network | ||
website_title: "Crab Network Snapshots" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- hosts: g1.crab2.darwinia.network | ||
roles: | ||
- snapshots |
16 changes: 16 additions & 0 deletions
16
ansible/playbooks/snapshots_darwinia/host_vars/g1.darwinia2.darwinia.network.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
|
||
snapshots: | ||
gcp_project: darwinia2 | ||
gcp_snapshots_source_disk: darwinia-g1-data | ||
gcp_snapshots_zone: asia-southeast1-c | ||
gcp_snapshots_name: snapshots-darwinia-g1 | ||
gcp_snapshots_storage_location: asia-southeast1 | ||
|
||
chain_name: darwinia2 | ||
data_path: darwinia2/data | ||
mounted_device: /dev/sdc | ||
work_server: darwinia-g1 | ||
snapshots_workdir: /mnt/snapshots | ||
bucket_name: snapshots.darwinia.network | ||
website_title: "Darwinia Network Snapshots" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- hosts: g1.darwinia2.darwinia.network | ||
roles: | ||
- snapshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
snapshots: | ||
workdir: /tmp/node_snapshots | ||
|
||
gcp_project: darwinia2 | ||
gcp_snapshots_source_disk: pangolin-g2-data | ||
gcp_snapshots_zone: europe-west4-c | ||
gcp_snapshots_name: snapshots-pangolin-g2 | ||
gcp_snapshots_storage_location: europe-west4 | ||
|
||
chain_name: pangolin2 | ||
chain_node_rpc: http://127.0.0.1:9944 | ||
data_path: pangolin2/data | ||
mounted_device: /dev/sdc | ||
work_server: pangolin-g2 | ||
snapshots_workdir: /mnt/snapshots | ||
bucket_name: snapshots.crab.network | ||
website_title: "Pangolin Network Snapshots" | ||
|
||
gomplate_version: v3.11.4 |
Oops, something went wrong.