Build Image with Agent
This page describes how to insert the Connect Agent into an OS image build in order to deploy JFrog Connect to a large number of devices.
This method is suitable for off-the-shelf and custom linux-based operating systems. This procedure uses Yocto OS as an example, but it is applicable to other OS’s as well.
Prerequisites
You need the following before starting the procedure:
Devices meet minimum hardware, OS, and software requirements as described in Connect Agent
Internet connectivity with the devices
JFrog Connect account created and a project defined as described in Create JFrog Connect Account
OS Image Requirements
The requirements and parameters specifically for Yocto are shown below.
Systemd or init.d and Cron. It is recommended to use Systemd:
DISTRO_FEATURES_append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" VIRTUAL-RUNTIME_initscripts = ""
OpenSSH:
CORE_IMAGE_EXTRA_INSTALL_append = " openssh"
For other operating systems, the requirements are similar:
Systemd or init.d (systemd is recommended)
Cron
OpenSSH
Step 1: Obtain Connect Agent Binary
To obtain the Connect Agent binary file, contact JFrog Connect Support.
Step 2: Prepare Settings File
Complete the following steps:
Open the file
connect/service/settings.json
Fill in the values for
<user_token>
and<project_name>
. (To find these, go to the Devices page and click Register Device). Below is an example of asettings.json
file with the values filled in.{"user_token":"YourUserTokenXxxxyyyy","project_name":"Demo","device_name":"","device_group":"","software_version":"","device_token":""}
(Optional) If you leave the values of
<device_name>
and<device_group>
blank, by default the devices will register with the generated name "New Device" and group "Production". However, you could set the value of<device_name>
to“$HOSTNAME”
or to some other variable. Then the device name that appears in the web UI will be the host name of each device (or a different name depending on the variable you use for the<device_name>
value).Save the file.
Copy the following files and folders to your OS (i.e., Yocto) file system:
/connect/ folder
to/etc/
connect.service
file to/etc/systemd/system/.
connect.service
file to/etc/systemd/system/multi-user.target.wants/
Tip: For some agent sub-versions, the branding and name of Connect might appear as Upswift. If the directory/service name of Connect does not exist, check for "upswift" instead of Connect.
Step 3: Duplicate and Distribute Image
Duplicate the OS image and burn it on your SD cards or eMMC flashes.
Boot the new devices that have the duplicated image. Connect Agent will automatically recognize that it is running on new hardware and will register the device as a new device.
The new devices now appear in the Web UI on the Devices page. You can view them there and edit any of the details as necessary. To change the device names and groups automatically, complete the procedure in Set Device Name and Group Automatically.
What’s Next?
Learn a simple way to deploy software updates to your fleet by creating update flows.
Last updated