{"id":20419892,"url":"https://github.com/gavindsouza/robocorp-workers-bench","last_synced_at":"2025-07-10T16:05:16.896Z","repository":{"id":160300946,"uuid":"633359505","full_name":"gavindsouza/robocorp-workers-bench","owner":"gavindsouza","description":"Simplified Robocorp Worker Management Interface","archived":false,"fork":false,"pushed_at":"2023-08-15T13:43:16.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T04:24:56.918Z","etag":null,"topics":["robocorp","worker"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavindsouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-04-27T10:28:32.000Z","updated_at":"2023-08-03T12:53:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6b6409e-fbe5-4d20-ac5d-94fb5daafff9","html_url":"https://github.com/gavindsouza/robocorp-workers-bench","commit_stats":null,"previous_names":["switchup-de/robocorp-workers-bench"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gavindsouza/robocorp-workers-bench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Frobocorp-workers-bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Frobocorp-workers-bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Frobocorp-workers-bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Frobocorp-workers-bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavindsouza","download_url":"https://codeload.github.com/gavindsouza/robocorp-workers-bench/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavindsouza%2Frobocorp-workers-bench/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264604675,"owners_count":23635920,"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":["robocorp","worker"],"created_at":"2024-11-15T06:39:15.373Z","updated_at":"2025-07-10T16:05:16.876Z","avatar_url":"https://github.com/gavindsouza.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Simplified Robocorp Setup\n\nRun `./worker-up.py` for available CLI options \u0026 help.\n\n```bash\nusage: Robocorp Worker Wrapper [-h] [--name NAME] [--token TOKEN] [--build] [--dockerfile-location DOCKERFILE_LOCATION] [--image-name IMAGE_NAME]\n                               [--image-version IMAGE_VERSION]\n\nManage Robocorp self-hosted workers\n\noptions:\n  -h, --help            show this help message and exit\n  --name NAME, -n NAME\n  --token TOKEN, -t TOKEN\n  --build, -b           Build the worker image\n  --dockerfile-location DOCKERFILE_LOCATION, -d DOCKERFILE_LOCATION\n  --image-name IMAGE_NAME, -i IMAGE_NAME\n  --image-version IMAGE_VERSION, -v IMAGE_VERSION\n\nSimplified Robocorp Worker Management Interface\n```\n\n#### Steps to setup a Cluster of self-hosted workers\n\nSteps to build \u0026 spin up a self-hosted worker:\n\n1. Generate a `Dockerfile` that outlines the worker environment\n\nI prefer using the dynamic workers for quickly spinning up workers that I can discard later.\n\n```bash\ncp ./base/dynamic/Dockerfile Dockerfile\n```\n\n2. Setup appropriate conda.yaml that outlines robot runtime context\n\nA conda file that resembles the environment your robots need. This ensures a suitable environment is generated while building the image to avoid any slow downs during executing robot processes.\n\n```bash\ncp {your-robot-conda} conda.yaml\n```\n\n3. Build a worker image\n\nBuild the common image which will be used for spinning up new workers.\n\n```bash\n./worker-up.py --build -i rc_dynamic -v 1.0\n```\n\n4. Spin up a worker using a single or group token\n\nEach worker started translates to a container spun up using the image generated in the previous step.\n\n```bash\n./worker-up.py -i rc_dynamic -v 1.0 -n {worker_name} -t {token}\n```\n\n#### Gavin's Workflow\n\n1. Provision a new server \u0026 SSH to it\n1. `apt update \u0026\u0026 apt upgrade -y \u0026\u0026 apt install git`\n1. `curl https://get.docker.com/ | sh`\n1. `git clone https://github.com/gavindsouza/robocorp-workers-bench robocorp`\n1. `cd robocorp`\n1. `cp ./base/dynamic/Dockerfile .`\n1. `cp ./base/conda.yaml .`\n1. `./worker-up.py --build`\n1. `export ROBOCORP_GROUP_TOKEN=${NEW_TOKEN_GENERATED_IN_CONTROL_ROOM}`\n1. ```for i in `seq 1 N`; do   ./worker-up.py -n \"a-$i\" -t $ROBOCORP_GROUP_TOKEN; done```\n\n\n```bash\n# for copy pastin' - update token \u0026 worker count values (first \u0026 last lines)\nexport ROBOCORP_GROUP_TOKEN=${NEW_TOKEN_GENERATED_IN_CONTROL_ROOM}\napt update \u0026\u0026 apt upgrade -y \u0026\u0026 apt install git\ncurl https://get.docker.com/ | sh\ngit clone https://github.com/gavindsouza/robocorp-workers-bench robocorp\ncd robocorp\ncp ./base/dynamic/Dockerfile .\ncp ./base/conda.yaml .\n./worker-up.py --build\nfor i in `seq 1 N`; do   ./worker-up.py -n \"a-$i\" -t $ROBOCORP_GROUP_TOKEN; done\n```\n\n#### Notes\n\nCopy the `conda.yaml` from the targetted robot to this folder. It will be used in the container image building process.\n\nAdded the `--no-cache` during the image building because we don't want to cache the `rcc` environment creation. Alternatively, we can add the `ADD` directive to the pypi \u0026 github URLs to do so automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavindsouza%2Frobocorp-workers-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavindsouza%2Frobocorp-workers-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavindsouza%2Frobocorp-workers-bench/lists"}