mirror of
https://github.com/matter-labs/ansible-en-role.git
synced 2025-12-06 02:49:55 +00:00
added an example
This commit is contained in:
23
example_playbooks/mainnet_with_snapshots_recovery/README.md
Normal file
23
example_playbooks/mainnet_with_snapshots_recovery/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Mainnet Snapshots Recovery playbook
|
||||
|
||||
This directory is simple example how to set up EN using this role. It comes with snapshots recovery enabled by default.\
|
||||
**Note that for simplicity it's using postgres database
|
||||
with a very unsecure password and the EN is just started on the same machine**
|
||||
|
||||
To run this playbook, first install dependencies
|
||||
|
||||
```shell
|
||||
ansible-galaxy install -r requirements.yml
|
||||
```
|
||||
|
||||
and then you can run the playbook using
|
||||
|
||||
```shell
|
||||
ansible-playbook playbook.yml -i hosts.ini -K
|
||||
```
|
||||
|
||||
To see logs you can use
|
||||
|
||||
```shell
|
||||
docker logs en-external_node-1
|
||||
```
|
||||
@ -0,0 +1,2 @@
|
||||
[local]
|
||||
localhost ansible_connection=local
|
||||
@ -0,0 +1,15 @@
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
database_name: "zksync_ext_node_mainnet"
|
||||
database_username: "postgres"
|
||||
database_password: "notsecurepassword"
|
||||
eth_l1_url: "https://ethereum-rpc.publicnode.com"
|
||||
main_node_url: "https://zksync2-mainnet.zksync.io"
|
||||
l1_chain_id: "1"
|
||||
l2_chain_id: "324"
|
||||
enable_snapshots_recovery: true
|
||||
snapshots_bucket_base_url: "zksync-era-mainnet-external-node-snapshots"
|
||||
|
||||
roles:
|
||||
- external_node
|
||||
@ -0,0 +1,13 @@
|
||||
---
|
||||
roles:
|
||||
- name: geerlingguy.docker
|
||||
src: https://github.com/geerlingguy/ansible-role-docker
|
||||
version: "7.1.0"
|
||||
|
||||
- name: external_node
|
||||
src: https://github.com/matter-labs/ansible-en-role
|
||||
version: "v3.0.0"
|
||||
|
||||
collections:
|
||||
- name: community.general
|
||||
version: 8.4.0
|
||||
Reference in New Issue
Block a user