Open genofedanzo opened 7 years ago
Due to the parallel installation I don't know if a good option exists. One option would be to install unf_ext prior to running the installation.
That would work. Although I guess it could come up any time there are shared native extension dependencies in multiple packages. Maybe don't parallelize it? I'm just not sure how often it would come up and the speed increase is nice. What I think is important is that people can run the example compose file and bring up a working cluster. After getting past the compile issue I ran into CLIENT_ADDRESS not being populated (which I got going with 127.0.0.1 but I believe that makes the server run checks against itself and not the actual client?) and then uchiwa needs env vars for SENSU_DC_NAME, SENSU_HOSTNAME and SENSU_SERVICE_PORT in order to hit the API and show the registered clients. I can create a PR for the uchiwa vars.
@genofedanzo part of the problem may have been that the sstarcher/aws repo that was reference is very out dated. I pushed the upstream updates back to sstarcher/sensu-plugins-aws. Try doing the example install again.
@sstarcher looks like it still has the dependency. Drop the parallel install to prevent it coming up again in the future? Bake this gem into the image? Seems like it could come up again. What did you think about the uchiwa vars I mentioned that are needed to connect to the API? Would you like me to create a PR or open a separate issue? I'd like to help so others don't have to troubleshoot as much as I did.
ya, the uchiwa vars need fixed in the README. The docker-compose.yaml works and it may make more sense to just remove the example out of the README and link to the docker-compose.yaml
As for the parallel build I would be fine with a flag to turn it off. I don't recommend doing the RUNTIME install. I would recommend building a new dockerfile based off this dockerfile and putting in a
RUN gem install unf_ext
RUN /bin/install aws,mailer
That makes sense. Dropping the sample compose config out of the readme and linking to the repo compose file makes sense. Wish I realized it existed before but I ended up learning a bunch while troubleshooting. I hadn't heard of dumb-init or envtpl and now I'm using them in my own images. Thanks for the help.
@genofedanzo haha np, sorry for not keeping that README as up to date. Hopefully I'll get around to updating it and add a comment about troubleshooting the parallel build.
When using the example docker-compose.yml I ran into a problem where the client container would try to run parallel gem installations of sstarcher/aws and mailer plugins which both have dependencies on unf_ext. It seems to create a race condition where one gem starts to build unf_ext and the other begins to build unf_ext and wipes out the priors work as seen here:
I've worked around this by preventing the install script from backgrounding each plugin install. I can submit a PR but I'm not sure if this is the best approach.