diff --git a/ansible/host_vars/testing-large-01.aws-eu-central-1a.nimbus.prater.yml b/ansible/host_vars/testing-large-01.aws-eu-central-1a.nimbus.prater.yml new file mode 100644 index 0000000..b398786 --- /dev/null +++ b/ansible/host_vars/testing-large-01.aws-eu-central-1a.nimbus.prater.yml @@ -0,0 +1,30 @@ +--- +# Builds use quite a bit of RAM +swap_file_size_mb: 4096 + +# Docker image builds +beacon_node_builds_docker_hub_user: '{{lookup("passwordstore", "cloud/DockerHub/user")}}' +beacon_node_builds_docker_hub_token: '{{lookup("passwordstore", "cloud/DockerHub/token")}}' + +# The -large suffix is because of native compilation. +beacon_node_builds_branches: + - name: 'unstable-libp2p-unstable-large' + version: 'nim-libp2p-auto-bump-unstable' + frequency: '*-*-* 18:00:00' + + - name: 'unstable-large' + version: 'unstable' + frequency: '*-*-* 10:00:00' + + - name: 'testing-large' + version: 'testing' + frequency: '*-*-* 06:00:00' + + - name: 'stable-large' + version: 'stable' + frequency: '*-*-* 02:00:00' + + - name: 'deploy-eth2-prod' + version: 'v1.4.1' + enabled: false + update: true diff --git a/ansible/prater.yml b/ansible/prater.yml index 3ce4d4b..3348d86 100644 --- a/ansible/prater.yml +++ b/ansible/prater.yml @@ -12,7 +12,7 @@ - name: Deploy beacon node build nodes become: true hosts: - - testing-large-01.aws-eu-central-1a.nimbus.pyrmont + - testing-large-01.aws-eu-central-1a.nimbus.prater roles: - role: swap-file tags: swap-file diff --git a/ansible/requirements.yml b/ansible/requirements.yml index c4a43e1..7e6a9cf 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -16,7 +16,7 @@ - name: infra-role-bootstrap-linux src: git@github.com:status-im/infra-role-bootstrap-linux.git - version: 53e96605481a84542702bd72e94a58eb63da9c9e + version: a51317d65e30ca9609778619195df96c8d05ba42 scm: git - name: infra-role-bootstrap-windows @@ -31,7 +31,7 @@ - name: oauth-proxy src: git@github.com:status-im/infra-role-oauth-proxy.git - version: 567b4cf59d97f87be78e77e62684214f6de03096 + version: 05ef1410abe09db6df6e58ca14c556b7e2c383d7 scm: git - name: consul-service diff --git a/ansible/roles/beacon-node-builds/README.md b/ansible/roles/beacon-node-builds/README.md index 02ba4a4..a26823d 100644 --- a/ansible/roles/beacon-node-builds/README.md +++ b/ansible/roles/beacon-node-builds/README.md @@ -10,8 +10,9 @@ The minimal configuration would look something like: beacon_node_builds_branches: - name: 'xyz' version: 'feature/xyz' - targets: ['nimbus_beacon_node', 'nimbus_signing_process'] frequency: '*-*-* 02:00:00' + enabled: true + update: true # Required to push Docker images beacon_node_builds_docker_hub_user: 'docker-hub-user' diff --git a/ansible/roles/beacon-node-builds/defaults/main.yml b/ansible/roles/beacon-node-builds/defaults/main.yml index 993f203..189f65b 100644 --- a/ansible/roles/beacon-node-builds/defaults/main.yml +++ b/ansible/roles/beacon-node-builds/defaults/main.yml @@ -14,6 +14,5 @@ beacon_node_build_timer_timeout: 3600 beacon_node_builds_branches: [] # - name: 'unstable' # version: 'unstable' -# targets: ['nimbus_beacon_node', 'nimbus_signing_process'] # frequency: '*-*-* 10:00:00' # enabled: false diff --git a/ansible/roles/beacon-node-builds/templates/Dockerfile.j2 b/ansible/roles/beacon-node-builds/templates/Dockerfile.j2 index 9f43678..d87db50 100644 --- a/ansible/roles/beacon-node-builds/templates/Dockerfile.j2 +++ b/ansible/roles/beacon-node-builds/templates/Dockerfile.j2 @@ -7,12 +7,11 @@ RUN apt-get -qq update \ && apt-get -qq clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -{% for target in item.targets %} -COPY repo/build/{{ target }}_${COMMIT} /usr/local/bin/{{ target }} -{% endfor %} +COPY repo/build/nimbus_beacon_node_${COMMIT} /usr/local/bin/nimbus_beacon_node +COPY repo/build/nimbus_signing_process_${COMMIT} /usr/local/bin/nimbus_signing_process STOPSIGNAL SIGINT -ENTRYPOINT ["/usr/local/bin/{{ item.targets | first }}"] +ENTRYPOINT ["/usr/local/bin/nimbus_beacon_node"] CMD ["--help"] diff --git a/ansible/roles/beacon-node-builds/templates/build.sh.j2 b/ansible/roles/beacon-node-builds/templates/build.sh.j2 index d722503..288fccb 100644 --- a/ansible/roles/beacon-node-builds/templates/build.sh.j2 +++ b/ansible/roles/beacon-node-builds/templates/build.sh.j2 @@ -11,7 +11,7 @@ function dockerImageExists() { } function binaryExists() { - ls -l build/{{ item.targets | first }}_${COMMIT} 2>&1 1>/dev/null + ls -l build/nimbus_beacon_node_${COMMIT} 2>&1 1>/dev/null } function fetchChanges() { @@ -25,13 +25,12 @@ function buildBinaries() { NICE="nice -n 19 ionice -c2 -n7" ${NICE} make -j1 update - ${NICE} make -j1 {{ item.targets | join(" ") }} \ + ${NICE} make -j1 nimbus_beacon_node nimbus_signing_process \ LOG_LEVEL="TRACE" NIMFLAGS="-d:testnet_servers_image -d:noSignalHandler" # Rename binaries to match commit the were built from. -{% for target in item.targets %} - mv "build/{{ target }}" "build/{{ target }}_${COMMIT}" -{% endfor %} + mv "build/nimbus_beacon_node" "build/nimbus_beacon_node_${COMMIT}" + mv "build/nimbus_signing_process" "build/nimbus_signing_process_${COMMIT}" # Delete copies that are older than 7 days find build -mtime +7 -exec rm '{}' \+