Coder Social home page Coder Social logo

killbill / killbill-cloud Goto Github PK

View Code? Open in Web Editor NEW
61.0 10.0 83.0 94.37 MB

Kill Bill deployment utilities

Home Page: https://killbill.io

License: Apache License 2.0

Shell 9.72% Ruby 81.80% Makefile 0.51% Dockerfile 1.78% Jinja 6.18%
killbill subscriptions billing payments

killbill-cloud's Introduction

Kill Bill deployment utilities

kpm killbill/killbill killbill/kaui killbill/mariadb killbill/postgresql

  • kpm: the Kill Bill Package Manager, low-level command line utility to install and manage Kill Bill
  • ansible: Ansible Galaxy collection of roles for Kill Bill deployments
  • docker: official Kill Bill Docker images
  • docker/compose: Docker Compose recipes, including examples integrating Kill Bill with the ELK and TIG stacks

About

Kill Bill is the leading Open-Source Subscription Billing & Payments Platform. For more information about the project, go to https://killbill.io/.

killbill-cloud's People

Contributors

abalhamoud avatar aiham avatar andrenpaes avatar anthonyp avatar beccagaspard avatar benbro avatar dependabot[bot] avatar dol avatar efenderbosch avatar govwhizdeploy avatar killbillio avatar learnjavawithreshma avatar lessmental avatar mushrushu avatar pierre avatar reshmabidikar avatar rjrpaz avatar sbrossie avatar skuda avatar tungleduyxyz avatar vnandwana avatar wwjbatista avatar wwlvelez avatar yubuylov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

killbill-cloud's Issues

add username ALL=(ALL) NOPASSWD: ALL to /etc/sudoers

When trying to use the killbill images as a base for another image, it isn't possible to run sudo commands in a Dockerfile (for example to add another binary to /usr/local/bin). The following error is displayed and the build fails:

sudo: no tty present and no askpass program specified

I think this can be fixed by adding

username ALL=(ALL) NOPASSWD: ALL
to
/etc/sudoers

See this issue for discussion:

docker/machine#3554

artifact info should be populated the same way for ruby/java and whether install was skipped or not

Today we have to look at different fields to extract the same info depending on the use cases. This is extremely confusing and also leads to issues such as the code here.

In addition there is currently a bug where installing (ok), uninstalling (ok), reinstalling without download because of sha1 (ok) , and then finally uninstalling again (fail). The issue if that the info extracted for the plugin_name is wrong and the json (plugin identifier) contains bad info leading to a failure on uninstall.

db.expose error

ERROR: Validation failed in file 'killbill-cloud/docker/compose/docker-compose.kb.yml', reason(s):
db.expose is invalid: should be of the format 'PORT[/PROTOCOL]

Maybe it should be?

expose:
    - "3306"

KPM/KPM plugin should handle correctly not passing a plugin version

The behavior should probably be different when command is executed through pure KPM, or through the KPM-plugin.

For KPM-plugin:

  • If the plugin exists in our repo, the system should detect the KB version and based on that extract the correct version for the plugin
  • If the plugin does not exist in our repo, it should default to LATEST

For pure KPM (where KB running version is not available) it should always default to LATEST

Can we revisit the static file : plugins_directory.yml

Today our docker images rely on a static file plugins_directory.yml to extract the versions of the plugin:

  • That means all plugins need to exist in that file
  • Also all versions must be up-to-date

Could we instead pass the version instead of a flag -e KILLBILL_PLUGIN_STRIPE=1 and extract dynamically from maven?

Easy data export scripts

Need a tool to easily export data from production to QA environment (ideally using the export endpoint in Kill Bill). Sensitive data should be scrubbed automatically.

Docker Compose Conflict

Following the instructions of :
https://github.com/killbill/killbill-cloud/tree/master/docker/compose#kill-bill

make run-kb Will download DOCKER LATEST TAG ( 0.17 )

and instructions below that will have 0.16 version of database. That creates the DB fields mismatch error.

host> docker exec -ti kb_killbill_1 /bin/bash
tomcat7@container:/var/lib/tomcat7$ mysql -h db -uroot -pkillbill -e 'create database killbill; create database kaui'
tomcat7@container:/var/lib/tomcat7$ curl -s http://docs.killbill.io/0.16/ddl.sql | mysql -h db -uroot -pkillbill killbill
tomcat7@container:/var/lib/tomcat7$ curl -s https://raw.githubusercontent.com/killbill/killbill-admin-ui/master/db/ddl.sql | mysql -h db -uroot -pkillbill kaui

