News for hackers. Stuff that matters.
Re:Low-Cost VPS Testing by asdkhadsj on Friday December 06, 2019 @04:29PM (#21726159)
I can't wait for PaaS prices to drop. I know they'll always be relatively expensive, but I'm primarily a dev (not ops) and I don't have the time nor desire to manage my own servers securely.

Heroku lately has seemed a tempting offer, assuming I can run my apps on it (Rust based), but at $7/m for little side projects it felt.. expensive for a no user side project. They can add up. A $5/m DO box can host quite a few apps in containers, by comparison.

Perhaps Serverless would be a great playground for low/no traffic apps, but I've not gotten into serverless much.

Re:Low-Cost VPS Testing by thesandlord on Friday December 06, 2019 @04:53PM (#21726344)
Give Google Cloud Run a try. Can run any Docker container, and billing is per request. It is basically a fully managed knative.

https://cloud.google.com/run

My side projects all run for free.

(I work for Google Cloud)

Re:Low-Cost VPS Testing by asdkhadsj on Friday December 06, 2019 @05:09PM (#21726493)
That.. is really impressive! Had no idea about this, thanks!

For a well rounded review, can you or anyone comment on similar offerings with competitors? I was not familiar with per-request containers, but it sounds like exactly what I wanted.

Thoughts?

Re:Low-Cost VPS Testing by arcticfox on Friday December 06, 2019 @06:35PM (#21727185)
I've been trying every Docker platform for years (Joyrnt Triton, Tutum, k8s on various platforms)... Cloud Run is by far my favorite
Re:Low-Cost VPS Testing by AtroxDev on Friday December 06, 2019 @06:45PM (#21727258)
I fully agree with this. I'm using Cloud Run since the day it got into beta and never been happier. It beats all the other platforms (for docker) IMO.
Re:Low-Cost VPS Testing by ivoecpereira on Friday December 06, 2019 @09:04PM (#21727959)
Out of curiosity, what are you using for your databases?
Re:Low-Cost VPS Testing by thesandlord on Saturday December 07, 2019 @11:17AM (#21731004)
I use Cloud Firestore, it's also serverless and is really easy to use for building SPAs as you can do a lot of things with just frontend code and trigger cloud functions when things in the database change.

I do wish there was a serverless SQL option like AWS has, but nothing yet. Can always use Cloud SQL, but as others have mentioned you need to access it over a public IP (for now)

Re:Low-Cost VPS Testing by helpfulgoogler on Tuesday December 10, 2019 @03:48PM (#21756697)
Have you seen the instructions for using a Unix socket with Cloud SQL from Cloud Run?

https://cloud.google.com/sql/docs/mysql/connect-run

Re:Low-Cost VPS Testing by drewnick on Friday December 06, 2019 @09:39PM (#21728097)
Not OP but I can setup DB of choice on an instance or group of instances and access directly from the Cloud Run containers. Our particular main stack is on MongoDB 3.4 so we deployed Atlas on the VPC and the containers access it just fine.
Re:Low-Cost VPS Testing by ivoecpereira on Saturday December 07, 2019 @06:14AM (#21729658)
For side projects doesn't it end up being a little too expensive?
Re:Low-Cost VPS Testing by ksec on Sunday December 08, 2019 @12:17AM (#21734450)
As far as I am aware, there is nothing like CloudRun where your whole App are changed at a per second / request intervals. ( Although No Private Network means Your SQL requires Public IP which is a big No No )

I haven't tried using it though, and my recent submission [1] where BaseCamp had problem with GCP and moved back to AWS.

[1] https://news.ycombinator.com/item?id=21733996

Re:Low-Cost VPS Testing by helpfulgoogler on Tuesday December 10, 2019 @03:51PM (#21756726)
Although a public IP address is required, you don't need to poke any holes in the firewall. As a result, it is not a problem from a security perspective.

https://cloud.google.com/sql/docs/mysql/connect-run

Re:Low-Cost VPS Testing by ldoughty on Saturday December 07, 2019 @12:02AM (#21728574)
Cloud run looks cool, but doesn't seem to support databases ? Unless it supports linked containers?

I like that it's a mix of AWS lambda scaling with more open environments... Though it's hard to read through the marketing... "Nearly instance availing from 1 to 1000"

Re:Low-Cost VPS Testing by dstaley on Saturday December 07, 2019 @02:15AM (#21728953)
Cloud Run user here. It does not support running a database as a Cloud Run service; you'd need to connect to a Cloud SQL instance. This is one area I really hope PaaS providers improve on in the future. The closest thing at the moment is Aurora Serverless on AWS, especially with their neat HTTP connection system. That being said, cold starts are even worse since they're now the start up time for your application in addition to the start up time for Aurora Serverless.
Re:Low-Cost VPS Testing by cstpdk on Saturday December 07, 2019 @02:45AM (#21729032)
But, correct me if this has changed please, last i checked Cloud Run did not support private networks. So you SQL instance has to be exposed to the internet, correct?
Re:Low-Cost VPS Testing by chimera77 on Sunday December 08, 2019 @02:02PM (#21737518)
Your Cloud SQL instance would have a public IP, but would not be exposed to the internet. All traffic is blocked by default. Only GCP service accounts with the right permissions can make connections to your SQL instance, or IPs added to a whitelist (not recommended).
Re:Low-Cost VPS Testing by cstpdk on Tuesday December 10, 2019 @05:35AM (#21751303)
Ah, thanks for clearing that up, I was unaware. How is the traffic blocked by default? Firewall layer?
Re:Low-Cost VPS Testing by helpfulgoogler on Tuesday December 10, 2019 @03:53PM (#21756737)
Yes. There is a proxy in front of the database which only allows whitelisted traffic (dangerous) or traffic with a valid cert (safe).
Re:Low-Cost VPS Testing by dstaley on Saturday December 07, 2019 @03:06AM (#21729086)
Yes, Cloud Run requires your Cloud SQL instance to have a public IP address.
Re:Low-Cost VPS Testing by ivoecpereira on Saturday December 07, 2019 @06:12AM (#21729651)
You might want to check out FaunaDB.
Re:Low-Cost VPS Testing by dstaley on Saturday December 07, 2019 @03:28PM (#21732367)
Unfortunately FaunaDB isn't a SQL database, so it's in the same class as things like Cloud Firestore, AWS DynamoDB, and Mongo Atlas. Good datastores for serverless applications, but not so great for traditional applications migrated to serverless.
Re:Low-Cost VPS Testing by fastball on Friday December 06, 2019 @04:50PM (#21726318)
Have you tried running Dokku[0] on a VPS?

[0] https://github.com/dokku/dokku

Re:Low-Cost VPS Testing by wooly_bully on Friday December 06, 2019 @05:07PM (#21726477)
Seconding this. Big fan of Dokku on a DO droplet as an inexpensive way to make applications.
Re:Low-Cost VPS Testing by MuffinFlavored on Friday December 06, 2019 @07:03PM (#21727371)
I feel like setting up Docker + Terraform might be easier? Postgres + Redis + containerized app with little effort.
Re:Low-Cost VPS Testing by lapnitnelav on Friday December 06, 2019 @07:56PM (#21727688)
Used to use Dokku but preferred Caprover because it's even less work and there's a web ui. Both are good though
Re:Low-Cost VPS Testing by StevePerkins on Saturday December 07, 2019 @07:46AM (#21729989)
Does CapRover's Web UI offer any kind of 2FA? It feels a bit scary to have the keys to the kingdom just hanging out in on a public IP address, for anyone to brute force the admin password.
Re:Low-Cost VPS Testing by kasra85 on Sunday December 08, 2019 @07:25AM (#21735559)
It doesn't have 2FA, but it has password throttling, so brute force isn't possible
Re:Low-Cost VPS Testing by asdkhadsj on Friday December 06, 2019 @05:31PM (#21726656)
No, but that's mainly because I still have to manage the server running Dokku I believe?

edit: For context what I was already using was manual docker on a DO box. While I recognized that Dokku would make it more seamless and easier, my issue was managing and securing the DO VM itself. I didn't see how Dokku would help that scenario

Re:Low-Cost VPS Testing by ivoecpereira on Friday December 06, 2019 @05:56PM (#21726847)
I would suggest reading about Ansible and working on an initial collection of Ansible playbooks that might help on that. Check out https://www.thecloud.coach/ansible-crash-course. Of course nothing beats a dedicated devops but some playbooks regarding main security compliances might do a great job. Anyone correct me if I am wrong but I am seeing it as a good base practice for these cases.
Re:Low-Cost VPS Testing by scarejunba on Friday December 06, 2019 @07:18PM (#21727475)
Honestly, I think this is going in the wrong direction for OP's use-case. He definitely should go in the serverless direction.

If he learns any sort of dev-ops infra management he's just wasting his time.

Re:Low-Cost VPS Testing by ivoecpereira on Friday December 06, 2019 @07:51PM (#21727663)
Possibly. I use Serverless as well but I prefer to keep my options open when playing with a new project, than trying to force everything into the same tool. If he is lean to learn something, Ansible might be good for setting some servers up, but there are some nice other suggestions in the thread if he doesn't want to.
Re:Low-Cost VPS Testing by fastball on Friday December 06, 2019 @07:38PM (#21727598)
On DigitalOcean they have one-click setup for Dokku.
Re:Low-Cost VPS Testing by icebraining on Saturday December 07, 2019 @09:13AM (#21730339)
One-click for initial setup, but what about maintenance? I like DO, but those easy setups seem like a recipe for vulnerable machines. If it's complicated to maintain, it shouldn't be too easy to setup.
Re:Low-Cost VPS Testing by itake on Friday December 06, 2019 @05:33PM (#21726676)
yep. Dokku is not as simple as heroku.
Re:Low-Cost VPS Testing by benbristow on Friday December 06, 2019 @06:57PM (#21727327)
It's definitely not as simple as you have to maintain the server yourself. But being able to run multiple applications/containers on a server for the price of one dyno really makes up for it for personal projects!

If I were working on a project with a corporate budget then using Heroku or a different style of architecture like serverless would be a no-brainer

Re:Low-Cost VPS Testing by WrtCdEvrydy on Friday December 06, 2019 @04:57PM (#21726381)
I do CapRover + FaaS on the small $5 droplet on Linode. I run a lot of random stuff out of it, with the only change from me being increasing swap from 512MB to 2GB (it's all SSD backed anyways).
Re:Low-Cost VPS Testing by rcarmo on Friday December 06, 2019 @04:45PM (#21726283)
If you feel like contributing Rust support to https://github.com/piku, it would be great. ;)
Re:Low-Cost VPS Testing by tyingq on Friday December 06, 2019 @04:37PM (#21726221)
Maybe openfaas, kubeless, or knative on DigitalOcean's managed K8S? Note that Linode has managed K8S in beta now, so there's another cheap K8S option.
Re:Low-Cost VPS Testing by Hamuko on Friday December 06, 2019 @04:49PM (#21726313)
Isn't that even more expensive? DO advertises it as "as little as $10 per month".
Re:Low-Cost VPS Testing by tyingq on Friday December 06, 2019 @05:51PM (#21726824)
Ah, I had assumed you could run one node.
Re:Low-Cost VPS Testing by OJFord on Friday December 06, 2019 @07:00PM (#21727348)
If it's like AWS' equivalent, you can, but the cost is more than that because you're paying for a managed control plane.
Re:Low-Cost VPS Testing by tyingq on Friday December 06, 2019 @07:37PM (#21727592)
I had assumed it was like Linode:

"Linode Kubernetes Pricing LKE pricing includes only the resources you consume – Linodes, NodeBalancers, and Volumes. Your cluster’s master services are free of charge."

So whenever they are out of their beta, you should be able to run a $5/month single node K8S "cluster".

Re:Low-Cost VPS Testing by erulabs on Sunday December 08, 2019 @07:23PM (#21739500)
If you’re interested - Im building a starting-at-free Kubernetes hosting service, out of YCombinator S19! - https://kubesail.com
Re:Low-Cost VPS Testing by jwr on Saturday December 07, 2019 @09:55AM (#21730554)
I don't see PaaS as a realistic alternative except for the simplest of apps. One always eventually needs to tweak the web server to get things like websockets, brotli compression, fast serving of versioned immutable files, or something else. Or run several servers with vpncloud.rs between them. It's not price that is a problem, it's the lack of flexibility.
Re:Low-Cost VPS Testing by asdkhadsj on Saturday December 07, 2019 @10:40AM (#21730796)
That may be true for some, but it's not true for me - currently.

Ie, if I could get a DB/FS + PaaS for $5/m I'd use it in a heartbeat. If I run into a wall where I need to manually tweak some fine detail, I can always fall back to normal deployments, right?

PaaS in concept fits exactly what many of us seek. Deploying apps without managing ops. Just because it's not infinitely powerful doesn't mean it's a reason no one would use a PaaS. PaaS fits a very real use case.

In my somewhat edge case though, hobby/side projects, I can't pay much for them. So I manage the ops myself currently because I can save money, but if Heroku was just a bit more cheap I'd use them.

Re:Low-Cost VPS Testing by vidar on Saturday December 07, 2019 @04:35AM (#21729334)
render.com is a really strong PaaS, quite recent but showing great promise.
Re:Low-Cost VPS Testing by iagovar on Saturday December 07, 2019 @03:49AM (#21729219)
Maybe scalingo.com or fortrabbit.com for php?