{"id":19269541,"url":"https://github.com/status-im/infra-role-beacon-node-macos","last_synced_at":"2025-06-26T01:36:08.755Z","repository":{"id":37930405,"uuid":"389531063","full_name":"status-im/infra-role-beacon-node-macos","owner":"status-im","description":"Ansible role for Nimbus Eth2 beacon node on MacOS","archived":false,"fork":false,"pushed_at":"2025-05-21T07:06:04.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-06-18T13:06:36.481Z","etag":null,"topics":["ansible-role","eth2","infra","macos","nimbus"],"latest_commit_sha":null,"homepage":"https://github.com/status-im/nimbus-eth2","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/status-im.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-26T06:28:22.000Z","updated_at":"2025-05-21T07:06:08.000Z","dependencies_parsed_at":"2024-05-10T11:24:44.196Z","dependency_job_id":"1fedf86a-7fab-4b51-8ed7-326f641796c2","html_url":"https://github.com/status-im/infra-role-beacon-node-macos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/status-im/infra-role-beacon-node-macos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Finfra-role-beacon-node-macos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Finfra-role-beacon-node-macos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Finfra-role-beacon-node-macos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Finfra-role-beacon-node-macos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/status-im","download_url":"https://codeload.github.com/status-im/infra-role-beacon-node-macos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Finfra-role-beacon-node-macos/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261983495,"owners_count":23240217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible-role","eth2","infra","macos","nimbus"],"created_at":"2024-11-09T20:20:20.263Z","updated_at":"2025-06-26T01:36:08.736Z","avatar_url":"https://github.com/status-im.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nThis role provisions a [Nimbus](https://nimbus.team/) installation on MacOS hosts.\n\n# Introduction\n\nThe role will:\n\n* Checkout a branch from the [nimbus-eth2](https://github.com/status-im/nimbus-eth2) repo\n* Build it using the [`build.sh`](./templates/build.sh.j2) Bash script\n* Schedule regular builds using [Launchd Scheduled Jobs](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html)\n* Start a node by defining a [Launchd Job](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html)\n\n# Ports\n\nThe service exposes three ports by default:\n\n* `9000` - LibP2P peering port. Must __ALWAYS__ be public.\n* `9200` - JSON RPC port. Must __NEVER__ be public.\n* `9900` - Prometheus metrics port. Should not be public.\n\n# Installation\n\nAdd to your `requirements.yml` file:\n```yaml\n- name: infra-role-beacon-node-macos\n  src: git@github.com:status-im/infra-role-beacon-node-macos.git\n  scm: git\n```\n\n# Configuration\n\nThe crucial settings are:\n```yaml\n# branch which should be built\nbeacon_node_repo_branch: 'stable'\n# ethereum network to connect to\nbeacon_node_network: 'mainnet'\n# optional setting for debug mode\nbeacon_node_log_level: 'DEBUG'\n# WebSocket or HTTP URLs for execution layet Engine API\nbeacon_node_exec_layer_urls:\n  - 'wss://erigon.internal.example.org:8551'\n  - 'http://geth.internal.example.org:8552'\n```\nThe order of WebSocket URLs matters. First is the default, the rest are fallbacks.\n\nMost non-sensitive configuration resides in `conf/config.toml` file in service directory.\n\n# Management\n\n## Directories\n\nEach service folder consists of the following contents:\n\n* `build.sh` - Script that is executed to create a new build. The resulting binaries can be found in `repo/build/`\n* `rpc.sh` - Script to make it easier to interact with the beacon node JSON RPC API.\n* `data/` - Data created by the beacon node process.\n* `repo/` - Clone of the [nimbus-eth2](https://github.com/status-im/nimbus-eth2) repo.\n* `logs/` - Node and build logs.\n* `logs/build.log` - Build logs generated by the Launchd scheduled job.\n* `logs/service.log` - Node logs rotated according to the [`logrotate.conf`](./templates/launchd-logrotate.plist.j2) file.\n\n## Service\n\nTo see service status use:\n```\n \u003e sudo launchctl list status.beacon-node-mainnet-stable\n{\n\t\"StandardOutPath\" = \"/Users/nimbus/beacon-node-mainnet-stable/logs/service.log\";\n\t\"LimitLoadToSessionType\" = \"System\";\n\t\"StandardErrorPath\" = \"/Users/nimbus/beacon-node-mainnet-stable/logs/service.log\";\n\t\"Label\" = \"status.beacon-node-mainnet-stable\";\n\t\"OnDemand\" = false;\n\t\"LastExitStatus\" = 0;\n\t\"PID\" = 6347;\n\t\"Program\" = \"/Users/nimbus/beacon-node-mainnet-stable/repo/build/nimbus_beacon_node\";\n\t\"ProgramArguments\" = (\n\t\t\"/Users/nimbus/beacon-node-mainnet-stable/repo/build/nimbus_beacon_node\";\n\t\t\"--network=mainnet\";\n...\n```\nTo restart the node use:\n```sh\nsudo launchctl unload /Library/LaunchDaemons/status.beacon-node-mainnet-unstable.plist\nsudo launchctl load /Library/LaunchDaemons/status.beacon-node-mainnet-unstable.plist\n```\nNote that the Launchd config has the `keepalive` value set to `true` and\nrunning `launchctl stop` will immediately restart the node process.\n\n## Builds\n\nBuild scheduled with a [Launchd Scheduled Job](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html) can be also managed using `launchctl`:\n```\nsudo launchctl start status.build-beacon-node-mainnet-stable\nsudo launchctl stop status.build-beacon-node-mainnet-stable\n```\nThe build logs can be seen in the `logs/build.log`.\nThe job simply runs the [`buils.sh`](./templates/build.sh.j2) Bash script which can be run by hand:\n```\n \u003e sudo -u nimbus /Users/nimbus/beacon-node-prater-stable/build.sh \n \u003e\u003e\u003e Build Start: 2021-10-26T10:37:52Z\n \u003e\u003e\u003e Fetching changes...\nHEAD is now at 9e8081e4 Merge branch 'stable' into unstable\n \u003e\u003e\u003e Binary already built. Run with --force flag to override\n \u003e\u003e\u003e SUCCESS\n```\n\n## Cleanup\n\nWhen removing a deployment make sure to stop and delete the launchd daemons:\n```\n# stop the beacon node\ncd /Library/LaunchDaemons\nsudo launchctl unload status.beacon-node-mainnet-unstable.plist\nrm status.beacon-node-mainnet-unstable.plist\n\n# unload the periodic build job\nsudo launchctl unload status.build-beacon-node-mainnet-unstable.plist\nrm status.build-beacon-node-mainnet-unstable.plist\n\n# delete the repo, data and logs\nrm -rf ~/beacon-node-mainnet-unstable\n\n# delete logrotate config\nrm /opt/homebrew/etc/logrotate.d/beacon-node-mainnet-unstable.conf\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus-im%2Finfra-role-beacon-node-macos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatus-im%2Finfra-role-beacon-node-macos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus-im%2Finfra-role-beacon-node-macos/lists"}