Code Monkey home page Code Monkey logo

apache-brooklyn-service-broker's Introduction

Cloud Foundry Brooklyn Service Broker

Build Status

This project makes a CF broker which makes Apache Brooklyn blueprints available as Cloud Foundry services.

Quick Start

The WAR file can be downloaded as a release on this github site, or you can build it from source.

You can launch it by deploying to Cloud Foundry, passing a few environment variables (e.g. in your manifest.yml):

    BROOKLYN_URI: https://brooklyn-uri:8081
    BROOKLYN_USERNAME: brooklyn-username
    BROOKLYN_PASSWORD: brooklyn-password
    SECURITY_USER_NAME: broker-username
    SECURITY_USER_PASSWORD: broker-password

You then use it by running cf create-service-broker and enable-service-access in the usual way.

For More Information

See the docs in this project. Or come talk to the authors at #brooklyncentral on IRC.

apache-brooklyn-service-broker's People

Contributors

ahgittin avatar andreaturli avatar christopherclark avatar nakomis avatar robertgmoss avatar tbouron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

apache-brooklyn-service-broker's Issues

cannot see the catalog added in brooklyn

Hi
I deploy the version 0.10 broker and brooklyn 0.10.
Then added below catalog by using brooklyn GUI

brooklyn.catalog:
    id: mysql
    version: 1.0
    iconUrl: classpath://mysql.png
    description: MySql is an open source relational database management system (RDBMS)
name: MySQL Database
services:
- type: brooklyn.entity.basic.BasicApplication
  brooklyn.children:
    - type: brooklyn.entity.database.mysql.MySqlNode
      id: mysql
      name: MySQL Node

After that I update the service broker by using below command:

 cf update-service-broker brooklyn broker-username broker-password https://brooklyn-service-broker.cf.hkdaac.com

But I can only got below result by running cf service-access

ubuntu@bosh-orch:~/brooklyn_broker$ cf service-access
Getting service access as admin...
broker: brooklyn
   service                        plan      access   orgs
   br_apache_brooklyn_blueprint   default   none

Do you have any idea on it?

Failed to create service instance

I added an catalog in my brooklyn environment. I am sure it can succeed to deploy from brooklyn UI. But when I try to deploy it from brooklyn broker, it failed. When I check the blueprint, I found it is not using the blueprint I configured.
I used the following catalog blueprint to add a catalog

brooklyn.catalog:
  id: Icinga2
  version: 1.0
  itemType: template
  name: Icinga2
  description: Icinga2 is an open source monitoring tool.
  item:
    services:
    - type: com.services.icinga2.Icinga2Service
      name: Icinga Node
      provisioning.properties:
        imageNameRegex: ubuntu-14.04-LTS
        hardwareId: t2.micro
      adminpassword: abc123456
      services: ssh,procs,load,swap
      hosts: 127.0.0.1
    location:
      jclouds:aws-ec2:
        identity: ******
        credential: ******
        region: ap-southeast-1

I tested to deploy it from brooklyn UI, it succeed to deploy using the blueprint I configured in the item. It is shown as follows:

    services:
    - type: com.services.icinga2.Icinga2Service
      name: Icinga Node
      provisioning.properties:
        imageNameRegex: ubuntu-14.04-LTS
        hardwareId: t2.micro
      adminpassword: abc123456
      services: ssh,procs,load,swap
      hosts: 127.0.0.1
    location:
      jclouds:aws-ec2:
        identity: ******
        credential: ******
        region: ap-southeast-1

But when I deploy it from broker, It failed and I found it is not using the blueprint I configured in the item. It is just using the following blueprint:

{"services":[{"type": "Icinga2:1.0"}], "locations": ["jclouds:aws-ec2"]}

The WAR failed to start in Tomcat

I build the WAR from source code. When I try to deploy the WAR through brooklyn, it started but I can not connect to the broker. I checked the tomcat startup log, there is errors. Then I tried to deploy the WAR in a local tomcat directly, there is also errors. The log is as follows. My environment is jdk1.8 and tomcat 8.

12-Nov-2015 11:27:34.092 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1m 19 Mar 2015)
12-Nov-2015 11:27:34.378 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
12-Nov-2015 11:27:34.407 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
12-Nov-2015 11:27:34.412 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2481 ms
12-Nov-2015 11:27:34.467 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
12-Nov-2015 11:27:34.468 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.26
12-Nov-2015 11:27:34.540 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive D:\workspace\apache-tomcat-8.0.26\webapps\brooklyn-service-broker.war
12-Nov-2015 11:27:50.037 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
12-Nov-2015 11:27:50.085 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/brooklyn-service-broker]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.isEnabled(WebSocketServerContainerInitializer.java:122)
    at org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer.onStartup(WebSocketServerContainerInitializer.java:137)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5156)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 10 more

12-Nov-2015 11:27:50.088 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive D:\workspace\apache-tomcat-8.0.26\webapps\brooklyn-service-broker.war
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/brooklyn-service-broker]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

