Skip to content

Commit

Permalink
resize default fedora instances and add stricter logrotation rules fo…
Browse files Browse the repository at this point in the history
…r tomcat (#594)
  • Loading branch information
jcrompton42 authored Oct 28, 2024
1 parent c6a2cb2 commit c1bdb4f
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/files/fedora-depo-ec2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Resources:
InstanceType: "t3.large"
IamInstanceProfile: !Ref FedoraInstanceProfile
KeyName: "default_library_key"
BlockDeviceMappings:
- DeviceName: "/dev/xvda"
Ebs:
VolumeSize: 30
PropagateTagsToVolumeOnCreation: True
SecurityGroupIds:
- "sg-0d01f29e22a683661"
Expand Down
73 changes: 73 additions & 0 deletions ansible/files/logging.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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.

handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

1catalina.org.apache.juli.FileHandler.level = WARN
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
1catalina.org.apache.juli.FileHandler.encoding = UTF-8
1catalina.org.apache.juli.FileHandler.maxDays = 2

2localhost.org.apache.juli.FileHandler.level = WARN
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.
2localhost.org.apache.juli.FileHandler.encoding = UTF-8
2localhost.org.apache.juli.FileHandler.maxDays = 2


3manager.org.apache.juli.FileHandler.level = WARN
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.
3manager.org.apache.juli.FileHandler.encoding = UTF-8

4host-manager.org.apache.juli.FileHandler.level = WARN
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
4host-manager.org.apache.juli.FileHandler.encoding = UTF-8
4host-manager.org.apache.juli.FileHandler.maxDays = 2

java.util.logging.ConsoleHandler.level = WARN
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.encoding = UTF-8


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = WARN
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = WARN
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = WARN
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler

# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE

# To see debug messages in TldLocationsCache, uncomment the following line:
#org.apache.jasper.compiler.TldLocationsCache.level = FINE
6 changes: 6 additions & 0 deletions ansible/install_tomcat_and_fedora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
src: files/server.xml
owner: tomcat
group: tomcat
- name: set logging properties
copy:
dest: /opt/tomcat/conf/logging.properties
src: files/logging.properties
owner: tomcat
group: tomcat
- name: download fedora war
get_url:
owner: tomcat
Expand Down

0 comments on commit c1bdb4f

Please sign in to comment.