5 ms·
Bringing Serverless to a Web Page Near You with Hugo and Kubernetes
- thomasedwards 7y agoOr you could just use Netlify with one click ;)
- cameronbrown 7y agoNetlify is one of those services that just makes perfect sense. Perfect vertical integration across the web stack.
- ed_blackburn 7y agoAm loving the innovation and appreciate that the assumption here is if you've already got Kubernetes then this can be useful. Otherwise, a Kubernetes cluster is quite the pre-req for a static site generator that can run on the command line or on a build server.
- alexellisuk 7y agoSo if you're new to OpenFaaS, it is a platform for building and shipping applications on Kubernetes. We're talking about the big picture here, if you have Kubernetes, you can now deploy static sites, blogs, micro services, functions and lift+shift just about any other code.
- saiyam911 7y agoYes it's true, OpenFaas is something everyone should try even if they are a beginner. Alex and the community have tons of blogs, workshops that you can help you learn and implement production-ready solutions. Openfaas is making Kubernetes development Easy. For static blogs, websites its really simple with Openfaas. https://twitter.com/openfaas/status/1162414762652835841 https://twitter.com/openfaas/status/1162414762652835841
- born2discover 7y agoWhile the article is a bit informative, it is hard to take it seriously. It claims to bring "serverless" to a webpage near you, yet one of its prerequisites is: "You need to have a Kubernetes cluster up & running.", which implies a server (actually several), so not so "serverless" in the end. The entire "serverless" movement seems to preach something that is impossible. You can't have internet without a server. You can offload server management and maintenance onto a provider, that is true, but you can't remove it entirely from your stack. So preaching "serverless" architecture is disingenuous and IMHO rather ignorant.
- aivisol 7y agoI believe "serverless" in a way how it is used in this context means there is no top down full server starting from hardware all the way up to the OS available to you exclusively. Instead you just use services which you need for tasks you need. Think storage buckets for your files, lambda functions for your scripts, load balancers for your traffic etc. They do run on servers, but you never have access to the server itself.
- dx034 7y agoIsn't that what webhosting providers have offered for at least a decade? No server management, just resources on a server with a web server, data storage (often MySQL) and the ability to execute code (mostly PHP). You run your software on a server without ever accessing the server itself or having to worry about OS updates.
- zzh8829 7y agoI think the biggest difference is webhosting provider can't scale your php resource up and down infinitely in real time. Your software is not exposed to the server but constrained by it. The idea of serverless is that your service is automatically distributed and not constrained by the capability of some web server.
- duhast 7y ago
- m90 7y agoI would honestly be interested in what the author(s) consider to be the advantage of such a setup over things like for example GitHub Pages, Netlify, S3 + Cloudfront, a plain Apache Server?
- nindalf 7y agoI use nginx + static html. I deliberately kept it as simple as possible. I wouldn't follow this tutorial unless it was for the purpose of learning how to use Kubernetes and even then, there are probably better tutorials.
- athorax 7y agoThere is a note near the beginning: "The goal of this tutorial is not to show you that you need a Kubernetes cluster to run a static website, it’s to show what can be done with OpenFaaS and Kubernetes." I don't think it is being advocated that you should make this switch, just an informative article showing the steps required to do so.
- deleted 7y ago[deleted]
- tekkk 7y agoLooks like a major pain in the ass to manage. Why not use AWS Lambda or other FAAS? And wait, the whole site is hosted with k8s using some Nginx server? Where's the CDN and frankly, object storage like S3 would seem a much better fit for the static assets. If the point of using this is to learn how to use k8s for FAAS, great. If the point is to save pennies and create a hassle-free deployment, I would rethink the approach. I've heard good things about Netlify, although as a tinkerer myself I used AWS and CloudFormation with Sceptre to create my site. As unrelated note, if you are familiar with React you should probably consider using Gatsby. It's much easier to extend and customize which happens quite often once you start adding your own little cool widgets.
- xgulfie 7y agoArticle might be a good intro to openFaas but please do not do this in production. Gitlab Pages and GitHub Pages will gladly host a git branch for you as a static site. Gitlab has built in support for building static sites with any command you want. They have more than enough infrastructure to host a static site for you and it will take <1hr to set it up.
- ldoughty 7y agoThere are a lot better options of you like Hugo or other static site generators... I have GitHub set up to push my merge requests to AWS Lambda. The lambda downloads the specific Hugo release I deemed to run on, generates my pages, an pushes to S3 + Cloudfront. Takes less than 10 seconds from merge to publish. No servers. No services fees. Costs $13/year (95% domain fee). Truly "serverless". At some point I want to retry this on Gitlab, it seems to support the same flow
- icebraining 7y agoOn Gitlab the flow is simpler, you can just add a configuration file to run Hugo on the integrated CI and pass the generated files to the hosting: https://gohugo.io/hosting-and-deployment/hosting-on-gitlab/ https://gohugo.io/hosting-and-deployment/hosting-on-gitlab/
- Lucasja135 7y agoThanks for your sharing!. If you want to find quality web hosting platform, check out my web page http://couponupto.com/coupons/green-geeks http://couponupto.com/coupons/green-geeks
- softwarelimits 7y agoThis is one brilliant piece of modern technical humoristic literature, a genre that is still rare and should get much more attention! The author has written that really well, simulating a style that some cloud marketing guys still will take serious. Of course every developer with some background in webdev will start to chuckle after a few sentences, but he keeps the flow on a very high level, great! I wonder if some kind of NLP was involved and a second article with sources attached will follow. Very good piece of parody!
- hn23 7y agoHave not looked into it but I feel that the headline qualifies for tech bs bingo...
- zeveb 7y agoI've used Hugo static pages, and I've used Kubernetes. Replacing the former with the latter is not a win for simplicity. Static pages can easily be maintained well by a single person; Kubernetes is a nasty king rat of pain and complexity which requires a team of highly-skilled engineers and architects to do well. Its complexity is worth it, in many circumstances, but it is not — repeat, not — the first thing one should reach for. Or the second, even.
- bhartzer 7y agoI’ve seen where someone has “hosted” an entire site on a router. Would that qualify as serverless?
- giancarlostoro 7y agoServerless is purely a cloud marketing term for the next rendition of a web CGI like solution we all used to do to make any programming language run behind a web server, e.g. C, Python, and so on. You can trigger it by other means, such as if a file is added to a cloud based file storage (think Azure Blob Storage, not Google Drive, though it wouldn't surprise me if that's a hook too) or something happens in your cloud based database. Or old school: someone visits a URL. The whole web aspect of serverless is just the most popular.