IBM Cloud Docs
Migration options

Migration options

CDN is scheduled for End of Marketing and eventually End of Service. In preparation for this transition, it is recommended that you migrate your CDN mapping to IBM Cloud® Internet Services (CIS, migrate to Akamai if you prefer Akamai CDN, or migrate to other CDN services on the IBM Cloud Catalog.

Migrating CDN to IBM Cloud Internet Services

The following sections describe the methods of migrating your CDN instances to CIS.

Migrating Wildcard CDN to CIS

In this example, an existing Wildcard CDN instance with the following configurations is about to be moved from CDN to CIS:

  • Hostname: cdn-demo.slcdnservice.net
  • Current IBM CNAME: cdn-demo.cdn.appdomain.cloud

With the following two different types of origins, part of the configuration steps will be different.

  • A static website hosted on IBM Cloud Object Storage (ICOS) and has a format like http://<bucketname>.s3-web.<endpoint>/.
  • An origin that has a public IP.

After migration, the hostname cdn-demo.slcdnservice.net is moved to CIS and can be used to access the website.

This instance is being moved in a non-disruptive way. The IBM provided CDN CNAME cdn-demo.cdn.appdomain.cloud continues working until migration is complete; the parent domain slcdnservice.net is not moved to CIS.

Before you begin

  1. Create a CIS instance on the IBM Cloud Catalog. See Getting Started with CIS for more information.

    To make sure you can utilize the CIS caching capabilities, choose an Enterprise plan.

  2. Prepare IBM Cloud CLI.

  3. Log in to IBM Cloud CLI and install CIS CLI. See CIS CLI reference for more details about how to log in and access CIS.

Set up DNS zone CNAME

  1. Set the instance context in CLI.

    ibmcloud cis instance-set "<your-instance-name>"
    
  2. Create a partial type of CNAME zone for your domain (in this example, cdn-demo.slcdnservice.net). For more information about adding a partial zone, see Add a domain and DNS zone CNAME partial setup.

    ibmcloud cis domain-add "cdn-demo.slcdnservice.net" --type partial
    
  3. Get the TXT record verification_key and cname_suffix from the response:

    {
    "result": {
        "id": "1df93abfb59849abd3e34fde156a4c21",
        "name": "cdn-demo.slcdnservice.net",
        "status": "pending",
        "paused": false,
        "verification_key": "476754457-428595283",
         "cname_suffix": "cdn.cloudflare.net",
        "original_name_servers": [
            "ns1.softlayer.com",
            "ns2.softlayer.com"
        ],
        "original_registrar": "everyones internet, ltd. dba s (id: 925)",
        "original_dnshost": null,
        "modified_on": "2021-05-07T06:46:19.326826Z",
        "created_on": "2021-05-07T01:57:53.163247Z",
        "account": {
            "id": "b0c53e3f037b8cdc62b5cb373b8c55e6",
            "name": "57aea3aa-a38e-4760-ada5-a698bca56171"
        }
    },
    "success": true,
    "errors": [],
    "messages": []
    }
    
  4. With the authoritative DNS provider of your domain, add a TXT record cloudflare-verify to the DNS zone (in this example, cdn-demo.slcdnservice.net) pointing to the verification key (in this example,476754457-428595283). Wait for a few hours for the change to take effect.

    txt cloudflare-verify.cdn-demo.slcdnservice.net  476754457-428595283
    

Set up the DNS records

  1. With CIS, get your domain ID from the output of the following command.

    ibmcloud cis domains
    
  2. Depending on your origin type, add a CNAME record or an A record for cdn-demo.slcdnservice.net and enable proxy.

    • If your origin is a static website hosted on ICOS: Add A CNAME record to associate the domain cdn-demo.slcdnservice.net.
    ibmcloud cis dns-record-create <your-domain-ID> --type CNAME --name cdn-demo.slcdnservice.net --content <bucketname>.s3-web.<endpoint> --proxied true
    
    • If your origin is a website or application with a public IP, add an A record.
    ibmcloud cis dns-record-create <your-domain-ID> --type A --name cdn-demo.slcdnservice.net --content <your-origin-public-IP> --proxied true
    
  3. Before moving the domain officially to CIS, verify the subdomain changes on your local server. A typical way of doing this is to add a row to the /etc/hosts file on your local server.

    <CIS-proxy-IP> cdn-demo.slcdnservice.net
    

    Where <CIS-proxy-IP> can be retrieved by the following command:

    dig cdn-demo.slcdnservice.net.cdn.cloudflare.net a +short
    

    You can also use the curl command to verify the setting on your local server.

    curl --resolve cdn-demo.slcdnservice.net:443:<CIS-proxy-IP> https://cdn-demo.slcdnservice.net
    
  4. Add a CNAME record with the cdn.cloudflare.net suffix in the authoritative DNS so that the domain can be moved to CIS.

    cdn-demo.slcdnservice.net CNAME cdn-demo.slcdnservice.net.cdn.cloudflare.net
    
  5. Verify the CNAME settings.

    dig cdn-demo.slcdnservice.net a
    

    In the resulting screen, if the domain is migrated successfully, you can see something similar to the following example in the ANSWER SECTION:

        ;; ANSWER SECTION:
     cdn-demo.slcdnservice.net. 900	IN	CNAME	cdn-demo.slcdnservice.net.cdn.cloudflare.net.
     cdn-demo.slcdnservice.net.cdn.cloudflare.net. 300 IN A 104.18.3.72
     cdn-demo.slcdnservice.net.cdn.cloudflare.net. 300 IN A 104.18.2.72
        ...
    

    You can also verify whether the status of the domain has been changed to active.

    ibmcloud cis domain <your-domain-ID> -i <your-instance-name>
    

    After this status is verified, if you have changed the /etc/hosts file in the previous steps for verification purpose, remove the added line.

Additional steps for an ICOS static website origin

If you are configuring an ICOS static website origin, additional steps are required to finish migrating your CDN instance to CIS.

Add another CNAME record in CIS

Within CIS, add another CNAME record for cos.cdn-demo.slcdnservice.net and enable proxy. The CNAME configuration for cos.cdn-demo.slcdnservice.net together with the upcoming page rule settings will ensure the domain cdn-demo.slcdnservice.net points to the origin website successfully.

ibmcloud cis dns-record-create <domain_ID> --type CNAME --name cos.cdn-demo.slcdnservice.net --content <bucketname>.s3-web.<endpoint> --proxied true

Configure page rules with CIS

  1. Within CIS, navigate to Performance and the Page Rules tab.
  2. Create two rules for URLs that match cdn-demo.slcdnservice.net/*.
  3. Enable these two rules.
Page rule configurations
Behavior Setting
Resolve Override cos.cdn-demo.slcdnservice.net
Host header override <bucketname>.s3-web.<endpoint>

Verify the configuration and delete the CDN instance

  1. Verify that the domain cdn-demo.slcdnservice.net is accessible and points to the static website hosted on IBM Cloud Object Storage.
  2. Delete the existing CDN instance as described in deleting a CDN.

Migrating DV SAN CDN to CIS

In this example, an existing DV SAN CDN instance with the following configurations is about to be moved from CDN to CIS:

  • Hostname: site.slcdnservice.net
  • Current IBM CNAME: cdn-trial.cdn.appdomain.cloud

With a DV SAN CDN, all the migration steps are the same as a Wildcard CDN. After migration, the hostname site.slcdnservice.net is moved to CIS.

  • During migration, the domain site.slcdnservice.net will experience a CNAME change from an Akamai CNAME to a Cloudflare CNAME.
  • After migration, a new dedicated certificate issued by CIS will be associated with your domain replacing the previous shared certificate.

Migrating CDN to Akamai

Alternatively, if you prefer to use Akamai CDN after the End of Marketing date, you can migrate to Akamai by creating an Akamai account. You can either inquire on the Akamai website to be contacted by sales, or can contact our designated account manager (jomorton@akamai.com) for this migration to be redirected to your assigned account team.

Migrating CDN to third-party CDN services on IBM Cloud

In addition, if you are looking for more CDN options, navigate to the IBM Cloud Catalog and choose from the third-party CDN services available for a rich collection of configurable features, for example, Cloudsway CDN.