LogoLogo
What's New?Connect Agent ReleasesBook a DemoPricing
  • Documentation
  • Developers
  • Administration
  • OVERVIEW
    • JFrog Connect Overview
      • Architecture Overview
        • Connect Agent
        • Connect & JFrog Platform
      • Plan Your Update Strategy
        • Software Update Objectives & Concepts
        • Software Update Process & Procedures
  • Get Started
    • Create JFrog Connect Account
    • Log in to JFrog Connect
    • Network Requirements
    • Register Device
  • Manage your Fleet
    • Register Devices at Scale
      • Freeze Image on Device
      • Build Image with Agent
    • Register & Update Device at Once
    • Organize Your Fleet
      • Create Project
      • Move Device between Projects
      • Create Groups
        • Add Device to Group
        • Add Many Devices to Group
        • Change Group Name
        • Delete Group
      • Tag Devices
        • Remove a Tag
      • Remove Many Devices
  • Devices
    • Fleet Overview
      • Filter Devices
      • Locate Devices
    • Device Details
      • Delete a Device
      • Block Updates with Update Trigger
    • Update Connect Agent
    • Delete Many Devices
  • Deployment
    • Create Update Flow
      • Actions
        • Run Command
        • Run Script
        • Deploy File
        • Deploy Docker
          • Use Docker Image
          • Use Docker Compose
          • Get Artifactory Parameters
        • Clone Git Repository
        • Download Artifact
          • Get Artifactory Path
        • Download Release Bundle
          • Get Artifactory Parameters for Release Bundle
        • Update Image
        • Install Debian Package
          • Get Artifactory Parameters for Debian
      • Use Update Parameters
      • On Failure & Rollback
      • Vulnerability Scans
      • Sample Use Case: Build Update Flow for Reuse
    • Deploy Software
      • Set Application & Version
      • Set Alert upon Failure
      • Set Phased Rollout
      • View Deployment Progress
        • Detailed Deployment Information
        • Abort a Deployment
      • Deploy in Groups
      • Sample Use Case: Deploy Docker Images to Devices
  • Tools
    • Remote Tools
      • Use Terminal
      • Open Port Tunnel Session
        • Access with VNC
        • Connect with SSH
        • Access Device Web Applications
      • Run Commands Remotely
        • Run Command as Non-Root User
      • Get Device Files (Fetch Files)
    • Alerts
      • Create Channel
      • Set Webhook
    • Monitor
      • Resource Monitor
      • Process Monitor
  • Releases
    • What's New?
    • Connect Agent Release Notes
  • Troubleshooting
    • Connect Server Status
    • Troubleshoot Topics
      • Device Registration
      • Terminal Troubleshooting
Powered by GitBook
On this page
  • Prerequisites
  • Step 1: Register a Single Device
  • Step 2: Prepare the Settings File
  • Using Connect Agent 7.0
  • Using Connect Agent 6.x or Lower
  • Step 3: Duplicate and Distribute the Image
  • Step 4: Set Device Name and Group Automatically
  • Set after Registration
  • Set before Registration
  • Get Device Token
  • What’s Next?

Was this helpful?

Export as PDF
  1. Manage your Fleet
  2. Register Devices at Scale

Freeze Image on Device

When scaling to production, provisioning each device manually could be a time-consuming task. JFrog Connect enables you to register devices automatically by embedding the Connect Agent in your device.

PreviousRegister Devices at ScaleNextBuild Image with Agent

Last updated 28 days ago

Was this helpful?

This page describes how to install the on a fleet of devices without the need to register each device manually.

Prerequisites

You need the following before starting the procedure:

  • Devices meet minimum hardware, OS, and software requirements as described in

  • Internet connectivity with the devices

  • JFrog Connect account created and a project defined as described in

Step 1: Register a Single Device

Complete the following steps:

  1. Install Connect Agent on a single device by completing the procedure in .

  2. Disconnect the device from the Internet.

Step 2: Prepare the Settings File

Using Connect Agent 7.0

  1. Delete the settings.json file at the path indicated below: /etc/connect/service/settings.json

  2. Create a new settings.json file in the same location and add the following content: {"pairing_token":"<pairing_token>", "device_name":"", "device_group":"", "software_version":"", "device_token":""}

  3. Get the <pairing_token>. You can get your token in the Connect web UI. Go to Devices and click Register Device. To generate the token, click Generate Token.

  4. Save the file. Do not reconnect the device to the Internet until you have duplicated the image.

Using Connect Agent 6.x or Lower

  1. Delete the settings.json file at the path indicated below: /etc/connect/service/settings.json

  2. Create a new settings.json file in the same location and add the following content: {"user_token":"<user_token>", "project_name":"<project_name>", "device_name":"", "device_group":"", "software_version":"", "device_token":""}

  3. Change the <user_token> to your account token. You can find your token in the Connect web UI under Settings.

  4. Change the <project_name> to the project you want the device to be registered to. You can find your projects in the Connect web UI under Settings.

  5. (Optional) 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.

  6. Save the file. Do not reconnect the device to the Internet until you have duplicated the image.

Step 3: Duplicate and Distribute the Image

  1. Duplicate this device image, and burn it on other SD cards or eMMC flashes.

  2. Boot a new device that has the duplicated image. Connect Agent will automatically recognize that it is running on new hardware and will register the device as a new device.

  3. Repeat the step above for all of the devices with the new image.

Tip: For some agent sub-versions, the branding and name of Connect is defined as Upswift. If the directory/service name/ of Connect does not exist, check for a directory called Upswift.

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.

Step 4: Set Device Name and Group Automatically

You can set the device name and group automatically either before or after the devices are registered.

After the device registers to the platform, the settings.json file is encrypted and you will not be able to modify it anymore.

Set after Registration

Set before Registration

You can set the device name and group by setting the <device_name> and <device_group> keys in the settings.json file before the device registers to the platform. This means that you are creating a unique settings file for each device, so it is recommended to write a script that will generate the files.

Tip: If you use this method, ensure that the groups you use already exist.

In order to set the device name and group correctly, we recommend including the following steps in your script:

  1. Run a script on the device boot using crontab or init.d.

  2. Check if /etc/connect/service/settings.json already exists. If it exists, finish the script.

  3. If it doesn't exist, generate the device name (by any method you would like).

  4. Create the /etc/connect/service/settings.json file including the correct values.

  5. Change the file permissions by running chmod 777 /etc/connect/service/settings.json

If no device name or group has been defined, the Connect Agent will register the device with a generic name “New device” to the group “Production”.

Get Device Token

If you are using the Connect API, you will need the device token. To receive the device token, run the agent binary with the flag --print-token. The command is:

/etc/connect/service/ConnectAgent --print-token

What’s Next?

The device name and group can be changed using Connect API request, . By using the API, you can run a script on the device that will change the name and group after device registration.

Learn how to that includes your OS and the Connect Agent binary.

Connect Agent
Connect Agent
Create JFrog Connect Account
Register a Device
Update Device
build an image