GithubHelp home page GithubHelp logo

fastly-config's Introduction

fastly-config

Usage

./fastly-config <path to yaml> service-name (fastly|vcl) output-dir <username> <password>

./fastly-config.rb vcl-yml/service-name.yml "Service name" fastly vcl-gen [email protected] s3kr1tp4ssw0rd

./fastly-config.rb vcl-yml/service-name.yml "Service name" vcl vcl-gen

Requirements

Overview

This provides a way to keep your fastly configs in source control. You specify your settings in a yaml file named like "service-name.yml", formatted like the example provided in vcl-yml in this directory, and it uses an erb template named "service-name-template.vcl.erb" in the vcl-templates directory to generate any needed vcl files.

There are two modes fastly-config.rb runs in. The 'fastly' operation uses the Fastly API to set up the configuration specified in the yml file, and uses the erb vcl template to generate a VCL file to upload, if specified in the yml file. When creating a new version of a service, it just creates an empty version from scratch and fills everything back in, rather than trying to update the old one.

The 'vcl' mode generates a full varnish 2.x file that can be dropped in and used to fulfill the CDN's functions should Fastly somehow utterly vanish from the face of the earth. An unlikely occurance, but it's best to be prepared. When generating the full vcl file, the username and password are not needed.

TODO

This should be relatively general, but some of the more obscure settings like gzip haven't been tested extensively.

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.