Skip to content

Instantly share code, notes, and snippets.

@archie
Created May 11, 2012 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save archie/2658496 to your computer and use it in GitHub Desktop.
Save archie/2658496 to your computer and use it in GitHub Desktop.
Fabric example
@hosts("local")
def prepare_config(data, maxcap='5'):
local("cp deploy/template.conf deploy/application.conf")
local("sed -i -f \"s/FOLDERPLACEHOLDER/" + data + "/g;s/MAXCAPACITYPLACEHOLDER/" +
maxcap + "/g;\" deploy/application.conf")
def config():
put("deploy/application.conf", "~/recsys/")
run("sed -i \"s/IPPLACEHOLDER/$(hostname -f)/g;\" ~/recsys/application.conf")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment