akamai for devops · registration for the akamai developer program: to get the credentials to...

49
akamai get akamai-open/cli i-property ttempting to fetch command. ...... [ OK ] nstalling...... [ OK ] vailable Commands: update help list get property ee " akamai help [command] " for details. $ akamai get akamai-open/cli-property Attempting to fetch command...... [ OK ] Installing...... [ OK ] Available Commands: update help list get property See " akamai help [command] " for details. Akamai for DevOps 2018 WORLD TOUR

Upload: others

Post on 25-Mar-2020

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

akamai get akamai-open/cli-property akamai get akamai-open/cli-propertyAttempting to fetch command......Attempting to fetch command...... [OK]Installing...... [OK]Available Commands: update

help list get

propertySee "akamai help [command]" for details.

$ akamai get akamai-open/cli-propertyAttempting to fetch command...... [OK]Installing...... [OK]Available Commands: update

help list get propertySee "akamai help [command]" for details.

Akamai for DevOps

2 0 1 8 W O R L D T O U R

Page 2: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

About the DevOps World Tour Labs 3 Step 1: Get your Login Credentials 3 Step 2: Log In to the Hosted Environment 3

Property Manager API Tutorial 5 Prerequisites 5 Step 1: Choose a Property Name 5 Step 2: Explore the Base Property 5 Step 3: Create a New Property 6 Step 4: Update the Origin 7 Step 5: Activate Your Property 7

Use the Purge API 9 Prerequisites 9 Step 1: Access the CCU V3 API using Akamai CLI 9 Step 2: Access the CCU V3 API using HTTPie 10 Further Exercises: Use the ccu_v3.py code 11

Property Management with Terraform 13 Prerequisites 13 Glossary 13 Step 1: Create a Working Directory 14 Step 2: Create a Terraform Configuration 14 Step 3: Define the Current Property 16 Step 4: Update Your Property 16 Step 5: Apply and Verify Your Changes 18 Step 6: Use Terraform Input Variables 19

Analyze Site Speed and Revenue with mPulse 21 Step 1: Access the demo site 21 Step 2: Check your site’s pulse 22 Step 3: Use What-if to forecast revenue, conversion, and degradation 24 Step 4: Find performance optimizations 26 Step 5: Fix performance issues 28 Summary 29

System Setup 30 Option 1: Docker Install 30 Option 2: Local CLI Install 31 Option 3: Local Language Install 31 Option 4: Log In to the Hosted Environment (bc.akamaideveloper.com) 31

1

Page 3: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Authentication and Provisioning using Luna 33 Step 1: Add a new API credential using Luna 33 Step 2: Grant API access 34 Step 3: Configure your environment 36 Step 4: Create more credentials 37

CLI Overview 39 Step 1: Install the CLI Binary 39 Step 2: Install the Packages 40 Step 3: Browse Help 40

Diagnostic Tools 42 Prerequisites: 42 Step 1: Use the diagnostic-tools.py Code 42 Step 2: Access the APIs from the command line 45 Step 3: Advanced Additional Commands 47

2

Page 4: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

About the DevOps World Tour Labs The labs in this workbook are designed so that you can use your own laptop. You will be logging into a hosted system to do all of the lab work you see here. In the back, there are instructions for setting up and using your own system if you want to do that after the workshop.

Step 1: Get your Login Credentials You will get a username and password for our hosted working environment after filling out your registration for the Akamai Developer Program:

● To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form.

Step 2: Log In to the Hosted Environment Once you have the username and password, you can log in to our hosted environment for the duration of the event. You can access the environment via SSH. For macOS, Linux, and other *nix like systems with an SSH client installed, you can run the following from the command line, and you will be prompted for the password: $ ssh <username>@bc.akamaideveloper.com  For Windows, you can use PuTTY, which can be downloaded from: bit.ly/putty-download , and use the settings shown, and you will be prompted for the password:

3

Page 5: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

4

Page 6: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Property Manager API Tutorial Level: Intermediate Duration: 25-35 minutes In this tutorial you will work with the Property Manager API to create and configure a web property for the Akamai Intelligent Platform.

Prerequisites If you’re not working in the hosted environment:

● You need to have a docker container or system setup as in System Setup . ● All steps in this tutorial use the papi credentials you configured in Authentication and

Provisioning . If you built your credentials on your own, the section in the credentials file is expected to be ‘papi’

● Some of the advanced exercises require a local install of Python 2.7+ on your system, but these are optional. The rest of the exercises can be done using the CLI.

Step 1: Choose a Property Name Before getting started, pick a property name that's unique to you. We are working with the sandbox.akamaideveloper.com namespace, so your property will be < youruniquename>.sandbox.akamaideveloper.com . You'll use this property name throughout the tutorial, so be sure to remember it. Here’s a handy table that shows which string to use where.

Setup Type Shared Sandbox Your Account Sandbox

<propertyname> <yourname>.sandbox.akamaideveloper.com <yourpropertyname>

<hostname> <yourname>.sandbox.akamaideveloper.com <yourpropertyname>

<origin> <yourname>.origin.sandbox.akamaideveloper.com <youroriginname>

Step 2: Explore the Base Property To start off with, take a look at the property you’ll clone. ‘ akamai property’ has a ‘retrieve’ sub-command which fetches the rules for the property. Start out by retrieving the sandbox.akamaideveloper.com property. Scroll back up to the top and take a look at the information there.

5

Page 7: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

