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
      • Device Registration Troubleshooting
  • Fleet Management
    • 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
  • 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
        • Terminal Troubleshooting
      • 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
    • Connect Server Status
  • Releases
    • What's New?
    • Connect Agent Release Notes
Powered by GitBook
On this page
  • Prerequisites
  • Step 1: Get Started
  • Example A: Deploy Docker Action
  • Example B: Release Bundle Action
  • Step 2: On-Failure Policy
  • Example A: On-Failure Configuration for Deploy Container
  • Example B: On-Failure Configuration for Release Bundle
  • Step 3: Complete the Update Flow
  • What’s Next?

Was this helpful?

Export as PDF
  1. Deployment
  2. Create Update Flow

Sample Use Case: Build Update Flow for Reuse

This page describes the detailed procedure for creating an Update Flow that delivers one or more Docker images and uses a Docker Compose YAML file.

PreviousVulnerability ScansNextDeploy Software

Last updated 4 months ago

Was this helpful?

The use case presented in this page is intended as a demonstration of how you could use JFrog Connect and make up part of the process described in .

Prerequisites

Before starting the procedures below, you need the following:

  • One or more Docker containers created and uploaded to your Artifactory repository

  • A Docker compose.yaml file created and uploaded to your Artifactory repository

  • (Optional) A release bundle created in Artifactory (if you are using a Release Bundle action, as in Example A)

Step 1: Get Started

  1. In the Connect web UI, go to Deployment in the left menu and click the Create Update Flow tab.

  1. Add a Flow Name, e.g., update-app-docker-images.

  2. The examples on this page describe update flows that use Docker Compose, i.e., the flow uses either the Deploy Docker or the Release Bundle action. Complete the procedure in either Example A or Example B below.

Example A: Deploy Docker Action

If you do not have Artifactory Enterprise+ edition, we recommend using the Deploy Docker action.

  1. Drag and drop the Deploy Docker action into the update flow and click the Edit (pencil) icon.

  2. Complete the configuration as described below. For some of the fields, we recommend entering parameters instead of values. This will enable you to reuse the update flow many times over.

Deploy Docker Configuration

Enter the configuration as shown below.

  • Action Name: Enter a name for action block (e.g., my-app-containers).

  • Registry Account: This is the account where your container images are stored. Choose one of the following:

    • JFrog Default: The default Artifactory account you received when you registered JFrog Connect.

    • Other Registry: Any other account, JFrog or other, where you store container images.

  • Deployment Type: Choose Docker Compose. You can use this option whether you deliver a single or multiple Docker containers. The information in the compose.yaml will specify which container image(s) to pull.

  • Destination Path on Device: Enter a parameter for this, e.g., {{path-on-device}}.

  • Artifactory Path: Enter a parameter for this, e.g., {{artifactory-compose-yaml-path}}.

Example B: Release Bundle Action

If you use JFrog Artifactory Enterprise+, we recommend using the Release Bundle action. (Release Bundles are available only in the Enterprise+ edition.)

  1. Drag and drop the Release Bundle action into the update flow and click the Edit (pencil) icon.

  2. Complete the configuration as described below. For some of the fields, we recommend entering parameters instead of values. This will enable you to reuse the update flow many times over.

Release Bundle Block Configuration

Enter the configuration as shown below.

  • Action Name: Enter a name for your release bundle block (e.g., cool-app-bundle).

  • JFrog Account: Choose the name of the JFrog account. This is the Artifactory account where your release bundle is stored.

  • Name: You may want to deliver a different release bundle each time you run this flow, so enter a parameter, e.g., {{release-bundle-name}}.

  • Version: The release bundle might have different version numbers for different deliveries, so enter a parameter, e.g., {{release-bundle-version}}.

  • Destination Path on Device: Enter a parameter for this, e.g., {{bundle-artifacts-device-path}}.

  • Custom Paths: (Optional) Mark this option if need to deploy files to destinations on the device other than the destination path of the compose.yaml.

    • Release Bundle Path: This is the Artifactory path for a release bundle that will be deployed to a location different from the destination path of the Docker Compose YAML. We recommend making this a parameter, e.g., {{custom-bundle-path-01}}. You can deliver multiple bundles with custom paths.

    • Destination Path on Device: Enter a parameter for the custom path on the device, e.g., {{custom-device-path-01}}.

  • Docker Compose: Mark this checkbox.

  • Release Bundle Path: Enter a parameter for your release bundle path in Artifactory, e.g., {{artifactory-bundle-path}}.

  • Destination Path on Device: Enter a parameter for the device path where the Docker Compose YAML file will be delivered, e.g., {{compose-yaml-device-path}}.

Step 2: On-Failure Policy

After completing the Configuration tab of the action, click On Failure and complete the information in this tab. The On Failure configuration defines your policy of what should happen if a delivery failure should occur. Once you have a well-defined on-failure policy, you will know exactly what should happen at each stage of the deployment process.

For the actions described on this page, we recommend using the default on-failure configurations as described below.

Example A: On-Failure Configuration for Deploy Container

The default and recommended settings are marked as follows:

  • Run General Rollback

  • Do Actions

    • Trigger when Whole Update fails

    • Revert Docker Compose File

Example B: On-Failure Configuration for Release Bundle

The default and recommended settings are marked as follows:

  • Run General Rollback

  • Do Actions

    • Trigger when Whole Update fails

    • Revert All Files

After completing the On Failure policy, save the action and complete the rest of the information required for the update flow.

Step 3: Complete the Update Flow

Once you have configured the actions you need, complete the steps below.

  1. If you would like the device to reboot after the actions have completed, mark Reboot after Update.

  2. Click Rollback, enable the General Rollback, and choose how the rollback will run. The rollback can run either according to a command you enter or a script that you upload.

  3. Save the Update Flow.

What’s Next?

Of course, you can configure On Failure differently according to your use case requirements. For more detailed information about on-failure and rollback configuration, see the page.

You will be able to use this update flow from the web UI, where it appears in the list under the Update Flows tab, or by using the request in the Connect API. Whichever method you choose, you will be able to reuse this flow tens or thousands of times to deploy software updates to the IoT devices.

Learn how to use this update flow to .

Rollback
Deploy Update
Deploy Docker Images to Device
Software Update Process & Procedures