3 ms·
Have you written a webapp as a side project before? If yes, then great: 1. Find a bare VM provider, e.g. Linode or Digital Ocean or EC2. 2. Figure out a way t
by didip 9y ago
Have you written a webapp as a side project before? If yes, then great:
1. Find a bare VM provider, e.g. Linode or Digital Ocean or EC2.
2. Figure out a way to get your code up there, even if it's ghetto. e.g. git pull from github. Get the app server running.
3. Figure out how to expose your app to the internet. Buy a domain name, get it to point to your IP addr. Soon enough you will realize that DNS load balancing is terrible...
4. Then you should install Nginx or HA proxy and put your app behind it. Run your app on localhost, only nginx should be exposed.
5. Once everything is up, iptables is your next concern, expose only ports you want and disable everything else.
6. Repeat 1-5 on a second instance.
7. Soon enough you will find that repeating the same thing sucks, so you will write Python script using Fabric library. But then you realized someone else have done this already, after a quick googling, you will find Ansible or Salt. Use those instead.
8. Rinse and repeat for other networked things. e.g. databases, mail relays, cache servers, etc.
9. Evolve your approaches, rewrite ghetto stuff, make your artifact as immutable as possible with very few network dependencies...
That's pretty much the entire devops evolution up until 3 years ago. Once you got good in these...
1. Start reading about Linux container and why they are useful.
2. Install docker and try to get your toy project in a dockerfile.
3. Repeat the learning exercise again on deploying Docker containers.
Hope that helps :)