Configure Akamai on Zephyr

We now support Akamai as a cloud provider for Bring Your Own Cloud (BYOC) deployments. Akamai is a cloud platform known for its global content delivery network (CDN), edge computing capabilities, and strong focus on performance and security. Their infrastructure is designed to help organizations build and scale applications closer to end users while maintaining high availability and low latency.

With this integration, you can leverage your existing Akamai infrastructure to run and manage services directly within your own cloud environment, giving you more control, flexibility, and compliance alignment.

Prerequisites

INFO
  • A registered Akamai account, contract must include edge workers and edgekv
  • A registered Zephyr account
  • A registered domain

Configure and enable Akamai

Log in to the Zephyr Dashboard

After signing in, select your organization.


Locate Akamai under Deployment Integration

  • Select Settings from the top navigation tabs.
  • On the left sidebar, select Deployment Integration.
  • Choose Available to find Akamai, then click on Add integration.

Retrieve Credentials and Configure Akamai

Before proceeding, you will need some data from Akamai:

1. API Token

  • Click on Identity and access in the menu
  • Click on Create API client
  • Choose Advanced
  • Configure required permissions and remove the rest:
APIAccess Level
CPcode and Reporting group (cprg)READ-WRITE
Edge Hostnames API (hapi)READ-WRITE
EdgeKVREAD-WRITE
EdgeWorkersREAD-WRITE
Property Manager (PAPI)READ-WRITE
  • Copy or download token and add [default] as a header, so token will look like:
Secure Your Credentials

Keep your API token secure. Never commit credentials to version control or share them publicly.

[default]
client_secret = YOUR_CLIENT_SECRET
host = YOUR_AKAMAI_HOST
access_token = YOUR_ACCESS_TOKEN
client_token = YOUR_CLIENT_TOKEN

2. Contract id

  • Click on Contracts in the menu
  • Find your contract id

3. Group id

  • Click on Properties in the menu
  • Numeric value in the url is your group id https://control.akamai.com/apps/property-manager/#/groups/<groupId>/properties

4. Product id

Find you product here and choose product id regarding contract - prd_Fresca or prd_SPM

Configuration Inputs

Details for each input after clicking Add Integration under Akamai:

Integration Name
A unique name within your organization, used as a slug.
Integration Display Name
The name of the integration shown on the dashboard.
API Token

Obtainable from Akamai. See instructions for creating your API token.

Domain
Your domain.
Akamai contract id

Obtainable from Akamai. See instructions for getting your contract id.

Akamai group id

Obtainable from Akamai. See instructions for getting your group id.

Akamai product id

Obtainable from Akamai. See instructions for getting your product id.

Set Integration as Default

When set as default, all Zephyr deployments will use this integration until a new one (default integration) is set. Deployment using integration won't work until Akamai worker and property become activated.

Validate domain and setup DNS

  • Click on Properties in the menu

  • Click on your property

  • Click on active version

  • Go to section Property hostnames

  • Click on ... in Actions column near any hostname, click Validate certificate domain and copy CNAME Record value

  • Go to your domain provider (e.g., GoDaddy)

  • Add some CNAME records

    SubdomainTypeValue
    _acme-challenge.ze.yourdomain.comCNAME< value from verification record >
    ze.yourdomain.comCNAMEze.yourdomain.com.edgesuite.net.
    *.ze.yourdomain.comCNAMEze.yourdomain.com.edgesuite.net.

Wait until worker and property become activated

It may take up to 30 minutes.

What Will Be Created on Your Akamai Account?

When Akamai is added as your provider on Zephyr, these properties will be created on your Akamai account:

1. EdgeKV Namespace

  • ze-yourdomain-com

2. EdgeKV access token

  • ekv-token-ze-yourdomain-com

3. Workers

  • ze.yourdomain.com (for uploading and serving assets)

4. Property

  • ze.yourdomain.com

Clean Uninstall and Reset

Warning
  • Zephyr Cloud does not manage deletion of API tokens or any Akamai account properties.
  • Assets and information on your Akamai account are immutable by default. During a clean uninstall, previously deployed assets and information are unrecoverable.

To delete an existing Akamai integration, follow these steps:

Deleting property

  1. Remove CNAME records which have been added here
  2. Click on Properties in the menu
  3. Click on your property
  4. Click on three ... in the Actions column in the active version line
  5. Choose Deactivate Production
  6. Wait until property become deactivated
  7. Go back to properties list
  8. Click on three ... in the Actions column in the your property line
  9. Choose Delete Property

Deleting worker

  1. Click on EdgeWorkers in the menu
  2. Click on your worker
  3. Click on three ... in the Actions column in the active version line
  4. Choose Deactivate version
  5. Wait until version become deactivated
  6. Go back to workers list
  7. Click on three ... in the Actions column in the your worker line
  8. Choose Delete EdgeWorker ID

Remove edge hostname

  1. Click on Edge Hostnames in the menu
  2. Click on three ... in the Actions column in the active version line
  3. Choose Delete Edge Hostname

Remove EdgeKV namespace

Can be done only with Akamai API.

const EdgeGrid = require('akamai-edgegrid');

const { homedir } = require('node:os');
const { promisify } = require('node:util');

const edgercPath = homedir() + '/.edgerc';
const edgercSection = 'default';
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection,
});

const namespaceId = process.env.NAMESPACE;
const network = process.env.NETWORK || 'production'; // staging or production

eg.auth({
  path: `/edgekv/v1/networks/${network}/namespaces/${namespaceId}`,
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  body: {},
});

const send = promisify(eg.send.bind(eg));
send()
  .then(({ data }) => {
    console.log('Namespace deleting result', data);
  })
  .catch((error) => {
    console.error('Namespace deleting error', error);
    process.exit(1);
  });

Revoke EdgeKV access token

Can be done with Akamai CLI or Akamai API.

const EdgeGrid = require('akamai-edgegrid');

const { homedir } = require('node:os');
const { promisify } = require('node:util');

const edgercPath = homedir() + '/.edgerc';
const edgercSection = 'default';
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection,
});

const tokenName = process.env.TOKEN_NAME;

eg.auth({
  path: `/edgekv/v1/tokens/${tokenName}`,
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
    Accept: 'application/json',
  },
  body: {},
});

const send = promisify(eg.send.bind(eg));
send()
  .then(({ data }) => {
    console.log('Token revoking result', data);
  })
  .catch((error) => {
    console.error('Token revoking error', error);
    process.exit(1);
  });