The rules include the accountID, and the group and contract associated with this property. Your new property will inherit these items from the cloned property. The propertyName is what we used to retrieve the rules, and that is also how we’ll perform the clone. Type the following into your terminal:

akamai property retrieve sandbox.akamaideveloper.com

You can look through the rules you’ve retrieved to get a better understanding of the structure and options. Do a search for ORIGIN_HOSTNAME to see what value is set there. We’ll be changing that shortly.

Step 3: Create a New Property Using the <propertyname> you determined above, create a clone of the sandbox base property. In the example below, I have chosen to call my property “khunter.sandbox.akamaideveloper.com”. Note that this is the property name , which can be distinct from the property hostnames. We’ll set those up in a moment.

akamai property create khunter.sandbox.akamaideveloper.com --clone sandbox.akamaideveloper.com

6

Page 8: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 4: Update the Origin Let’s set the origin for our property. The origin for your property is the “backend” system where Akamai goes to find the content to serve. It will work as it is, using the same origin as the cloned property, but we want it to be a custom value for your personal property. akamai property modify khunter.sandbox.akamaideveloper.com --origin

khunter.origin.sandbox.akamaideveloper.com

Step 5: Activate Your Property In order to do the purge exercises, your property will need to be activated. The DNS and other configuration pieces are done, all you need to do is a quick activation. Type the following command in the terminal window:

akamai property activate <propertyname> --network staging

7

Page 9: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Because we are activating on Akamai’s staging network, this command will take between 10 and 15 minutes. Deploying a new property to the Akamai production network takes about 60 minutes for your property configuration to be pushed out to over 200,000 servers worldwide. Once the property has finished activating you can see it at http://<yourname>.sandbox.akamaideveloper.com

Advanced exercises:

● In the python directory are the files you want to explore ● Here’s a selection of what you’ll find:

○ papi_create_datastore.py - creates a local property version cache, in the form of a Git repository.

○ papi_get_meta - Demonstrates how to get metadata from the command line. ○ papi_activate_cloudlet - This allows you to interact with the API and indicate

your preference as to ‘requestEmail’

8

Page 10: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Use the Purge API Level: Beginner Duration: 15-20 minutes In this tutorial you’ll learn three different ways to purge a file using the Purge API:

● Using the Akamai CLI tool – a wrapper for purge functionality to simplify the interaction ● From the command line using HTTPie – quick access to the API without writing code ● Using code from the repository or Docker container

Prerequisites ● If you’re not working in the hosted environment:

○ Docker container or local install as described in System Setup ○ You will work with the ‘ccu’ credential you created in .edgerc during the

Authentication and Provisioning tutorial. Note: remember, because we are testing on the staging network, we will need to purge on the staging network too.

Step 1: Access the CCU V3 API using Akamai CLI

In each step, we will purge an object using the new Akamai CLI utility. This utility provides easy access to different Akamai platform functions, including purge. You will be using the property you created in the Property Manager module for this exercise. For an example, I will be using khunter.sandbox.akamaideveloper.com for <hostname>, but the exercise is more fun if you have your own property to work with.

1. In your browser, head to your site: https://<propertyname> Refresh the page a couple of times. Notice that the timestamp doesn’t change (this is by design for the lab, normally one wouldn’t cache a timestamp).

2. Try ‘akamai help purge invalidate’ to see what options are available. 3. Type the following command in the terminal window:

$ akamai purge invalidate --staging http://<hostname>/index.html

Notice the use of the --staging flag to purge on the staging network. To purge on production, omit the flag.

9

Page 11: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

● The CLI command purges files from the Edge so they will be refreshed. This takes only

a few seconds. ● Browse to your site again. Did the timestamp change? That means the cache was

purged on your property. ● Try a few random URLs, and note what happens.

Step 2: Access the CCU V3 API using HTTPie Here, you make calls directly to the API using HTTPie, a command line tool for accessing HTTP APIs. This tool has been installed and configured in the Docker environment, and there are instructions for installing it on your system locally in System Setup.

1. In the terminal window, run the following command.

$ http -A edgegrid -a ccu: :/ccu/v3/invalidate/url /staging objects:='[" http:// <propertyname>"]' As with the Akamai CLI command, we append /staging to the API endpoint to purge on the staging network. When you want to purge on production, you should omit this.

Note: Pay particular attention to the formatting shown. If you get an unexpected result, make sure that all of the colons are included as indicated here.

This HTTPie command does the same thing as the ccu_v3.py code above: ● Because the body is set as a JSON object (the objects parameter), HTTPie

automatically uses POST for the call ● The POST command is sent to the invalidate endpoint

10

Page 12: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

● The POST body determines which objects will be acted upon ● Check your site to make sure the purge happened. Go ahead and do this a few times…

there will be a slight delay each time while the purge propagates.

Further Exercises: Use the ccu_v3.py code The most common way to work with an API is through code developed to perform the interaction. First, we’ll run the ccu-v3.py sample code from the python directory, which you can use as-is or as a starting point for your own purge utility. This code will make one call to the API to purge a file from the edge.

1. Open a terminal window and run the following command: python ccu_v3.py --verbose

2. Verify that your response shows that the system has successfully received the purge request and completed the purge in less than five seconds. The response includes various tracking information, but the important pieces are the estimatedSeconds and httpStatus , which should be 201 (created).

● The ccu_v3.py command uses the Purge endpoint of /ccu/v3/invalidate/url /staging to invalidate the specified resource or resources.

● The --verbose flag instructs the script to output details about the call and response body.

