diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 1ab8f4fc..18e387ab 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -30,7 +30,7 @@ kaui_system_properties: '' kb_system_properties: '' # Tomcat and JVM properties -- recommended defaults -jvm_initial_memory: 4G +jvm_initial_memory: 1G jvm_max_memory: 4G jvm_jdwp_port: 12345 jvm_jdwp_server: y diff --git a/ansible/templates/tomcat/conf/setenv.sh.j2 b/ansible/templates/tomcat/conf/setenv.sh.j2 index c86b895d..62b00dd9 100644 --- a/ansible/templates/tomcat/conf/setenv.sh.j2 +++ b/ansible/templates/tomcat/conf/setenv.sh.j2 @@ -7,8 +7,16 @@ CATALINA_OPTS="-server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{ catalina_base }}/logs/ -XX:+UseCodeCacheFlushing +{% if lookup('env', 'TOMCAT_JAVA_XMS') %} + -Xms{{ lookup('env', 'TOMCAT_JAVA_XMS') }} +{% else %} -Xms{{ jvm_initial_memory }} +{% endif %} +{% if lookup('env', 'TOMCAT_JAVA_XMX') %} + -Xmx{{ lookup('env', 'TOMCAT_JAVA_XMX') }} +{% else %} -Xmx{{ jvm_max_memory }} +{% endif %} -Xrunjdwp:transport=dt_socket,server={{ jvm_jdwp_server }},suspend=n,address={{ jvm_jdwp_port }} -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow @@ -20,10 +28,19 @@ CATALINA_OPTS="-server -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction={{ jvm_cms_initiating_fraction_threshold }} +{% if lookup('env', 'TOMCAT_JAVA_NEW_SIZE') %} + -XX:NewSize={{ lookup('env', 'TOMCAT_JAVA_NEW_SIZE') }} +{% else %} -XX:NewSize={{ jvm_new_size }} +{% endif %} +{% if lookup('env', 'TOMCAT_JAVA_MAX_NEW_SIZE') %} + -XX:MaxNewSize={{ lookup('env', 'TOMCAT_JAVA_MAX_NEW_SIZE') }} +{% else %} -XX:MaxNewSize={{ jvm_max_new_size }} +{% endif %} -XX:SurvivorRatio={{ jvm_survivor_ratio }} -XX:+DisableExplicitGC +{% if not lookup('env', 'TOMCAT_DISABLE_GC_LOGGING') %} -Xloggc:{{ catalina_base }}/logs/gc.log -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime @@ -32,7 +49,9 @@ CATALINA_OPTS="-server -XX:+PrintTenuringDistribution -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=14 - -XX:GCLogFileSize=100M" + -XX:GCLogFileSize=100M +{% endif %} + " # Java Properties export CATALINA_OPTS="$CATALINA_OPTS diff --git a/docker/README.adoc b/docker/README.adoc index b0ae173d..7c031a21 100644 --- a/docker/README.adoc +++ b/docker/README.adoc @@ -84,7 +84,7 @@ The following environment variables will populate the default `killbill.properti * `KILLBILL_DAO_MAX_CONNECTION_AGE` (default `0m`) * `KILLBILL_DAO_MIN_IDLE` (default `5`) * `KILLBILL_DAO_MYSQL_SERVER_VERSION` (default `4.0`) -* `KILLBILL_DAO_PASSWORD` (default `killkill`) +* `KILLBILL_DAO_PASSWORD` (default `killbill`) * `KILLBILL_DAO_POOLING_TYPE` (default `HIKARICP`) * `KILLBILL_DAO_PREP_STMT_CACHE_SIZE` (default `500`) * `KILLBILL_DAO_PREP_STMT_CACHE_SQL_LIMIT` (default `2048`) diff --git a/docker/templates/killbill/light/Dockerfile b/docker/templates/killbill/light/Dockerfile new file mode 100644 index 00000000..080feb67 --- /dev/null +++ b/docker/templates/killbill/light/Dockerfile @@ -0,0 +1,71 @@ +FROM killbill/killbill:0.20.11 +MAINTAINER Kill Bill core team + +# Install envsubst (see killbill.sh) +USER root +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && \ + apt-get install -y \ + gettext-base && \ + rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND teletype +USER tomcat + +# Disable Ansible (requires /dev/shm) +ENV KPM_INSTALL_CMD /bin/true + +# No JRuby plugin and no OSGI bundle, to keep memory usage low +RUN kpm uninstall kpm --destination=$KILLBILL_INSTALL_DIR/bundles +RUN rm -f $KILLBILL_INSTALL_DIR/bundles/platform/* + +# Pre-expand the Kill Bill WAR +RUN cd $TOMCAT_HOME/webapps && \ + mkdir ROOT && \ + cd ROOT && \ + jar -xvf ../ROOT.war && \ + touch -r ../ROOT.war META-INF/war-tracker && \ + cd - && \ + rm -f ROOT.war && \ + cd - + +# TODO +# * The SocketFactory jdbc driver doesn't seem to be working on Cloud Run +# * The Logback Stackdriver LoggingAppender isn't reliable +# +# Custom libraries +#COPY lib/*.jar $TOMCAT_HOME/webapps/ROOT/WEB-INF/lib/ +# Hack for now... +#RUN cd $TOMCAT_HOME/webapps/ROOT/WEB-INF/lib/ && \ +# rm -f animal-sniffer-annotations-1.14.jar annotations-3.0.1u2.jar asm-5.0.3.jar commons-codec-1.9.jar commons-lang3-3.2.1.jar error_prone_annotations-2.1.3.jar google-api-services-sqladmin-v1beta4-rev20190510-1.28.0.jar j2objc-annotations-1.1.jar jackson-core-2.9.6.jar && \ +# cd - + +# Add Kaui +COPY webapps/kaui.war $TOMCAT_HOME/webapps/kaui.war + +# Pre-expand the Kaui WAR +RUN cd $TOMCAT_HOME/webapps && \ + mkdir kaui && \ + cd kaui && \ + jar -xvf ../kaui.war && \ + touch -r ../kaui.war META-INF/war-tracker && \ + cd - && \ + rm -f kaui.war && \ + cd - + +# TODO See above +# Custom libraries +#COPY lib/*.jar $TOMCAT_HOME/webapps/kaui/WEB-INF/lib/ +# Hack for now... +#RUN cd $TOMCAT_HOME/webapps/kaui/WEB-INF/lib/ && \ +# rm -f animal-sniffer-annotations-1.14.jar annotations-3.0.1u2.jar asm-5.0.3.jar commons-codec-1.9.jar commons-lang3-3.2.1.jar error_prone_annotations-2.1.3.jar google-api-services-sqladmin-v1beta4-rev20190510-1.28.0.jar j2objc-annotations-1.1.jar jackson-core-2.9.6.jar && \ +# cd - + +# Note that classic configuration via environment variables won't work since Ansible isn't invoked +COPY webapp-context.xml $TOMCAT_HOME/webapps/ROOT/META-INF/context.xml +COPY webapp-context.xml $TOMCAT_HOME/webapps/kaui/META-INF/context.xml +COPY context.xml $TOMCAT_HOME/conf/context.xml +COPY server.xml $TOMCAT_HOME/conf/server.xml +COPY setenv.sh $TOMCAT_HOME/bin/setenv.sh +COPY logback.xml $KILLBILL_INSTALL_DIR/logback.xml +COPY killbill.properties.template $KILLBILL_INSTALL_DIR/killbill.properties.template +COPY killbill.sh $KILLBILL_INSTALL_DIR diff --git a/docker/templates/killbill/light/README.md b/docker/templates/killbill/light/README.md new file mode 100644 index 00000000..b63f1987 --- /dev/null +++ b/docker/templates/killbill/light/README.md @@ -0,0 +1,6 @@ +# Kill Bill light + +Kill Bill light is suitable for serverless deployments such as Google Cloud Run: + +* Memory usage low +* No `/dev/shm` requirement diff --git a/docker/templates/killbill/light/context.xml b/docker/templates/killbill/light/context.xml new file mode 100644 index 00000000..03c78e76 --- /dev/null +++ b/docker/templates/killbill/light/context.xml @@ -0,0 +1,3 @@ + + + diff --git a/docker/templates/killbill/light/killbill.properties.template b/docker/templates/killbill/light/killbill.properties.template new file mode 100644 index 00000000..345c7463 --- /dev/null +++ b/docker/templates/killbill/light/killbill.properties.template @@ -0,0 +1,14 @@ +org.killbill.security.shiroNbHashIterations=1 +org.killbill.jaxrs.threads.pool.nb=5 +org.killbill.payment.plugin.threads.nb=1 +org.killbill.billing.osgi.bundles.jruby.conf.dir=/var/lib/killbill/config +org.killbill.osgi.bundle.install.dir=/var/lib/killbill/bundles +org.killbill.server.baseUrl=http://localhost:8080 +org.killbill.billing.osgi.dao.user=$KILLBILL_DAO_USER +org.killbill.billing.osgi.dao.password=$KILLBILL_DAO_PASSWORD +org.killbill.billing.osgi.dao.url=$KILLBILL_DAO_URL +org.killbill.dao.user=$KILLBILL_DAO_USER +org.killbill.dao.password=$KILLBILL_DAO_PASSWORD +org.killbill.dao.url=$KILLBILL_DAO_URL +org.killbill.dao.maxActive=10 +org.killbill.billing.osgi.dao.maxActive=10 diff --git a/docker/templates/killbill/light/killbill.sh b/docker/templates/killbill/light/killbill.sh new file mode 100755 index 00000000..56382296 --- /dev/null +++ b/docker/templates/killbill/light/killbill.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +export KILLBILL_DAO_USER=${KILLBILL_DAO_USER:-killbill} +export KILLBILL_DAO_PASSWORD=${KILLBILL_DAO_PASSWORD:-killbill} +export KILLBILL_DAO_URL=${KILLBILL_DAO_URL:-jdbc:h2:mem:killbill} + +envsubst < $KILLBILL_INSTALL_DIR/killbill.properties.template > $KILLBILL_INSTALL_DIR/killbill.properties + +exec /usr/share/tomcat/bin/catalina.sh run diff --git a/docker/templates/killbill/light/lib/animal-sniffer-annotations-1.17.jar b/docker/templates/killbill/light/lib/animal-sniffer-annotations-1.17.jar new file mode 100644 index 00000000..6ec7a603 Binary files /dev/null and b/docker/templates/killbill/light/lib/animal-sniffer-annotations-1.17.jar differ diff --git a/docker/templates/killbill/light/lib/annotations-4.1.1.4.jar b/docker/templates/killbill/light/lib/annotations-4.1.1.4.jar new file mode 100644 index 00000000..8cbf103f Binary files /dev/null and b/docker/templates/killbill/light/lib/annotations-4.1.1.4.jar differ diff --git a/docker/templates/killbill/light/lib/api-common-1.8.1.jar b/docker/templates/killbill/light/lib/api-common-1.8.1.jar new file mode 100644 index 00000000..aab58d18 Binary files /dev/null and b/docker/templates/killbill/light/lib/api-common-1.8.1.jar differ diff --git a/docker/templates/killbill/light/lib/asm-7.1.jar b/docker/templates/killbill/light/lib/asm-7.1.jar new file mode 100644 index 00000000..355eb08d Binary files /dev/null and b/docker/templates/killbill/light/lib/asm-7.1.jar differ diff --git a/docker/templates/killbill/light/lib/asm-analysis-7.1.jar b/docker/templates/killbill/light/lib/asm-analysis-7.1.jar new file mode 100644 index 00000000..9b529c6c Binary files /dev/null and b/docker/templates/killbill/light/lib/asm-analysis-7.1.jar differ diff --git a/docker/templates/killbill/light/lib/asm-commons-7.1.jar b/docker/templates/killbill/light/lib/asm-commons-7.1.jar new file mode 100644 index 00000000..31ffb987 Binary files /dev/null and b/docker/templates/killbill/light/lib/asm-commons-7.1.jar differ diff --git a/docker/templates/killbill/light/lib/asm-tree-7.1.jar b/docker/templates/killbill/light/lib/asm-tree-7.1.jar new file mode 100644 index 00000000..8e9ddbd9 Binary files /dev/null and b/docker/templates/killbill/light/lib/asm-tree-7.1.jar differ diff --git a/docker/templates/killbill/light/lib/asm-util-7.1.jar b/docker/templates/killbill/light/lib/asm-util-7.1.jar new file mode 100644 index 00000000..5e61f2c1 Binary files /dev/null and b/docker/templates/killbill/light/lib/asm-util-7.1.jar differ diff --git a/docker/templates/killbill/light/lib/auto-value-annotations-1.6.5.jar b/docker/templates/killbill/light/lib/auto-value-annotations-1.6.5.jar new file mode 100644 index 00000000..f68a0136 Binary files /dev/null and b/docker/templates/killbill/light/lib/auto-value-annotations-1.6.5.jar differ diff --git a/docker/templates/killbill/light/lib/checker-compat-qual-2.5.5.jar b/docker/templates/killbill/light/lib/checker-compat-qual-2.5.5.jar new file mode 100644 index 00000000..c0c8d91f Binary files /dev/null and b/docker/templates/killbill/light/lib/checker-compat-qual-2.5.5.jar differ diff --git a/docker/templates/killbill/light/lib/commons-codec-1.10.jar b/docker/templates/killbill/light/lib/commons-codec-1.10.jar new file mode 100644 index 00000000..1d7417c4 Binary files /dev/null and b/docker/templates/killbill/light/lib/commons-codec-1.10.jar differ diff --git a/docker/templates/killbill/light/lib/commons-lang3-3.5.jar b/docker/templates/killbill/light/lib/commons-lang3-3.5.jar new file mode 100644 index 00000000..6328c8de Binary files /dev/null and b/docker/templates/killbill/light/lib/commons-lang3-3.5.jar differ diff --git a/docker/templates/killbill/light/lib/commons-logging-1.2.jar b/docker/templates/killbill/light/lib/commons-logging-1.2.jar new file mode 100644 index 00000000..93a3b9f6 Binary files /dev/null and b/docker/templates/killbill/light/lib/commons-logging-1.2.jar differ diff --git a/docker/templates/killbill/light/lib/download.sh b/docker/templates/killbill/light/lib/download.sh new file mode 100644 index 00000000..72c334f6 --- /dev/null +++ b/docker/templates/killbill/light/lib/download.sh @@ -0,0 +1 @@ +mvn dependency:copy-dependencies -DoutputDirectory=. diff --git a/docker/templates/killbill/light/lib/error_prone_annotations-2.3.2.jar b/docker/templates/killbill/light/lib/error_prone_annotations-2.3.2.jar new file mode 100644 index 00000000..bc2584db Binary files /dev/null and b/docker/templates/killbill/light/lib/error_prone_annotations-2.3.2.jar differ diff --git a/docker/templates/killbill/light/lib/failureaccess-1.0.1.jar b/docker/templates/killbill/light/lib/failureaccess-1.0.1.jar new file mode 100644 index 00000000..9b56dc75 Binary files /dev/null and b/docker/templates/killbill/light/lib/failureaccess-1.0.1.jar differ diff --git a/docker/templates/killbill/light/lib/gax-1.48.0.jar b/docker/templates/killbill/light/lib/gax-1.48.0.jar new file mode 100644 index 00000000..2c285d07 Binary files /dev/null and b/docker/templates/killbill/light/lib/gax-1.48.0.jar differ diff --git a/docker/templates/killbill/light/lib/gax-grpc-1.48.0.jar b/docker/templates/killbill/light/lib/gax-grpc-1.48.0.jar new file mode 100644 index 00000000..c825ac94 Binary files /dev/null and b/docker/templates/killbill/light/lib/gax-grpc-1.48.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-api-client-1.28.0.jar b/docker/templates/killbill/light/lib/google-api-client-1.28.0.jar new file mode 100644 index 00000000..450fea8e Binary files /dev/null and b/docker/templates/killbill/light/lib/google-api-client-1.28.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-api-services-sqladmin-v1beta4-rev20190510-1.28.0.jar b/docker/templates/killbill/light/lib/google-api-services-sqladmin-v1beta4-rev20190510-1.28.0.jar new file mode 100644 index 00000000..e816f515 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-api-services-sqladmin-v1beta4-rev20190510-1.28.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-api-services-sqladmin-v1beta4-rev20190607-1.30.1.jar b/docker/templates/killbill/light/lib/google-api-services-sqladmin-v1beta4-rev20190607-1.30.1.jar new file mode 100644 index 00000000..65833310 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-api-services-sqladmin-v1beta4-rev20190607-1.30.1.jar differ diff --git a/docker/templates/killbill/light/lib/google-auth-library-credentials-0.17.1.jar b/docker/templates/killbill/light/lib/google-auth-library-credentials-0.17.1.jar new file mode 100644 index 00000000..3765c6f5 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-auth-library-credentials-0.17.1.jar differ diff --git a/docker/templates/killbill/light/lib/google-auth-library-oauth2-http-0.17.0.jar b/docker/templates/killbill/light/lib/google-auth-library-oauth2-http-0.17.0.jar new file mode 100644 index 00000000..7e315610 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-auth-library-oauth2-http-0.17.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-cloud-core-1.88.0.jar b/docker/templates/killbill/light/lib/google-cloud-core-1.88.0.jar new file mode 100644 index 00000000..5a1c6472 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-cloud-core-1.88.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-cloud-core-grpc-1.88.0.jar b/docker/templates/killbill/light/lib/google-cloud-core-grpc-1.88.0.jar new file mode 100644 index 00000000..be3ea01f Binary files /dev/null and b/docker/templates/killbill/light/lib/google-cloud-core-grpc-1.88.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-cloud-logging-1.88.0.jar b/docker/templates/killbill/light/lib/google-cloud-logging-1.88.0.jar new file mode 100644 index 00000000..b0444d7a Binary files /dev/null and b/docker/templates/killbill/light/lib/google-cloud-logging-1.88.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-cloud-logging-logback-0.106.0-alpha.jar b/docker/templates/killbill/light/lib/google-cloud-logging-logback-0.106.0-alpha.jar new file mode 100644 index 00000000..eb8190a9 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-cloud-logging-logback-0.106.0-alpha.jar differ diff --git a/docker/templates/killbill/light/lib/google-http-client-1.28.0.jar b/docker/templates/killbill/light/lib/google-http-client-1.28.0.jar new file mode 100644 index 00000000..b6286aa0 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-http-client-1.28.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-http-client-apache-2.0.0.jar b/docker/templates/killbill/light/lib/google-http-client-apache-2.0.0.jar new file mode 100644 index 00000000..83043dda Binary files /dev/null and b/docker/templates/killbill/light/lib/google-http-client-apache-2.0.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-http-client-jackson2-1.28.0.jar b/docker/templates/killbill/light/lib/google-http-client-jackson2-1.28.0.jar new file mode 100644 index 00000000..608e2282 Binary files /dev/null and b/docker/templates/killbill/light/lib/google-http-client-jackson2-1.28.0.jar differ diff --git a/docker/templates/killbill/light/lib/google-oauth-client-1.28.0.jar b/docker/templates/killbill/light/lib/google-oauth-client-1.28.0.jar new file mode 100644 index 00000000..b7a40f9b Binary files /dev/null and b/docker/templates/killbill/light/lib/google-oauth-client-1.28.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-alts-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-alts-1.23.0.jar new file mode 100644 index 00000000..067fbacc Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-alts-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-api-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-api-1.23.0.jar new file mode 100644 index 00000000..baea1562 Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-api-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-auth-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-auth-1.23.0.jar new file mode 100644 index 00000000..9ea548f1 Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-auth-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-context-1.19.0.jar b/docker/templates/killbill/light/lib/grpc-context-1.19.0.jar new file mode 100644 index 00000000..94b2e38d Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-context-1.19.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-core-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-core-1.23.0.jar new file mode 100644 index 00000000..2f3c209d Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-core-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-grpclb-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-grpclb-1.23.0.jar new file mode 100644 index 00000000..9ce16d7a Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-grpclb-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-netty-shaded-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-netty-shaded-1.23.0.jar new file mode 100644 index 00000000..8fc7ab1b Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-netty-shaded-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-protobuf-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-protobuf-1.23.0.jar new file mode 100644 index 00000000..ef694fef Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-protobuf-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-protobuf-lite-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-protobuf-lite-1.23.0.jar new file mode 100644 index 00000000..ea02d19d Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-protobuf-lite-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/grpc-stub-1.23.0.jar b/docker/templates/killbill/light/lib/grpc-stub-1.23.0.jar new file mode 100644 index 00000000..69904f4c Binary files /dev/null and b/docker/templates/killbill/light/lib/grpc-stub-1.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/gson-2.7.jar b/docker/templates/killbill/light/lib/gson-2.7.jar new file mode 100644 index 00000000..be5b59b7 Binary files /dev/null and b/docker/templates/killbill/light/lib/gson-2.7.jar differ diff --git a/docker/templates/killbill/light/lib/guava-28.0-android.jar b/docker/templates/killbill/light/lib/guava-28.0-android.jar new file mode 100644 index 00000000..516fc5fa Binary files /dev/null and b/docker/templates/killbill/light/lib/guava-28.0-android.jar differ diff --git a/docker/templates/killbill/light/lib/httpclient-4.5.5.jar b/docker/templates/killbill/light/lib/httpclient-4.5.5.jar new file mode 100644 index 00000000..7796b0e7 Binary files /dev/null and b/docker/templates/killbill/light/lib/httpclient-4.5.5.jar differ diff --git a/docker/templates/killbill/light/lib/httpcore-4.4.9.jar b/docker/templates/killbill/light/lib/httpcore-4.4.9.jar new file mode 100644 index 00000000..cddba28f Binary files /dev/null and b/docker/templates/killbill/light/lib/httpcore-4.4.9.jar differ diff --git a/docker/templates/killbill/light/lib/j2objc-annotations-1.3.jar b/docker/templates/killbill/light/lib/j2objc-annotations-1.3.jar new file mode 100644 index 00000000..a429c721 Binary files /dev/null and b/docker/templates/killbill/light/lib/j2objc-annotations-1.3.jar differ diff --git a/docker/templates/killbill/light/lib/jackson-core-2.9.6.jar b/docker/templates/killbill/light/lib/jackson-core-2.9.6.jar new file mode 100644 index 00000000..09e7dd20 Binary files /dev/null and b/docker/templates/killbill/light/lib/jackson-core-2.9.6.jar differ diff --git a/docker/templates/killbill/light/lib/javax.annotation-api-1.3.2.jar b/docker/templates/killbill/light/lib/javax.annotation-api-1.3.2.jar new file mode 100644 index 00000000..a8a470a7 Binary files /dev/null and b/docker/templates/killbill/light/lib/javax.annotation-api-1.3.2.jar differ diff --git a/docker/templates/killbill/light/lib/jdbc-socket-factory-core-1.0.14.jar b/docker/templates/killbill/light/lib/jdbc-socket-factory-core-1.0.14.jar new file mode 100644 index 00000000..c54d6c3e Binary files /dev/null and b/docker/templates/killbill/light/lib/jdbc-socket-factory-core-1.0.14.jar differ diff --git a/docker/templates/killbill/light/lib/jffi-1.2.19-native.jar b/docker/templates/killbill/light/lib/jffi-1.2.19-native.jar new file mode 100644 index 00000000..a57bb1dc Binary files /dev/null and b/docker/templates/killbill/light/lib/jffi-1.2.19-native.jar differ diff --git a/docker/templates/killbill/light/lib/jffi-1.2.19.jar b/docker/templates/killbill/light/lib/jffi-1.2.19.jar new file mode 100644 index 00000000..b92013e1 Binary files /dev/null and b/docker/templates/killbill/light/lib/jffi-1.2.19.jar differ diff --git a/docker/templates/killbill/light/lib/jnr-a64asm-1.0.0.jar b/docker/templates/killbill/light/lib/jnr-a64asm-1.0.0.jar new file mode 100644 index 00000000..e736825f Binary files /dev/null and b/docker/templates/killbill/light/lib/jnr-a64asm-1.0.0.jar differ diff --git a/docker/templates/killbill/light/lib/jnr-constants-0.9.12.jar b/docker/templates/killbill/light/lib/jnr-constants-0.9.12.jar new file mode 100644 index 00000000..d894741f Binary files /dev/null and b/docker/templates/killbill/light/lib/jnr-constants-0.9.12.jar differ diff --git a/docker/templates/killbill/light/lib/jnr-enxio-0.21.jar b/docker/templates/killbill/light/lib/jnr-enxio-0.21.jar new file mode 100644 index 00000000..3e600205 Binary files /dev/null and b/docker/templates/killbill/light/lib/jnr-enxio-0.21.jar differ diff --git a/docker/templates/killbill/light/lib/jnr-ffi-2.1.10.jar b/docker/templates/killbill/light/lib/jnr-ffi-2.1.10.jar new file mode 100644 index 00000000..d3382b5c Binary files /dev/null and b/docker/templates/killbill/light/lib/jnr-ffi-2.1.10.jar differ diff --git a/docker/templates/killbill/light/lib/jnr-posix-3.0.50.jar b/docker/templates/killbill/light/lib/jnr-posix-3.0.50.jar new file mode 100644 index 00000000..1288fce5 Binary files /dev/null and b/docker/templates/killbill/light/lib/jnr-posix-3.0.50.jar differ diff --git a/docker/templates/killbill/light/lib/jnr-unixsocket-0.23.jar b/docker/templates/killbill/light/lib/jnr-unixsocket-0.23.jar new file mode 100644 index 00000000..167ff645 Binary files /dev/null and b/docker/templates/killbill/light/lib/jnr-unixsocket-0.23.jar differ diff --git a/docker/templates/killbill/light/lib/jnr-x86asm-1.0.2.jar b/docker/templates/killbill/light/lib/jnr-x86asm-1.0.2.jar new file mode 100644 index 00000000..dd4e695f Binary files /dev/null and b/docker/templates/killbill/light/lib/jnr-x86asm-1.0.2.jar differ diff --git a/docker/templates/killbill/light/lib/jsr305-3.0.2.jar b/docker/templates/killbill/light/lib/jsr305-3.0.2.jar new file mode 100644 index 00000000..59222d9c Binary files /dev/null and b/docker/templates/killbill/light/lib/jsr305-3.0.2.jar differ diff --git a/docker/templates/killbill/light/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar b/docker/templates/killbill/light/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar new file mode 100644 index 00000000..45832c05 Binary files /dev/null and b/docker/templates/killbill/light/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar differ diff --git a/docker/templates/killbill/light/lib/logback-classic-1.2.3.jar b/docker/templates/killbill/light/lib/logback-classic-1.2.3.jar new file mode 100644 index 00000000..bed00c0a Binary files /dev/null and b/docker/templates/killbill/light/lib/logback-classic-1.2.3.jar differ diff --git a/docker/templates/killbill/light/lib/logback-core-1.2.3.jar b/docker/templates/killbill/light/lib/logback-core-1.2.3.jar new file mode 100644 index 00000000..487b3956 Binary files /dev/null and b/docker/templates/killbill/light/lib/logback-core-1.2.3.jar differ diff --git a/docker/templates/killbill/light/lib/mysql-socket-factory-connector-j-8-1.0.14.jar b/docker/templates/killbill/light/lib/mysql-socket-factory-connector-j-8-1.0.14.jar new file mode 100644 index 00000000..78533ede Binary files /dev/null and b/docker/templates/killbill/light/lib/mysql-socket-factory-connector-j-8-1.0.14.jar differ diff --git a/docker/templates/killbill/light/lib/opencensus-api-0.23.0.jar b/docker/templates/killbill/light/lib/opencensus-api-0.23.0.jar new file mode 100644 index 00000000..5bf88f17 Binary files /dev/null and b/docker/templates/killbill/light/lib/opencensus-api-0.23.0.jar differ diff --git a/docker/templates/killbill/light/lib/opencensus-contrib-grpc-metrics-0.21.0.jar b/docker/templates/killbill/light/lib/opencensus-contrib-grpc-metrics-0.21.0.jar new file mode 100644 index 00000000..22242cc3 Binary files /dev/null and b/docker/templates/killbill/light/lib/opencensus-contrib-grpc-metrics-0.21.0.jar differ diff --git a/docker/templates/killbill/light/lib/opencensus-contrib-http-util-0.18.0.jar b/docker/templates/killbill/light/lib/opencensus-contrib-http-util-0.18.0.jar new file mode 100644 index 00000000..48aa45cc Binary files /dev/null and b/docker/templates/killbill/light/lib/opencensus-contrib-http-util-0.18.0.jar differ diff --git a/docker/templates/killbill/light/lib/perfmark-api-0.17.0.jar b/docker/templates/killbill/light/lib/perfmark-api-0.17.0.jar new file mode 100644 index 00000000..8f07afa4 Binary files /dev/null and b/docker/templates/killbill/light/lib/perfmark-api-0.17.0.jar differ diff --git a/docker/templates/killbill/light/lib/pom.xml b/docker/templates/killbill/light/lib/pom.xml new file mode 100644 index 00000000..c42e6014 --- /dev/null +++ b/docker/templates/killbill/light/lib/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + org.kill-bill.docker + killbill-light + 0.0.1-SNAPSHOT + + + com.google.cloud.sql + mysql-socket-factory-connector-j-8 + 1.0.14 + + + com.google.cloud + google-cloud-logging-logback + 0.106.0-alpha + + + \ No newline at end of file diff --git a/docker/templates/killbill/light/lib/proto-google-cloud-logging-v2-0.71.0.jar b/docker/templates/killbill/light/lib/proto-google-cloud-logging-v2-0.71.0.jar new file mode 100644 index 00000000..bae83178 Binary files /dev/null and b/docker/templates/killbill/light/lib/proto-google-cloud-logging-v2-0.71.0.jar differ diff --git a/docker/templates/killbill/light/lib/proto-google-common-protos-1.16.0.jar b/docker/templates/killbill/light/lib/proto-google-common-protos-1.16.0.jar new file mode 100644 index 00000000..1d179db3 Binary files /dev/null and b/docker/templates/killbill/light/lib/proto-google-common-protos-1.16.0.jar differ diff --git a/docker/templates/killbill/light/lib/proto-google-iam-v1-0.12.0.jar b/docker/templates/killbill/light/lib/proto-google-iam-v1-0.12.0.jar new file mode 100644 index 00000000..0ebacead Binary files /dev/null and b/docker/templates/killbill/light/lib/proto-google-iam-v1-0.12.0.jar differ diff --git a/docker/templates/killbill/light/lib/protobuf-java-3.9.1.jar b/docker/templates/killbill/light/lib/protobuf-java-3.9.1.jar new file mode 100644 index 00000000..a87a5cfc Binary files /dev/null and b/docker/templates/killbill/light/lib/protobuf-java-3.9.1.jar differ diff --git a/docker/templates/killbill/light/lib/protobuf-java-util-3.9.1.jar b/docker/templates/killbill/light/lib/protobuf-java-util-3.9.1.jar new file mode 100644 index 00000000..f638732e Binary files /dev/null and b/docker/templates/killbill/light/lib/protobuf-java-util-3.9.1.jar differ diff --git a/docker/templates/killbill/light/lib/slf4j-api-1.7.25.jar b/docker/templates/killbill/light/lib/slf4j-api-1.7.25.jar new file mode 100644 index 00000000..0143c099 Binary files /dev/null and b/docker/templates/killbill/light/lib/slf4j-api-1.7.25.jar differ diff --git a/docker/templates/killbill/light/lib/threetenbp-1.3.3.jar b/docker/templates/killbill/light/lib/threetenbp-1.3.3.jar new file mode 100644 index 00000000..d10ae7f0 Binary files /dev/null and b/docker/templates/killbill/light/lib/threetenbp-1.3.3.jar differ diff --git a/docker/templates/killbill/light/logback.xml b/docker/templates/killbill/light/logback.xml new file mode 100644 index 00000000..de5e49b7 --- /dev/null +++ b/docker/templates/killbill/light/logback.xml @@ -0,0 +1,23 @@ + + + + + %-4relative [%thread] %-5level %logger{35} - %msg %n + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docker/templates/killbill/light/server.xml b/docker/templates/killbill/light/server.xml new file mode 100644 index 00000000..73000190 --- /dev/null +++ b/docker/templates/killbill/light/server.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docker/templates/killbill/light/setenv.sh b/docker/templates/killbill/light/setenv.sh new file mode 100644 index 00000000..b90f22e6 --- /dev/null +++ b/docker/templates/killbill/light/setenv.sh @@ -0,0 +1,37 @@ +export JAVA_HOME=${JAVA_HOME-"/usr/lib/jvm/default-java"} + +# JVM Options +CATALINA_OPTS="-server + -showversion + -XX:+PrintCommandLineFlags + -XX:+UseCodeCacheFlushing + -Xms512m + -Xmx1024m + -XX:+CMSClassUnloadingEnabled + -XX:-OmitStackTraceInFastThrow + -XX:+UseParNewGC + -XX:+UseConcMarkSweepGC + -XX:+CMSConcurrentMTEnabled + -XX:+ScavengeBeforeFullGC + -XX:+CMSScavengeBeforeRemark + -XX:+CMSParallelRemarkEnabled + -XX:+UseCMSInitiatingOccupancyOnly + -XX:CMSInitiatingOccupancyFraction=50 + -XX:NewSize=100m + -XX:MaxNewSize=256m + -XX:SurvivorRatio=10 + -XX:+DisableExplicitGC" + +# Java Properties +export CATALINA_OPTS="$CATALINA_OPTS + -Dkaui.url=http://127.0.0.1:8080 + -Dkaui.db.url=$KILLBILL_DAO_URL + -Dkaui.db.password=$KILLBILL_DAO_PASSWORD + -Dkaui.db.username=$KILLBILL_DAO_USER + -Dlogback.configurationFile=/var/lib/killbill/logback.xml + -Dorg.killbill.server.properties=file:///var/lib/killbill/killbill.properties + -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true + -Djava.rmi.server.hostname=$ENV_HOST_IP + -Djava.security.egd=file:/dev/./urandom + -Djruby.compile.invokedynamic=false + -Dlog4jdbc.sqltiming.error.threshold=1000" diff --git a/docker/templates/killbill/light/webapp-context.xml b/docker/templates/killbill/light/webapp-context.xml new file mode 100644 index 00000000..6ee4fad2 --- /dev/null +++ b/docker/templates/killbill/light/webapp-context.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/docker/templates/killbill/light/webapps/kaui.war b/docker/templates/killbill/light/webapps/kaui.war new file mode 100644 index 00000000..daec40d5 Binary files /dev/null and b/docker/templates/killbill/light/webapps/kaui.war differ