# cdn.json

This document explains how CDN configurations are stored and how to deploy changes on the configuration to the CDN.

The CDN configuration file is called cdn.json, and is created when the MarfeelCDN is activated. A tenant, with MarfeelCDN disabled, can have the cdn.json file if the MarfeelCDN has been enabled for the tenant at some point, and then disabled.

Extra custom configuration can be added, when necesary, in a cdn directory within the tenant's folder. This configuration is written in in VCL (Varnish Configuration Language), and the file name refers to the stage when the code is executed.

The possible file names are:

  • custom_config_preFastlyFF.vcl
  • custom_config_postFastlyFF.vcl
  • custom_config_preVCLRecv.vcl
  • custom_config_postVCLRecv.vcl
  • custom_config_postVCLFetch.vcl
  • custom_config_postVCLDeliver.vcl

The cdn.json file for a tenant, can be found at its root, and includes all its custom configuration to deploy in MarfeelCDN.

File-directory tree schema:

MediaGroup repository
    └─── tenant.com
        └─── cdn.json
        └─── cdn/*.vcl
    └─── anothertenant.com
        └─── cdn.json

# Deployment

Changes to the cdn.json file of a tenant are automatically deployed to MarfeelCDN when merged.

To check if the deploy has finished correctly, look at the result of the Jenkins job for the associated mediagroup. The job can be found searching the name of the mediagroup repo in Jenkins.

# Flags

All the flags have default values set for all tenants, and only special values are added to a tenant's cdn.json.

Find all the flags in the catalog.