[Apiman-user] Would be possible to upgrade APIMan from 1.2.8 to 1.3.0?

Celso Agra celso.agra at gmail.com
Sat Jun 3 09:47:15 EDT 2017


Thanks Eric! I'll try do to that.

Best regards,

Celso Agra

2017-06-03 10:22 GMT-03:00 Eric Wittmann <eric.wittmann at redhat.com>:

> You should probably be safe copying the entire data directory...I think. :)
>
> On Fri, Jun 2, 2017 at 5:06 PM, Celso Agra <celso.agra at gmail.com> wrote:
>
>> I think I found it!
>>
>> ./standalone/data# ls -l
>>>
>> apiman
>>
>> bootstrap
>>
>> content
>>
>> es
>>
>> kernel
>>
>> keycloak.h2.db
>>
>> keycloak.lock.db
>>
>> keycloak.trace.db
>>
>> keycloak.trace.db.old
>>
>> timer-service-data
>>
>> tx-object-store
>>
>>
>> Could I just copy the whole "data" folder?
>>
>> I'll take a look in the production guide.
>>
>> Thanks again!
>>
>>
>> 2017-06-02 17:59 GMT-03:00 Celso Agra <celso.agra at gmail.com>:
>>
>>> I knew it! hehehe
>>>
>>> I'll try again later.
>>>
>>> Thanks!!
>>>
>>> 2017-06-02 17:48 GMT-03:00 Eric Wittmann <eric.wittmann at redhat.com>:
>>>
>>>> You *almost* did the right thing.  :)  You were correct to create a new
>>>> instance of the whole system, just pointing it to your KC and database.
>>>> However you must *also* point it to your Gateway storage, which by default
>>>> is Elasticsearch (embedded in the quickstart).
>>>>
>>>> Note that you really shouldn't use the embedded Elasticsearch instance
>>>> for production (there is more info in the Production guide on the apiman
>>>> site).  It's really intended as a quick Getting Started approach.
>>>>
>>>> Anyway, the Gateway has its own separate persistence store which you'll
>>>> need to copy to your 1.3.0 setup.  You should be able to find the data
>>>> files in Wildfly somewhere (standalone/data/apiman iirc).
>>>>
>>>> -Eric
>>>>
>>>>
>>>> On Fri, Jun 2, 2017 at 4:06 PM, Celso Agra <celso.agra at gmail.com>
>>>> wrote:
>>>>
>>>>> Here is both files!
>>>>>
>>>>> Actually, I believe I did something wrong. I just create a new
>>>>> instance of APIMan just pointing to my keycloak and database.
>>>>> So, it was a new instance of whole system, such as Wildfly, Apiman-es,
>>>>> Apiman, etc...
>>>>>
>>>>>
>>>>> 2017-06-02 16:53 GMT-03:00 Eric Wittmann <eric.wittmann at redhat.com>:
>>>>>
>>>>>> It sounds like your configuration is different between 1.2.8 and
>>>>>> 1.3.0.  Can you post the apiman.properties files from each?
>>>>>>
>>>>>> On Fri, Jun 2, 2017 at 10:40 AM, Celso Agra <celso.agra at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Also, when I try to access some API with an APIKey, i got this error
>>>>>>>
>>>>>>> {"responseCode":500,"message":"No client found for API Key
>>>>>>> xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","trace":"io.apiman.gat
>>>>>>> eway.engine.beans.exceptions.InvalidContractException: No client
>>>>>>> found for API Key xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n\tat
>>>>>>> io.apiman.gateway.engine.es.CachingESRegistry.getContract(CachingESRegistry.java:78)\n\tat
>>>>>>> io.apiman.gateway.engine.impl.SecureRegistryWrapper.getContr
>>>>>>> act(SecureRegistryWrapper.java:154)\n\tat
>>>>>>> io.apiman.gateway.engine.impl.ApiRequestExecutorImpl.execute
>>>>>>> (ApiRequestExecutorImpl.java:361)\n\tat
>>>>>>> io.apiman.gateway.platforms.servlet.GatewayServlet.doAction(GatewayServlet.java:177)\n\tat
>>>>>>> io.apiman.gateway.platforms.servlet.GatewayServlet.service(GatewayServlet.java:78)\n\tat
>>>>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat
>>>>>>> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)\n\tat
>>>>>>> io.undertow.servlet.handlers.security.ServletSecurityRoleHan
>>>>>>> dler.handleRequest(ServletSecurityRoleHandler.java:62)\n\tat
>>>>>>> io.undertow.servlet.handlers.ServletDispatchingHandler.handl
>>>>>>> eRequest(ServletDispatchingHandler.java:36)\n\tat
>>>>>>> org.wildfly.extension.undertow.security.SecurityContextAssoc
>>>>>>> iationHandler.handleRequest(SecurityContextAssociationHandler.java:78)\n\tat
>>>>>>> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)\n\tat
>>>>>>> io.undertow.servlet.handlers.security.SSLInformationAssociat
>>>>>>> ionHandler.handleRequest(SSLInformationAssociationHandler.ja
>>>>>>> va:131)\n\tat
>>>>>>>
>>>>>>> 2017-06-02 11:32 GMT-03:00 Celso Agra <celso.agra at gmail.com>:
>>>>>>>
>>>>>>>> Here is the error when I try to register some changes in my
>>>>>>>> ClientApp
>>>>>>>>
>>>>>>>>
>>>>>>>> io.apiman.manager.api.rest.contract.exceptions.ActionException:
>>>>>>>> Failed to register client.
>>>>>>>> at io.apiman.manager.api.rest.impl.util.ExceptionFactory.action
>>>>>>>> Exception(ExceptionFactory.java:331)
>>>>>>>> at io.apiman.manager.api.rest.impl.ActionResourceImpl.registerC
>>>>>>>> lient(ActionResourceImpl.java:427)
>>>>>>>> at io.apiman.manager.api.rest.impl.ActionResourceImpl.performAc
>>>>>>>> tion(ActionResourceImpl.java:111)
>>>>>>>> at io.apiman.manager.api.rest.impl.ActionResourceImpl$Proxy$_$$
>>>>>>>> _WeldClientProxy.performAction(Unknown Source)
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>>>>>>> ssorImpl.java:62)
>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>>>>>>> thodAccessorImpl.java:43)
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:498)
>>>>>>>> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInje
>>>>>>>> ctorImpl.java:139)
>>>>>>>> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget
>>>>>>>> (ResourceMethodInvoker.java:295)
>>>>>>>> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(Resourc
>>>>>>>> eMethodInvoker.java:249)
>>>>>>>> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(Resourc
>>>>>>>> eMethodInvoker.java:236)
>>>>>>>> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(Synchro
>>>>>>>> nousDispatcher.java:402)
>>>>>>>> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(Synchro
>>>>>>>> nousDispatcher.java:209)
>>>>>>>> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDi
>>>>>>>> spatcher.service(ServletContainerDispatcher.java:221)
>>>>>>>> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatc
>>>>>>>> her.service(HttpServletDispatcher.java:56)
>>>>>>>> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatc
>>>>>>>> her.service(HttpServletDispatcher.java:51)
>>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>>>>>>>> ...
>>>>>>>> Caused by: io.apiman.gateway.engine.beans
>>>>>>>> .exceptions.RegistrationException: API api-servico-dev not found
>>>>>>>> in Organization homolog.
>>>>>>>> at io.apiman.gateway.engine.es.ESRegistry.validateContract(ESRe
>>>>>>>> gistry.java:159)
>>>>>>>> at io.apiman.gateway.engine.es.ESRegistry.validateClient(ESRegi
>>>>>>>> stry.java:139)
>>>>>>>> at io.apiman.gateway.engine.es.ESRegistry.registerClient(ESRegi
>>>>>>>> stry.java:108)
>>>>>>>> at io.apiman.gateway.engine.es.PollCachingESRegistry.registerCl
>>>>>>>> ient(PollCachingESRegistry.java:114)
>>>>>>>> at io.apiman.gateway.engine.impl.SecureRegistryWrapper.register
>>>>>>>> Client(SecureRegistryWrapper.java:81)
>>>>>>>> at io.apiman.gateway.api.rest.impl.ClientResourceImpl.register(
>>>>>>>> ClientResourceImpl.java:54)
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>>>>>>> ssorImpl.java:62)
>>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>>>>>>> thodAccessorImpl.java:43)
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:498)
>>>>>>>> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInje
>>>>>>>> ctorImpl.java:139)
>>>>>>>> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget
>>>>>>>> (ResourceMethodInvoker.java:295)
>>>>>>>> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(Resourc
>>>>>>>> eMethodInvoker.java:249)
>>>>>>>> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(Resourc
>>>>>>>> eMethodInvoker.java:236)
>>>>>>>> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(Synchro
>>>>>>>> nousDispatcher.java:402)
>>>>>>>> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(Synchro
>>>>>>>> nousDispatcher.java:209)
>>>>>>>> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDi
>>>>>>>> spatcher.service(ServletContainerDispatcher.java:221)
>>>>>>>> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatc
>>>>>>>> her.service(HttpServletDispatcher.java:56)
>>>>>>>> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatc
>>>>>>>> her.service(HttpServletDispatcher.java:51)
>>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>>>>>>>> ...
>>>>>>>>
>>>>>>>> 2017-06-02 11:30 GMT-03:00 Celso Agra <celso.agra at gmail.com>:
>>>>>>>>
>>>>>>>>> Thanks Marc and Eric!
>>>>>>>>>
>>>>>>>>> The application works fine, but for some reason, I can't delete
>>>>>>>>> any API. Looks like there is no reference for them.
>>>>>>>>>
>>>>>>>>> Is there some elasticsearch node in the Apiman?
>>>>>>>>>
>>>>>>>>> 2017-06-01 9:46 GMT-03:00 Marc Savy <marc.savy at redhat.com>:
>>>>>>>>>
>>>>>>>>>> +1. That's my expectation, also.
>>>>>>>>>>
>>>>>>>>>> On 1 June 2017 at 13:03, Eric Wittmann <eric.wittmann at redhat.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> I do not believe that there were any database changes between
>>>>>>>>>>> 1.2.8 and 1.30.  So I *think* you should be OK if you just upgrade the
>>>>>>>>>>> application and skip the export/import process (just point the new version
>>>>>>>>>>> to your existing database).  However, I would advise you to clone your
>>>>>>>>>>> database and give it a try first (on a test system), before doing anything
>>>>>>>>>>> in production.
>>>>>>>>>>>
>>>>>>>>>>> -Eric
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Wed, May 31, 2017 at 4:45 PM, Celso Agra <
>>>>>>>>>>> celso.agra at gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi all,
>>>>>>>>>>>>
>>>>>>>>>>>> Sorry about that, but I'm concern to upgrade my apiman to a
>>>>>>>>>>>> newest.
>>>>>>>>>>>> I read about upgrating the application:
>>>>>>>>>>>> http://www.apiman.io/latest/installation-guide.html#_upgradi
>>>>>>>>>>>> ng_to_a_new_apiman_version
>>>>>>>>>>>> But I'd like to know if I upgrade from 1.2.8 to 1.3.0 is must
>>>>>>>>>>>> needed to export and reimport all data from different versions.
>>>>>>>>>>>>
>>>>>>>>>>>> Could I just change server and application without change
>>>>>>>>>>>> anything in my database? just put the new wildfly running the apiman
>>>>>>>>>>>> instance. Would be possible to do that?
>>>>>>>>>>>>
>>>>>>>>>>>> PS.: My APIMan is running with a remote database and remote
>>>>>>>>>>>> Keycloak.
>>>>>>>>>>>>
>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> ---
>>>>>>>>>>>> *Celso Agra*
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Apiman-user mailing list
>>>>>>>>>>>> Apiman-user at lists.jboss.org
>>>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Apiman-user mailing list
>>>>>>>>>>> Apiman-user at lists.jboss.org
>>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> ---
>>>>>>>>> *Celso Agra*
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> ---
>>>>>>>> *Celso Agra*
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ---
>>>>>>> *Celso Agra*
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ---
>>>>> *Celso Agra*
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> ---
>>> *Celso Agra*
>>>
>>
>>
>>
>> --
>> ---
>> *Celso Agra*
>>
>
>


-- 
---
*Celso Agra*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20170603/b2e88ca1/attachment-0001.html 


More information about the Apiman-user mailing list