Change Project, Many Devices

Use a JFrog Connect update flow to change the project of many devices with a single command.

You can use this procedure as a bulk action to change the project of multiple devices or a single device. When you switch the devices to a different project, JFrog Connect will install the latest version of the Connect Agent on the devices.

Create an Update Flow for the Command

In this part of the procedure, you will create a Run Command update flow with the required command to switch your devices to a different project. Do the following:

  1. Copy the command below to your clipboard.

su -c 'wget -O - "https://app.connect.jfrog.io/v2/install_connect" | sh -s <user_token> {{project_name}}'
  1. Go to Updates and create a new update flow that has the Run Command action block. Enter a Flow Name for the update flow.

  1. In the action block configuration panel, enter a name for the action block and paste the command in the Command box.

  1. In the command, substitute <user_token> with your user token. You can get this from the Account tab in the Settings page. The command should now look like the example below:

su -c 'wget -O - "https://app.connect.jfrog.io/v2/install_connect" | sh -s YourUserTokenXxxxyyyy {{project_name}}'
  1. Save the configuration and create the update flow.

Deploy the Command

In this part of the procedure, you will use the deployment filters to choose the relevant devices and deploy the update flow that switches the devices to a different project. Do the following:

  1. Go to the Update Flows tab and click New Deployment for the update flow you just created.

  1. Select the devices to change. Your selection can include specific groups in the account and any of the additional filters, as shown in the example below.

  1. Under Deployment Parameters, enter the value for project_name. This is the name of the new project for the device.

  1. You can set any of the other deployment options, such as a schedule or an alert. Create the deployment. To view the device in the new project, use the device filter to choose the relevant project name.

Tip: When this deployment is successful, you will not be able to see the Success message in the deployment details.

Reuse the Update Flow

This update flow is reusable. If you need to change more devices, you can deploy the same update flow. Each time you just change the filter for the devices to be changed and enter the relevant project_name when prompted.

What's Next?

Learn how to change the project without updating Connect Agent on the device.

Last updated