aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/salt-formulas/opendaylight
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/salt-formulas/opendaylight')
-rw-r--r--mcp/salt-formulas/opendaylight/files/jetty.xml132
-rw-r--r--mcp/salt-formulas/opendaylight/files/setenv.shell21
-rw-r--r--mcp/salt-formulas/opendaylight/init.sls12
-rw-r--r--mcp/salt-formulas/opendaylight/map.jinja28
-rw-r--r--mcp/salt-formulas/opendaylight/server.sls102
5 files changed, 0 insertions, 295 deletions
diff --git a/mcp/salt-formulas/opendaylight/files/jetty.xml b/mcp/salt-formulas/opendaylight/files/jetty.xml
deleted file mode 100644
index de2ac677d..000000000
--- a/mcp/salt-formulas/opendaylight/files/jetty.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-{%- from "opendaylight/map.jinja" import server with context -%}
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
-DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
-
-<Configure id="Server" class="org.eclipse.jetty.server.Server">
-
- <!-- =========================================================== -->
- <!-- Set connectors -->
- <!-- =========================================================== -->
- <!-- One of each type! -->
- <!-- =========================================================== -->
-
- <!-- Use this connector for many frequently idle connections and for
- threadless continuations. -->
- <New id="http-default" class="org.eclipse.jetty.server.HttpConfiguration">
- <Set name="secureScheme">https</Set>
- <Set name="securePort">
- <Property name="jetty.secure.port" default="8543" />
- </Set>
- <Set name="outputBufferSize">32768</Set>
- <Set name="requestHeaderSize">8192</Set>
- <Set name="responseHeaderSize">8192</Set>
-
- <!-- Default security setting: do not leak our version -->
- <Set name="sendServerVersion">false</Set>
-
- <Set name="sendDateHeader">false</Set>
- <Set name="headerCacheSize">512</Set>
- </New>
-
- <New id="http-legacy" class="org.eclipse.jetty.server.HttpConfiguration">
- <Set name="secureScheme">https</Set>
- <Set name="securePort">
- <Property name="jetty.secure.port" default="8443" />
- </Set>
- <Set name="outputBufferSize">32768</Set>
- <Set name="requestHeaderSize">8192</Set>
- <Set name="responseHeaderSize">8192</Set>
-
- <!-- Default security setting: do not leak our version -->
- <Set name="sendServerVersion">false</Set>
-
- <Set name="sendDateHeader">false</Set>
- <Set name="headerCacheSize">512</Set>
- </New>
-
- <Call name="addConnector">
- <Arg>
- <New class="org.eclipse.jetty.server.ServerConnector">
- <Arg name="server">
- <Ref refid="Server" />
- </Arg>
- <Arg name="factories">
- <Array type="org.eclipse.jetty.server.ConnectionFactory">
- <Item>
- <New class="org.eclipse.jetty.server.HttpConnectionFactory">
- <Arg name="config">
- <Ref refid="http-default"/>
- </Arg>
- </New>
- </Item>
- </Array>
- </Arg>
- <Set name="host">{{ server.odl_bind_ip }}
- <Property name="jetty.host"/>
- </Set>
- <Set name="port">
- <Property name="jetty.port" default="{{ server.odl_rest_port }}"/>
- </Set>
- <Set name="idleTimeout">
- <Property name="http.timeout" default="300000"/>
- </Set>
- <Set name="name">jetty-default</Set>
- </New>
- </Arg>
- </Call>
-
- <!-- =========================================================== -->
- <!-- Configure Authentication Realms -->
- <!-- Realms may be configured for the entire server here, or -->
- <!-- they can be configured for a specific web app in a context -->
- <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
- <!-- example). -->
- <!-- =========================================================== -->
- <Call name="addBean">
- <Arg>
- <New class="org.eclipse.jetty.jaas.JAASLoginService">
- <Set name="name">karaf</Set>
- <Set name="loginModuleName">karaf</Set>
- <Set name="roleClassNames">
- <Array type="java.lang.String">
- <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
- </Item>
- </Array>
- </Set>
- </New>
- </Arg>
- </Call>
- <Call name="addBean">
- <Arg>
- <New class="org.eclipse.jetty.jaas.JAASLoginService">
- <Set name="name">default</Set>
- <Set name="loginModuleName">karaf</Set>
- <Set name="roleClassNames">
- <Array type="java.lang.String">
- <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
- </Item>
- </Array>
- </Set>
- </New>
- </Arg>
- </Call>
-</Configure>
diff --git a/mcp/salt-formulas/opendaylight/files/setenv.shell b/mcp/salt-formulas/opendaylight/files/setenv.shell
deleted file mode 100644
index 2921ade14..000000000
--- a/mcp/salt-formulas/opendaylight/files/setenv.shell
+++ /dev/null
@@ -1,21 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Mirantis Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-{%- from "opendaylight/map.jinja" import server with context -%}
-# export JAVA_HOME # Location of Java installation
-export JAVA_MIN_MEM={{ server.java_min_mem }} # Minimum memory for the JVM
-export JAVA_MAX_MEM={{ server.java_max_mem }} # Maximum memory for the JVM
-# export JAVA_PERM_MEM # Minimum perm memory for the JVM
-export JAVA_MAX_PERM_MEM=512m # Maximum perm memory for the JVM
-export EXTRA_JAVA_OPTS='{{ server.java_extra_opts }}' # Additional JVM options
-# export KARAF_HOME # Karaf home folder
-# export KARAF_DATA # Karaf data folder
-# export KARAF_BASE # Karaf base folder
-# export KARAF_ETC # Karaf etc folder
-# export KARAF_OPTS # Additional available Karaf options
-# export KARAF_DEBUG # Enable debug mode
-# export KARAF_REDIRECT # Enable/set the std/err redirection when using bin/start
diff --git a/mcp/salt-formulas/opendaylight/init.sls b/mcp/salt-formulas/opendaylight/init.sls
deleted file mode 100644
index 132f69b33..000000000
--- a/mcp/salt-formulas/opendaylight/init.sls
+++ /dev/null
@@ -1,12 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Mirantis Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-include:
-{% if pillar.opendaylight.server is defined %}
-- opendaylight.server
-{% endif %}
diff --git a/mcp/salt-formulas/opendaylight/map.jinja b/mcp/salt-formulas/opendaylight/map.jinja
deleted file mode 100644
index 38575111e..000000000
--- a/mcp/salt-formulas/opendaylight/map.jinja
+++ /dev/null
@@ -1,28 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Mirantis Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-{% set server = salt['grains.filter_by']({
- 'Debian': {
- 'karaf_features': {'default': ['standard', 'wrap', 'ssh']},
- 'odl_rest_port': '8282',
- 'odl_bind_ip': '0.0.0.0',
- 'repo': 'odl-team/oxygen',
- 'log_levels': {},
- 'enable_ha': false,
- 'ha_node_ips': [],
- 'ha_node_index': 0,
- 'security_group_mode': 'stateful',
- 'vpp_routing_node': '',
- 'java_extra_opts': '-Djava.net.preferIPv4Stack=true -XX:+UseG1GC',
- 'java_min_mem': '1g',
- 'java_max_mem': '2g',
- },
- 'RedHat': {
- 'repo': 'opendaylight-6-testing'
- },
-}, merge=salt['pillar.get']('opendaylight:server')) %}
diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/opendaylight/server.sls
deleted file mode 100644
index 51a4d9f95..000000000
--- a/mcp/salt-formulas/opendaylight/server.sls
+++ /dev/null
@@ -1,102 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Mirantis Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-{% from "opendaylight/map.jinja" import server with context %}
-{% from "linux/map.jinja" import system with context %}
-
-{%- if server.enabled %}
-
-opendaylight_repo_key:
- cmd.run:
- - name: "apt-key adv --keyserver keyserver.ubuntu.com --recv 44C05248"
-{%- if system.proxy is defined and system.proxy.keyserver is defined %}
- - env:
-{%- if system.proxy.keyserver.http is defined and grains['dns']['nameservers'][0] in system.proxy.keyserver.http %}
- - http_proxy: {{ system.proxy.keyserver.http }}
-{%- endif %}
-{%- if system.proxy.keyserver.https is defined and grains['dns']['nameservers'][0] in system.proxy.keyserver.https %}
- - https_proxy: {{ system.proxy.keyserver.https }}
-{%- endif %}
-{%- endif %}
-
-opendaylight_repo:
- pkgrepo.managed:
- # NOTE(armband): PPA handling behind proxy broken, define it explicitly
- # https://github.com/saltstack/salt/pull/45224
- # - ppa: {{ server.repo }}
- - human_name: opendaylight-ppa
- - name: deb http://ppa.launchpad.net/odl-team/{{ server.version }}/ubuntu xenial main
- - file: /etc/apt/sources.list.d/odl-team-ubuntu-{{ server.version }}-xenial.list
-
-opendaylight:
- pkg.installed:
- - require:
- - pkgrepo: opendaylight_repo
- - require_in:
- - file: /opt/opendaylight/etc/jetty.xml
- - file: /opt/opendaylight/bin/setenv
- - ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
- - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
- service.running:
- - enable: true
- - watch:
- - file: /opt/opendaylight/etc/jetty.xml
- - file: /opt/opendaylight/bin/setenv
- - ini: /opt/opendaylight/etc/org.apache.karaf.features.cfg
- - ini: /opt/opendaylight/etc/org.ops4j.pax.web.cfg
-
-# TODO: use service.masked state once salt get updated to 2017.7.0+
-service.mask:
- module.run:
- - m_name: opendaylight
- - require_in:
- - pkg: opendaylight
-
-/opt/opendaylight/etc/jetty.xml:
- file.managed:
- - source: salt://opendaylight/files/jetty.xml
- - template: jinja
- - user: odl
- - group: odl
-
-/opt/opendaylight/bin/setenv:
- file.managed:
- - source: salt://opendaylight/files/setenv.shell
- - mode: 0755
- - use:
- - file: /opt/opendaylight/etc/jetty.xml
-
-{% set features %}
-{%- for f in server.karaf_features.itervalues() -%}
-{{ f | join(',') }}{%- if not loop.last %},{%- endif %}
-{%- endfor %}
-{% endset %}
-
-/opt/opendaylight/etc/org.apache.karaf.features.cfg:
- ini.options_present:
- - sections:
- featuresBoot: {{ features }}
-
-/opt/opendaylight/etc/org.ops4j.pax.web.cfg:
- ini.options_present:
- - sections:
- org.ops4j.pax.web.listening.addresses: {{ server.odl_bind_ip }}
- org.osgi.service.http.port: {{ server.odl_rest_port }}
-
-{%- if server.get('router_enabled', false) %}
-/opt/opendaylight/etc/custom.properties:
- ini.options_present:
- - sections:
- ovsdb.l3.fwd.enabled: 'yes'
- ovsdb.of.version: 1.3
- - require:
- - pkg: opendaylight
- - watch_in:
- - service: opendaylight
-{%- endif %}
-
-{%- endif %}