● The sample code for ccu_v3.py is freely available on github if you want to leverage it later during your own development: https://github.com/akamai/devops. Use command-line editing tools like nano or vim to inspect the code for ccu_v3.py in the Docker container.

11

Page 13: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

12

Page 14: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Property Management with Terraform In this tutorial you set up Terraform to manage an existing Akamai property. Terraform is a tool that enables you to manage infrastructure as code. You define the desired infrastructure in a simple configuration file, and then include that as part of your change management process (e.g. included in your revision control system, go through code reviews, etc.). Terraform takes that file and uses it to configure resources with one or more providers.

Prerequisites ● If you’re not using the hosted environment:

o You should have a docker container or system setup as in System Setup . o All steps in this tutorial will use the papi credentials you configured in

Authentication and Provisioning . If you built your credentials on your own, the section in the credentials file is expected to be ‘papi’

Glossary Before you get started, familiarize yourself with some terms you may encounter when working with Terraform.

Term Description Example

Provider A provider, or Terraform provider, is a plugin for Terraform that controls a specific service.

Akamai Provider

Resource Each provider exposes one or more resources that can be configured to your liking.

Akamai Property, AWS Instance, Azure Database

Data Resource Similar to a configurable Resource, however a Data Resource is used to read data from the service to use dynamically in your configuration.

AWS Availability Zones

Configuration A simple text file written using HashiCorp Configuration Language, or HCL.

Any file ending in a .tf file extension

State Terraform maintains the current state of the your infrastructure in the State.

A file ending in .tfstate, or stored in a shared state system like Terraform Enterprise.

13

Page 15: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 1: Create a Working Directory For this tutorial, you need the property manager API credentials you created earlier. Terraform itself is included in the akamaiopen/devops Docker Container.

1. To get started, run the docker container, or login to the remote docker environment: $ docker run -it akamaiopen/devops 

2. Once docker starts, create a new directory where you can work: $ mkdir terraform 

3. And then change directories into it.  $ cd terraform

Step 2: Create a Terraform Configuration Now create a Terraform configuration file called worldtour.tf using either vim (if you are familiar with it), or nano:

1. At the command line, enter either $ vim worldtour.tf or, $ nano worldtour.tf

2. To exit vim, hit <esc>, followed by :wq<enter>. To exit nano, hit Ctrl+X, then hit Y (yes) to save your work. 

Note: Terraform automatically uses all files ending in .tf within the current directory by default.

Provider Configuration The configuration file is made up of two parts: the configuration for the provider itself, such as API credentials, and the configuration of the providers resources, in this case your property. The provider configuration for the Akamai provider defines the path to your .edgerc file, and the appropriate sections to use for each service. For this purpose, you only need to specify the “papi” section to work with the Property Manager API:

1. In a text editor, open worldtour.tf. 2. Add the following:

provider "akamai" {      edgerc = "/path/to/your/.edgerc"      papi_section = "papi" }

Note: If you use the docker container, use edgerc = "/root/.edgerc"

14

Page 16: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Property Configuration Terraform can only manage and understand resources it knows about, so you need to define an akamai_property resource for your existing property.

● Within the worldtour.tf configuration file, add the following line at the end of the configuration:

resource "akamai_property" "a_unique_name" { }

Each resource is defined using two arguments, the type of resource, in this case akamai_property, and a unique name. You should change “a_unique_name” in the example above to a unique (to this configuration file/resource type) name, it should contain only alphanumeric characters, along with underscores. It’s a good idea to make it something easily recognizable and short, such as the subdomain for the property e.g. “www” or “sandbox”. For this tutorial, use the “myname_sandbox” format, so for me it would be “dshafik_sandbox ”. With your empty property placeholder in the configuration file, you can now import the remote property state using terraform import . To do this you need to provide the resource “address” — the resource type followed by a period, and then the unique name given above — and the property name. For example, dshafik.sandbox.akamaideveloper.com .

1. At the command line, enter: $ terraform import akamai_property.dshafik_sandbox dshafik.sandbox.akamaideveloper.com

terraform import akamai_property.dshafik_sandbox dshafik.sandbox.akamaideveloper.com

akamai_property.dshafik_sandbox: Importing from ID

"dshafik.sandbox.akamaideveloper.com"...

akamai_property.dshafik_sandbox: Import complete!

Imported akamai_property (ID: prp_431888)

akamai_property.dshafik_sandbox: Refreshing state... (ID: prp_431888)

Import success! The resources imported are shown above. These are

now in your Terraform state. Import does not currently generate

configuration, so you must do this next. If you do not create configuration

for the above resources, then the next `terraform plan` will mark

them for destruction.

This will only update the state to reflect the current property, not the configuration file , you can see this by running terraform show :

$ terraform show akamai_property.dshafik_sandbox:

15

Page 17: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

 id = prp_#####  account_id = act_#####  contract_id = ctr_#####  group_id = grp_#####  name = dshafik.sandbox.akamaideveloper.com  product_id =  rule_format =   version = 1

Step 3: Define the Current Property Now that Terraform knows of your property, you need to add some more configuration to describe the current property state to enable you to update. First add the name, account_id, product_id, cp_code, a contact email address, the public hostname, and the network on which to activate the property. You can retrieve the account_id, contract_id, and group_id from the output of terraform show above. Other values you will need are:

● product_id: prd_SPM ● cp_code: 657536 ● hostname: the public hostname you assigned to the property, like <your

name>.sandbox.akamaideveloper.com ● network: staging

1. Within the worldtour.tf configuration file, add these inside your

akamai_property resource block: resource "akamai_property" "dshafik_sandbox" {      name = "property name"      account_id = "act_#####"      product_id = "prd_SPM"      cp_code = "657536"      contact = ["[email protected]"]      hostname = [ "username.sandbox.akamaideveloper.com"]      network = "staging" }

With these additions, you now have a configuration that is associated with the property and can be used to make changes going forward.

Step 4: Update Your Property To update the property, you can now add new rules to the configuration. This is done using a “rules” block inside of your property resource. You’ll add a new rule called “l10n” (short for Localization), that will change requests to / so they transparently serve /Timezone/Identifier instead.

16

Page 18: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

1. To start, define the top-level rules block itself, this is the default rule:

rules { }

2. Next, inside the rules block, add a new child rule block:

rule {         name = "l10n"         comment = "Localize the default timezone"        }

3. Then within the rule block, define the criteria to match incoming request against. In this case, you’re going to do a match against the incoming path for /:  criteria {    name = "path"    option {         key = "matchOperator"         value = "MATCHES_ONE_OF"    }    option {         key = "matchCaseSensitive"         value = "true"    }    option {         key = "values"         values = ["/"]    }  }

Each criteria block consists of the name of the criteria (path), and the options for the criteria configuration. Each option key-value pair is defined using an option block which specifies the key, and then either a value, or values array. For the path criteria we define the options:

● matchOperator = MATCHES_ONE_OF ● matchCaseSensitive = true ● values = an array containing "/"

Next, specify the behavior applied when the criteria is match. Each behavior, similar to criteria, are defined in behavior blocks that consist of a behavior name, and option blocks for the behavior configuration. For this particular behavior, use the rewriteUrl behavior to rewrite Edge requests to / to /Timezone/Identifier request against origin: behavior {

17

Page 19: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

   name = "rewriteUrl"    option {      key = "behavior"      value = "REWRITE"    }    option {      key = "targetUrl"      value = "/America/Los_Angeles"    } } Note: You can find a list of timezone identifiers at: php.net/timezones

This time, the options are:

● behavior = REWRITE ● targetUrl = /America/Los_Angeles 

Step 5: Apply and Verify Your Changes In this step you view the pending changes and then apply them.  

1. Use terraform plan to see a complete list of changes that will be made to the property when you execute the configuration file. $ terraform plan

2. To apply your changes, use terraform apply: $ terraform apply

3. Once terraform apply completes you should see a success message like: Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Once the configuration has finished activating, you should be able to browse to your property in your browser and see the time in your local timezone. Note: You may need to purge your property!

How it works Note that terraform apply executes against the configuration to perform the changes displayed in terraform plan. Apply is smart enough to parallelize as many resources as possible, in this case you only have one resource, but with more complex configurations this ensures that your changes are made as quickly as efficiently as possible.

18

Page 20: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 6: Use Terraform Input Variables One of the best features of Terraform is it’s support for input variables. Input variables allow you to define variables that can be populated either via the command line, the environment, or a configuration file. Try this by adding a simple variable to allow you to control when the property is activated with new changes.

1. Open worldtour.tf configuration file and add a variable block to the top-level.

variable "activate" {  default = false }

This defines a variable called “activate” which defaults to false. You can then use this variable to set the “activate” flag of your property configuration. All user variables are accessed under the special “var” collection, meaning the address of your “activate” variable is “var.activate”.

2. To use the variable, add the following at the top-level of your property block:

activate = "${var . activate}" This uses the special interpolation syntax of ${} to insert your variable as the value. Note: Terraform requires that interpolation is done within strings, but will automatically convert booleans, as in this case.

Set the Variable Now that you have a variable, the property defaults to not activating, but you can toggle this by specifying the “-var” flag when running terraform plan or apply : $ terraform apply -var activate=true This will set activate to true, activating the property.

Completed Configuration File When you’ve completed the configuration, it should look similar to this: provider "akamai" { edgerc = "/root/.edgerc" papi_section = "papi" }

19

Page 21: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

variable "activate" {  default = false } resource "akamai_property" "dshafik_sandbox" { name = "dshafik.sandbox.akamaideveloper.com" account_id = "act_######" product_id = "prd_SPM" cp_code = "657536" contact = [ "[email protected]" ] hostname = [ "dshafik.sandbox.akamaideveloper.com"] network = "staging" rules {    rule {      name = "l10n"      comment = "Localize the default timezone"      criteria {        name = "path"        option {          key = "matchOperator"          value = "MATCHES_ONE_OF"        }        option {          key = "matchCaseSensitive"          value = "true"        }        option {          key = "values"          values = [ "/" ]       }     }      behavior {        name = "rewriteUrl"        option {          key = "behavior"          value = "REWRITE"        }        option {          key = "targetUrl"          value = "/America/Los_Angeles"        }     }   } } activate = "${ var. activate }" }

20

Page 22: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Analyze Site Speed and Revenue with mPulse Level: Beginner Duration: 25-35 minutes This module gets you started using mPulse, Akamai’s Real User Monitoring tool. You may already know how long your pages load using other tools, but mPulse looks at performance differently, because it also collects behavioral metrics like conversion rate, session length, and bounce rate. mPulse tells you not only how fast your site is, but how fast it should be. mPulse works by installing a small piece of JavaScript on every page of your site. Whenever a visitor looks at a page on your site, mPulse collects over 200 facts about that experience, and sends them back to mPulse’s data warehouse. Most importantly, it does this by measuring what matters most: your real users in real time!

Step 1: Access the demo site First, you need to log in to a running copy of mPulse with sample data.

1. Go to www.soasta.com/mpulse in your browser. 2. Click the SEE DEMO button. You should now be logged in to a demo session of mPulse.

You should see the default dashboard, a real-time view of performance over the last 60 minutes on your site.

21

Page 23: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

3. Watch the dashboard and notice that new minutes feed in automatically from the right

side of the chart, pushing the oldest minutes off the left edge as they go. The chart is usually updated within 10 seconds of real user interactions, so you can spot performance issues the instant they appear.

4. Below the time series chart, notice how traffic is divided into a few key dimensions: Geographies, Page Groups, Operating Systems, and Browsers. This is just a sample; you can track the dimensions that are important to you.

Step 2: Check your site’s pulse In this step you’ll check your site’s health in real time, to see how it’s performing across different segments of users. mPulse supports many different types of data segmentation using the filter bars across the top of its dashboards. For example, you can filter data by browsers, page types, operating systems, device types (mobile, tablet, or desktop), geographic countries and regions, Internet service providers (ISPs), and many others. You can even create your own user-defined dimensions to segment traffic into custom groups, such as logged in users or paid accounts. Finally, you can combine these filters to analyze the exact segment of traffic you are interested in. We’ll use this capability throughout this tutorial. Feel free to explore and try out different combinations at any time on your own in the live demo.

1. At the top of the mPulse display, click Central.

22

Page 24: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

2. You’ll see a list of dashboards. Double-click the Showcase dashboard.

The Showcase dashboard gives you animated view of your traffic on a 3D globe. This dashboard is one of the most popular ones we see in Network Operations Command Centers

23

Page 25: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

(NOCC) and team rooms. The blinking lights on the globe are user interactions within ten seconds of real time. At a glance, it’s easy to see if everything is green (all good) or red (we have a problem).

Tell me more! mPulse has several default dashboards that support different monitoring use cases, all of which can be found in the Central tab. You can also create an unlimited number of your own custom dashboards. When you create a custom dashboard, it shows up in Central as well. Note that this feature has been disabled in the anonymous demo account you’re using for this tutorial. Another key use case for mPulse is predicting the amount of additional revenue that would result from a given performance improvement, which is what our What-If dashboard does. It can also be used to see what would happen if you experienced a performance degradation.

Step 3: Use What-if to forecast revenue, conversion, and degradation mPulse not only shows you how fast you are , but how fast you need to be in order to meet your users’ expectations. Most site owners guess at this, or adopt a recommendation from analysts or research studies based on users of other web sites. By using mPulse, you can directly measure how your users are impacted by delays on your site, leading to a much more accurate estimate of what your target speed should be.

1. Return to the Central tab by clicking Central in the top bar.

24

Page 26: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

2. Double-click the What-If dashboard. You should see a screen that looks like this:

This dashboard shows the last 30 days of data collected from real visitors to the site. You can see that 2.2 million users visited, 3.42% of whom converted. Conversions in mPulse are user-defined and can mean any action you want the user to take, such as purchasing something from your site or signing up for a subscription. Another user-definable field is Revenue. This could be the value of a subscription or the total value of the user’s shopping cart at the time of checkout. In the example above, we can see that the site’s conversions have generated $123.9M in revenue over the last 30 days. In terms of performance, we see that the median Session Load Time over the last 30 days has been 3.51 seconds. So 3.51 seconds is how fast we currently are, but how fast do we need to be? Let’s use the model to choose a target speed and find out how much it would be worth to our business. To do this, we will use the sliders at the bottom of the What-If dashboard.

1. Grab the slider under Session Load Time and move it to the left until it is set to 3s . Notice that the histogram in the center of the dashboard displays a shaded overlay, and the values for Conversion and Revenue have changed.

2. Try moving the Conversion slider to a new value. Notice that the Revenue and Session Load Time sliders change correspondingly. This is because the sliders are all locked

25

Page 27: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

together based on the data in the model, so it is also possible to approach setting your performance goals by starting with either of the other two sliders.

3. You can also use this model to predict what might happen when your site experiences a negative impact on performance. Move the Session Load Time slider to 4 seconds and note the change. By playing with the settings, you can determine what level of severity to allocate to different amounts of degradation in response time.

Technical and behavioral data are often collected independently by disparate tools, and therefore siloed off from each other, making these insights unavailable. The What-If dashboard models the relationship between speed and revenue. This is only possible because mPulse collects both technical and behavioral metrics together and can correlate these two sets of data.

Tell me more! If your site isn’t conversion-drive, such as a media publisher that uses free content to attract an audience for ad revenue, you may be wondering how mPulse is useful to you. The model also works for use cases where you want to drive more engagement via deeper sessions and more page views. To see an example, click the triangle next to Conversion and change its value to Session Length. You’ll see that the model changes to show the relationship between speed and how many pages visitors click. You can now adjust any of the sliders to see how much more traffic you could generate by changing the speed of your site.

Step 4: Find performance optimizations Now that you know how fast your site is, and how fast you want it to be, it’s time to identify how you can do to improve its speed. Open the DevOps dashboard and drill down on a few dimensions to find an area where performance optimizations would improve the user experience.

1. Return to the Central tab by clicking Central.

26

Page 28: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

2. In the dashboard list, double-click the DevOps dashboard, You should see a dashboard that looks like this:

3. Switch the view so that you’re looking at seven days of total data. a. Underneath the top bar there is a list of filters. Click the one that says Last 60

Minutes to display a drop-down. b. Click Last 7 Days and then OK to apply the change. The dashboard will update

