WebFaction
Community site: login faq

I'm looking at setting up more automated blue/green deployment for a Django app, and I plan to use a python/fabric script to flip back and forth between these two states:


State “Green”

website_green, assigned domains:

  • green.example.com
  • example.com

website_blue, assigned domains:

  • blue.example.com

State “Blue”

website_green, assigned domains:

  • green.example.com

website_blue, assigned domains:

  • blue.example.com
  • example.com

My script would just basically throw a toggle switch to flip which website is currently the production site (i.e., the one that responds to the root "example.com" domain). I'd like to minimize potential downtime with this method. Is there a more expedient way to do this, other than to use update_website to remove the domain from the subdomains list, and then add it back to the other website?

asked 12 May, 22:34

bobtiki's gravatar image

bobtiki
297
accept rate: 50%


Is there a more expedient way to do this, other than to use update_website to remove the domain from the subdomains list, and then add it back to the other website?

Something like this:

  1. Remove example.com from both sites.
  2. Create a third site to serve some kind of lightweight proxy on example.com, proxying blue or green as needed.
  3. Have your fabric script flip between green and blue in the proxy config.
permanent link

answered 12 May, 23:03

seanf's gravatar image

seanf ♦♦
11.9k21333
accept rate: 37%

Like this sort of a proxy deal? https://community.webfaction.com/questions/20137/straight-forward-nginx-reverse-proxy-installation-no-uwsgi

That is, if you have other suggested proxy instructions, I'd love to see them. :) Thanks!

(12 May, 23:34) bobtiki bobtiki's gravatar image

Like this sort of a proxy deal? https://community.webfaction.com/questions/20137/straight-forward-nginx-reverse-proxy-installation-no-uwsgi

Yes, that seems like a reasonable example.

(12 May, 23:47) seanf ♦♦ seanf's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×73
×72
×4

question asked: 12 May, 22:34

question was seen: 396 times

last updated: 12 May, 23:47

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM