Commit 0393cff6 authored by Charlie Root's avatar Charlie Root
Browse files

sync

parent 6ac5c5e9
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
{% from "geoserver/map.jinja" import geoserver with context %}
include:
- geoserver.install
{% for instance, config in geoserver.instances.items() %}
{{ instance }}_geoserver_data_dir:
file.directory:
- name: {{ config.GEOSERVER_DATA_DIR }}
- makedirs: True
- user: {{ config.user }}
- group: {{ config.group }}
- require:
- archive: {{ instance }}_geoserver_archive
cmd.run:
- name: cp -R {{ config.data_dir.rstrip('/') }} {{ config.GEOSERVER_DATA_DIR }}
- require:
- file: {{ instance }}_geoserver_data_dir
- unless:
- ls -A {{ config.GEOSERVER_DATA_DIR }} | grep -q .
{{ instance }}_geoserver_data_dir_permissions:
file.directory:
- name: {{ config.GEOSERVER_DATA_DIR }}
- user: {{ config.user }}
- group: {{ config.group }}
- recurse:
- user
- group
- mode
- dir_mode: 750
- file_mode: 640
- onchanges:
- cmd: {{ instance }}_geoserver_data_dir
{% endfor %}
......@@ -7,10 +7,14 @@ geoserver:
group: geoserver
jdk: openjdk8
geoservers:
2.16.2:
jetty:
version: 9.4.18.v20190429
jdks:
FreeBSD:
openjdk8:
pkg: openjdk8
JAVA_HOME: /usr/local/openjdk8
JAVA_OPTS: -server -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xmx2048m -Xms2048m -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
# vim: ts=2 sw=2
geoserver:
version: 2.16.2
jetty:
version: 9.4.18.v20190429
include:
- geoserver.install
- geoserver.plugins
- geoserver.data_dir
......@@ -13,6 +13,10 @@ geoserver_home:
pkg.installed:
- name: {{ config.jdk_conf.pkg }}
#############
# GEOSERVER #
#############
{{ instance }}_geoserver_archive:
archive.extracted:
- name: {{ config.root }}
......@@ -25,23 +29,9 @@ geoserver_home:
- file: geoserver_home
- pkg: {{ instance }}_jdk_pkg
{% if config.plugins is defined %}
{% for plugin in config.plugins %}
{{ instance }}_geoserver_plugin_{{ plugin.plugin }}:
archive.extracted:
- name: {{ config.lib }}
- user: {{ config.user }}
- group: {{ config.group }}
- enforce_toplevel: False
- source: {{ plugin.source }}
- source_hash: {{ plugin.source_hash }}
- require:
- archive: {{ instance }}_geoserver_archive
- require_in:
- file: {{ instance }}_geoserver_fix_bin
{% endfor %}
{% endif %}
###############
# PERMISSIONS #
###############
{{ instance }}_geoserver_fix_bin:
file.directory:
......
......@@ -27,10 +27,17 @@
salt.slsutil.merge(geoserver.defaults, config|default({}))
) %}
{% do config.update(
salt.slsutil.merge(defaults.geoservers[config.version], config|default({}))
) %}
{% do config.update(
salt.slsutil.merge({
'log': geoserver.log|path_join(instance) ~ '.log',
'root': geoserver.root|path_join(instance),
'data_dir': geoserver.root|path_join(
instance, 'geoserver-' ~ config.version, 'data_dir'
),
'GEOSERVER_HOME': geoserver.root|path_join(instance, 'geoserver-' ~
config.version),
'GEOSERVER_DATA_DIR': geoserver.root|path_join(
......@@ -44,16 +51,16 @@
instance, 'geoserver-' ~ config.version, 'bin'
),
'source': 'salt://' ~ 'geoserver'|path_join(
'files', config.version,
'files', 'geoserver', config.version,
'geoserver-' ~ config.version ~ '-bin.zip'
),
'source_hash': 'salt://' ~ 'geoserver'|path_join(
'files', config.version, 'md5sum'
'files', 'geoserver', config.version, 'md5sum'
),
'jdk_conf': salt.slsutil.merge(
defaults['jdks'][salt.grains.get('os')][config.jdk],
config[config.jdk]|default({})
)
),
},
config)
......@@ -66,11 +73,12 @@
{% do plugin.update(
salt.slsutil.merge({
'source': 'salt://' ~ 'geoserver'|path_join(
'files', config.version, 'geoserver-' ~ config.version ~ '-' ~
'files', 'geoserver', config.version,
'geoserver-' ~ config.version ~ '-' ~
plugin.plugin ~ '-plugin.zip'
),
'source_hash': 'salt://' ~ 'geoserver'|path_join(
'files', config.version, 'md5sum'
'files', 'geoserver', config.version, 'md5sum'
),
}, plugin)
) %}
......
{% from "geoserver/map.jinja" import geoserver with context %}
include:
- geoserver.install
{% for instance, config in geoserver.instances.items() %}
{% for plugin in config.plugins %}
{{ instance }}_geoserver_plugin_{{ plugin.plugin }}:
archive.extracted:
- name: {{ config.lib }}
- user: {{ config.user }}
- group: {{ config.group }}
- enforce_toplevel: False
- source: {{ plugin.source }}
- source_hash: {{ plugin.source_hash }}
- require:
- archive: {{ instance }}_geoserver_archive
- require_in:
- file: {{ instance }}_geoserver_fix_bin
{% endfor %}
{% endfor %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment