Converting Sensu Workshop docker-compose into an acornfile #592
Replies: 4 comments 15 replies
-
Acorn Question: environment value inheritance?We're relying on the docker-compose understanding of the |
Beta Was this translation helpful? Give feedback.
-
Okay putting this to bed for the night. I have the first service in the Success: the sensu-backend appears to be running now as an acornHere's what I started with in the docker-compose file:
Here's the Acornfile equivalent I have right now:
I need to iterate a bit so I can use an env.yaml as an arg, instead of hard-coding but I'm not too worried about that. Proof it's alive:
Problem: No evidence that the port publishing is working as expectedIngress addon is confirmed enabled
I ask minikube what the url should be for the sensu-backend service and its just blank
Yes this is minikube so the port stuff is weird anyways because of the minikube's semi-documented tunnel thing to cross the minikube vm to host boundary. But even without the tunnel if the port publishing was working I'd expect to get something 'fun' when I ask minikube for the service URL. I'm doing something wrong in that Acornfile in defining the ports to publish.. I have to be. But I'm wrapping up for tonight. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Okay before I go further, one big take away from this is the largest refactoring hurdle for docker-compose users will be the loss of environment variable value inheritance from the external environment and/or .env file that docker-compose supports. This workshop uses the environment variable value inheritance pattern a lot. I should be able to construct an arguments yaml map that works as a sufficient replacement, but this hurdle might be worth talking about in detail when aiming content at docker-compose converts. Especially if there's a "good reason"{tm} to not allow the inheritance pattern. Off the top of my head, supporting value inheritance like that might make some of the conditional logic for deploying to testing/production more brittle or error-prone. Being explicit about where you're grabbing the env variable values passed to containers means less surprises. |
Beta Was this translation helpful? Give feedback.
-
Ok, I'm digging in and I'm gonna kick the tires on acorn with a real world project.
We've got a docker-compose based Sensu workshop environment that we spun up as educational collateral for people to be able to use locally. I'm going to see how far I can get to translating that beast of a docker-compose into an operational acornfile as a way to learn up acorn.
Here's what I'm starting with: https://github.com/sensu/sensu-go-workshop
I'm just going to try to convert the simplest workshop environment the
docker-compose-default
I'll touch base in this discussion thread as I go, with successes/failures/questions. I don't think I can get it all done in one night so this is gonna be sort of an async adventure over multiple days.
Pardon me if I end up bringing up existing topics. I want this to be sort of a full journal of trying to translate a working docker-compose stack into an acorn. I think might be valuable in context.
So here we go.....
Beta Was this translation helpful? Give feedback.
All reactions