Commit 8ac42732 authored by Charlie Root's avatar Charlie Root
Browse files

sync

parent 9e23c184
......@@ -2,3 +2,15 @@
geoserver:
version: 2.16.2
port: 8080
user: geoserver
group: geoserver
jdk: openjdk8
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
File mode changed from 100644 to 100755
{% from "geoserver/map.jinja" import geoserver with context %}
geoserver_openjdk_pkg:
pkg.installed:
- name: {{ geoserver.openjdk_pkg }}
geoserver_home:
file.directory:
- name: {{ geoserver.base_dir }}
- name: {{ geoserver.root }}
- user: root
- group: wheel
- mode: 755
- require:
- pkg: geoserver_openjdk_pkg
{% for instance, config in geoserver.instances.items() %}
geoserver_archive:
{{ instance }}_jdk_pkg:
pkg.installed:
- name: {{ config.jdk_conf.pkg }}
{{ instance }}_geoserver_archive:
archive.extracted:
- name: {{ geoserver.base_dir }}
- user: {{ geoserver.user }}
- group: {{ geoserver.user }}
- source: salt://geoserver/files/geoserver-{{ geoserver.version }}-bin.zip
- source_hash: md5={{ geoserver.files['geoserver-' ~ geoserver.version ~ '-bin.zip'] }}
- if_missing: {{ geoserver.base_dir ~ '/geoserver-' ~ geoserver.version }}
- archive_format: zip
- name: {{ config.root }}
- user: {{ config.user }}
- group: {{ config.user }}
- source: {{ config.source }}
- source_hash: {{ config.source_hash }}
- require:
- file: geoserver_home
- pkg: {{ instance }}_jdk_pkg
{% endfor %}
{#
{% for plugin in geoserver.plugins %}
{% set plugin_file = 'geoserver-' ~ geoserver.version ~ '-' ~ plugin ~ '-plugin.zip' %}
geoserver_plugin_{{ plugin }}:
......@@ -64,4 +63,4 @@ geoserver_fix_bin:
- mode
- require:
- archive: geoserver_archive
#}
......@@ -4,14 +4,46 @@
{% set geoserver = salt.grains.filter_by(
osmap,
grain='os',
merge=salt.pillar.get('geoserver:lookup', {}),
base=defaults
merge=salt.pillar.get('geoserver:lookup', {})
) %}
{% do geoserver.update(salt.grains.get('geoserver:instances') %}
{% do geoserver.defaults.update(
salt.slsutil.merge(
defaults['geoserver'],
geoserver.defaults|default({})
)
) %}
{% for geoserver_name, geoserver_config in geoserver.instances.items() %}
{% do geoserver.update({
'instances' : salt.pillar.get('geoserver:instances')
}) %}
{% endfor %}
{% for instance, config in geoserver.instances.items() %}
{% do config.update(
salt.slsutil.merge(geoserver.defaults, config|default({}))
) %}
{% do config.update(
salt.slsutil.merge({
'log': geoserver.log|path_join(instance) ~ '.log',
'root': geoserver.root|path_join(instance),
'source': 'salt://' ~ 'geoserver'|path_join(
'files', config.version,
'geoserver-' ~ config.version ~ '-bin.zip'
),
'source_hash': 'salt://' ~ 'geoserver'|path_join(
'files', config.version, 'md5sum'
),
'jdk_conf': salt.slsutil.merge(
defaults['jdks'][salt.grains.get('os')][config.jdk],
config[config.jdk]|default({})
)
},
config)
) %}
{% endfor %}
{% do salt.log.info(geoserver) %}
......@@ -2,7 +2,4 @@
FreeBSD:
root: /usr/local/geoserver
user: geoserver
group: geoserver
log: /var/log/geoserver
openjdk_pkg: openjdk8
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