def install_core_schema(self): text = templ_solr_core.render(**self.options) config = Configuration(self.buildout, 'schema.xml', { 'deployment': self.deployment_name, 'directory': self.options['core-conf-directory'], 'file': os.path.join(os.path.dirname(__file__), "templates", "schema.xml")}) return [config.install()]
def install_log4j(self): text = templ_log4j.render(**self.options) config = Configuration(self.buildout, 'log4j.properties', { 'deployment': self.deployment_name, 'directory': self.solr_home, 'text': text}) return [config.install()]
def install_core_properties(self): text = templ_solr_core.render(**self.options) config = Configuration(self.buildout, 'core.properties', { 'deployment': self.deployment_name, 'directory': self.options['core-directory'], 'text': text}) return [config.install()]
def install_setenv_sh(self): text = setenv_sh.render(**self.options) config = Configuration(self.buildout, 'setenv.sh', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['catalina-base'], 'bin'), 'text': text}) return [config.install()]
def install_server_xml(self): text = server_xml.render(**self.options) config = Configuration(self.buildout, 'server.xml', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['catalina-base'], 'conf'), 'text': text}) return [config.install()]
def install_solr_env(self): text = templ_solr_env.render(**self.options) config = Configuration(self.buildout, 'solr.in.sh', { 'deployment': self.deployment_name, 'directory': self.solr_home, 'text': text}) return [config.install()]
def install_logging_props(self): text = logging_props.render(**self.options) config = Configuration(self.buildout, 'logging.properties', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['catalina-base'], 'conf'), 'text': text}) return [config.install()]
def install_sites(self, update): templ_sites = Template(filename=self.input) text = templ_sites.render(**self.options) config = Configuration(self.buildout, self.name + '.conf', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['etc-directory'], 'conf.d'), 'text': text}) return [config.install()]
def install_wms_config(self): text = config_xml.render(dynamic_services=self.dynamic_services, **self.options) config = Configuration( self.buildout, "config.xml", {"deployment": self.tomcat.deployment_name, "directory": self.options["ncwms-home"], "text": text}, ) return [config.install()]
def install_jetty_context(self): text = templ_jetty_context.render(**self.options) config = Configuration(self.buildout, 'solr-jetty-context.xml', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['conda-prefix'], 'opt', 'solr', 'server', 'contexts'), 'text': text}) return [config.install()]
def install_start_stop(self): text = templ_start_stop.render(**self.options) config = Configuration(self.buildout, 'supervisord', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['etc-prefix'], 'init.d'), 'text': text}) configfile = config.install() os.chmod(configfile, 0o755) return [configfile]
def install_config(self): """ install supervisor main config file """ text = templ_config.render(**self.options) config = Configuration(self.buildout, 'supervisord.conf', { 'deployment': self.deployment_name, 'text': text}) return [config.install()]
def install_config(self): """ install pywps config in etc/pywps/ """ text = templ_pywps_cfg.render(extra_options=self.extra_options, **self.options) config = Configuration(self.buildout, self.name + '.cfg', { 'deployment': self.deployment_name, 'text': text}) return [config.install()]
def install_catalina_sh(self): config = Configuration(self.buildout, 'catalina.sh', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['catalina-base'], 'bin'), 'mode': '0o755', 'file': os.path.join(self.options['catalina-home'], 'bin', 'catalina.sh')}) installed = [config.install()] # fix permission os.chmod(os.path.join(self.options['catalina-base'], 'bin', 'catalina.sh'), 0o755) return installed
def install_gunicorn(self): """ install gunicorn config in etc/gunicorn/ """ text = templ_gunicorn.render(**self.options) config = Configuration(self.buildout, self.name + '.py', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['etc-prefix'], 'gunicorn'), 'text': text}) return [config.install()]
def install_program(self): """ install supervisor program config file """ text = templ_program.render(**self.options) config = Configuration(self.buildout, self.program + '.conf', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['etc-directory'], 'conf.d'), 'text': text}) return [config.install()]
def install_config(self, update): """ install nginx main config file """ text = templ_config.render(**self.options) config = Configuration(self.buildout, 'nginx.conf', { 'deployment': self.deployment_name, 'text': text}) # copy additional files try: copy2(os.path.join(os.path.dirname(__file__), "mime.types"), self.options['etc-directory']) except Exception: pass return [config.install()]
def install_config_context(self): """ used since ncWMS2 2.2.0 """ text = ncwms_xml.render(**self.options) config = Configuration( self.buildout, "ncWMS2.xml", { "deployment": self.tomcat.deployment_name, "directory": os.path.join(self.options["catalina-base"], "conf", "Catalina", "localhost"), "text": text, }, ) return [config.install()]
def install_web_xml(self): config = Configuration(self.buildout, 'web.xml', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['catalina-base'], 'conf'), 'file': os.path.join(self.options['catalina-home'], 'conf', 'web.xml')}) return [config.install()]
def install_config_py(self): text = templ_config_py.render(options=self.options) config = Configuration(self.buildout, 'celeryconfig.py', { 'deployment': self.deployment_name, 'text': text}) return [config.install()]
def install_solr_xml(self): config = Configuration(self.buildout, 'solr.xml', { 'deployment': self.deployment_name, 'directory': self.solr_home, 'file': os.path.join(os.path.dirname(__file__), "templates", "solr.xml")}) return [config.install()]