Deployment and logging details

Hello,
We are preparing to deploy our new app with cleavr, and I have few questions that popped up when I was testing the platform, and maybe can offer some suggestions :smile: for the future.

  1. Builds and github actions:
  • Are there plans to introduce live build logs? Right know they are not available during the build time, and if something hangs up, no one knows about it, and this leads to timeout. We are building from github now, but this could be an issue especially for smaller servers which are strained by the installation.
  • If github build is enabled, applicaton env variables are not propagated to the build process - in our case nuxt BASE_URL was not set after build, maybe we have misconfigured that? Editing github workflow file and filling it with env solved that issue, and I still think that this feature works as intended, am I right? Some documentation would be appreciated nonetheless :relieved:
  1. Deployments
  • While testing staging env, we spun up t2.small aws instance, and after few deployments, it got clogged with deployment data, in effect bricking up the machine. I saw cleaning old deployment action, but I donā€™t see that it deletes old deployment files, what does it do in essence? And what can we do to limit deployment history to some arbitrary number? For example staging env doesnā€™t even need deployment history, we will just redeploy a new version if something will fail.
  1. Running the application with reporting
  • We have some monitoring infrastructure set up for our services, namely datadog, and we would like to report app request logs to the service. Right now, even with pm2 I couldnā€™t grok whether there are some kind of server logs from the nuxt server by which I mean server output to stdout or file, because the standard ones, beside having information about the app start, were empty. Could you help me with that?

Other than that, the setup was a breeze and we enjoyed the platform a lot, thank you for help!

Hello @macieklad! Welcome to Cleavr forum! We are very happy to hear that the setup was a breeze and you are enjoying the platform :pray:t4:

Are there plans to introduce live build logs?

Yes! :slight_smile: In fact, we have been planning about live build logs for last few days. However, youā€™d probably have to wait at least a few weeks. Live logs are resources intensive - both on your servers and ours so we need some more planning about the experience and some technical details before we put our heads down coding.

If github build is enabled, applicaton env variables are not propagated to the build process

This is true and there isnā€™t much we can do about it. What you did - putting env variables in the build file - is the right approach. However, we strongly recommend against hard coding env variables in your workflow file. You should use GitHub secrets for those, which is very straight forward - https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets

And I agree, some documentation about it with our recommendations might be very helpful /cc @amiedema

I saw cleaning old deployment action, but I donā€™t see that it deletes old deployment files

It should take care of deleting old deployments. Cleavr only keeps last 5 successful deployments so that should be taken care of. If not, thatā€™s probably a bug. We will verify it and get back to you.

And what can we do to limit deployment history to some arbitrary number?

This should already be taken care of but our custom hooks are very powerful and it allows you to do anything you want during deployments. You can use it to clean old directories if you want: https://cleavr.zendesk.com/hc/en-us/articles/360049802253-Deployment-Hooks

Right now, even with pm2 I couldnā€™t grok whether there are some kind of server logs from the nuxt server by which I mean server output to stdout or fileā€¦

We solely depend on pm2 as the source of logs. So, we show what it gives us. I donā€™t have much experience with datadog but this pm2 module might be helpful: https://github.com/nunofgs/pm2-datadog
Let us know if you figured it out.

Again, thank you so much for trying out Cleavr. We are working hard everyday to resolve all the nagging issues and improving the product so your feedback is really appreciated :slight_smile:

1 Like

Thanks for the answers, now we know everything we need. After I will experiment with pm2, I will report back here, maybe it will be of some use :slight_smile:

2 Likes

At the end, we set up datadog to consume nginx logs. It was the most non obtrusive solution and are happy for now. We are looking forward to the future of cleavr, especially for ways to scale apps across multiple nodes automatically!

2 Likes