Giter Site home page Giter Site logo

fastly-tools's Introduction

fastly-tools CircleCI

This library is a command line tool for interacting with the FT.com CDN, Fastly.

Requirements

  • Node version defined by engines.node in package.json. Run command nvm use to switch your local Node version to the one specified in .nvmrc.

Installation

git clone [email protected]:Financial-Times/fastly-tools.git
cd fastly-tools
make install

Development

Testing

In order to run the tests locally you'll need to run:

make test

Install from NPM

npm install --save-dev @financial-times/fastly-tools

Usage

Usage: fastly [options] [command]

Options:
  -h, --help                      output usage information

Commands:
  deploy [options] [folder]       Deploys VCL in [folder] to the specified fastly service. Requires FASTLY_APIKEY env var which can be found in the repo's corresponding Vault directory.

Deploy

Usage: deploy [options] [folder]

Deploys VCL in [folder] to the specified fastly service. Requires FASTLY_APIKEY env var which can be found in the repo\'s corresponding Vault directory.

Options:
  -m, --main <main>               Set the name of the main vcl file (the entry point).  Defaults to "main.vcl"
  -v, --vars <vars>               A way of injecting environment vars into the VCL.  So if you pass --vars AUTH_KEY,FOO the values {$AUTH_KEY} and ${FOO} in the vcl will be replaced with the values of the environment variable.  If you include SERVICEID it will be populated with the current --service option
  -e, --env                       Load environment variables from local .env file (use when deploying from a local machine
  -s, --service <service>         REQUIRED.  The ID of the fastly service to deploy to.
  -V --verbose                    Verbose log output
  -b --backends <backends>        Upload the backends specified in <backends> via the api
  -k --api-keys <keys>            list of alternate api keys to try should the key stored in process.env.FASTLY_API_KEY hit its rate limit
  --skip-conditions <conditions>  list of conditions to skip deleting
  -h, --help                      output usage information

Example

For example to deploy to a given environment, you would use the following command:

	fastly-tools deploy -V --vars SERVICEID --main main.vcl --service ${FASTLY_STAGING_SERVICE_ID} --api-keys ${FASTLY_STAGING_APIKEY} --backends backends.js ./vcl/

fastly-tools's People

Contributors

matthew-andrews avatar wheresrhys avatar ivomurrell avatar apaleslimghost avatar andygout avatar antonsamper avatar sjparkinson avatar emortong avatar serena97 avatar aintgoin2goa avatar leannecornish-ft avatar edds avatar jenniferemshepherd avatar jonnangle avatar adgad avatar simonplend avatar jakechampion avatar doramatadora avatar alevito avatar ironsidevsquincy avatar ker-an avatar renovate-bot avatar phamann avatar

Watchers

 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.