Skip to content
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

Add ability to stream the output of the CDDDocker containers to AWS IoT #147

Open
cea2aj opened this issue Jun 24, 2019 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@cea2aj
Copy link

cea2aj commented Jun 24, 2019

I would like some way to stream the output of the docker container itself to back to AWS IoT.
I have two ideas for adding this support:

  • Connect the output to a topic specified by function.conf
  • Add a command line argument to run.sh which sends the desired output topic inside the payload

For the second idea, the command would look like
./run.sh ${AWS_IOT_THING_NAME} arm32v7/hello-world:latest ${AWS_IOT_TOPIC}
Where AWS_IOT_TOPIC specifies the topic for the output

I would like this to work for containers that continuously stream output such as the container: bfirsh/reticulate-splines

@timmattison
Copy link
Contributor

I really like this. I can see a mix of the two approaches working. The topics in function.conf set up so there is a sub topic hierarchy that can have this streaming output and an option in run.sh to choose the topic.

It’ll take some work to figure out how to create the listeners, but one thing to think about is how it works when the Lambda function restarts. Maybe another option is the ability to attach and detach from the output with a new command. That would give you the ability to reattach if the function restarted.

This is my first glance at it so let’s see what would work for you.

@cea2aj
Copy link
Author

cea2aj commented Jun 25, 2019

Ah, good catch! Restarts definitely need to be considered. I like the idea of the attach and detach, but I think that getting it to the point of automatic reattachment would be ideal. If a lambada function comes online and it sees an output topic in function.conf, then it could automatically attempt to send its output there when the container is started.

@timmattison timmattison added the enhancement New feature or request label Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants