Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
age 1.2.1
helm 3.15.3
sops 3.8.1
sops 3.13.3
shellcheck 0.11.0
python 3.12.12
awscli 2.22.26
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This repository contains the infrastructure code used to setup ~all~ dev/testnet
Status | Network | Links | Ansible | Terraform | Kubernetes
------ | -------- | ---- | ----- | ------- | ------
WIP | [devnet-0](https://notes.ethereum.org/@ethpandaops/dc-devnet-0) | [Network config](network-configs/devnet-0) / [Inventory](https://bootnode-1.srv.dc-devnet-0.ethpandaops.io/meta/api/v1/inventory.json) / [Validator ranges](https://bootnode-1.srv.dc-devnet-0.ethpandaops.io/meta/api/v1/validator-ranges.json) | [🔗](ansible/inventories/devnet-0) | [🔗](terraform/devnet-0) | -
WIP | [devnet-1](https://notes.ethereum.org/@ethpandaops/dc-devnet-1) | [Network config](network-configs/devnet-1) / [Inventory](https://bootnode-1.srv.dc-devnet-1.ethpandaops.io/meta/api/v1/inventory.json) / [Validator ranges](https://bootnode-1.srv.dc-devnet-1.ethpandaops.io/meta/api/v1/validator-ranges.json) | [🔗](ansible/inventories/devnet-1) | [🔗](terraform/devnet-1) | -

# Development
## Version management for tools
Expand Down
4 changes: 2 additions & 2 deletions ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ansible_managed = Ansible managed. Don't change this file manually. Template info: {{{{ (template_fullpath | replace(playbook_dir,'')) }}}}
stdout_callback = default
callback_result_format = yaml
inventory = inventories/devnet-0/inventory.ini
inventory = inventories/devnet-1/inventory.ini
roles_path = vendor/roles/:roles
collections_path = vendor/collections
forks = 100
Expand All @@ -19,7 +19,7 @@ fact_caching = jsonfile
# Keep facts forever
fact_caching_timeout = 0
# Where to store the fact cache
fact_caching_connection = tmp/devnet-0/
fact_caching_connection = tmp/devnet-1/

[inventory]
enable_plugins = script, yaml, ini
Expand Down
85 changes: 85 additions & 0 deletions ansible/inventories/devnet-1/group_vars/all/00-defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
ansible_user: devops
ansible_python_interpreter: /usr/bin/python3
# Template name refers to the name of the devnet without number
# Generally refer to the first word of the repository name
# e.g. peerdas, or pectra
devnet_name: dc

# IPv6 Specific configuration
global_ipv6_enabled: true

# Per-service IPv6 offset within the host's assigned prefix.
# DO /124 has only ::3..::f usable, so offsets must stay small.
# Use end of range for static assignments, start will be auto assigned to remaining containers.
service_ipv6_offsets:
nginx_proxy: 15 # :f
execution: 14 # :e
snooper_engine: 13 # :d
snooper_rpc: 12 # :c
beacon: 11 # :b
validator: 10 # :a

# Derive host IPv6 prefix from the Terraform-provided `ipv6` host var.
# Hetzner gives a /64, DO gives a /124.
host_ipv6_prefix_length: "{{ '64' if cloud | default('') == 'hetzner' else '124' }}"
host_ipv6_prefix: "{{ (ipv6 | default('')) | ansible.utils.ipsubnet(host_ipv6_prefix_length | int) if (ipv6 | default('')) | length > 0 else '' }}"

######################################################
##
## Role specific overwrites
##
######################################################

# role: ethpandaops.general.bootstrap
bootstrap_user: root
bootstrap_default_user_authorized_keys_github:
- barnabasbusa
- parithosh
- samcm
- savid
- skylenet
- pk910
- mattevans
- qu0b

# role: robertdebock.fail2ban
fail2ban_loglevel: INFO
fail2ban_logtarget: /var/log/fail2ban.log
fail2ban_maxretry: 10
fail2ban_bantime: 600
fail2ban_ignoreips:
- "127.0.0.1/8 ::1"
- "{{ lookup('ansible.builtin.url', 'http://ifconfig.me/ip', split_lines=False) }}/32" # Avoid banning ourself


# role: ethpandaops.general.docker_network
docker_network_name: shared
docker_network_enable_ipv6: "{{ global_ipv6_enabled | default(false) | bool and (host_ipv6_prefix | default('') | length > 0) }}"
docker_network_driver_options: >-
{{ {'com.docker.network.bridge.gateway_mode_ipv6': 'routed'}
if (docker_network_enable_ipv6 | bool) else {} }}
docker_network_ipam_config: >-
{{ [{'subnet': host_ipv6_prefix,
'gateway': host_ipv6_prefix | ansible.utils.ipaddr(1) | ansible.utils.ipaddr('address')}]
if (docker_network_enable_ipv6 | bool) else [] }}
docker_network_ipv6_pool: >-
{{ (host_ipv6_prefix | ansible.utils.ipsubnet(124, 0))
if (docker_network_enable_ipv6 | bool) else '' }}

docker_networks_shared:
- name: "{{ docker_network_name }}"

# role: geerlingguy.docker
docker_users:
- devops
docker_daemon_options:
"log-driver": "json-file"
"log-opts":
"max-size": "500m"
"max-file": "8"

# role: ethpandaops.general.prometheus
prometheus_container_networks: "{{ docker_networks_shared }}"

# role: ethpandaops.general.ethereum_node
ethereum_node_images_always_pull: true
Loading
Loading