Skip to content

Commit

Permalink
Merge pull request actions#121 from akamai/connector-1.5.0
Browse files Browse the repository at this point in the history
Connector 1.5.0
  • Loading branch information
herzykj committed Apr 11, 2023
2 parents fa29aca + f50f044 commit e714e6e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 36 deletions.
67 changes: 33 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To use this tool you need:
* [Akamai CLI](https://github.com/akamai/cli) installed. If you have a Mac with brew installed, run this command: `brew install akamai`.
* An API client that contains both the Sandbox and Property Manager APIs with read-write access. Follow the steps in [Get Started with APIs](https://developer.akamai.com/api/getting-started) to learn how to configure credentials to access the API.
* Node versions supported: any active LTS, maintenance LTS and current version (according to [nodejs schedule](https://nodejs.org/en/about/releases/)), currently: 10.x, 12.x, 14.x and 15.x
* Java version 8
* A supported Java version, currently 8, 11, 15 and 17.

## Quick Start

Expand Down Expand Up @@ -67,14 +67,14 @@ You have two options to test the Sandbox.
* Run this curl command: `curl --header 'Host: www.example.com' http://127.0.0.1:9550/`

#### Step 5: Validate that your responses are coming from a Sandbox
All Sandbox traffic is tagged with the response header `X-Akamai-Sandbox: true`. Use the [Developer Toolkit](https://developer.akamai.com/tools/akamai-developer-toolkit-chrome) to validate the presence of the header.
All Sandbox traffic is tagged with the response header `X-Akamai-Sandbox: true`. You can use e.g. the [Developer Toolkit](https://github.com/akamai/akamai_developer_toolkit) to validate the presence of the header, Network Monitor in any browser or similar tools that display HTTP headers.

#### Debug and report issues
You are all set, happy debugging! If you experience any issues with Sandbox, raise them as a [github issue](https://github.com/akamai/cli-sandbox/issues). Feel free to create a pull request with the fix or suggestion.
___

## Overview of Commands
Sandbox CLI enables you to manage sandboxes by calling the [Sandbox API](https://developer.akamai.com/api/core_features/sandbox/v1.html).
Sandbox CLI enables you to manage sandboxes by calling the [Sandbox API](https://techdocs.akamai.com/sandbox/reference/welcome-to-sandbox-api).

Every command has a built-in help available by using `--help` or `-h`. Alternatively, you can use `akamai sandbox help [command]`

Expand Down Expand Up @@ -118,56 +118,55 @@ Commands:
```

## Customizable Template
You can use this example "recipe" to quickly customize the sandbox to your development environment. Copy the code below and paste it into a text editor.
You can use this code sample to quickly customize the sandbox to your development environment. Copy the code below and paste it into a text editor.

```
{
"sandbox":{
"clonable":true,
"properties":[
{
"property":"123456:2",
"requestHostnames":[
{
"sandbox": {
"clonable": true,
"properties": [
{
"property": "123456:2",
"requestHostnames": [
"localhost2"
],
"cpcode": 1234
},
{
"hostname":"www.example.com",
"requestHostnames":[
{
"hostname": "example.com",
"requestHostnames": [
"localhost2"
]
},
{
"rulesPath":"./rules-1.json",
"requestHostnames":[
{
"property": "example.sandbox.property.com:1",
"rulesPath": "./rules-1.json",
"requestHostnames": [
"localhost3"
]
}
]
},
"clientConfig":{
"sandboxServerInfo":{
"secure":false,
"port":9550,
"host":"127.0.0.1"
"clientConfig": {
"sandboxServerInfo": {
"secure": false,
"port": 9550,
"host": "127.0.0.1"
},
"originMappings":[
{
"from":"origin-www.example.com",
"to":{
"secure":false,
"port":8080,
"host":"localhost"
"originMappings": [
{
"from": "origin-www.example.com",
"to": {
"secure": false,
"port": 8080,
"host": "localhost"
}
}
]
}
}
```
1. Edit the information according to your development environment and property specifications.
1. Save the file with a `.json` extension (e.g., `example_recipe.json`)
1. Run this command on your file `akamai sandbox create --recipe=./example/example_recipe.json ` to instantiate the sandbox client according to the defined specifications.

## Resources
For more information on Sandbox, refer to the [User Guide](https://learn.akamai.com/en-us/webhelp/sandbox/sandbox-user-guide/).
1. Edit the information for `sandboxServerInfo` and `originMappings` according to your development environment and property specifications. For more information on which fields to modify, refer to the [User Guide](https://techdocs.akamai.com/sandbox/docs/config-sandbox-client-cli).
2. Save the file with a `.json` extension (e.g., `example_recipe.json`)
3. Run this command on your file `akamai sandbox create --recipe=example_recipe.json` to instantiate the sandbox client according to the defined specifications.
2 changes: 1 addition & 1 deletion cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"commands": [
{
"name": "sandbox",
"version": "1.5.0",
"version": "1.6.0",
"description": "Manage Akamai Sandbox environments.",
"bin": "https://github.com/akamai/cli-sandbox/releases/download/{{.Version}}/akamai-{{.Name}}-{{.Version}}-{{.OS}}-{{.Arch}}{{.BinSuffix}}"
}
Expand Down
2 changes: 1 addition & 1 deletion src/service/sandbox-client-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const shell = require('shelljs');
const fsExtra = require('fs-extra');
const download = require('download');

const CONNECTOR_VERSION = '1.4.0';
const CONNECTOR_VERSION = '1.5.0';
const DOWNLOAD_PATH: string = `https://github.com/akamai/sandbox-client/releases/download/${CONNECTOR_VERSION}/`;
const DOWNLOAD_FILE: string = `sandbox-client-${CONNECTOR_VERSION}-RELEASE-default.zip`;
const DOWNLOAD_URL = DOWNLOAD_PATH + DOWNLOAD_FILE;
Expand Down

0 comments on commit e714e6e

Please sign in to comment.