def fetch_elasticsearch(): with open("%(java_packages)s/pom.xml" % env) as pom: for l in pom: for elastic_version in re.findall('<elasticsearch.version>([^<]+)</', l): break workdir_elastic = "%(mgr_workdir)s/elastic_pkg" % env mkdirpath(workdir_elastic) elastic_distfile = "elasticsearch-%(elastic_version)s.tar.gz" % vars() with cd(workdir_elastic): if not exists(elastic_distfile): run("wget http://download.elasticsearch.org/elasticsearch/elasticsearch/%s" % elastic_distfile) return elastic_version, "%(workdir_elastic)s/%(elastic_distfile)s" % vars()
def _prepare_mgr_work(): _needs_targetenv() mkdirpath("%(mgr_workdir)s/install" % env) put(p.join(env.manageroot, "sysconf", "install", "*.sh"), "%(mgr_workdir)s/install" % env) put(p.join(env.manageroot, "sysconf", "common", "tomcat", "server.xml"), "%(mgr_workdir)s/install" % env) mkdirpath("%(mgr_workdir)s/tomcat_pkg" % env)