Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Open up Fastly Configure script #1

Merged
merged 1 commit into from Jul 10, 2015
Merged

Open up Fastly Configure script #1

merged 1 commit into from Jul 10, 2015

Conversation

ajlanghorn
Copy link
Contributor

I recently watched a talk from Target about how they migrated to use Fastly. One of the things that was mentioned was that they have no way to deploy VCL in CI jobs, whereas - well - we do. We currently deploy our Fastly configuration using this script, but it's unfortunately kept internally on GitHub Enterprise and never sees the light of day. We should open this up to the world so that everyone can use it.

The script reads in from a YAML file to generate a hash which the rest of the script uses, which means that configuration can be kept separate from code, which is a good idea. There's a README, and an example of fastly.yaml, which is required to set parameters to pass to the Fastly API.

-----

Installing
~~~~~~~~~~
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not markdown

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, RST.

@ajlanghorn ajlanghorn force-pushed the add-deploy-vcl branch 2 times, most recently from f88c817 to 1dbaa87 Compare July 9, 2015 11:04
@@ -0,0 +1,4 @@
---
vhost:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't obvious to me that this (and correct me if I'm wrong here) is actually a configurable key. I suggest that Yaml like this might be a better example:

---
frontend_webservers:
  production:
    service_id: a1b2c3d4e5f6g7
  staging:
    service_id: a2b3c4d5e6f7g8
backend_api_requests:
  production:
    service_id: a3b4c5d6e7f8g9

I'd also drop the term vhost and refer instead to services, pools, environments or something else everywhere it's used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vhost is a term we've inherited from the script, so that's why we kept it. We might be able to do something about that, if the need is there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, you're right re: this example file. I'll put the current content in comments and provide a more specific example below.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you've inherited vhost from the existing script, but since this is PR#1 that could quickly be changed to something else before it's in use by anyone else... ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. How about service? A service can belong to an environment?

On 9 July 2015 at 16:12, Sam J Sharpe notifications@github.com wrote:

In fastly.yaml
#1 (comment)
:

@@ -0,0 +1,4 @@
+---
+vhost:

I know you've inherited vhost from the existing script, but since this is
PR#1 that could quickly be changed to something else before it's in use by
anyone else... ;)


Reply to this email directly or view it on GitHub
https://github.com/alphagov/fastly-configure/pull/1/files#r34265811.

Andrew Langhorn
Web Operations
Government Digital Service

e: andrew.langhorn@digital.cabinet-office.gov.uk
t: +44 (0)7810 737375
a: 6th Floor, Aviation House, 125 Kingsway, London, WC2B 6NH

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tricky one. I couldn't think of the right language so I was deliberately vague. The issue with service is that's a name Fastly uses for a specific CDN configuration. What we want is something larger than a service - a configuration ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, okay. A configuration works well.

@ajlanghorn ajlanghorn force-pushed the add-deploy-vcl branch 3 times, most recently from 13df4b2 to 650feb3 Compare July 9, 2015 15:41
@ajlanghorn
Copy link
Contributor Author

@samjsharpe I addressed your naming comment by swapping out vhost for service.
@dcarley I've added a .ruby-version file.

Adds:
- deploy_vcl
- Gemfile(.lock)
- README
- fastly.yaml
- vcl_templates/ directory

vcl_templates/ directory is kept because this is where deploy_vcl expects
your VCL to live.
@samjsharpe
Copy link

LGTM 👍

rjw1 added a commit that referenced this pull request Jul 10, 2015
Open up Fastly Configure script
@rjw1 rjw1 merged commit 977c508 into master Jul 10, 2015
@rjw1 rjw1 deleted the add-deploy-vcl branch July 10, 2015 13:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants