VividCortex / heroku-buildpack-vividcortex

Heroku Buildpack to run VividCortex Agents in a Dyno
MIT License
0 stars 3 forks source link

Does this buildpack require a dedicated Heroku project? #5

Closed attilaolah closed 9 years ago

attilaolah commented 9 years ago

It is not clear from the readme.md whether this buildpack requires a dedicated, empty Heroku project. The following line:

On your machine create a new directory for the VividCortex agents project.

…seems to suggest that, but it is still unclear whether it would work to just add the buildpack to an existing Cedar-14 app.

For the record, adding the buildpack to an existing app doesn't seem to work. Upon deploy, the buildpack is fetched, but no VividCortex app is detected, so the buildpack does not install the required files (bin/compile et al are not even run).

Please clarify, in the readme, whether a dedicated Heroku project/app is required, and if not, advise how to add this to an existing project.

AgentO3 commented 9 years ago

@attilaolah heroku by default only allows 1 buildpack per project. However there is a buildpack that will allow you to use multiple buildpacks. https://github.com/ddollar/heroku-buildpack-multi

I'll try test that and update the documentation depending on the results.

attilaolah commented 9 years ago

Thanks.

I was wondering then, if that is the case, why make this a buildpack at all, why not make it a regular app that runs using the default buildpack.

AgentO3 commented 9 years ago

I believe it simplifies the setup process, there are specific parameters and that need to be defined to allow agents to run in a Heroku container. Either way you would need a non-default buildpack, since this is not a Ruby, Node, etc application that Heroku supports by default. The agent is a complied binary and Heroku won't be able to identify how to run it. Does that make sense?

attilaolah commented 9 years ago

Yep, it makes sense.

However, I could get vc-start to run without the buildpack just by copying the files from the buildpack, slightly modifying them, and running them from a separate dyno, alongside the app.

Although this doesn't help too much, since dynos are still containerized, so it cannot detect OS stats from the web workers (or other workers in the same Heroku project), at least it avoids having to connect to Postgres from a different host, which would result in those pg_hba.conf warnings.

Bottom line is, having to run the agent in a separate Heroku project is not a big deal, but if it doesn't have to run on the same host (or in the same container) where the application is, and it obviously cannot run on the same host where Postgres is running, what is the advantage of running it on Heroku? We could run it on any PaaS or in a managed VM like DigitalOcean, or VividCortex could even run it internally, as part of the subscription plan. Since it has to connect to the DB from outside anyway.


That said, making it a little more clear in the readme that this buildpack is for running the VividCortex agent in its own Heroku app/project would be nice.

AgentO3 commented 9 years ago

Generally off-host os level stats aren't very useful in the context of database performance . Other than monitoring the performance of our installed agents whether you're running the agents in a Heroku container or a dedicated VM there is no real point in collecting those os metrics.

Heroku support came about as a request from one of our customers. I believe their reasoning is they enjoy the convince of using Heroku so it would be ideal for them to have the agents run in Heroku it's self. You could run the agents anywhere assuming they can access the database, however you would probably want to have the agents running in the same datacenter as the database. So in the case of Heroku I would recommend you run them in AWS so they don't have to try to connect to the database over the internet. It also looks like Heroku does not offer an encrypted connection which is another reason other then latency not to try to connect to it cross the internet.

Thanks for your input. I was able to successfully use the multi buildpack to run the agent in the same project as the app. I'll update the readme to be more clear about running the agent.

attilaolah commented 9 years ago

Thanks, updating the readme would be a lot helpful.

attilaolah commented 9 years ago

It also looks like Heroku does not offer an encrypted connection

FTR they do allow connections over SSL now.