automatically. 4. Mobile traffic is the fastest growing traffic segment for many sites, so check on

performance of just the mobile users. Click the filter at the top that says All Device Types and change its value to Mobile . The dashboard automatically updates to a filtered view that only considers mobile traffic.

5. Look at the titled Timers . a. Are mobile users spending more time waiting on Back-End Time (time between

page request and the first byte of the response) or Front-End Time (time spent waiting on the HTML page and all of its embedded content to load)?

b. Note which of these (back-end or front-end) is where users are spending more time waiting. You’ll use this information later in another dashboard.

6. Find the Page Groups widget. Page Groups are user-defined values that group similar URLs on the site together. For example, all visits to article pages or product pages. Note the name of the Page Group that is currently receiving the most traffic on this site. You’ll use this value in the next dashboard.

27

Page 29: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 5: Fix performance issues Now that you have an idea where on the site users are spending the most time and where they may be encountering delays, you need to look at some detailed data to understand why.

1. Go to Central again and double-click the Waterfall dashboard. You should see a dashboard that looks like this:

2. In the previous dashboard, you saw that mobile users are likely to experience slower performance, so we’ll investigate that. Find the filter that says All Device Types and change it to Mobile . The Waterfall dashboard automatically updates to show data from just the mobile users.

3. Next, filter the view to show visitors to the most common type of page on the site. Change the filter from All Page Groups to the value of the Page Group you discovered in the previous dashboard.

4. The previous dashboard showed that front-end time was where most users experienced delays. Focus the view on users who have a problem in that area. Find the Beacon Page Load (ms) filter and change it to Front-end (ms). Then, set the value of the input box next to the filter to 5000 ms . Now you’re looking at every example of a real user having to wait more than 5 seconds on front-end time on their mobile devices.

5. Scroll through the different Waterfall charts you see in the resulting view. mPulse records every user experience at the object level, so everything keeping your users waiting

28

Page 30: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

should be recorded here. Look for things like single objects blocking the page from rendering (“front-end single points of failure”) or images taking a long time to load.

Summary This quick tour only scratches the surface of what mPulse can do. To see how mPulse can help you find and fix performance problems interfering with your revenue, try out mPulse on your site to see how it works with your data.

1. Log into Luna and click Marketplace .

2. In the navigation bar, click Web Experience . 3. On the mPulse card, click Learn More . 4. Click Free to start a free trial of the product. 5. Accept the Terms of Service. 6. Click Configure to go directly to mPulse.

You can use Property Manager to deploy mPulse to your site . Go here for more details and instructions: https://control.akamai.com/dl/rd/propmgr/Content/mPulse.htm.

29

Page 31: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

System Setup When you head back to your home, you can still do these labs (and a few others) with your own account and system. There are several ways for you to get up and running with the Akamai Platform. Here are instructions on setting up the system.

● Docker install – Use Docker to get a pre-configured container on your system. This protects your existing development environment and allows you to get right to the exercises.

● Local CLI install – Install just the CLI and needed language runtimes. This is a good choice if you’re mostly interested in command line interaction, and want to have the commands available on your system for future use. You won’t be able to do some of the modules interactively with this installation.

● Local language install – Install the language runtime, example code, and CLI natively on your computer. This is needed for many of the modules in the workbook.

● Hosted Environment (bc.akamaideveloper.com) – The hosted environment has everything you need without downloading or installing anything on your machine. This option is only used at events, where the instructions are provided for you.

Note: To complete the Terraform lab you must use the Docker install, or use bc.akamaideveloper.com in addition to the Local CLI/language installs.

Option 1: Docker Install 1. Install Docker Community Edition for your platform from the Docker Store .

2. Retrieve and run the Akamai DevOps Container. This will retrieve the Akamai DevOps

docker container, and drop you into a bash shell with all needed languages and tools

30

Page 32: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

installed. docker run -it akamaiopen/devops

Option 2: Local CLI Install If you’re doing a local install of the CLI only, you can proceed to the CLI Overview tutorial.

Option 3: Local Language Install To work with the code samples directly, you’ll need to download the runtime for the sample code.

● For diagnostic tools and ccu code, you can use either Python 2.7.10+ or Node 7+. Follow the instructions for your OS at http://python.org or http://nodejs.org .

● For extended property manager examples, you need Python 2.7.10+. Follow the instructions for your OS at http://python.org .

● To use HTTPie, a command line HTTP utility configured to work with the Akamai platform, you’ll need Python 2.7.10+. ‘pip install httpie-edgegrid’

Once you’ve installed your language of choice, download the devops repository from https://github.com/akamai/devops.

Option 4: Log In to the Hosted Environment (bc.akamaideveloper.com) Once you have your credentials, you can log in to our hosted environment for the duration of the event. You can access the environment via SSH: Host: bc.akamaideveloper.com Username: worldtour Password: afdo-worldtour$  For Windows, use PuTTY, which can be downloaded from: bit.ly/putty-download

31

Page 33: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

32

Page 34: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Authentication and Provisioning using Luna Level: Beginner Duration: 15-25 minutes In this tutorial, you learn how to set up authentication and provisioning in Luna, and retrieve the authentication tokens needed to make OPEN API calls. The authentication tokens are required for other API-based tutorials that follow. The high-level steps for provisioning credentials are:

1. Add a new API credential using Luna. 2. Grant specific API access. 3. Set up the credentials in your environment. 4. Verify your credentials.

