Git Product home page Git Product logo

akamai-ets's Introduction

NOTE : This is a work in progress contributions welcome

akamai-ets

akamai-etsis a dockerized version of the ETS server provided by Akamai.

ETS server is a reverse proxy built with Apache and mod_esi that can be used to test ESI-enabled content.

Installation

In order to use akamai-ets you must first ensure that you have Docker installed. Installation instructions can be found here.

Once Docker is installed, you can complete the installation by following the instructions below.

Prerequisite You will need to obtain a copy of the ETS Server from Akamai initially. Older versions may work with modification but this project has been tested with akamai-ets_6.0.0.4_Ubuntu.tar.gz. This needs to be placed in ./files/release.

> git clone ssh://[email protected]:newscorpaus/akamai-ets.git && cd akamai-ets
> make install

The above will clone akamai-ets locally, build an akamai-ets image and add the akamai-ets executable to your path for easy access

Usage

akamai-ets is bundled with a command line app to make it much easier for configuration. It intentionally does not use the bundled ets-config configuration tool. This cli can be seen as a drop-in replacement.

 █████╗  ██╗  ██╗  █████╗  ███╗   ███╗  █████╗  ██╗    ███████╗ ████████╗ ███████╗
██╔══██╗ ██║ ██╔╝ ██╔══██╗ ████╗ ████║ ██╔══██╗ ██║    ██╔════╝ ╚══██╔══╝ ██╔════╝
███████║ █████╔╝  ███████║ ██╔████╔██║ ███████║ ██║    █████╗      ██║    ███████╗
██╔══██║ ██╔═██╗  ██╔══██║ ██║╚██╔╝██║ ██╔══██║ ██║    ██╔══╝      ██║    ╚════██║
██║  ██║ ██║  ██╗ ██║  ██║ ██║ ╚═╝ ██║ ██║  ██║ ██║    ███████╗    ██║    ███████║ ██╗
╚═╝  ╚═╝ ╚═╝  ╚═╝ ╚═╝  ╚═╝ ╚═╝     ╚═╝ ╚═╝  ╚═╝ ╚═╝    ╚══════╝    ╚═╝    ╚══════╝ ╚═╝

Usage: akamai-ets [options]

Options:

-o, --origin   Origin server host and port                            [string]
-a, --alias    Origin server aliases                                   [array]
-g, --geo      GEO configuration options                               [array]

 -v, --version  Show version number                                   [boolean]
 -h, --help     Show help                                             [boolean]

Playground

A realtime ESI playground is also provided to learn more about how to use ESI or debug code in realtime.

Playground

origin

The origin option tells ETS which host should be ESI enabled.

> akamai-ets -o http://192.168.1.1:3000 -g country_code=AUS -g city=SYDNEY

alias

Alternative host names for the origin server which should also be processed. These are usually requests to external fragments.

geo

This option permits controlling the GEO settings of the server. They should be added using the format of -g <name>=<value>. Note multiple values can be supplied

> akamai-ets -o http://status.ets -g country_code=AUS city=SYDNEY

Values added via this means will be merged with the GEO defaults

{
    'georegion'    : '246',
    'country_code' : 'US',
    'region_code'  : 'CA',
    'city'         : 'SANJOSE',
    'dma'          : '807',
    'pmsa'         : '7400',
    'areacode'     : '408',
    'county'       : 'SANTACLARA',
    'fips'         : '06085',
    'lat'          : '37.3353',
    'long'         : '121.8938',
    'timezone'     : 'PST',
    'network_type' : 'dialup'
}

GEO default

GEO can be disabled using -g false.

debug

To see the ESI debug output for an origin server access it using the debug port.

ports

Ports are dynamically assigned unless overridden by ETS_PORT or ETS_DEBUG_PORT.

Environment Variables

Environment Variables can be set to override the default host port and directory to mount.

  • ETS_PORT : the local port for the ESI playground
  • ETS_ORIGIN : the local port of the proxied origin
  • ETS_DEBUG : the local port for debugging the proxied origin
  • ETS_WWW : use the defined path instead of the current directory ( default : $PWD )

Further reading

For a complete overview of GEO settings and other ESI related items review the Akamai ETS documentation found here.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using npm test / yarn test.

Release History

  • 1.0.0 Initial release

License

MIT Copyright (c) 2017 News Corp Australia.

akamai-ets's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.