Is there a simple way to "clone a setup" from an existing setup


#1

I need to set up 10-20 different sites based on a template, is there a clean way for me to clone an existing site and just change the 1-2 fields that need changing?

cc @aspires


#2

Hey Sam,

Please go ahead and send us a support ticket and we can help out.

Thanks.


#3

Another option would be to write the setup using custom VCL. We do something where we essentially have a base VCL file that calls functions imported from another deploy-specific VCL file. Each Fastly setup that needs customized values just includes its own specific VCL with deployment-specific values in the functions.


#4

Depending on what you are doing you could map many Domains to one serivce. then in VCL you could choose the fields you need.

A lot of this depends on what you are doing.

Could you tell us a bit more about what you are trying to do?

Cheers,
Jack


#5

Sure …

I am setting up CDN for all our enterprise customers. Initially I was going to set up one site per customer, but it needed a few rules like, removing cookies, more aggressive caching and so on.

It felt a bit tedious adding all the rules for each new site.

My final trickery was to set up a single site and do the redistribution on our side using haproxy … so for example

https://discourse-cdn.global.ssl.fastly.net/gradle/ goes to https://discuss.gradle.org/

and

https://discourse-cdn.global.ssl.fastly.net/ubuntu/ goes to ubuntu

It involved 3 haproxy rules per site on the frontend on our side, but we have that all scripted so its a better fit. Also longer term it means we can have our own SSL domain for all things CDN which fits better.


#6

I just found out that we are working on functionality to clone version across servers which might be what you want.

One think you might want to consider is VCL “includes” statement.
This could give you some shared “parent” functionality that you could include in each “child” service.

That “parent” file could be included in each service and the “child” service could implement the enterprise specific concerns you have.

This would mean less proxies and indirection which could make system less complex and easier to debug.

I have a few other ideas but they all get a little more complex from there.

Cheers,
Jack