[Apiman-user] Creating resources using Docker image
Tim Dudgeon
tdudgeon.ml at gmail.com
Thu Oct 8 08:31:59 EDT 2015
Sad to hear Arun has left.
yes, I've been making some progress on this. Hope to get a basic project
into github soon.
Still a lot more to do, and lots of bits I don't fully understand, so
I'm sure I'll be back here soon for more help!
Tim
On 08/10/2015 13:21, Eric Wittmann wrote:
> Hi Tim - I'm sorry to say that Arun has moved on from Red Hat, so I'm
> assuming he is no longer poking at apiman + docker:
>
> http://blog.arungupta.me/au-revoir-redhat/
>
> If you continue with this effort, we'd love to have a look at your
> results. We currently have a production guide (which might help with
> your efforts):
>
> http://www.apiman.io/latest/production-guide.html
>
> But we'd love to have full dockerized versions of each component!
>
> -Eric
>
> On 10/3/2015 7:00 AM, Tim Dudgeon wrote:
>> Arun,
>> did you get anywhere creating a full dockerised apiman environment with
>> all relevant parts (db, elasticsearch, keycloak, manager, gateway) as
>> separate containers and a corresponding docker compose file?
>> I'm trying to set this up, but suspecting that its already been done.
>>
>> Tim
>>
>>
>>
>> On 23/07/2015 17:57, Arun Gupta wrote:
>>> Start/stop yes, but not if the container is removed.
>>>
>>> And because the "cost" associated with restarting a container is low,
>>> restarting is more common that start/stop.
>>>
>>> Arun
>>>
>>> On Thu, Jul 23, 2015 at 10:45 AM, Eric Wittmann
>>> <eric.wittmann at redhat.com> wrote:
>>>> Is that true? The state of the container is lost each time you
>>>> stop it? I
>>>> thought the EAP data directory was preserved across container
>>>> start/stop, so
>>>> that the state was preserved. But I guess I'm wrong?
>>>>
>>>> If it's true that state is *not* preserved, then the script can
>>>> just blindly
>>>> run I guess.
>>>>
>>>> -Eric
>>>>
>>>> On 7/23/2015 12:26 PM, Arun Gupta wrote:
>>>>> That could work too! I was just trying to be comprehensive but YAGNI!
>>>>>
>>>>> Either way, as the state of the container is not preserved and a new
>>>>> container is started every time, what is the likelihood that the
>>>>> entity to be created will exist?
>>>>>
>>>>> Arun
>>>>>
>>>>> On Thu, Jul 23, 2015 at 9:59 AM, Eric Wittmann
>>>>> <eric.wittmann at redhat.com>
>>>>> wrote:
>>>>>> I'm not sure what you mean by this. I'm only suggesting that the
>>>>>> "bootstrap" script could first do a GET on *one* of the entities
>>>>>> that the
>>>>>> script is planning on creating. If the entity already exists
>>>>>> then the
>>>>>> script can bail at that point. I don't see how a loop is
>>>>>> possible. And
>>>>>> I
>>>>>> don't think you would need to check for *each* entity you plan on
>>>>>> creating.
>>>>>> Just use the first entity as a marker - if *that* one exists then
>>>>>> assume
>>>>>> the
>>>>>> rest do as well.
>>>>>>
>>>>>> On 7/23/2015 11:15 AM, Arun Gupta wrote:
>>>>>>>
>>>>>>> If the container is started a fresh then it would not have any
>>>>>>> existing resources, isn't it?
>>>>>>>
>>>>>>> Otherwise the script will get into a nested loop to first check for
>>>>>>> organization, then service, then version, etc.
>>>>>>>
>>>>>>> Arun
>>>>>>>
>>>>>>> On Thu, Jul 23, 2015 at 7:34 AM, Eric Wittmann
>>>>>>> <eric.wittmann at redhat.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I think it would be possible to have a run-once shell script.
>>>>>>>> Either
>>>>>>>> by
>>>>>>>> writing/checking some sort of "already run" file. Or else by
>>>>>>>> querying
>>>>>>>> apiman to see if a particular entity exists. For example,
>>>>>>>> query to see
>>>>>>>> if
>>>>>>>> "My-Custom-Organization" exists ... if it does then skip the
>>>>>>>> script.
>>>>>>>> If
>>>>>>>> not, then run the multitude of curl commands to do what you want.
>>>>>>>>
>>>>>>>> -Eric
>>>>>>>>
>>>>>>>> On 7/23/2015 7:48 AM, Arun Gupta wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I've been thinking something on those lines.
>>>>>>>>>
>>>>>>>>> - Invoke shell script from Dockerfile
>>>>>>>>> - Start API Man
>>>>>>>>> - Run shell scripts
>>>>>>>>> - Shut it down
>>>>>>>>> - Go back to Dockerfile which will then start it
>>>>>>>>>
>>>>>>>>> Will share something, stay tuned.
>>>>>>>>>
>>>>>>>>> Arun
>>>>>>>>>
>>>>>>>>> On Thu, Jul 23, 2015 at 5:45 AM, Eric Wittmann
>>>>>>>>> <eric.wittmann at redhat.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> You are probably more deft with docker than I am, but perhaps
>>>>>>>>>> a shell
>>>>>>>>>> script
>>>>>>>>>> could be used to send a bunch of curl commands?
>>>>>>>>>>
>>>>>>>>>> -Eric
>>>>>>>>>>
>>>>>>>>>> On 7/23/2015 7:35 AM, Arun Gupta wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Thanks!
>>>>>>>>>>>
>>>>>>>>>>> What is the recommended design pattern to extend the
>>>>>>>>>>> Dockerfile in
>>>>>>>>>>> the
>>>>>>>>>>> meanwhile?
>>>>>>>>>>>
>>>>>>>>>>> Arun
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 23, 2015 at 5:32 AM, Eric Wittmann
>>>>>>>>>>> <eric.wittmann at redhat.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> That is not currently a feature. But I've now added a JIRA
>>>>>>>>>>>> for it,
>>>>>>>>>>>> since it seems like a nice idea (especially for extending the
>>>>>>>>>>>> docker
>>>>>>>>>>>> container).
>>>>>>>>>>>>
>>>>>>>>>>>> https://issues.jboss.org/browse/APIMAN-566
>>>>>>>>>>>>
>>>>>>>>>>>> -Eric
>>>>>>>>>>>>
>>>>>>>>>>>> On 7/23/2015 3:47 AM, Tim Dudgeon wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> This indeed would be very useful.
>>>>>>>>>>>>> Tim
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 23/07/2015 04:44, Arun Gupta wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I've created a Dockerfile [1] that will attempt to create
>>>>>>>>>>>>>> different
>>>>>>>>>>>>>> resources. Is there any standard format where I can drop
>>>>>>>>>>>>>> <organization>.yml in a pre-defined directory and API Man
>>>>>>>>>>>>>> will
>>>>>>>>>>>>>> read
>>>>>>>>>>>>>> the resources defined there and create them?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> This will simplify how the resources are created using
>>>>>>>>>>>>>> Docker.
>>>>>>>>>>>>>> The
>>>>>>>>>>>>>> samples at [2] do not show that.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [1]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> https://github.com/arun-gupta/microservices/blob/master/microservice/docker/Dockerfile
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [2] https://registry.hub.docker.com/u/jboss/apiman-wildfly/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Arun
>>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> 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
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>> _______________________________________________
>> Apiman-user mailing list
>> Apiman-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>
More information about the Apiman-user
mailing list