diff --git a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 index a01cbdc02..c12fc33ff 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-geth.nomad.j2 @@ -16,7 +16,6 @@ job "{{ job.name }}" { unlimited = false } {% endif %} - network { mode = "bridge" @@ -36,6 +35,34 @@ job "{{ job.name }}" { {% endfor %} } +config { + cni_config = jsonencode({ + "cniVersion": "0.4.0", // Updated CNI version + "name": "{{ job.name }}-network", + "plugins": [ + { + "type": "bridge", // CNI plugin type + "bridge": "br0", + "isGateway": true, + "ipMasq": true, + "ipam": { + "type": "host-local", + "subnet": "172.16.30.0/24", + "routes": [ + { + "dst": "0.0.0.0/0" + } + ] + } + }, + { + "type": "portmap", + "capabilities": { "portMappings": true } + } + ] + }) +} + task "node" { driver = "exec" diff --git a/infrastructure/nomad/playbooks/variables/profiles.yml b/infrastructure/nomad/playbooks/variables/profiles.yml index dab2d9f27..75df001b5 100644 --- a/infrastructure/nomad/playbooks/variables/profiles.yml +++ b/infrastructure/nomad/playbooks/variables/profiles.yml @@ -59,7 +59,7 @@ jobs: env: ip: 0.0.0.0 public_ip: "{{ ansible_facts['default_ipv4']['address'] }}" - net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32" + net_restrict: 172.16.30.0/8 type: bootnode mev_commit_geth_signer_node1: &mev_commit_geth_signer_node1_job @@ -79,7 +79,7 @@ jobs: static: 30311 env: ip: 127.0.0.1 - net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32" + net_restrict: 172.16.30.0/8 type: signer port: 30311 @@ -100,7 +100,7 @@ jobs: static: 30312 env: ip: 127.0.0.1 - net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32" + net_restrict: 172.16.30.0/8 type: signer port: 30312 @@ -121,7 +121,7 @@ jobs: static: 30313 env: ip: 127.0.0.1 - net_restrict: "{{ ansible_facts['default_ipv4']['address'] }}/32" + net_restrict: 172.16.30.0/24 type: signer port: 30313