Kamal: Why and how you should leave the cloud?

By Guillaume Briday

me
✌️ @guillaumebriday

Before starting

  • Quick introduction
  • Not a silver bullet
  • Know your context
  • Not a technical demo

Back in my days...

Timeline

IaaS vs PaaS

What's the difference?

PaaS features

  • "It just works"
  • "It's reliable"
  • "It's easy"
  • "It's performant"
  • "It's scalable"
  • "I don't need to hire a DevOps"

IAAS features

  • "It's complicated"
  • "It's not reliable"
  • "It's not secure"
  • "It's slow"
  • "It's not scalable"

How to deploy on a Paas?

How to deploy on a IaaS?

  • Hardening your server
  • Install NGINX
  • Install PG
  • Install Redis
  • Install all dependencies
  • Find a way to deploy your app
  • Maintain the server
  • And so on...

How to deploy on a IaaS?

Capistrano
Forge
Hatchbox

PaaS is just one piece of the puzzle

  • Off-site Backups
  • Emails
  • DB scaling
  • CDN
  • Logs
  • APM
  • S3

Deploying on a IaaS?

It's not that complicated.

Deploying on a IaaS?

  • We are not in 2007 anymore
  • It just works, exactly like a PaaS
  • Everything is mostly automatic now

Deploying on a IaaS?

Deploying on a IaaS?

  • Hardening your server
  • Install NGINX
  • Install PG
  • Install Redis
  • Install all dependencies
  • Find a way to deploy your app
  • Maintain the server
  • And so on...

Hardening your server?

  • Disable SSH password login
  • Install UFW
  • Install Fail2Ban
  • Install unattended-upgrades

Hardening your server?

Hardening your server?

  
# hosts.ini
[webservers]
192.168.0.1
192.168.0.2
192.168.0.3


$ ansible-playbook -i hosts.ini playbook.yml
            
          

Deploying on IaaS?

  • PaaS are nice UI for IaaS (with extra Markup)
  • PaaS make you believe it's hard
  • PaaS are as reliable as IaaS
  • PaaS are as performant as IaaS

deploying on a Iaas?

What about the scalability?

You don't have (real) scalability issues.

What about the scalability?

  • Growth is mostly linear
  • It depends on other teams and actions
  • Your business will fail before it hits hard
  • Auto-scaling is a solution to a non-existing problem
  • IaaS are x100 cheaper than PaaS anyway

What about the scalability?

Introducing Kamal 2

  • Based on Docker
  • SSL included
  • Fully transparent
  • Basically, Kamal is Capistrano for Containers
  • Runs everywhere

Introducing Kamal 2

  • It just works
  • It takes 10 minutes to bootstrap and deploy on a new server
  • You can still use Cloud tools

Introducing Kamal 2

Conclusion

  • The best alternative to PaaS, so far
  • Keep your money for R&D
  • Much simpler than you’d expect
  • Absolutely worth a try

Thanks! 🙏