Skip to content

Update Templates in Offline Environment

Overview

This section describes how to manually update the view template package, measurement dictionary, official Pipeline library, etc., in an offline environment without upgrading the Guance version.

How to Update the View Template Package in an Offline Environment

  1. Download the latest view template package: https://gitee.com/dataflux/dataflux-template (master branch). After downloading, you will get a dataflux-template-master.zip file.
  2. Upload the downloaded file to the container persistent storage directory at: forethought-core namespace → inner container → /config/cloudcare-forethought-backend/sysconfig/staticFolder/
  3. Replace the existing content in the staticFolder with the uploaded file:
    cd /config/cloudcare-forethought-backend/sysconfig/staticFolder
    unzip dataflux-template-master.zip
    # For the first deployment, since dataflux-template does not exist, there is no need to run the mv command. When updating the template later, you need to run the mv command.
    # mv dataflux-template dataflux-template-bak
    mv dataflux-template-master dataflux-template
    
  4. Enter the Python environment at: forethought-core namespace → inner container → /config/cloudcare-forethought-backend
    python
    
  5. Execute the Python commands:
    from forethought.tasks.timed_sync_integration import execute_update_integration 
    execute_update_integration()
    
  6. If you see the following prompt, the import is successful: success.jpg

How to Update the Measurement Dictionary JSON in an Offline Environment

  1. Download the latest measurement dictionary JSON file: https://static.guance.com/datakit/measurements-meta.json
  2. In the folder forethought-core namespace → inner container → /config/cloudcare-forethought-backend/sysconfig/staticFolder/metric, create a new file named metric_config.json and paste the content from the link into it.

How to Update the Official Pipeline Library in an Offline Environment

  1. Download the latest measurement dictionary JSON file: https://static.guance.com/datakit/internal-pipelines.json
  2. In the folder forethought-core namespace → inner container → /config/cloudcare-forethought-backend/sysconfig/staticFolder, create a new file named internal-pipelines.json and paste the content from the link into it.

Feedback

Is this page helpful?