Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ cd autoclock-rpc
- this command can take between 10-20 minutes based on the specs of the machine
- it takes long because it does everything necessary to start the validator (format disks, checkout the solana repo and build it, download the latest snapshot, etc.)
- make sure that the solana_version is up to date (see below)
- check the values set in `defaults/main.yml` and update to the values you want
- check the values set in `roles/solana-rpc/defaults/main.yml` and update to the values you want

```
time ansible-playbook runner.yaml
ansible-playbook playbook.yml
```

#### ~ Parameters explained ~
Expand Down
7 changes: 0 additions & 7 deletions fstab.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: Install/configure Solana RPC
hosts: all
gather_facts: yes
roles:
- { role: solana-rpc }
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 7 additions & 4 deletions tasks/disks.yaml → roles/solana-rpc/tasks/disks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@
shell: mkfs.ext4 /dev/{{ raid_name.stdout }}
when: raid_name.rc == 0 and mount_mnt.rc != 0

- name: mount disks
- name: mount disks and write entry in fstab
become: true
become_user: root
shell: mount /dev/{{ raid_name.stdout }} /mnt
when: mount_mnt.rc != 0

mount:
path: /mnt
src: /dev/{{ raid_name.stdout }}
fstype: ext4
state: mounted
when: raid_name.rc == 0 and mount_mnt.rc != 0
22 changes: 6 additions & 16 deletions tasks/file_setup.yaml → roles/solana-rpc/tasks/file_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,11 @@
group: solana
mode: "0755"

- name: setup sol.service
become: true
become_user: root
template:
src: sol.service
dest: /etc/systemd/system/sol.service
owner: root
group: root
mode: "0755"

- name: copy restart.sh
become: true
become_user: solana
template:
src: restart.sh
copy:
src: files/restart.sh
dest: /home/solana/restart.sh
owner: solana
group: solana
Expand All @@ -31,17 +21,17 @@
- name: copy snapcheck.py
become: true
become_user: solana
template:
src: snapcheck.py
copy:
src: files/snapcheck.py
dest: /mnt/snapcheck.py
owner: solana
group: solana

- name: copy snapshot-finder.py
become: true
become_user: solana
template:
src: snapshot-finder.py
copy:
src: files/snapshot-finder.py
dest: /mnt/snapshot-finder.py
owner: solana
group: solana
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions tasks/main.yaml → roles/solana-rpc/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
include_tasks: snapshot_downloader.yaml
when: download_snapshot|default(true)|bool == true

- name: solana service
include_tasks: service.yaml

- name: restart without waiting
become: true
become_user: root
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions roles/solana-rpc/tasks/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- name: setup sol.service
become: true
become_user: root
copy:
src: files/sol.service
dest: /etc/systemd/system/sol.service
owner: root
group: root
mode: "0755"

- name: Enable service sol
become: true
become_user: root
systemd:
name: sol.service
enabled: yes
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
become: true
become_user: solana
shell: python3 /mnt/snapshot-finder.py --snapshot_path /mnt/solana-snapshots --version {{ solana_version }}

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions runner.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions test_runner.yaml

This file was deleted.