def install_nginx(): sudo( "echo \"deb http://ppa.launchpad.net/nginx/stable/ubuntu $(lsb_release -cs) main\" >> /etc/apt/sources.list" ) sudo("apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C") sudo("apt-get update && apt-get -y install nginx") if exists("/etc/init.d/apache2"): sudo("/etc/init.d/apache2 stop") sudo("update-rc.d apache2 disable") sudo("update-rc.d nginx enable") with fabutils.process_erb( base_folder + "/webz.nginx.conf.erb", { "ROOT_DIRECTORY": "/home/web/runz", "WEBZ_SITE_ROOT_DIRECTORY": "/home/web/runz/webz/site" }) as f: put(f.name, "/etc/nginx/sites-enabled/default", use_sudo=True) sudo("/etc/init.d/nginx restart") put(base_folder + "/runz-webz.sh", "/home/web/runz-webz.sh", use_sudo=True) sudo("chmod +x /home/web/runz-webz.sh") with fabutils.process_erb(base_folder + "/runz-web.sh.erb", {"MONO_VERSION": mono_version}) as f: put(f.name, "/home/web/runz-web.sh", use_sudo=True) sudo("chmod +x /home/web/runz-web.sh")
def setup(): sudo("apt-get -y install git-core curl ruby-full p7zip-full") install_python_support() with fabutils.process_erb(base_folder+"/runz-agent.sh.erb", {"MONO_VERSION" : mono_version}) as f: put(f.name, "/home/agent/runz-agent.sh", use_sudo=True) sudo("chmod +x /home/agent/runz-agent.sh") sudo("easy_install psutil")
def setup(): sudo("apt-get -y install git-core curl ruby-full p7zip-full") install_python_support() with fabutils.process_erb(base_folder + "/runz-agent.sh.erb", {"MONO_VERSION": mono_version}) as f: put(f.name, "/home/agent/runz-agent.sh", use_sudo=True) sudo("chmod +x /home/agent/runz-agent.sh") sudo("easy_install psutil")
def generate_nginx_config(runz_output_path, output_file): with fabutils.process_erb( base_folder + "/webz.nginx.conf.erb", { "ROOT_DIRECTORY": os.path.abspath(runz_output_path), "WEBZ_SITE_ROOT_DIRECTORY": os.path.abspath(os.path.join(runz_output_path, "webz/site")) }) as f: with open(output_file, "w") as out: out.writelines(f.readlines())
def install_nginx(): sudo("echo \"deb http://ppa.launchpad.net/nginx/stable/ubuntu $(lsb_release -cs) main\" >> /etc/apt/sources.list") sudo("apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C") sudo("apt-get update && apt-get -y install nginx") if exists("/etc/init.d/apache2"): sudo("/etc/init.d/apache2 stop") sudo("update-rc.d apache2 disable") sudo("update-rc.d nginx enable") with fabutils.process_erb(base_folder + "/webz.nginx.conf.erb", {"ROOT_DIRECTORY" : "/home/web/runz", "WEBZ_SITE_ROOT_DIRECTORY" : "/home/web/runz/webz/site"}) as f: put(f.name, "/etc/nginx/sites-enabled/default", use_sudo=True) sudo("/etc/init.d/nginx restart") put(base_folder + "/runz-webz.sh", "/home/web/runz-webz.sh", use_sudo=True) sudo("chmod +x /home/web/runz-webz.sh") with fabutils.process_erb(base_folder + "/runz-web.sh.erb", {"MONO_VERSION" : mono_version}) as f: put(f.name, "/home/web/runz-web.sh", use_sudo=True) sudo("chmod +x /home/web/runz-web.sh")
def setup(): sudo("apt-get -y install p7zip-full") with fabutils.process_erb(base_folder+"/runz-repo-tracker.sh.erb", {"MONO_VERSION" : mono_version}) as f: put(f.name, "/home/repotracker/runz-repo-tracker.sh", use_sudo=True) sudo("chmod +x /home/repotracker/runz-repo-tracker.sh")
def setup(): sudo("apt-get -y install p7zip-full") with fabutils.process_erb(base_folder + "/runz-repo-tracker.sh.erb", {"MONO_VERSION": mono_version}) as f: put(f.name, "/home/repotracker/runz-repo-tracker.sh", use_sudo=True) sudo("chmod +x /home/repotracker/runz-repo-tracker.sh")
def generate_nginx_config(runz_output_path, output_file): with fabutils.process_erb(base_folder + "/webz.nginx.conf.erb", {"ROOT_DIRECTORY" : os.path.abspath(runz_output_path), "WEBZ_SITE_ROOT_DIRECTORY" : os.path.abspath(os.path.join(runz_output_path, "webz/site"))}) as f: with open(output_file, "w") as out: out.writelines(f.readlines())