12-Nov-2015 11:27:50.094 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive D:\workspace\apache-tomcat-8.0.26\webapps\brooklyn-service-broker.war has finished in 15,553 ms
12-Nov-2015 11:27:50.101 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\workspace\apache-tomcat-8.0.26\webapps\docs

Is there any suggestion about this error?

Thanks.

Exception cURLing the catalog REST API

I get the following error when I test the broker against brooklyn-0.7.0-M2-incubating:

$ curl http://user:$PASSWORD@localhost:8080/v2/catalog
{"description":"You must define a @Consumes type on your client method or interface, or supply a default"}

Here's the full stacktrace:

2015-05-05 13:17:23.324  WARN 22073 --- [nio-9091-exec-1] o.c.c.s.controller.BaseController        : Exception

java.lang.RuntimeException: You must define a @Consumes type on your client method or interface, or supply a default
    at org.jboss.resteasy.client.core.marshallers.ClientMarshallerFactory.createMarshaller(ClientMarshallerFactory.java:134)
    at org.jboss.resteasy.client.core.marshallers.ClientMarshallerFactory.createMarshallers(ClientMarshallerFactory.java:42)
    at org.jboss.resteasy.client.core.ClientInvoker.<init>(ClientInvoker.java:58)
    at org.jboss.resteasy.client.ProxyFactory.createClientInvoker(ProxyFactory.java:90)
    at org.jboss.resteasy.client.ProxyBuilder.createProxy(ProxyBuilder.java:149)
    at org.jboss.resteasy.client.ProxyBuilder.now(ProxyBuilder.java:129)
    at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:70)
    at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:65)
    at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:60)
    at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:43)
    at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:28)
    at brooklyn.rest.client.BrooklynApi.getCatalogApi(BrooklynApi.java:64)
    at org.cloudfoundry.community.servicebroker.brooklyn.service.BrooklynRestAdmin.getCatalogApplications(BrooklynRestAdmin.java:52)
    at org.cloudfoundry.community.servicebroker.brooklyn.service.BrooklynCatalogService.getCatalog(BrooklynCatalogService.java:32)
    at org.cloudfoundry.community.servicebroker.controller.CatalogController.getCatalog(CatalogController.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
    at org.springframework.web.method.support.InvocableHandlerinvokeForRequest(InvocableHandlerMethod.java:132)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilterChainProxy.java:342)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIionFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    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:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

Can't build the project

I want to install Brooklyn service broker, as it was described in this tutorial. After cloning the repo I run gradle clean build and it fails with an error:

FAILURE: Build failed with an exception.

A problem occurred evaluating root project 'brooklyn-service-broker'.
> org.gradle.api.tasks.TaskContainer.create(Ljava/lang/String;Ljava/lang/Class;)Lorg/gradle/api/Task;

If re-run this task with --debug option I see NoSuchMethod exception.

My environment:

$ gradle -v

------------------------------------------------------------
Gradle 1.4
------------------------------------------------------------

Gradle build time: Monday, September 9, 2013 8:44:25 PM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.3 compiled on April 8 2014
Ivy: non official version
JVM: 1.8.0_40 (Oracle Corporation 25.40-b25)
OS: Linux 3.13.0-43-generic amd64

How to create an application manifest and use it

When deploying brooklyn service broker, the launch.md says I should create an application manifest before cf push the war package. How to create the application manifest and use it?

Thanks,
Jiang chuan.

Question on deploy brooklyn service broker with blueprint

I successed to deploy broker with the following blueprint:

name: Brooklyn Service Broker

services:
- type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
  name: Tomcat Server
  war: <REPLACE>
  brooklyn.config:
    java.sysprops:
      brooklyn.uri: https://brooklyn-uri:8081
      brooklyn.username: brooklyn-username
      brooklyn.password: brooklyn-password
      security.user.name: broker-user
      security.user.password: broker-password

location: 
  jclouds:aws-ec2:
    identity: <REPLACE>
    credential: <REPLACE>

But I can not connect to the broker. How can I find the url for the broker? Or should I replace the parameter brooklyn.uri with a specific value?

Problem accessing /v2/catalog. Reason: Not found

Hi,

I trying to deploy brooklyn service broker on CF250 with an AMP Brooklyn Backend. But, I get an error during create-service-broker.
AMP Brooklyn is working find. CF also. See the following error message.

cf create-service-broker brooklyn amp4 Amp4! http://139.25.25.251:4443        Creating service broker brooklyn as admin...
FAILED
Server error, status code: 502, error code: 10001, message: The service broker rejected the request to http://139.25.25.251:4443/v2/catalog. Status Code: 404 Not Found, Body: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /v2/catalog. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

Could not find org.cloudfoundry:spring-boot-cf-service-broker:2.5.0-async

:clean UP-TO-DATE
:compileJava

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 11.293 secs

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.