tencent cloud

Feedback

Guide to Using the EdgeOne Tool for Migrating Content Delivery Network (CDN) Related Services

Last updated: 2024-11-07 10:50:30

    Overview

    This tool supports batch migration of domain configurations that have been connected to Tencent Cloud Content Delivery Network (CDN) service to Tencent Cloud EdgeOne, including connected CDN/ECDN/SCDN domain names. You can quickly migrate the current domain configuration to EdgeOne service using this tool.
    Note:
    As a configuration migration assistant tool, after the migration is completed, please check the migration result according to the migration result log and go to the EdgeOne console to confirm whether the relevant configuration has been completely migrated to EdgeOne and takes effective as expected.
    This tool does not support the migration of special configurations assisted by Tencent Cloud operations personnel. If you have related special configuration needs, please contact Tencent Cloud after-sales support for reconfiguration after the migration is completed.
    Data and logs and other related information will not be migrated. If you have data and log-related retention needs, please save them locally in advance.
    
    
    

    Prerequisites

    1. You have installed Nodejs 10.0.0 or later.
    2. The cloud API key has been created in the Tencent Cloud console, and the corresponding SecretId and SecretKey have been obtained. You can go to Cloud Access Management > Access Key > API Key Management console to obtain it.
    3. Refer to the quick access to EdgeOne to create the domain site to be migrated, and it is recommended to create the site using the CNAME access method.

    User Guide

    Scenario example

    Currently, the acceleration domain names www.example.com, test.example.com, and vod.example.com have been connected to Tencent Cloud CDN, and the site example.com has been created in Tencent Cloud EdgeOne Service. It is planned to migrate three domain services in CDN and related configurations to the corresponding sites in the EdgeOne console.

    Directions

    Step 1: Install the dependency environment and configure the migration tool

    1. To Install nodejs, it is recommended to download and install version 18.18.2;
    2. After the installation is complete, open the command line tool;
    3. (Optional) Execute the following command to check the node installation status. If the version number is returned as shown below, the installation is successful;
    node -v
    v18.18.2
    4. (Optional) Execute the following command to check the npm installation status. If the version number is returned as shown below, the installation is successful;
    npm -v
    9.6.7
    5. Execute the following command to download and install the toolkit.
    npm install tencentcloud-edgeone-migration-nodejs-v2
    6. Execute the following command to enter the toolkit installation directory.
    cd ./node_modules/tencentcloud-edgeone-migration-nodejs-v2

    Step 2: Migrate configuration

    1. After the installation is complete, enter the root directory of the toolkit installed in Step 1 (i.e.,:/node_modules/tencentcloud-edgeone-migration-nodejs/) and find the configuration file config.json. Open the configuration file and modify the relevant migration configuration. The parameter configuration description is as follows:
    SecretId, SecretKey: The cloud API key information of the Tencent Cloud account to be migrated, which can be obtained from Cloud Access Management > Access Key > API Key Management console.
    AppID: The Tencent Cloud account ID that requires migration, which can be obtained from Cloud Access Management > Account Information console.
    Domains: Array format, for CDN domains to be migrated, which can be viewed in Tencent Cloud Content Delivery Network (CDN) > Domain Management.
    ZoneId: String format, the corresponding ID of the site to be migrated to Tencent Cloud EdgeOne. It can be obtained from Tencent Cloud EdgeOne > Site List, as shown below:
    
    NeedCreateDomain: Boolean value, whether to automatically create a new domain after migration to EdgeOne, the default is true. If the current domain name already exists, you can pass false to only migrate the configuration, which is convenient for multiple operations of the same domain name configuration migration.
    Configuration examples are as follows:
    Single site migration
    Multiple site migration
    {
    "SecretId": "xxx",
    "SecretKey": "xxx",
    "AppId":"xxx",
    "List": [
    {
    "Domains": [
    "www.example.com",
    "test.example.com",
    "vod.example.com"
    ],
    "ZoneId": "zone-2nrr03d36xmk"
    }
    ],
    "NeedCreateDomain": true
    }
    {
    "SecretId": "xxx",
    "SecretKey": "xxx",
    "List": [
    {
    "Domains": [
    "www.example.com",
    "test.example.com",
    "vod.example.com"
    ],
    "ZoneId": "zone-2nrr03d36xmk"
    },
    {
    "Domains": [
    "www.site.com",
    "test.site.com",
    "vod.site.com"
    ],
    "ZoneId": "zone-2dqi0sbt6gk2"
    }
    ],
    "NeedCreateDomain": true
    }
    Note:
    1. Before using this tool, you need to create the corresponding site on the EdgeOne console, otherwise, the migration cannot be performed. This tool cannot create sites, it can only create domain names under the site.
    2. EdgeOne products manage domain names by the main domain name as the site dimension. If you have multiple domain names and the main domain names are not consistent, you need to create multiple sites.

    Step 3: Execute configuration migration

    For details about the CDN/ECDN acceleration-related configuration items that can be migrated through this tool, see Dependable tool migration configuration for CDN/ECDN acceleration.
    1. Execute the command: node task.js to start the configuration migration. This command is used to migrate CDN/ECDN acceleration-related configurations.
    node task.js
    2. (Optional) If you have IP Blocklist/Allowlist Configuration, Hotlink Protection Configuration, and UA Blocklist/Allowlist Configuration in your current domain, you can continue to follow the steps to migrate the related configurations.
    Execute the command: node check.js to verify whether the current domain has been deployed in EdgeOne.
    node check.js
    Wait for the domain name deployment to complete, then execute the command: node access.js to migrate related access control configuration items.
    node access.js
    Note:
    The default output of the command is in Chinese log. If you need to switch to English, you can add "en" after the command, for example: node task.js en, node check.js en, node access.js en.

    Step 4: Post-migration verification

    Note:
    After using this tool to complete the domain name migration, please go to the Tencent Cloud EdgeOne console to check whether the site acceleration configuration, rule engine configuration, and security protection configuration of the domain name are as expected. After the configuration verification is completed, switch the related domain name acceleration service to Tencent Cloud EdgeOne.
    View configuration migration results
    After the migration tool has run, a csv file (report-${timestamp}.csv) will be generated in the local directory of the migration tool, recording the results. You can refer to this file to see if the migration was successful or the specific reasons for any exceptions.
    Verify the effectiveness of the configuration
    After the migration is completed, it is recommended that you verify whether the domain name access meets the expectations. After the verification is completed, switch the related services to EdgeOne.
    Note:
    If your current site is accessed via Cname, you can refer to the following methods for verification. If it is accessed via NS, you can directly switch the NS server for verification.
    1. Go to the EdgeOne console, click the site list in the console, and enter the site of the domain that has been migrated;
    2. Click Domain Name Service > Domain Management, find the migrated domain, and view the CNAME information assigned by EdgeOne for the domain name. For example: www.example.com.eo.dnse3.com.
    
    3. Get the node IP information assigned by EdgeOne for the domain name by entering ping www.example.com.eo.dnse3.com in the command line tool and viewing the corresponding node IP returned.
    
    4. Bind the node IP (43.152.53.230) obtained in step 3 and the acceleration domain name (www.example.com) to the local hosts file on the computer, as shown below:
    
    Note:
    The Path of the Hosts file in the Windows system is C:\\Windows\\System32\\drivers\\etc\\hosts.
    The Path of the Hosts file in the Mac system is /etc/.
    5. Access the popular URL content under the domain name and verify whether the corresponding domain name service meets the migration configuration comparison of the pre-migration tool.

    Related References

    Dependable tool migration configuration items for CDN/ECDN acceleration

    CDN configuration
    Configuration migrated to EdgeOne
    Basic Information
    Acceleration type
    No need to migrate, EdgeOne no longer distinguishes acceleration types.
    IPv6 access
    Migration to the EdgeOne's Domain-Level Configuration.
    Tag
    Tool automatic migration is not supported, please configure tags when creating a site or in the site list.
    Origin Server Information
    Customer origin
    Migrate to origin group list.
    COS origin
    Migrate to origin group list.
    IGTM multi-active origin server
    Migrate to the EdgeOne's origin server information
    Third-party object storage origin
    Tool automatic migration is not supported, please configure it in the origin group list after migration.
    Hot standby origin server
    After migration, please proceed to configure the EdgeOne Load Balancer (Whitelist application required).
    Access Control
    Hotlink protection configuration
    Migrate to web protection - custom rule and generate basic access control rules.
    IP blocklist/allowlist configuration
    Migrate to web protection - custom rule and generate basic access control rules.
    IP access limit configuration
    After migrating your domain, please proceed to configure the rate limiting settings in EdgeOne Web Protection.
    Authentication configuration
    Migrate to the rule engine. For feature introduction, see Token Authentication.
    UA blocklist/allowlist configuration
    Migrate to web protection - custom rule and generate basic access control rules.
    Downstream speed limit configuration
    EdgeOne does not support this feature yet.
    Access port configuration
    No need to migrate, access ports 80, 8080, 443 are enabled by default.
    Remote authentication
    Migration is not supported. You can configure it through Edge functions after migration, refer to the documentation: Remote Authentication.
    Cache Configuration
    Cache key rule configuration
    Migrate to the rule engine. For feature introduction, see Custom Cache Key.
    Node cache validity configuration
    Migrate to the rule engine. For feature introduction, see Node Cache TTL.
    Browser cache validity configuration
    Migrate to the rule engine. For feature introduction, see Browser Cache TTL.
    Status code cache
    Migrate to the rule engine. For feature introduction, see Status Code Cache TTL.
    HTTP header cache configuration
    No need to migrate, enabled by default.
    Access URL rewrite configuration
    Migrate to the rule engine. For feature introduction, see Access URL Redirection.
    Origin-pull configuration
    Merge origin-pull
    EdgeOne does not support this feature yet.
    Range GETs configuration
    Migrate to the rule engine. For feature introduction, see Range GETs.
    HTTP origin-pull request header configuration
    Migrate to the rule engine. For feature introduction, see Modifying HTTP Request Headers.
    Follow 301/302 configuration
    Migrate to the rule engine. For feature introduction, see Redirect Following During Origin-Pull.
    Origin-pull timeout configuration
    Migrate to the Rule Engine, for an introduction to its features, see Origin-Pull Timeout.
    Origin URL rewrite configuration
    Migrate to the rule engine. For feature introduction, see Origin-Pull URL Rewrite.
    Origin-pull SNI configuration
    No need to migrate, when the origin-pull protocol is HTTPS, the origin-pull SNI configuration is enabled by default.
    HTTPS Configuration
    HTTPS service
    No need to migrate, EdgeOne supports HTTPS service by default.
    HTTPS configuration
    If the current certificate is hosted in SSL certificate, the corresponding HTTPS certificate can be migrated.
    HTTP 2.0
    Migrate to the rule engine. For feature introduction, see HTTP/2.
    Forced redirection
    Migrate to the rule engine. For feature introduction, see Forced HTTPS Access.
    Note: Only supports migration of HTTP requests to force redirection to HTTPS.
    HSTS configuration
    Migrate to the rule engine. For feature introduction, see Enabling HSTS.
    TLS version configuration
    Migrate to the rule engine. For feature introduction, see Configuring SSL/TLS Security.
    OCSP stapling configuration
    Migrate to the rule engine. For feature introduction, see Enabling OCSP Stapling.
    QUIC
    Migrate to the rule engine. For feature introduction, see Enable HTTP/3.
    Advanced Configuration
    Custom error page
    Migrate to the rule engine. For feature introduction, see Custom Error Page.
    Usage limit configuration
    Migrate to usage cap policy.
    SEO configuration
    EdgeOne does not support this feature yet.
    HTTP response header configuration
    Migrate to the rule engine. For feature introduction, see Modifying HTTP Response Headers.
    Smart compression
    Migrate to the rule engine. For feature introduction, see Smart Compression.
    Note: Only supports migration to enable, does not support configuration file size range, compression range defaults to 256B - 30MB.
    Offline cache configuration
    Migrate to the rule engine. For feature introduction, see Offline Caching.
    POST request size configuration
    Migrate to the rule engine. For feature introduction, seeMaximum Upload Size.

    FAQs

    Migration configuration

    If the current domain name is an ECDN acceleration domain name and dynamic acceleration is required, how to configure it after migrating to EdgeOne?

    For domain names with ECDN dynamic acceleration or ECDN dynamic and static acceleration, after the migration is completed, you need to manually enable smart acceleration to enable dynamic acceleration for the domain name. This feature is a value-added service capability. For related billing standards, please refer to VAU Fee (Pay-as-You-Go).

    How to deal with the failure of HTTPS related configuration migration prompted by the tool?

    The following HTTPS related configurations depend on the domain name hosting certificate that has been uploaded in Tencent Cloud SSL console. If you have not uploaded the certificate, you cannot complete the automatic migration. You need to upload the HTTPS certificate to Tencent Cloud SSL console and manually configure it after the migration. Or change the parameter NeedCreateDomain in Step 2 to false and execute the migration again.
    Quic

    The domain name is being resolved during domain name migration, and if you need to enable acceleration, please go to the DNS record page to enable acceleration. What should I do?

    If your current site is accessed by NS and the original DNS records have been imported, you may encounter this problem when adding a new domain name with an existing A record or CNAME record. If you need to use the tool for migration, you can delete the corresponding domain name resolution record on the EdgeOne console and then execute the migration.
    Note:
    If you have already switched the NS server to EdgeOne, deleting the DNS record may cause your domain name access to be interrupted. You can switch the resolution back to the original domain name resolution service provider, wait for all migrations to be ready, and then switch the NS server to EdgeOne to officially enable the service.

    How to use the image optimization function of the current domain name on EdgeOne?

    EdgeOne supports image processing capabilities and edge functions. You can refer to: Adaptive Image Format Conversion via Edge Functions or Image Processing to see how to implement adaptive image optimization capabilities on EdgeOne.

    The current domain name has the regional independent configurations in some Chinese Mainland and outside the Chinese Mainland. How to configure it on EdgeOne?

    Regional independent configuration is not supported for migration using this tool. If you have related configuration needs for the current domain name, please refer to the manual configuration migration using the rule engine.

    Product and billing

    What are the advantages of EdgeOne compared to CDN products?

    
    CDN
    EdgeOne
    Feature richness
    Pure acceleration, no security capabilities.
    In addition to providing content distribution acceleration for domain names, it has DDoS attack and CC attack capabilities, and also provides rich capabilities such as edge functions, L4 proxy, DNS resolution, etc.
    Configuration flexibility
    Each domain name is configured on the console according to the configuration items and cannot be flexibly combined.
    Supports rule engine, edge functions, and other flexible configuration methods, and can customize edge origin-pull rules and response rules according to your needs.
    Operation difficulty
    Update the certificate manually and and maintain the configuration according to the domain name dimension.
    Supports free certificate auto-renewal, provides site-level dimension configuration, and can deliver configuration to multiple domain names through a single rule.
    Risk avoidance
    Attacks will generate excess traffic charges, high risk of attack.
    Billing based on cleaned traffic, no need to worry about high bills caused by attacks.

    What is the difference between EdgeOne's billing method and CDN? What is the payment method for migrating to EdgeOne?

    EdgeOne's fees consist of basic service fees and value-added service fees. The basic service fees include Plan Fees and Fees for Out-of-plan Resource Usage (Pay-as-You-Go). Value-added service fees include VAU Fee (Pay-as-You-Go), Dedicated DDoS Mitigation Fee (Pay-as-You-Go) fees, and Cross-MLC-border acceleration traffic fee (Pay-as-You-Go). You can also view the Billing Overview for detailed billing methods.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support