macOS Worker Installation
This section assumes you have installed EdgeIQ using the macOS package installer, which places the edgeiq
binary in /usr/local/bin
and makes it available in your PATH
. It also assumes the Server is configured and running.
Set up a new Worker as follows:
- Generate a Worker ID and API key on the Server
- Create a data directory for the Worker
- Configure environment variables for the Worker
- Start the Worker
Generate an API key
Section titled “Generate an API key”A Worker ID and API key are required before the Worker can connect to the Server. This can be done either via the web-based UI or the edgeiq
CLI.
Via web-based UI
Section titled “Via web-based UI”Log in to the Server UI (usually http://localhost:3000
). Go to Workers in the top navigation, then select NEW WORKER.
Create a new Worker with a specified name and ID.
The Worker name is a human-readable designation (a label), while the Worker ID will be used in the Worker configuration.
Next, create an API key for the Worker. Go to Manage > Keys in the top navigation.
Then create a name for the new API key, select Add and copy the key value for later use.
Via the CLI
Section titled “Via the CLI”Adding a Worker via the CLI is a two-step process, similar to the UI method.
If you changed the default bind address of the Server or it’s on a different host, set EDGEIQ_URL
:
export EDGEIQ_URL="http://<your-server-ip-or-hostname>:3000"
Log in to the Server using the CLI:
edgeiq login admin
After providing the admin password, you will see Login successful
. Then add the new Worker:
edgeiq workers add worker1 --id worker1
Lastly, create an associated API key for the worker:
edgeiq api-key issue worker1
API-KEY(worker1;api_read;default) F4177-AM9PZIEW7MPI7IL28ERE
Create a Data Directory
Section titled “Create a Data Directory”A Worker requires a data directory to store Job definitions and some state information.
Create a directory for EdgeIQ worker data:
mkdir -p ~/Library/Application\ Support/EdgeIQ/worker
Configure Environment Variables
Section titled “Configure Environment Variables”The Worker is configured through environment variables. Create a shell script to set these variables:
cat > ~/edgeiq-worker.env << EOFEDGEIQ_WORKER_ID=worker1EDGEIQ_WORKER_API_KEY=PASTE_YOUR_API_KEY_HEREEDGEIQ_JOBS_DIR=~/Library/Application\ Support/EdgeIQ/workerEDGEIQ_URL=http://<your-server-ip-or-hostname>:3000EDGEIQ_LICENSE_EULA_ACCEPT=yesEOF
Important:
- Replace
PASTE_YOUR_API_KEY_HERE
with the actual API key you generated. - Replace
<your-server-ip-or-hostname>
with the correct IP address or hostname where your EdgeIQ Server is accessible. - Ensure the
EDGEIQ_WORKER_ID
matches the ID you created on the Server.
At a minimum, the Worker needs:
- A unique Worker ID (
EDGEIQ_WORKER_ID
) - An API key to authenticate against the Server (
EDGEIQ_WORKER_API_KEY
) - The Server URL (
EDGEIQ_URL
) - A data directory (
EDGEIQ_JOBS_DIR
)
Optional environment variables include:
EDGEIQ_WORKER_POLL_INTERVAL
: How often (in seconds) the Worker checks the Server for updates (default:15
).EDGEIQ_WORKER_LISTENER
: The address and port the Worker listens on for internal updates (default:127.0.0.1:4040
).EDGEIQ_LICENSE_EULA_ACCEPT=yes
: Prevents the one-time prompt for accepting the End User License Agreement.
Start the Worker
Section titled “Start the Worker”To start the worker using the configured environment variables:
source ~/edgeiq-worker.envedgeiq run worker
The Worker will connect to the Server using the provided EDGEIQ_URL
and API key, and begin processing assigned Jobs.
For more details, visit the full EdgeIQ Documentation.