You’re going to do these three steps four times; once for each set of credentials you’ll need for the three API tutorials that follow.

Step 1: Add a new API credential using Luna In this step, you create a new API credential that you’ll use for the tutorials in this workbook. The API credential also determines the group access, and which specific APIs it can access.

1. In your browser, log in to Luna at https://control.akamai.com . ○ Log in using the shared credentials you’ve been given for the exercises.

2. In the menu at the top, click the Configuration tab and choose Manage APIs . 3. On the Manage API Access screen, click New API Client for Me . 4. On the Create New API screen accept the default Group Access and click Next.

Tell me more! You’re right in the middle of a wizard, but it’s a good time to reflect on credentials and groups. For the purposes of these tutorials, it’s OK to use the default group access, which is the same as the user creating the credentials. But in reality, it’s pretty rare that everyone has the same access.

33

Page 35: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 2: Grant API access You’re now ready to set up API grants, which is a fancy way of saying “which API can this credential access?” We’re assuming you want to do all the tutorials in this workbook, so the instructions here go through setting up each of them, one at a time. The information you need for each credential set is as follows:

Tutorial Grant Config section

Diagnostic tools Diagnostic Tools default

Purge API CCU (all CPCodes) ccu

Property Manager API Property Manager papi

Alerts Alerts alerts

1. In the Client Name field, enter <tutorial>:<your name>. For example, Diagnostic Tools: Kirsten Hunter

2. Ensure the “API Group” is set to “General OPEN APIs ” 3. Now set the grants for the API you want credentials for Diagnostic Tools. Scroll through

the list of grants until you find Diagnostic Tools and set the permissions to READ-WRITE and click Submit.

4. In the next screen click the New Credential button. 5. A new screen will appear showing the four fields needed to authenticate. This screen will

automatically close after two minutes, so you need to ensure you copy the credentials quickly into the right section of your .edgerc configuration (see screenshot below), or click the “Download Client Tokens button to download a text file to your computer. After you complete all of these instructions for Diagnostic Tools, you’ll do the same set of instructions again, for both Property Manager and Purge API. Don’t set these now, but for later reference, you’ll be using:

○ Property Manager: set the permissions for Property Manager to READ-WRITE. ○ Alerts: set the permissions for Alerts to READ-WRITE

○ Purge: i. Ensure the “API Group” radio button is set to “OPEN CCU / Fast Purge

APIs ”. ii. Select CCU APIs and set permissions to READ-WRITE

iii. Click the “Allow purge by CP Code ” check box. iv. Select the radio button “All current and new CP Codes ”

34

Page 36: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

6. Click Select to move to the credential creation process.

7. On the following Manage API Access screen, click New Credential which will pop up a screen with the credential information. This is the only time you’ll have access to the complete set of credentials! The credentials include all four pieces of required credential

35

Page 37: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

information – Client token, client secret, host and access token. These credentials will be set up for use in the other tutorials quickly and easily in the next step.

8. Select the credential information and copy them to the clipboard with Ctrl-C.

Step 3: Configure your environment In this step, you’ll set up the credentials for the environment you’ll be working in. You’ll need

to use a text editor and create a file on the system called .edgerc in your home directory.

● If you’re using Docker, use ‘vi’ or ‘nano’ to edit the file:

# vi ~/.edgerc

● If you’re using a Mac, you can use any standard text editor, including vim, and save the

file as .edgerc in your home directory.

● On Windows, create the file using notepad, and then save it as .edgerc in your home

directory. You may need to rename the file at the command prompt to get it to the

correct name.

For each of the sections in the file, there will be a section header and four variables. This file is

formatted as a standard INI file.

Each section should look similar to this:

[Config section]

client_secret = XXXXX=

36

Page 38: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

host = XXX.luna.akamaiapis.net

access_token = XXXXX

client_token = XXXXXXX

Step 4: Create more credentials 1. Now that you’ve created credentials for the Diagnostic Tools tutorial, create and verify

the credentials for the remaining functions: a. Property Manager API b. Alerts API c. Purge API

Tutorial Grant Config section

Diagnostic tools Diagnostic Tools, Alerts default

Property Manager API Property Manager papi

Alerts API Alerts alerts

Purge API CCU (all CPCodes) ccu

When you have finished, your credential file should look like this: [papi]

client_secret = XXXXX=

host = XXX.luna.akamaiapis.net

access_token = XXXXX

client_token = XXXXXXX

[default]

client_secret = XXXXX=

host = XXX.luna.akamaiapis.net

access_token = XXXXX

client_token = XXXXXXX

[alerts]

client_secret = XXXXX=

host = XXX.luna.akamaiapis.net

access_token = XXXXX

client_token = XXXXXXX

[ccu]

client_secret = XXXXX=

host = XXX.purge.akamaiapis.net

access_token = XXXXX

client_token = XXXXXXX

37

Page 39: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Tell me more! ● You can create the credentials before starting each API tutorial, or create them all at

once. The credential file will have separate credentials for each of the APIs in the credential file located on your system.

● In this tutorial you set up one credential per API. This was necessary because the scripts used by later tutorials are looking specifically for certain credentials. How you set up API privileges on your own account is up to you, but note that you don’t typically set up one credential that has access to all API, but rather setup credentials for each individual client application granting access only to the APIs it needs.

38

Page 40: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