To fix it i just updated the make run-kb file to 0.16.9 image.

Docker image : Use volume for killbill.properties

Today those properties are hardcoded which means every change requires ssh'ing into the zone, making the change, and then restarting the instance. We could at least prevent the login into the zone.

Deprecation of the `stable_version`

The stable_version is only used for older KB version (prior to 0.16) and should be deprecated (removed) after 0.16 has been out for a while and becomes the default image.

Error "can't convert nil into String" during fresh installation

Fresh installation using KPM 0.2.1:

~ > mkdir killbill
~ > cd killbill
killbill > kpm install
I, [2016-04-26T07:29:40.733000 #32532]  INFO -- : Starting download of https://s3.amazonaws.com/kb-binaries/apache-tomcat-7.0.42.tar.gz to /var/folders/0x/1p8qjl4x03q_vtcp_rqqd0l03m6s2y/T/d20160426-32532-xdyeqf/tomcat.tar.gz
I, [2016-04-26T07:29:47.589000 #32532]  INFO -- : Successful installation of https://s3.amazonaws.com/kb-binaries/apache-tomcat-7.0.42.tar.gz to $HOME/killbill
I, [2016-04-26T07:29:52.715000 #32532]  INFO -- :       Starting download of org.kill-bill.billing:killbill-profiles-killbill:war:0.16.3 to /var/folders/0x/1p8qjl4x03q_vtcp_rqqd0l03m6s2y/T/d20160426-32532-1xy3jvs
I, [2016-04-26T07:30:48.968000 #32532]  INFO -- : Successful installation of org.kill-bill.billing:killbill-profiles-killbill:war:0.16.3 to $HOME/killbill/webapps
I, [2016-04-26T07:30:55.493000 #32532]  INFO -- :   Detected jruby.jar version 0.22-SNAPSHOT
I, [2016-04-26T07:30:59.349000 #32532]  INFO -- :   Skipping installation of org.kill-bill.billing.plugin.ruby:kpm-plugin:tar.gz:0.0.5 to /var/tmp/bundles/plugins/ruby, file already exists
I, [2016-04-26T07:31:10.029000 #32532]  INFO -- :   Skipping installation of org.kill-bill.billing:killbill-platform-osgi-bundles-defaultbundles:tar.gz:0.21 to /var/tmp/bundles/platform, file already exists
can't convert nil into String

This prevents Kaui to be installed.

Originally reported on the mailing-list: https://groups.google.com/forum/#!msg/killbilling-users/cOSjTg7hYFg/B-bCQ1cRCAAJ.

pluginKey should be independent of version

Currently KPM does not allow to install another version with the same pluginKey.

Example:

2015-12-18 19:15:43,137 [Thread-21] INFO  o.k.b.k.0.20.0.SNAPSHOT - handle_event command=INSTALL_PLUGIN, plugin_key=cybersource, artifact_id=, version=4.0.0, group_id=, packaging=, classifier=, type=, force_download=false
2015-12-18 19:15:43,137 [Thread-21] INFO  o.k.b.k.0.20.0.SNAPSHOT - Instructed to install plugin_key=cybersource artifact_id= version=4.0.0 group_id= packaging= classifier= type= force_download=false
2015-12-18 19:15:44,188 [Thread-21] WARN  o.k.b.k.0.20.0.SNAPSHOT - Entry in plugin_identifiers.json for key cybersource does not match for coordinate version: got 4.0.0 instead of 0.0.4
2015-12-18 19:15:44,188 [Thread-21] WARN  o.k.b.k.0.20.0.SNAPSHOT - Error during installation of plugin 

Provisioning tooling

Choose shiny tool(s)โ„ข and implement recipes to:

  • Handle Kill Bill lifecycle (start, stop, restart)
  • Handle multi-nodes (integration with slb, service discovery, etc.)
  • Handle rolling upgrades
  • Can be hooked easily into the ELK stack

Killbill Docker 0.14.0 - Stripe Not Registering

Hi Guys

I'm having problems upgrading from 0.13.5 to 0.14.0

I've Updated the Db Schema per: https://github.com/killbill/killbill/wiki/Kill-Bill-Migration-0.12.x-to-0.14.x

Removed the existing docker container and then installed the new version using the below command:

sudo docker run -tid --name pcbilling -p 8080:8080 \
-v /home/ubuntu/killbill/etc/stripe.yml:/etc/killbill/stripe.yml \
-e KILLBILL_PLUGIN_STRIPE=1 \
-e KILLBILL_CONFIG_DAO_URL=jdbc:mysql://###/killbill \
-e KILLBILL_CONFIG_DAO_USER=###\
-e KILLBILL_CONFIG_DAO_PASSWORD=### \
-e KILLBILL_CONFIG_OSGI_DAO_URL=jdbc:mysql://###/killbill \
-e KILLBILL_CONFIG_OSGI_DAO_USER=### \
-e KILLBILL_CONFIG_OSGI_DAO_PASSWORD=### \
killbill/killbill:0.14.0

I get the following error when using KAUI:
Error while retrieving account information: Error 400: Payment plugin killbill-stripe is not registered

From the logs:

2015-06-08 03:29:05,333 [http-bio-8080-exec-3] WARN o.k.b.j.mappers.ExceptionMapperBase - Bad request
org.killbill.billing.payment.api.PaymentApiException: Payment plugin killbill-stripe is not registered
at org.killbill.billing.payment.core.ProcessorBase.getPaymentPluginApi(ProcessorBase.java:132)
at org.killbill.billing.payment.core.PaymentMethodProcessor.buildDefaultPaymentMethod(PaymentMethodProcessor.java:171)
at org.killbill.billing.payment.core.PaymentMethodProcessor.getPaymentMethodInternal(PaymentMethodProcessor.java:325)
at org.killbill.billing.payment.core.PaymentMethodProcessor.getPaymentMethods(PaymentMethodProcessor.java:145)
at org.killbill.billing.payment.api.DefaultPaymentApi.getAccountPaymentMethods(DefaultPaymentApi.java:382)
at org.killbill.billing.util.glue.KillbillApiAopModule$ProfilingMethodInterceptor$1.execute(KillbillApiAopModule.java:52)
at org.killbill.commons.profiling.Profiling.executeWithProfiling(Profiling.java:33)
at org.killbill.billing.util.glue.KillbillApiAopModule$ProfilingMethodInterceptor.invoke(KillbillApiAopModule.java:49)
at org.killbill.billing.jaxrs.resources.AccountResource.getPaymentMethods(AccountResource.java:639)
at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
at org.killbill.billing.server.security.TenantFilter.doFilter(TenantFilter.java:110)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
at org.killbill.billing.server.filters.ResponseCorsFilter.doFilter(ResponseCorsFilter.java:66)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:44)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:41)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Looking at this startup logs ... I see the following juicy bits:

2015-06-08 03:27:05,436 [localhost-startStop-1] INFO o.k.b.osgi.pluginconf.PluginFinder - Adding plugin killbill-stripe-1.0.0
2015-06-08 03:27:05,436 [localhost-startStop-1] WARN o.k.b.osgi.pluginconf.PluginFinder - Configuration root dir /var/lib/killbill/bundles/plugins/java is not a valid directory

2015-06-08 03:27:09,968 [localhost-startStop-1] INFO o.killbill.billing.osgi.FileInstall - Starting bundle jruby-killbill-stripe
2015-06-08 03:27:09,982 [Thread-4] INFO o.k.b.k.0.2.0 - BundleEvent RESOLVED
2015-06-08 03:27:10,011 [Thread-4] INFO o.k.b.k.0.2.0 - JRuby bundle activated
2015-06-08 03:27:10,017 [Thread-4] INFO o.k.b.k.0.2.0 - Starting JRuby plugin Killbill::Plugin::Api::PaymentPluginApi
2015-06-08 03:27:10,018 [localhost-startStop-1] INFO o.k.b.osgi.bundles.jruby.JRubyPlugin - Creating scripting container with localContextScope THREADSAFE
2015-06-08 03:27:28,377 [Thread-4] INFO o.k.b.k.0.2.0 - BundleEvent STOPPED
2015-06-08 03:27:28,380 [localhost-startStop-1] WARN o.killbill.billing.osgi.FileInstall - Unable to start bundle
org.osgi.framework.BundleException: Activator start error in bundle org.kill-bill.billing.killbill-platform-osgi-bundles-jruby-1 [20].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2204)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2072)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:963)
at org.killbill.billing.osgi.FileInstall.startBundle(FileInstall.java:202)
at org.killbill.billing.osgi.FileInstall.startBundles(FileInstall.java:94)
at org.killbill.billing.osgi.DefaultOSGIService.start(DefaultOSGIService.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.killbill.billing.lifecycle.DefaultLifecycle.doFireStage(DefaultLifecycle.java:150)

Caused by: org.jruby.exceptions.RaiseException: (LoadError) Could not load 'active_record/connection_adapters/jdbcmysql_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile.

Fix `LATEST` version in KPM to point to even numbers

There are many places in our doc/config (e.g docker compose.yml files) where we have to provide command that take versions. It would be better to hardcode those to LATEST with the understanding that LATEST points to latest stable.

Currently, downloading LATEST Kill Bill could point to odd numbers (e.g. 0.19.1), which are unstable. We should somehow make it find the latest even number instead (e.g. 0.18.10).

Swagger misconfigured

org.killbill.server.baseUrl defaults to http://localhost:8080 in the Docker image -- it should somehow be set to the docker-machine ip address instead.

Document base /var/lib/tomcat7/webapps/ROOT does not exist or is not a readable directory

I use killbill image "killbill/killbill:latest". This is my log container:
What wrong with this?

Listening for transport dt_socket at address: 12345
Dec 16, 2015 3:57:43 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.5.1.
Dec 16, 2015 3:57:43 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Dec 16, 2015 3:57:43 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
Dec 16, 2015 3:57:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Dec 16, 2015 3:57:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 333 ms
Dec 16, 2015 3:57:43 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 16, 2015 3:57:43 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Dec 16, 2015 3:57:43 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/ROOT.xml
Dec 16, 2015 3:57:43 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /var/lib/tomcat7/webapps/ROOT does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5089)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Dec 16, 2015 3:57:43 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Error in resourceStart()
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5270)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 10 more

Dec 16, 2015 3:57:43 PM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor /etc/tomcat7/Catalina/localhost/ROOT.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Dec 16, 2015 3:57:43 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Dec 16, 2015 3:57:43 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 72 ms

KPM: refactor BaseArtifact to provide a uniform artifact_info

We currently construct the artifact_info with a a lot of useful fields such as:

  • dir_name
  • bundle_dir
  • file_path
  • repository_path

However the definition for those entries is not consistent across artifacts:

  • For ruby plugin:
    • dir_name = file_path = pluginDir/ruby
    • repository_path points to the tar.gz (e.g /org/kill-bill/billing/plugin/ruby/payment-test-plugin/1.8.7/payment-test-plugin-1.8.7.tar.gz)
    • bundle_dir = pluginDir/ruby/plugin_name/plugin_version (BUT ONLY AFTER it has been successfully installed).
  • For java plugin:
    • dir_name = pluginDir/java/plugin_name/plugin_version
    • repository_path points to the jar (e.g /org/kill-bill/billing/plugin/java/analytics-plugin/0.7.1/analytics-plugin-0.7.1.jar)
    • file_name = jar
    • file_path = dir_name/file_name
    • bundle_dir = dir_name (BUT ONLY AFTER it has been successfully installed).

Did not investigate the case for pure OSGI default bundles, kaui or killbill war, but that should also be consistent so we can extract clear definition from those fields.

Docker images with Java 8?

Any plans on releasing Docker images that use Java 8? We're implementing our own payment plugin and it uses libraries that require Java 8. I've hacked Java 8 in to the existing Docker image, but it would be nice to have the option of picking Ubuntu 14 or 16 LTS or Alpine and Java 7 or 8.

I can probably help by forking and submitting a pull request.

Extend KPM to install development plugins

We need to extend KPM to be able to install (non released) dev plugins. This came back recently on the mailing list (and people end up hacking sha1.yml andplugin_identifiers.json) by hand. Proposal is:

  1. Create an alias for verbs pull_ruby_plugin -> install_ruby_plugin (same for java)
  2. Add flag from_source_file to install the plugin (in case of java should be fairly simple, mostly consist in coyping the jar at the right place; for ruby we could rely on the rake install command

Error message when downloading plugin is cryptic

> kpm pull_ruby_plugin --destination=/tmp/foo org.kill-bill.billing.plugin.ruby:cybersource-plugin:3.0.0:tar.gz
Please submit your request using 4 colon-separated values. groupId:artifactId:version:extension

While the real syntax is
> kpm pull_ruby_plugin --destination=/tmp/cybersource/ cybersource-plugin 3.0.0

But the message implies we should pass all four arguments separated by columns

docker-compose commands in the readme need to point the yml file

The docker-compose README show several commands to manage the kb project.
A file named docker-compose.yml is expected.

ERROR: 
        Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml, fig.yml, fig.yaml

We need to add '-f docker-compose.kb.yml':

cd killbill-cloud/docker/compose
docker-compose -p kb -f docker-compose.kb.yml ps
docker-compose -p kb -f docker-compose.kb.yml restart killbill
docker-compose -p kb -f docker-compose.kb.yml restart kaui

I tried to restart killbill with the correct command. It stopped the container but didn't start again.

sudo do-compose -p kb -f docker-compose.kb.yml restart killbill

I'm using latest killbill on ubuntu 16.04 with stable docker and docker-compose packages.

Confusion in naming of kaui enviroment variable KAUI_URL

docker's kaui configuration argument **-e KAUI_URL=http://killbill:8080** is kinda confusing since the it's a link to killbill i think it should be **-e KILLBILL_URL=http://killbill:8080**
this comes up clearly where you have killbill and kaui in separate hosts and you need to pass the parameters using KAUI_URL tends to make it look like its the host where KAUI is hosted where's in real case it should bill KILLBILLS URL

Problems enabling Plugins (Stripe)

Hi all, im currently evaluating killbill and testing with the docker guide. Everything has been fine so far, but I got to the point where I wanted to test Stripe. I followed the guide, add the ENV var, setup stripe.yml etc and started up KB. When I try to create a new payment method I get the following:

{
  "className": "org.killbill.billing.payment.api.PaymentApiException",
  "code": 7028,
  "message": "Payment plugin killbill-stripe is not registered",
  "causeClassName": null,
  "causeMessage": null,
  "stackTrace": []
}

Investigating further I noticed something in the logs that may help?

2016-01-08 11:24:06,100 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - File non existent: Skipping parsing of plugin_identifiers.json
2016-01-08 11:24:06,101 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - Configuration root dir /var/lib/killbill/bundles/plugins/ruby is not a valid directory
2016-01-08 11:24:06,101 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - Configuration root dir /var/lib/killbill/bundles/plugins/java is not a valid directory
2016-01-08 11:24:06,102 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - File non existent: Skipping parsing of plugin_identifiers.json
2016-01-08 11:24:06,102 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - Configuration root dir /var/lib/killbill/bundles/plugins/ruby is not a valid directory
2016-01-08 11:24:06,102 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - Configuration root dir /var/lib/killbill/bundles/plugins/java is not a valid directory

I tried to create the missing directories and restart the server, but I got the following instead:

2016-01-08 11:35:40,615 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - File non existent: Skipping parsing of plugin_identifiers.json
2016-01-08 11:35:40,616 [localhost-startStop-1] WARN  o.k.b.osgi.pluginconf.PluginFinder - File non existent: Skipping parsing of plugin_identifiers.json

So it looks like some directories and files are missing? I'm using the image killbill/killbill:0.16.0.

If you need any further logs please let me know ๐Ÿ˜ƒ

jruby.jar story

Somehow KPM should detect whether jruby.jar is correctly installed and with correct version.

Include the DDLs in the docker image and install on first run

The README says to install the DDL after make run-kb.
Is there a reason not to include the DDLs in the image instead of downloading them from github?
The killbill container can install the DDLs from the local files on first run. It knows the DB user and password.
CREATE database IF NOT EXISTS killbill; CREATE database IF NOT EXISTS kaui;
The next two commands should only run on the first time so we don't reset the database.

The DDL version in the README should be 0.16 instead of 0.15 or point to /latest/ that will always be up to date.
http://docs.killbill.io/0.15/ddl.sql
https://github.com/killbill/killbill-cloud/blob/master/docker/compose/README.md

Dev provisioning

Develop tooling to ease development:

  • Should be self-contained as much as possible (no need to pre-install frameworks, etc.)
  • Code should be easy to update (WAR and/or plugins) and remote debug
  • Integrates with DDL management tooling (#3)

Add support for DDL files in KPM

It would be nice if KPM could install the DDL files too. We probably need to add a flag, so upgrades don't clobber existing tables.

needs special handling when installing to ROOT (under Tomcat)

... or a control parameter whether to extract the .war

killbill:
  version: 0.12.1
  webapp_path: /var/lib/tomcat7/webapps/ROOT
  plugins_dir: /var/tmp/bundles

simply created a killbill-xxx.war file under the ROOT directory (which is no a valid / deployment) instead of extracting the .war content there ... scenarios where the .war is renamed would likely be also interesting on some servers (have not tried) e.g. /var/lib/tomcat7/webapps/ROOT.war

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.