[LNT] running LNT in 'the cloud'

On a few occasions, Daniel has mentioned running a LNT instances from a PaaS cloud. A while back I decided to see if that is possible. I am happy to report it is.

In r210134 I made the necessary changes to allow LNT to run on the Heroku PaaS cloud.

https://www.heroku.com

The commit is all configuration changes to instruct the cloud on how to run the app. I have a live instance of LNT here:

http://llvm-lnt.herokuapp.com/

Some of the reasons I think this is a good idea:

  • you don’t maintain the infrastructure,
  • this is a much higher reliability setup,
  • it is probably faster,
  • you can scale it indefinitely,
  • collaboration on the LNT installation is easy.

The setup I built uses 1 Heroku “dyno” (a unit of compute power) and 1 database. This setup falls into the Heroku free category so they are not charging me to run it, although real use would push it into the pay categories.

The cloud configuration makes the web servers and database separate. The web servers are stateless, spawned on http requests, and sleep during periods of inactivity. They can also move between machines transparently. The database is a high availability Postgres cluster.

If anyone else would like to make their very own instance, all you need to do is approximatly follow the instructions for setting up Heroku for a flask app:

https://devcenter.heroku.com/articles/getting-started-with-python

Hi Chris,

Nice setup!

Some of the reasons I think this is a good idea:
- you don’t maintain the infrastructure,
- this is a much higher reliability setup,

These are real wins.

- it is probably faster,

As surprised as I am, I have to admit, it really is.

- you can scale it indefinitely,

We may never reach the boundaries of that fallacy, given our usage is
very limited.

The setup I built uses 1 Heroku “dyno” (a unit of compute power) and 1
database. This setup falls into the Heroku free category so they are not
charging me to run it, although real use would push it into the pay
categories.

I wonder how many "free" dynos we could have before they start
charging us for the "group of 15 units running 15 similar setups from
the same group".

Though, currently, we only have a handful of them, so we should be
fine for the time being.

I'll follow your steps and if that works, I'll start redirecting my
bot again to that.

Thanks for setting this up! This was the last missing action item from
the last Performance BoF, just in time for the next! :slight_smile:

cheers,
--renato

In terms of cost, I thought an LNT instance would exhaust the free database rows much faster than the free dynos. The price for the small database was only 8 dollars a month though.

Hum, that's a good point... I haven't thought about storage at all.
Still, $8 a month is really cheap, even if it can only host one bot.

cheers,
--renato

As Daniel mentioned in another message, you can also enable shadow forwarding to send the results back to the llvm.org LNT server.

Hi Chris,

Nice setup!

> Some of the reasons I think this is a good idea:
> - you don’t maintain the infrastructure,
> - this is a much higher reliability setup,

These are real wins.

> - it is probably faster,

As surprised as I am, I have to admit, it really is.

Wow, it really is speedy!

-- Sean Silva