📢
The time has come. I am releasing the first ever book on Kamal deployment tool Kamal Handbook.
20 chapters of awesome content + plenty of drawings to visualize the concepts.
Foreword by Donal McBreen, Lead Programmer at 37signals.
My Rails 7.0 application is now deployed using Kamal to a single Digital Ocean droplet running:
- Rails
- Sidekiq
- PostgreSQL
- Redis.
⌛️Time spent: 5 hours.
I'll need to spend a bit more time with Kamal and hopefully there will be some lessons learned to share.
Sometimes I think of those people that left Ruby and Rails 5+ years ago because it was dead. ☠️
To this day I see an amazing progress in the community week after week. 🗓️
Heck, even the posts on Rails' dying fate disappeared. 😅
My notes from DHH's Rails World keynote📒
- Rails is 20 years old (2003-2023)
- DHH is 44 years old, spending halt the life on Rails
- We should be Renaissance Developers, caring about it all from frontend to backend and delivery
- DHH's second favourite language is JavaScript
Prediction:
Frameworks like React, Vue, and Svelte compiler will take a back seat.
A lot of the "frontend" can be now done easily from the backend thanks to Hotwire, StimulusReflex or LiveView.
Okay so I wrote down some words on the new Kamal proxy:
- Why we need a proxy
- Why we had Traefik
- Why the new proxy
- How to use it
- How to use it from Kamal
Ruby 3.2 YJIT on a Rails app at work 🚀
- ActiveRecord object instantiation is 30% faster
- view rendering is 20-25% faster
- p50 request time down by ~15%
Pretty nice if you ask me.
Kamal Handbook is about Kamal which is in Ruby.
It's made with Asciidoc which is in Ruby.
I use foreman to build it which is in Ruby.
I sell it on Gumroad which is in Ruby.
Gumroad processes payments with Stripe which is in Ruby.
What a Ruby stack 💎😍
Deploying Ruby on Rails on a single server with Kamal:
✅ Making Traefik issue the Let’s Encrypt certificates
✅ Introducing a private Docker network for container communication
✅ Having a mounted volume or a simple directory for a local disk service
I'll never understand makers hating on tests. Tests is the thing that makes you fast in the long term.
I almost thought that a blog index page doesn't need one, indeed. But I am engineer, so I write them.
And guess what?
It caught an issue when posts had no content and I was
It's a weekend so I am taking DHH's new Rails deployment tool mrsk for a spin. 🚢
Design-wise it's the closest thing to my own vision for a Capistrano successor. 👏
Want a blog post how it went?
📢 Announcement 📢
My next book will be about🧪 testing Rails applications with Minitest and fixtures.
I kept Minitest and fixtures in all my own projects despite always working with RSpec at work.
But why?
I think it's actually better. Simpler. Faster. You name it.
And
@varunramg
You got it all wrong. Using the product means ordering food, not delivering it. Delivering is a different type of job they didn't sign up for. I am happy i never had to work for someone like you!
Kamal is basically these 5 things:
- Bash (your hooks)
- YAML (your config definition)
- Ruby (Kamal is a gem)
- Traefik (load balancer)
- Docker (your process manager)
I really appreciate that Kamal is OS-agnostic.
Adding slugs and UUIDs to hide the real numeric IDs is pretty easy in Rails.
Personally I don't replace primary keys (they are fast and they can stay).
Instead I just redefine "to_param" on a model.
This is my Sluggable module for example:
I just finished an unbelievable bike trip in the Northern Vietnam. 🛵
There are no words for such a breathtaking scenery.
My mind was completely reset and I have a smile on my face. 🤩
10/10 recommended to anyone needing a break.
Confession:
I had a rough week, my mood was really low, and it felt like nothing went the way I want.
I pushed myself to at least share the Kamal post with you. But it almost didn't happen.
I barely did any work on my projects.
Today I at least restarted some work and
Deploying with Kamal is hard at the moment:
1, not enough community resources
2. not great docs
3. I am getting flagged on Traefik forum for a Kamal related post
Luckily I solved my own problem in the end and I will put out more Kamal knowledge as I learn.
Fingers crossed🤞
I hand-picked 20 gems from my own bookmarks that deserves your like on GitHub. 💎
Last threads were popular so I decided to do one more on development and testing 🧪
Give them a like to show them your support ⭐️
Let's go 👇
Rails now supports Cache-Control immutable option which was originally proposed by Facebook and saved them 60% of requests (the option, not Rails change).
Think about it.
A Linux release might get over 1000 contributors.
Rails 7.1 has over 800 contributors. 😍
And some people think Rails is in decline.
Not even close.
Kamal 2 is getting close. Huge upgrade coming. Support for multiple apps on a single server, auto-provisioning of Let's Encrypt SSL certs, better secrets, faster deploys, aliases, and much more. This is the key to unlocking amazing deployment on any VPS / bare metal box.
I properly went viral on X for the first time ever 🎉
A first post liked by 1000 freaking people.
400k views.
Replies from
@levelsio
and
@flaviocopes
.
I only wish it would be for some of my more helpful posts haha, but I'll take it!
Here's the end of the month announcement 📢
I am working on a Kamal Handbook📙
This book will be:
- Short and to-the-point
- Super practical
- Cheap
Stay tuned for more!
@levelsio
I know I know, don't shame the victim BUT
Do not start interviewing without knowing the range for the position. I always ask them first if it's not already stated. I don't have calls before that.
They don't want to disclose? Skip it.
I am starting my ⏰ 24h startup challenge.
24 hours within 30 days to build a fully functional MVP and find 10 people who would try it.
I'll document it all here in Twitter.
Let's do this 🚀
@AndreyNovikoov
Makes no sense. I would:
1, always offer email singup
2, offer Google single sign-in for business apps
3, offer Facebook for social apps
4, offer GitHub for developer's tool
So I would have two. Email + most popular single sign-on relevant to my app.
Donal McBreen will do a foreword to the book!!!
Yes, the main programmer currently working on Kamal at 37signals who just cut the 1.4 release.
I am speechless.
Kamal Handbook's Early Access ⚡️
Support my work and start reading first ever book on Kamal with the patron copy⤵️
The patron copy for $21.99 gives you early access as well as lifetime updates, and future bonuses.
You can also buy the simple copy for just $14.99 and you'll get
@DmytroKrasun
I worked at a startup that could be served from one VM... and it was, then we switched to K8s for ultimate scale. Can you predict what happened to the startup?
I think people should celebrate the small wins more. 🍾
I recently crossed 600 copies sold for Kamal Handbook.
I haven't posted about it.
But I went and had my first lobster roll for lunch. 🦞
Small wins, small celebrations.
@dvassallo
I was posting similar picture from my last big travel. Apple design is at fault here. And on top they won't sell you world adapters separately.
The first edition of Kamal Handbook took just 5 weeks of full-time effort.😮
But that's no the whole story.
It took me:
- a decade+ in the industry
- 3+ years writing of my first book
- weeks+ of learning and deploying Kamal
- days+ of writing blog posts
Still, one can
💣 So the big news is...
I am quitting my senior engineer role at Phrase. 🤯
Time to recharge and build things full-time again.
Excited for what the future brings. 🤩
Watch this space :)