GitHub user flowchartsman added a comment to the discussion: pulsar standalone 
docker image should support initialization of some kind

> shall we support run bin/pulsar ... also?

Not for the use-case I had in mind, which was for pulsar, specifically in 
standalone mode. Actually, even more specifically, it was targeted at the 
`pulsar-standalone` image to help out in development and testing.  Since I 
originally wrote this issue, it seems the dedicated `pulsar-standalone` image 
has fallen behind, so it makes it tricker to implement, since you'd either need 
to have a dedicated image, or build it into pulsar directly, and that could be 
problematic if misused.

Since then, I've also found a technique that works "well enough", by using a 
script which calls curl on the metrics endpoint in a loop,  then setting this 
script as the as the container "health check":

```bash
#!/bin/bash
cd /pulsar/bin
# Wait for pulsar standalone to be initialized
until curl http://localhost:8080/metrics > /dev/null 2>&1 ; do sleep 1; done
./pulsar-admin tenants create -c standalone mytenant
./pulsar-admin namespaces create mytenant/mynamespace
<etc>
```

So I guess my question at this point would be: is it useful to provide this 
functionality as described, or is there a compelling use-case for calling 
`/pulsar/bin/pulsar` as well? I'm not sure, by I still think this would be 
handy, even if it's config-file driven.

GitHub link: 
https://github.com/apache/pulsar/discussions/18781#discussioncomment-4329356

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to