CLI Overview Level: Beginner Duration: 10-15 minutes In this tutorial you’ll install the Akamai CLI tools which you’ll need for later sections in this workbook. You’ll also explore the basics of the interface and install the Property Manager and Purge packages to your system. Akamai CLI is at its core a package manager that helps you build a toolkit of packages and provides interaction with the Akamai platform. The CLI can install, uninstall, or update packages. It can also upgrade itself as needed. It can auto-check for new versions of itself and allow you to install new releases; this is configurable if you don’t want the checks.

Step 1: Install the CLI Binary The binary is available for most modern platforms. You can retrieve it in a few ways.

1. Select the appropriate binary from https://github.com/akamai/cli/releases/latest and place it in your path as ‘akamai’.

2. If you use macOS and have homebrew on your system, you can get the binary with: brew install akamai

3. If you have Node 7+ installed on your system, you can get the binary with: npm install -g akamai-cli

 This image shows a typical installation of the CLI. Your screen should look similar.

 

39

Page 41: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 2: Install the Packages In this tutorial, you’ll install the property and purge packages.

1. First explore what the install command can do by entering akamai help install at the command line.

2. Now that you know what install can do, enter akamai install property

purge to install both packages.

Step 3: Browse Help Now that you know how to access the help, you can find out what’s available for Property Manager and Purge. Note that you won’t be able to perform commands against the Akamai platform until you’ve gone through the Authentication and Provisioning tutorial, but you can see what the CLI is able to do pretty easily.

40

Page 42: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

1. At the command line, enter akamai help property to see what’s possible with Property Manager.

2. This gives you an overview of what you can do with Property Manager, but you can also

drill into the individual commands. Try it now using akamai help property modify .

3. In a similar manner, try the top level help for Purge: akamai help purge . 4. And now drill into the invalidate command: akamai help purge invalidate .

41

Page 43: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Diagnostic Tools Level: Intermediate Duration: 25-35 minutes In this tutorial you’ll learn how to use the diagnostic tools API two different ways: using sample code, and using a command line interface with HTTPie. Using both methods, you’ll retrieve a list of locations from the API and run a dig command from one of the locations. The dig command is a network utility used for inspecting traffic from DNS servers, but in this case we're simply using it as an example of API interaction.

Prerequisites: ● You’ll use the environment you configured in System Setup , either a Docker container or

a local system install.

Step 1: Use the diagnostic-tools.py Code The first task is to run the diagnostic_tools.py sample code. This code makes two calls: one call to the locations endpoint to choose a location, and then a dig command from that location.

1. You should already have a terminal window open. If not, open one. Then, run the following commands: cd python

python diagnostic_tools.py

42

Page 44: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

2. The sample code supports --verbose and --debug flags to help you understand what’s happening. The --verbose flag instructs the tool to print out the server responses, so you can inspect the structure of the responses for use in your code. In the terminal window, run the following command:

43

Page 45: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

python diagnostic_tools.py --verbose

3. The --debug flag prints out all of the details of the HTTP transaction. This is very handy for debugging issues you might be having with API interaction. Try this as well: python diagnostic_tools.py --debug

Tell me more! Before moving on, inspect the code for diagnostic-tools.py using nano or vim in the Docker container, or using your favorite text editor on your local system. The sample code is freely available on github if you want to leverage it later during your own development: https://github.com/akamai/devops

44

Page 46: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 2: Access the APIs from the command line

Next, you’ll make calls directly to the API using HTTPie, a command line tool for accessing HTTP APIs. This tool has been installed and configured in the Docker environment.

1. In the terminal window, run the following command:

$ http -A edgegrid -a default:

:/diagnostic-tools/v2/ghost-locations/available

This command pulls a list of the edge locations you can use for the upcoming dig call. Choose one of them (for instance, "vienna-austria") for use in the next command.

45

Page 47: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

2. In the terminal window, run the following command:

$ http -a default:

:/diagnostic-tools/v2/ghost-locations/vienna-austria/dig-i

nfo hostName==developer.akamai.com

This command runs the dig command, performing a lookup on the specified hostname from the edge location you specified. Try a few other locations from the first call, and observe how the output differs.

46

Page 48: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

Step 3: Advanced Additional Commands If you’re interested in trying additional endpoints, select one of the endpoints from the reference tab and try it on the command line. In the following instructions, you’ll use Get a Translated URL, which gives high-level information about an Akamaized URL.

Note : Many of the diagnostic-tools API calls can only be made against the URL for the account making the call - this includes translated url, log-lines, and other endpoints. Making these calls on other URLs will result in authentication errors.

1. Point your browser to https://developer.akamai.com/api/luna/diagnostic-tools/overview.html

2. Select Get a Translated URL. The basic format of the request is: http –a <section>: :<endpoint> <options>

● <section>: This is the authorization section for the credentials file. The default section from Authentication and Provisioning is default , so you’ll replace <section> with default .

● <endpoint>: This is the endpoint you wish to run from the list on the documentation page. So, for Get a Translated URL, the endpoint would be /diagnostic-tools/v2/translated-url

● <options>: Options are sent using the format variable==value .

To send the URL https://sandbox.akamaideveloper.com using the default section and the translated URL endpoint, the command would be the following:

http -a default: :/diagnostic-tools/v2/translated-url

url==https://sandbox.akamaideveloper.com

Explore the various commands available within Diagnostic Tools. The credential you created gives you the ability to get information or even run commands on remote edge servers using curl. Try running a curl command to the host https://developer.akamai.com/ from the San Jose location.

47

Page 49: Akamai for DevOps · registration for the Akamai Developer Program: To get the credentials to login, point your browser to bit.ly/afdo-worldtour and fill out the form. Step 2: Log

developer.akamai.com