-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relay container failed to start #1397
Comments
Do you mind pasting the content of |
Hi Tu,
Pls note that I comment out two lines below in
|
@Gnep to my limited understanding, Cog needs access to docker.sock to schedule containers (a Cog chat command executes by using container). So whilst the error might have nothing to do with it, this might be the reason why you cannot pull the stack up successfully. |
Thanks @rebyn @christophermaier Could you elaborate a bit what is the use of docker.sock by Relay? |
@Gnep Sure thing! First, a little background. Cog can currently deal with two types of command bundles: "native" and Docker. With "native" bundles, the commands are executed directly on the Relay's host. Furthermore, you (as the operator of the Cog infrastructure) are responsible for installing the necessary binaries on the Relay. In contrast, Docker command bundles are packaged up as Docker images. As they are invoked, Relay will execute the commands in a container, and not directly on the host. Additionally, the Relay takes care of "installing" the bundle for you; it just pulls it down from whatever Docker repository it is pointed at. This makes dealing with Docker-based command bundles very easy. For both types of bundles, you need to upload a metadata file to the Cog server to make Cog aware of the bundle, but with Docker bundles, that's all you need to do. Native bundles require additional installation steps. That means additional configuration management you'll need to deal with; it also complicates things like upgrading bundles in Cog, which is otherwise very simple. As a result, the overwhelming majority (all?) the bundles you're likely to find in the wild, including the ones on https://bundles.operable.io are going to be Docker bundles, because they're so much easier to deal with. And so, to get back to the question you asked, Relay interacts with the Docker engine directly by using |
@christophermaier Thanks Chris. Maybe I should change the question: as Cog runs commands using Docker format, does it make sense to support Hyper.sh as the backend engine? AFAIK, Cog requires a server or a swarm cluster to run jobs. To keep a cluster running and manage it certainly introduces more cost and ops overhead. Hyper.sh is a container-native cloud, where you can launch containers on-demand, without the underlying cluster whatnot (not that we managed for you, there is just NO servers at all). And given the fast launch speed of containers, we provide a per-second billing model, e.g. your command runs for 10s, you pay for only that 10s. What I imagine is that people run Cog server somewhere, and commands are executed in Hyper.sh in ad-hoc manner. In another word, serverless chatops. What do you think? |
@Gnep It doesn't sound like Hyper.sh is a good fit for Relay at the moment. In addition to the need for I don't see a quick fix or workaround for this, and it seems like it would take a non-trivial amount of work to support this deployment model. I'm not saying that it's impossible, necessarily, just that it would take some doing. (Additionally, trying to use "native" bundles instead by packaging the command executables up with a Relay executable (so everything is in one container and nothing additional needs to be scheduled) won't work either, because Cog isn't currently designed to have Relays come and go that way.) |
Hi,
I tried to use the compose file to launch Cog. The Postgre and Cog are running fine, but Relay failed to start. The log shows:
And
/usr/local/etc/relay.conf
:The text was updated successfully, but these errors were encountered: