Deploy Hello World
Now that you've created the code bundle in the previous step, you can use HTTPie and httpie-edgegrid to access the Akamai APIs.
Add an EdgeWorker version
- Add a new version to the Hello World EdgeWorker ID.
cat <edgeworker code bundle> | http --timeout=30 --auth-type edgegrid -a <API credentials section>: POST :/edgeworkers/v1/ids/<edgeWorkerId>/versions Content-Type:application/gzip
-
Replace
<edgeWorkerId>
with the ID of your Hello World EdgeWorker. -
Replace
<edgeworker code bundle>
with the filename and path to the Hello World code bundle.
- Issue this API request to verify that the EdgeWorker version was created:
http --timeout=30 --auth-type edgegrid -a <API credentials section>: POST :/edgeworkers/v1/ids/<edgeWorkerId>/activations network=<network> version=<version>
-
Replace
<edgeWorkerId>
with the ID of your Hello World EdgeWorker. -
Replace
<network>
withSTAGING
. -
Replace
<version>
with the version number of your Hello World EdgeWorker ID.
Activate the EdgeWorker version
- Activate the EdgeWorker version on the Akamai network. Note the
activationId
. You'll need it to monitor the activation status.
http --timeout=30 --auth-type edgegrid -a <API credentials section>: POST :/edgeworkers/v1/ids/<edgeWorkerId>/activations network=<network> version=<version>
-
Replace
<edgeWorkerId>
with the ID of your Hello World EdgeWorker. -
Replace
<network>
withSTAGING
. -
Replace
<version>
with the version number of your Hello World EdgeWorker ID.
- To monitor the activation of the EdgeWorker version, try issuing this API request.
http --timeout=30 --auth-type edgegrid -a <API credentials section>: GET :/edgeworkers/v1/ids/<edgeWorkerId>/activations/<activationId>
-
Replace
<edgeWorkerId>
with the ID of your Hello World EdgeWorker. -
Replace
<activationId>
with the activation response.The
activationId
was provided in the previous step when the EdgeWorker ID was activated.
- Next, follow these instructions to test the Hello World code bundle.
Updated almost 3 years ago