Giter Club home page Giter Club logo

publish_eccu's Introduction

ECCU Publisher

This project provides a command-line tool for publishing "ECCU" files to Akamai. ECCU is one of several mechanisms for programattically interacting with your Akamai cache. Unfortunately, there appears to be no public-facing dcoumentation of the format. You can publish one or several ECCU files at once, or pass in a list of URL paths that will be converted into the appropriate XML. This project is distributed as a Python package.

Current status: 1.0. This appears to solve the problems it, but we will almost certainly learn new things as we move towards actually implementing this.

Dependencies

This software has only been tested under Python 2.6 and 2.7, on Mac OS X and Linux. It depends on the following Python libraries:

Installation

Into your Django Project: pip install git+https://github.com/cfpb/publish_eccu.git#egg=publish_eccu

  • Include publish_eccu as an INSTALLED_APPS

With PIP:

pip install [path to downloaded zip file or checkout directory]

Otherwise:

cd [path to checkout directory]
python setup.py install

Usage

There are four important environment variables that must be set.

export AKAMAI_USER=[akamai account name]
export AKAMAI_PASSWORD=[akamai_password]
export AKAMAI_NOTIFY_EMAIL=[email to recieve success or failure notification]
export AKAMAI_HOST=[domain name you are acting on]

Then, to publish already-crafted ECCU XML files, invoke the tool like this:

publish_eccu foo.xml bar.xml

This will combine those files into a single ECCU, before posting.

For the simplest cases, you can pass URL paths instead of XML files:

publish_eccu --simple /about-us/contact /blog/

If you want to invalidate the root URL of the domain, pass along the --home argument:

publish_eccu --simple /about-us/contact /blog/ --home

Finally, if you just want to see the combined or generated XML, pass the --noop argument:

publish_eccu --simple /about-us/contact /blog/ --home --noop
successfully published:
---------
<eccu><match:recursive-dirs  value="about-us"><match:recursive-dirs value="contact"><revalidate>now</revalidate></match:recursive-dirs></match:recursive-dirs><match:recursive-dirs  value="blog"><revalidate>now</revalidate></match:recursive-dirs><match:this-dir  value="This Directory Only"><match:filename value="No File Specified"><revalidate>now</revalidate></match:filename></match:this-dir></eccu>

How to test the software

Install dependencies

  • pip install -r requirements/test.txt
  • from the root directory of the project, run the nosetests command.

Known issues

We'll surely discover some soon!

Getting help

If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

Getting involved

If you find this tool useful, (or almost useful, pending some particular improvements), get in touch! General instructions on how to contribute should be stated with a link to CONTRIBUTING.


Open source licensing info

  1. TERMS
  2. LICENSE
  3. CFPB Source Code Policy

Credits and references

  1. Projects that inspired you
  2. Related projects
  3. Books, papers, talks, or other sources that have meaniginful impact or influence on this project

publish_eccu's People

Contributors

virtix avatar scotchester avatar kave avatar rosskarchner avatar anselmbradford avatar chetanddesai avatar contolini avatar marcesher avatar

Watchers

James Cloos avatar  avatar

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.