fastly - a command line shell for interacting with the Fastly infrastructure
fastly [option[s]]
You can either have a config file in either ~/.fastly or /etc/fastly with
api_key = <key>
or a config file with
user = <login> password = <password>
Alternatively you can pass in any of those options on the command line
fastly --api_key <key> fastly --user <login> --password <password>
Display a help message with available commands.
Display various thing. The sub commands are
List all the services you have access to with their ids and names.
fastly> show services
might show
KXKPV9svJFuPapAMjzxgP FooCorp 6g2rQokiwAGSRdGYhCY76v Example-Service Y9puwhPNS5Y1tAjUbxp7Z Test
Display the information from one particular service including all backends, directors, domains and origins.
fastly> show service <service name>
Show the creation date of all the versions for a service.
fastly> show versions <service name>
Display the diff between two different versions
fastly> show diff <service name> version <version number> to <version number>
Display the stats for a service. Default last argument is minutely.
fastly> show stats <service name> [all|minutely|hourly|daily]
Create a new object.
fastly> create service <service name> fastly> create service <service name> version <version number> backend <name> [options[s]] fastly> create service <service name> version <version number> director <name> [options[s]] fastly> create service <service name> version <version number> domain <name> [options[s]] fastly> create service <service name> version <version number> origin <name> [options[s]]
Options look like
fastly> create service <service name> version <version number> backend <name> ipv4 <ip address>
Update an object. A note - you cannot change the names of things.
fastly> set service <service name> version <version number> backend <name> [options[s]] fastly> set service <service name> version <version number> director <name> [options[s]] fastly> set service <service name> version <version number> domain <name> [options[s]] fastly> set service <service name> version <version number> origin <name> [options[s]]
Agagin, like create, options look like
fastly> set service <service name> version <version number> director <name> retries <retries>
Delete an object from a configuration.
fastly> delete service <service name> fastly> delete service <service name> version <version number> fastly> delete service <service name> version <version number> backend <backend name> fastly> delete service <service name> version <version number> director <director name> fastly> delete service <service name> version <version number> domain <domain name> fastly> delete service <service name> version <version number> origin <origin name>
Clone a configuration so that the new version can be modified.
fastly> clone service <service name> version <version number>
Activate a version for use - this will lock it and prevent any further modification.
fastly> activate service <service name> version <version number>
Remove objects from the cache.
fastly> purge service <service name> fastly> purge <url>
Upload a custom VCL file
fastly> upload service <service name> version <version number> from <file> [as <vcl name>]
Check to see that the currently uploaded VCL is valid.
fastly> validate service <service name> version <version number>
Show the generated VCL for a given service.
fastly> dump service <service name> version <version number>
Exit the Fastly shell.
Copyright 2011 - Fastly Inc
Mail support at fastly dot com if you have problems.
http://github.com/fastly/fastly-perl
http://www.fastly.com/documentation
To install Net::Fastly, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Fastly
CPAN shell
perl -MCPAN -e shell install Net::Fastly
For more information on module installation, please visit the detailed CPAN module installation guide.