13 ms·
Show HN: I wrote a book on web application deployment
- jalino23 5y agodeployment is always the one Ive struggled with. there so much tutorial about building a webapp and almost always all of them assumes you can deploy. and I could not find dedicated resources for deployment. thank you so much for this!
- strzibny 5y agoI actually think there are many resources online, but nothing that takes you from the beginning to the end. So unless you know what to search for, you won't find it. This is especially true for security. How do you know things are secure once your deployment works?
- matthieuchabert 5y agoI'm currently reading this book and I am very impressed by the work done by the author. It goes in depth on many subjects like provisioning, configuration and deployment. For a beginner like me it's perfect. Highly recommend for web developers who wants to understand better how a server works under the hood and how to deploy it.
- strzibny 5y agoThanks a lot for your kind words :). DM me if you hit any roadblocks!
- strzibny 5y agoHi fellow readers of HN, I am Josef, a full-stack developer, a formal Ruby Linux packager at Red Hat, and an author of Deployment from Scratch (which is this post about!). After working at Red Hat and technically leading a start-up (of which I was the primary production engineer), I decided to write down a resource I felt was missing on the market: A book that gives you the confidence to deploy your first application focused on fundamental, transferable, and long-lasting skills rather than tools of the day: * You'll learn about networking, Linux, systemd, deployment strategies, web servers, application servers, databases, and containers. * You'll be able to deploy Rails or Django applications (or anything really) together with production PostgreSQL and Redis databases. All automated with just a few lines of Bash. What's unique about this book: * It's a comprehensive book where things are designed to work together. I take readers from general networking knowledge to databases and containers. It's for beginners, but I am not skipping anything, not even SELinux. * There are no abstractions, just Bash. I believe in learning the actual thing rather than an abstraction. Abstractions are great once you know what they are abstracting. * Everything is done on Enterprise Linux with full SELinux support. While I have happy readers using Ubuntu, I thought the market doesn't have a good CentOS/Rocky/RHEL book. There are three scripted demonstrations, cheatsheets, and a security checklist, apart from the book content. The demonstrations include: * A git-push deployment of a database-backed Ruby on Rails application with Encrypted Credentials and Action Cable * A self-sufficient PostgreSQL cluster with automatic system upgrades, log rotation, and TLS With these demonstrations, you can be up and running quickly and also save a lot of money on Heroku :) Stats so far: * Took me more than 3 years to write (1+ year of fulltime billable time) * Built a mailing list of more than 600 interested people * Sold 366 copies * 22 readers gave the book 5-star rating The table of contents and the first small chapter: https://deploymentfromscratch.com/previews/intro.pdf https://deploymentfromscratch.com/previews/intro.pdf A special SHOW HN preview of the Web Servers chapter: https://deploymentfromscratch.com/previews/show_hn_preview.pdf https://deploymentfromscratch.com/previews/show_hn_preview.p... Buy on Gumroad: https://gum.co/deploymentfromscratch https://gum.co/deploymentfromscratch I am around to answer any questions. Josef p.s. You can use "showhn" discount code at checkout for 20% off as a thank you to this community that put my posts several times on the HN frontpage ;)
- pezzana 5y ago> Took me more than 3 years to write (1+ year of fulltime billable time) It shows - very polished. Have you described your process for writing the book anywhere? Given the quality of the landing page and samples, I'd also be interested in that.
- anonymous532 5y agoNot interested in this book, but maybe you find my opinion of any value: Your website comes off as hustle to get money without content: * The first section where you describe your product, you avoid all that the product is, making me think you don't actually have content which you want to show off(the book image is digital with no mention of it being an ebook, the description is about me and tehnologies, no preview, no list of concrete things I learn) * In the next section you continue marketing a dream instead of the actual content, then you sell reviews, a story and others' opinion. Again, I conclude that you don't want me to form my own opinion of potentially bad content. * "What I'll get" is meta content, things I should see after being sold the content. At that point I clicked off the website thinking it's a scam. Before commenting this I went one more time to make sure I didn't miss anything and discovered that you actually do have chapters content and preview, just past the point where I clicked off.
- rmbyrro 5y agoI happened to have a quite different view. It was clear to me the content I was supposed to get. The only reason I didn't purchase is because the value proposition "save time managing your own side-project/startup deployment" is not smart, to me at least. I decided to pay and outsource most of these things away in order to focus on differentiating software, marketing/sales and peace of mind. Edit: I also think the "start a career in SRE" is quite a long stretch.
- strzibny 5y agoThanks for your feedback. > the value proposition "save time managing your own side-project/startup deployment" is not smart I would say it's not right for all. But it's 100% true (from my readers) that people learn self-hosting to cut costs. That part of the page targets these people. > I decided to pay and outsource most of these things away in order to focus on differentiating software, marketing/sales and peace of mind I want to say that the saving angle is only one of the reasons pointed out. If you want to know how things work and don't care about saving, it's still worth to learn it. I think you are not the target audience, though, since you want to focus on other aspects of the business which you probably enjoy more. :) > I also think the "start a career in SRE" is quite a long stretch The book shows you lot of Linux content you can find in RHCSA and RHCE exams. If you would really learn what's in it, you can be hired on spot for a junior role.
- M4R5H4LL 5y agoPage red flagged and blocked by BitDefender.
- strzibny 5y agoOh shoot. It's just a static page hosted on Netlify, wonder why is that.
- nefitty 5y agoIs that in the book?
- strzibny 5y agoI don't use Bitdefender. I think it has some issue with how Netlify delivers content (sesing other Netlify issue with it). Likely a false positive, though.
- nefitty 5y agoCool. Hopefully I didn't come off as mocking. I should have clarified that I meant that general type of false-positive flagging problem. I favorited the post if that tells you anything lol I'm excited to dive in!
- strzibny 5y agoActually it was a good joke, I laughed reading it. And thanks!
- wrycoder 5y agoI’d be interested in knowing the reason, once you find it. Thanks for the book!
- M4R5H4LL 5y agoNo specifics - just got this page Web Protection by Bitdefender Dangerous page blocked for your protection https://deploymentfromscratch.com/ https://deploymentfromscratch.com/ Dangerous pages attempt to install software that can harm the device, gather personal information or operate without your consent. TAKE ME BACK TO SAFETY I understand the risks, take me there anyway If you know this page is not dangerous, you can add it to your Exceptions list. Be aware that you will not be warned about any threats existing on this pag
- vich 5y agoI am just starting the process of migrating away from Heroku, so this is perfect timing. As a full stack dev, I've always done the bare minimum with deployment as I never found the process particularly enjoyable. In the past, I would always just copy-paste build configurations from past projects, or some online resources, and wouldn't spend much time digging into the details or really understanding the ins and outs of the build & deploy process. Needless to say, I'm looking forward to this book.
- strzibny 5y agoThank you! I think that understanding things better makes it more enjoyable, actually. If you'll have any feedback for me or questions down the line, just send me a DM.
- vivty 5y agoAs someone new to deployment this book was a great read. I learnt a breadth of new techniques (ssh, security (e.g. fail2ban, selinux, permissions), bash commands, dns and configuration of a vps) and i also liked, that the author gave advice on which tools could be helpful (e.g. Ansible). The book however does not go into detail on these tools (ansible, terraform), its goal is to teach the basics of deploying an app on a linux vps.
- strzibny 5y agoThanks for a nice review. The book is already long as it is, so I only provide some general ideas behind these tools. The path forward might be very different from person to person. Some will want to convert the Bash code to Ansible and some are already running Kubernetes clusters at work :)
- copperx 5y agoI really like the way the book looks. Can you share details about how you wrote it / typesetted it?
- strzibny 5y agoI started with Markdown and gitbook initially (the old version of gitbook), and then switched to Pandoc & XeLaTex engine with the mixture of Markdown and LaTex. I only did the "cat" and "ref" boxes in LaTex, everything else is Markdown. I also use some Ruby for preprocessing (when building other formats), previews, etc. Someone submitted my post on that to HN a while ago so there is some discussion here: https://news.ycombinator.com/item?id=28594863 https://news.ycombinator.com/item?id=28594863
- __blockcipher__ 5y agoThis might just be paranoia but a couple of the early comments on this thread feel very astro-turfy. For example: https://news.ycombinator.com/threads?id=vich https://news.ycombinator.com/threads?id=vich (hasn't commented since aug 2020) https://news.ycombinator.com/threads?id=matthieuchabert https://news.ycombinator.com/threads?id=matthieuchabert (hasn't commented for 10 months) https://news.ycombinator.com/threads?id=vivty https://news.ycombinator.com/threads?id=vivty is slightly sketchy as well but not super cut and dry
- nawgz 5y agoShow HN has a major problem with that these days. The comments that are just like "perfect timing! I have never seen a resource for this and I'm just learning it now" are really facile, no one actually interacts with people selling you things like this, and it's contrasted starkly with the one comment giving feedback on the page which is that it has no content at all unless you buy it. I find it very hard to believe the ratio of happy purchasers already seeing value vs. questioners about what this really is being 5:1 or more. Sad to see.
- strzibny 5y agoI specifically waited with SHOW HN until I had some customers and good feedback hoping some of them hang out on HN as well. I swear nothing was solicited. I just posted it myself and waited. No Twitter, no mailing lists, nada.
- jaw 5y ago> no one actually interacts with people selling you things like this There's a whole successful social network (Goodreads) built on people's desire to talk about books, frequently in the form of effusive praise. I think being able to trace the product to a single individual (e.g. a book's author) helps make it particularly appealing to leave that sort of feedback: we know it feels great to hear that someone values a thing you've created, and we like the idea of giving that pleasure to the creators of things we like.
- 5y ago
- msie 5y agoI wished there was coverage of Apache http but otherwise a very interesting book!
- u-rate 5y agoHi Josef, the book looks super interesting! Do you offer discount for broke college students? :)
- pelagicAustral 5y agoLooks very promising OP. As a Rails developer I've been looking for something like this for a while. I'm getting a copy soon as hit my pad later on.
- strzibny 5y agoThanks a lot!
- pelagicAustral 5y agoDone! thank you very much for this resource.
- notyourday 5y agoReally? Rails, Python, and co deployment needs a book?! This is a perfect illustration of the sad state of basic skills of developers. * Super old school. rsync over ssh. ssh to restart the process. * Old school. "cap production deploy" * New school. Build a container. Run it.
- burnished 5y agoSorry, the knowledge-pods of those under 40 were defective, we just weren't born knowing everything we needed to know (unlike previous generations).
- errcorrectcode 5y agoResponding low with ageism isn't good. ): However, I will take all of your knowledge-pods. Resistance is futile. :)
- sireat 5y agoFrom the testimonial on the page: 4 CPU cores, 16 GB of RAM, and automated backups for barely €15 a month. Where can you get a VPS for so cheap, I do not think even Hetzner goes that low?
- dewey 5y agoOVH/Kimsufi: KS-4 - https://www.kimsufi.com/en/servers.xml https://www.kimsufi.com/en/servers.xml
- juanse 5y agoI wrote that, and I did it without being paid or having any affiliation. Just a happy customer. This is the service I use: https://www.netcup.eu https://www.netcup.eu, and by the way I recommended it too.
- indigodaddy 5y agoI’m a netcup.eu customer as well. Can confirm, reliable and consistent performance and the lowest prices you’re liable to find anywhere for KVM instances.. I also have BuyVM.net instances as well. They are also excellent and have been around a long time.
- turtlebits 5y agoFor a book on deployment, I feel there is too much content on setting up a server. Would have like to see pros and cons of differing ways to deploy. Also, for taking apps to production, there should definitely be a part on high availability.
- strzibny 5y agoI talk about some of it (like push vs pull approach to server configuration, containers or not, single server or not), but most likely not to the extend you are probably thinking of. As for high availability I discuss whether it's worth it or not in the Scaling chapter. I also show how to use NGINX as a load balancer. I currently don't have HA content written for PG and Redis, but there are planned (as a free update).
- errcorrectcode 5y agoNginx, in 2021, really? Envoy stomps it. https://www.loggly.com/blog/benchmarking-5-popular-load-balancers-nginx-haproxy-envoy-traefik-and-alb https://www.loggly.com/blog/benchmarking-5-popular-load-bala... Also, what about caching, a-la at the top varnish, redis/memcache in the middle, and database tuning in the BE?
- e12e 5y agoInteresting about the total requests, but the article does not test.. balancing load? In a perfect world, 1 lb in front of 4 app servers should be able to serve 4x the requests as 1 lb in front of 1 app server. So I'd imagine 4x nginx back-end servers, and a baseline hitting 1 nginx directly? That, and the fact that the nginx config is shorter, and the performance not terrible (though terrible next to envoy in this test admittedly) - does mean nginx shouldn't be ruled out.
- pojzon 5y agoIts not, its still widely used also in kubernetes world. Tho a lot of traction is going for apps written in GO. Which supposedly makes them faster.
- password4321 5y agoDoes it cover minimum viable Rails deployments? I want to know how to push only pre-configured dependencies without Docker. So no build tools in production, just pre-built binaries. (Specifically not building gems on the production server.)
- strzibny 5y agoI cover what most people do which is either using build tools on a production server or building containers without them. I understand where you are coming from, but I don't talk _specifically_ about this. Basically you need to build your .so files beforehand and then copy them over. If you use the same system as your target you can just copy gems' files around. A good approach (which we did at Red Hat) is to repackage gems as RPMs and then install them as other system packages. But it's a lot of work. Fedora has a whole default Rails stack packaged, though.
- caffeine 5y agoBook looks like it would have been very useful when starting out! I had to glean this information by watching more experienced devs and then bumping through different tutorials, and some of it (like security) is still hard to come by.
- padthai 5y agoI am working through the book right now. It touches a lot of things, albeit superficially, to get you up and running. I have done plenty of deployments in the past so I do not need half of the book, but it has been helpful to put into context holes in my education (SELinux, Systemd, firewalls, etc.) @strzibny, it would be great if you can put some curated links or references at the end of the book so the reader know where to go if they want to go deeper in that particular topic. It would really improve the value that some of us get from the book.
- strzibny 5y agoThanks a lot for your review. I'll think about it. Is there a topic/chapter specifically you want to dive deeper?
- mcguire 5y agoComprehensive? "Deploy Ruby, Python, PostgreSQL, and Redis."
- deleted 5y ago[deleted]
- strzibny 5y agoComprehensive means going from networking to configuring NGINX as a load balancer. And everything in-between. But to provide more value I chose certain language runtimes and databases, because writing only in general is not as useful and tangible. What it means is that a chapter on application servers goes through some options you want to look for, and after that discusses configuration of Puma and Gunicorn as examples. So if you are running Node.js, I don't have (currently) specific configuration directives listed, but you would know what to look for. I might add more to the current list, but obviously I can never cover everything.
- kingcharles 5y agoWhat is a good alternative to this book for Windows / ASP.NET / Azure? (don't judge me!)
- strzibny 5y agoDo people actually deploy on Windows? (It's a joke, but as a Red Hat guy I yet have to see it in real life to believe it.) My last Windows was XP, but I actually use Azure at work right now. If you want to mostly do cloudy things (use clouds for more than simple VMs), you might want to look into certifications[0]. [0] https://docs.microsoft.com/en-us/learn/certifications/browse/ https://docs.microsoft.com/en-us/learn/certifications/browse...
- benburton 5y agoI'd love to give this a read from someone with a lot of experience in the source material, but given a $50 pricetag for a book I don't need to read I'm not into it. Who are your editors?
- yodsanklai 5y agoAgree. I'd buy a $50 book only if it has consistent excellent reviews.
- strzibny 5y agoThe pricetag doesn't reflect just the PDF, though. If you deploy your own database with the demo, you might save way more money in a year. Other similar resources include less and charge more, or do you know one that's better value? I didn't split it into tears (book, book+code, book+code+...), because I think it works better together. I do realize I am losing some customers this way.
- strzibny 5y agoWould you be interested in giving it a read in exchange for your feedback? I might be open to that (DM me https://twitter.com/strzibnyj https://twitter.com/strzibnyj). I already lost more then one year of earnings working on the book and I couldn't afford a professional editor. So editors are only volunteers, and therefore I don't have a single editor for the whole book. (I know that as a potential customer you don't care about my excuses, I am just explaining my situation. Earning money on technical content is hard.)
- iamgopal 5y agoIs there similar book focused on terraform and kubernetes ?
- MrKey 5y agoLooks like a great work, not much to say, was long looking for such a comprehensive book. Exactly missed a single source which lists all deployment related topics, not too shallow, not too deep. In other words, saw it like an area map of the exact scale I was looking for. Bought instantly.
- strzibny 5y agoAhh thank you so much. I hope you'll like it.
- throwaway984393 5y agoI would not suggest this book to people who want to practice professional software deployments in 2021. This book is setting you up with a limited set of skills that are over-complicated and not best practice. For instance: Server configuration. You should not be monkeying around with OS configs. If you do, it should only be in something like a Docker container, which is an easily tested/updated versioned immutable repeatable closed environment that runs everywhere. Monkeying with server configuration is a quick path to becoming a systems administrator, introducing unnecessary bugs, and increasing complexity. Try to avoid using software that is platform-specific (see next point). Services with systemd. You should probably not use systemd to manage services. The primary reason is that you might not fully control the system you run services on if it's a multi-user system, and you need to have system control to modify systemd. It's also generally not portable outside of a Linux system. In the cloud you would ideally be using a deployment or orchestration system which has its own configuration format and method to run services, obsoleting systemd. The most portable service manager you could learn to use would be runit (even Busybox has an implementation of it), and after that, whatever one you choose that you can run as an unprivileged user. You can then run your preferred service manager as a systemd service, or in a container, etc. Databases. Try not to get into monkeying around with backups and restores. Find some kind of managed provider that can do simple snapshots before deployments and easily restore them. Doing it manually is painful, and automation could be done better by a managed provider than trying to roll it yourself. However, you should be familiar with Flyway-style database deployments. SELinux. You should not have to learn how it works to deploy. But if you do, get a dedicated book on it. Storage concerns. Don't use networked filesystems for production. You can, in the sense that you can toast bread in the bathtub, but I wouldn't recommend it. Backups and restores. Use versioned immutable artifacts in an artifact repository. Use a managed backup service/tool/etc for whatever doesn't work that way. I don't see mention of caching proxies, reverse proxies, or CDNs. These can get tricky, from being careful about headers to preserving source IPs to invalidating stale caches to load balancing and resource limits. I don't see any mention about continuous deployment, continuous integration, the 12 Factor App, or Immutable Infrastructure. All these are core components of modern deployments. And as much as I hate it, Kubernetes is slowly of eating the entire world of modern systems, so learning how deployments work on it is essential to working in modern professional settings.
- scottcodie 5y ago> "The physical signals in wires and the electromagnetic waves are the basic building blocks of the link layer". > So, what is a CPU anyway? A central processing unit (CPU) is your processor (or processor core). > Nevertheless, making a thread-safe code unsafe is more than easy and so if your application works with threads in some ways, make sure things work as expected. Cut the filler and just say what you're trying to say.
- strzibny 5y agoIf you have more actionable advise for me, I am all ears. It's my first book, after all.
- harryvederci 5y agoI hope the HN community will stop doing easy smackdown comments like this. Someone spent a ton of time on this product. It's exciting and terrifying at the same time to post it on HN. That "terrifying" is completely unnecessary, and 100% caused by reactions like yours. At the very least, please write a "shit sandwich" next time. [Mandatory "Yada yada yada, I don't know the author, not affiliated to the product, bla bla" here.]
- scottcodie 5y agoSorry, my comment was intended to be direct feedback. I'll try to practice more emotional intelligence in the future.
- harryvederci 5y agoRare to see an apology like this on the internet, I had to look twice. Respect!
- deleted 5y ago[deleted]