host ERA files under mainnet.era.nimbus.team domain

https://github.com/status-im/infra-nimbus/issues/126

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-11-08 17:51:08 +01:00
parent 1a49e60147
commit f75c94e6f5
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
3 changed files with 54 additions and 0 deletions

20
ansible/era.yml Normal file
View File

@ -0,0 +1,20 @@
---
- name: Verify Ansible versions
hosts: all
tags: always
become: false
run_once: true
gather_facts: false
tasks:
- local_action: command ./versioncheck.py
changed_when: false
- name: Configure ERA files hosting
become: true
hosts:
- metal-03.he-eu-hel1.nimbus.mainnet
roles:
- role: origin-certs
tags: origin-certs
- role: nginx
tags: nginx

View File

@ -0,0 +1,25 @@
---
era_files_domain: 'mainnet.era.nimbus.team'
era_files_path: '/data/era'
# CloudFlare Origin certificates
origin_certs:
- domain: 'nimbus.team'
crt: '{{lookup("bitwarden", "CloudFlare/nimbus.team", file="origin.crt")}}'
key: '{{lookup("bitwarden", "CloudFlare/nimbus.team", file="origin.key")}}'
nginx_sites:
era_files:
- listen 80 default_server
- listen 443 ssl
- server_name {{ era_files_domain }}
- ssl_certificate /certs/nimbus.team/origin.crt
- ssl_certificate_key /certs/nimbus.team/origin.key
- location / {
root {{ era_files_path }};
autoindex on;
autoindex_format html;
}

View File

@ -40,6 +40,15 @@ resource "cloudflare_record" "testing_mainnet_beacon_api" {
type = "A"
proxied = false
}
/* ERA Files hosting */
resource "cloudflare_record" "era_mainnet" {
zone_id = local.zones["nimbus.team"]
name = "mainnet.era"
value = module.nimbus_nodes_mainnet_hetzner.public_ips[2]
type = "A"
proxied = true
}
/* WARNING: These are bootnodes and losing their IPs and private keys would be bad. */
module "nimbus_nodes_mainnet_stable_small" {