Following up on the ‘Rails from “zero” to kubernetes’ series, we’ll see today how to expose your service to the internet, since I think we all agree that mapping directly the port of your rails app to the internet is not a really wise choice.
Kubernetes has a “simple but works” solution called ingress, ingress is an HTTP proxy, it will work as a reverse proxy for HTTP and HTTPS for any service that exposes one one port.
Following up on our previous post, we’ll now make kubernetes work for us, and automatically scale our application.
One of the really cool kubernetes features is the ability to automatically span new pods for your deployment based on the CPU usage of your pods. This is kinda simple, but very useful.
In the previous post, we created our first kubernetes pod, but one important part is missing, it is not possible to access that application, we’ll solve this with a service now….
Last year I wrote about using docker-compose to have a test/development environment similar to your production environment (you can check the post here) My environment kept growing and becoming more complex, and I started using docker swarm to deploy the applications, and after some time I started using kubernetes, I’ve learnt something about kubernetes in…
This post is the write-up of how I fixed a production problem that happened a few minutes ago, and can probably save some time for you too, so read this and remember for your next code that deals with time
Some time ago I missed one of the cool features from the time I worked with JavaEE, that was a request scope for some variables.
I know the instance variables on controllers do a great job simulating it, but I needed to access context in a completely different part of the application, that wasn’t always called from controllers, variables that should be scoped to that request.
So I thought, I could create something like that for my rails app.
I work as a developer since 1997 (yes, it’s been a long time), and I try to bring most of what I like to my day to day life and if for any reason you follow me on Instagram you know that I’m kinda addicted to crossfit, of course I’m not an athlete, but I’ve found ways that crossfit teaches lots of people skills that I think are really useful in business and life.
After a question in my other post about how to use sidekiq without rails, I decided to also post here how to use ActiveRecord without Rails, the basic idea is the same, we’ll start with an empty directory and create the files as we need.
Of course you can still use AR validations, that is not my point. But data consistency related validations should not trust AR for that, for example, if you have a “unique” constraint, and you are just trusting the database, it is really easy to break the DB consistency if for some reason you have a…