Skip to content

Instantly share code, notes, and snippets.

@grkvlt
Last active August 25, 2015 19:46
Show Gist options
  • Select an option

  • Save grkvlt/9b01feb5514468ee5fa7 to your computer and use it in GitHub Desktop.

Select an option

Save grkvlt/9b01feb5514468ee5fa7 to your computer and use it in GitHub Desktop.
Tomcat Catalog Entries
# Copyright 2014-2015 by Cloudsoft Corporation Limited
#
# Licensed 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.
brooklyn.catalog:
version: 1.0.3
items:
- id: tomcat-api-application
name: "Tomcat API Service"
iconUrl: https://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Tomcat-logo.svg/300px-Tomcat-logo.svg.png
itemType: template
item:
services:
- type: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
brooklyn.config:
# docker.image.name: $brooklyn:config("api.docker.image")
# docker.image.tag: $brooklyn:config("api.docker.tag")
# docker.dockerfile.url:
# "https://s3-eu-west-1.amazonaws.com/brooklyn-clocker/UsesJavaDockerfile"
wars.by.context:
$brooklyn:config("api.context"): $brooklyn:config("api.war.url")
- id: tomcat-api-cluster-haproxy
name: "Tomcat API Cluster (HAProxy)"
itemType: template
item:
services:
- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
name: "Web Cluster"
id: web-cluster
brooklyn.config:
initialSize: 2
dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: tomcat-api-application
brooklyn.config:
network.list:
- private
controlleddynamicwebappcluster.controllerSpec:
$brooklyn:entitySpec:
type: brooklyn.entity.proxy.haproxy.HAProxyController
brooklyn.config:
docker.image.name: haproxy
docker.image.tag: 1.5.9
install.dir: /usr/local/sbin/
run.dir: /usr/local/etc/haproxy/
network.list:
- private
member.sensor.hostname: "host.subnet.hostname"
- id: tomcat-api-cluster-nginx
name: "Tomcat API Cluster (Nginx)"
itemType: template
item:
services:
- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
name: "Web Cluster"
id: web-cluster
brooklyn.config:
initialSize: 2
dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: tomcat-api-application
controlleddynamicwebappcluster.controllerSpec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.proxy.nginx.NginxController
brooklyn.config:
member.sensor.hostname: "host.subnet.hostname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment