Created
May 11, 2012 08:53
-
-
Save archie/2658496 to your computer and use it in GitHub Desktop.
Fabric example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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