Skip to content

Latest commit

 

History

History
248 lines (176 loc) · 10.4 KB

migration-options.md

File metadata and controls

248 lines (176 loc) · 10.4 KB
copyright lastupdated keywords subcollection
years
2024
2024-10-09
object storage, bucket
CDN

{{site.data.keyword.attribute-definition-list}}

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 {{site.data.keyword.cis_full}} ({{site.data.keyword.cis_short_notm}}, migrate to Akamai if you prefer Akamai CDN, or migrate to other CDN services on the IBM Cloud Catalog. {: shortdesc}

Migrating CDN to IBM Cloud Internet Services

{: #migrating-cdn-to-cis}

The following sections describe the methods of migrating your CDN instances to {{site.data.keyword.cis_short_notm}}.

Migrating Wildcard CDN to {{site.data.keyword.cis_short_notm}}

{: #migrating-wildcard}

In this example, an existing Wildcard CDN instance with the following configurations is about to be moved from CDN to {{site.data.keyword.cis_short_notm}}:

  • 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 {{site.data.keyword.cis_short_notm}} 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 {{site.data.keyword.cis_short_notm}}. {: tip}

Before you begin

{: #prerequisites-migration}

  1. Create a {{site.data.keyword.cis_short_notm}} instance on the IBM Cloud Catalog. See Getting Started with {{site.data.keyword.cis_short_notm}} for more information.

    To make sure you can utilize the {{site.data.keyword.cis_short_notm}} caching capabilities, choose an Enterprise plan. {: note}

  2. Prepare IBM Cloud CLI.

  3. Log in to IBM Cloud CLI and install {{site.data.keyword.cis_short_notm}} CLI. See {{site.data.keyword.cis_short_notm}} CLI reference for more details about how to log in and access {{site.data.keyword.cis_short_notm}}.

Set up DNS zone CNAME

{: #create-a-partial-zone}

  1. Set the instance context in CLI.

    ibmcloud cis instance-set "<your-instance-name>"

    {: pre}

  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

    {: pre}

  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": []
    }
    

    {: screen}

  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

    {: pre}

Set up the DNS records

{: #verify-partial-zone}

  1. With {{site.data.keyword.cis_short_notm}}, get your domain ID from the output of the following command.

    ibmcloud cis domains

    {: pre}

  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

    {: pre}

    • 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

    {: pre}

  3. Before moving the domain officially to {{site.data.keyword.cis_short_notm}}, 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

    {: pre}

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

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

    {: pre}

    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

    {: pre}

  4. Add a CNAME record with the cdn.cloudflare.net suffix in the authoritative DNS so that the domain can be moved to {{site.data.keyword.cis_short_notm}}.

    cdn-demo.slcdnservice.net CNAME cdn-demo.slcdnservice.net.cdn.cloudflare.net

    {: pre}

  5. Verify the CNAME settings.

    dig cdn-demo.slcdnservice.net a

    {: pre}

    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
        ...
    

    {: screen}

    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>

    {: pre}

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

Additional steps for an ICOS static website origin

{: #additional-steps-for-icos}

If you are configuring an ICOS static website origin, additional steps are required to finish migrating your CDN instance to {{site.data.keyword.cis_short_notm}}.

Add another CNAME record in {{site.data.keyword.cis_short_notm}}

{: #add-another-cname-record-in-cis}

Within {{site.data.keyword.cis_short_notm}}, 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

{: pre}

Configure page rules with {{site.data.keyword.cis_short_notm}}

{: #configure-rules-partial-zone}

  1. Within {{site.data.keyword.cis_short_notm}}, 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.
Behavior Setting
Resolve Override cos.cdn-demo.slcdnservice.net
Host header override <bucketname>.s3-web.<endpoint>
{: caption="Page rule configurations" caption-side="bottom"}

Verify the configuration and delete the CDN instance

{: #verify-configuration-delete-cdn}

  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 {{site.data.keyword.cis_short_notm}}

{: #migrating-dv-san-cnd-cis}

In this example, an existing DV SAN CDN instance with the following configurations is about to be moved from CDN to {{site.data.keyword.cis_short_notm}}:

  • 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 {{site.data.keyword.cis_short_notm}}.

  • 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 {{site.data.keyword.cis_short_notm}} will be associated with your domain replacing the previous shared certificate.

Migrating CDN to Akamai

{: #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{: external} to be contacted by sales, or can contact our designated account manager ([email protected]) for this migration to be redirected to your assigned account team.

Migrating CDN to third-party CDN services on {{site.data.keyword.cloud_notm}}

{: #migrating-cdn-third-party-services}

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.