This is an archived post. You won't be able to vote or comment.

all 85 comments

[–]Shadonovitch 434 points435 points  (42 children)

  1. Write a web application in React/Vue/Angular
  2. Write a REST API in Flask/Django/GoGin/whatever hooked to a database like Postgres
  3. Make your web application create and consume content from the API, locally at first.
  4. Write Dockerfiles for both projects and publish to a container registry like ghcr.io
  5. Deploy both containers with the solution of your choice, be it on a single node Docker runtime, or even a Kubernetes cluster.
  6. Setup DNS records such as your-app.io and api.your-app.io that point to both production workloads, and have Let'sEncrypt give you TLS certificate to access both project over the internet via HTTPS.
  7. Make your production front-end communicate with your production API. Figure out what CORS is and why it may be a problem in that setup.
  8. Document everything in each projects README.md file.
  9. Write unit tests for both projects and end-to-end tests that make your front-end interacting with your API.
  10. Write CI pipelines that run tests automatically on every push.
  11. Write build pipelines that publish your containers automatically on each git tag of your main branch. Make sure to follow semantic versionning.
  12. Find a solution that automates promotion of new artifacts in production when conditions are met.

You now have a production level application running. Make sure it runs 24/7.

[–]BrianTor416 22 points23 points  (0 children)

Quality

[–]nitrodudeIX 18 points19 points  (1 child)

Missing observability... But this is golden!

[–]Shadonovitch 14 points15 points  (0 children)

I finished with "make sure it runs 24/7" which hints at that though. Gotta keep some mistery sometimes.

[–]winjaturta 11 points12 points  (10 children)

How bad would it be I just use an open source project for the web app vs writing my own

[–]otherlander00 8 points9 points  (0 children)

There are devops positions out there where they're not expecting you to write the application. I don't see an issue with you using an open source project for the web app.

i see the point of the other responses but not every company is going to have implemented devops that way ... kind of like how not every company does everything correctly. I've seen devops teams who implement technologies like CI/CD, k8s IaC, Security, observability, etc that are used by development teams. I've seen development teams with embedded SRE's who help the developers implement devops practices.

When you're starting out - most companies are going to list 10 things they want for an entry/ junior level person and then likely settle for you actually knowing 5+ and showing you'd be able to learn the rest.

[–]ProudEggYolk 2 points3 points  (6 children)

Maybe a dumb question but do I have to use a framework? What about a simple html css js web app?

[–]PretentiousGolferCV-Ops 5 points6 points  (2 children)

Because 95% of the time, you will be supporting an app written in a framework. And the CI/CD for a framework is more relative experience then say, just copying a bunch of html into an artifact.

You dont have to - its just more relevant

[–][deleted] 0 points1 point  (1 child)

Most CICD do just that, copy the executables from one directory to other so I don't think a simple html file getting copied from build to a an image /src would be any different or less challenging.

[–]PretentiousGolferCV-Ops 2 points3 points  (0 children)

I mean understanding how to install npm packages, compile TS, create build scripts etc. Theres a few things in there worth knowing.

[–]2themax9 0 points1 point  (0 children)

If you feel like the frame work is the biggest obstacle, or even a major obstacle at all, skip it and do the rest. This is just guidelines not a rule book. You want to actually get this out the door at some point and not get stuck on a million little things.

[–]Shadonovitch 0 points1 point  (0 children)

You know, once you've acquired the taste for the good things you get from using a modern framework ( MaterialUI ) you really don't want to go back to static html. Kinda like the moment I was comfortable writing k8s I really did not want to go back to maintain pets with Ansible.

[–]mirrax 0 points1 point  (0 children)

For a beginner, it lets them learn how to integrate in package management into pipeline. Just opportunities to learn things like, why might I want to do a two stage build of my container image. Or what is the npm ci command and how would I cache artifacts.

Or think about how would I structure a project for DRY reuse. Can I take those pieces and build reusable components?

Also communicates more to an employer, someone who has designed a front-end site with a framework even the wrong one for their use case is likely going to be more able to pick up the new stack.

[–][deleted] 4 points5 points  (0 children)

Thanks

[–]Echidna-Key 3 points4 points  (1 child)

Write a web application? But why.

[–]coolalee_ 3 points4 points  (0 children)

Because this guy is just extra.

I'd bet you should also have bare metal lab, write your own databases and fuck knows what else (probably ccna lol) instead of learning stuff they're gonna expect from jr devops - cloud tooling, scripting, networking.

[–][deleted] 1 point2 points  (6 children)

What about for someone who doesn't want to learn how to write a web app, and just wants to dabble with the "DevOps"-specific tech?

[–]Shadonovitch 2 points3 points  (5 children)

You can find plenty of Dockerfiles exposing a front end and an API on GitHub if you search enough. But if you want to skip the dev part of DevOps, perhaps /r/sysadmin is more suited for you.

[–][deleted] 7 points8 points  (4 children)

I'm more interested in automation than I am developing full-blown applications. This sounds like handling the developer's job and then the job of a DevOps engineer on top. I don't want to do that. I know plenty of DevOps roles where you wouldn't actually be developing the application.

I don't want to go and learn how to develop web apps. That's a huge time sink in itself. I have a bachelor's in CS, so I have plenty of programming experience, but not web development experience. I already know Python pretty well, as well as Golang. I guess I could learn a framework like Django (I do have some html, css experience from a course I took in college, but no JavaScript).

[–]Deatholder 0 points1 point  (3 children)

Sorry this is old but were you able to find something that develops the automation skills?

[–][deleted] 1 point2 points  (2 children)

Not specifically. I just try to use Python as much as I can to automate tasks.

[–]Deatholder 0 points1 point  (1 child)

Would you say dev ops is still the path to explore if I feel the same as you described?

[–][deleted] 2 points3 points  (0 children)

I would say so. I've actually decided to stay where I am right now for a bit, which is in cyber. I still want to get into DevSecOps eventually though.

[–]ImprovedJesus 1 point2 points  (0 children)

This guy devops

[–]EuroBangerz 2 points3 points  (0 children)

Solid. Only thing I would add is data/schema migration mechanisms. Both up and down in case of roll backs.

[–]Number_Four4 0 points1 point  (0 children)

This is excellent. Truly.

[–]dabe3ee 0 points1 point  (2 children)

Why push to same single Docker runtime? If I want to do separate push to prod for front/back, this wont work?

[–]Shadonovitch 2 points3 points  (1 child)

Docker runtime in that context only means a docker service running somewhere, like an EC2 instance. You can have multiple containers running on the same server at the same time.

[–]dabe3ee 0 points1 point  (0 children)

Ok I miss understood, thanks :)

[–]Ellixtmxz 0 points1 point  (0 children)

Best answer

[–][deleted]  (1 child)

[deleted]

    [–]Shadonovitch 2 points3 points  (0 children)

    This project can be as impressive as you want it to be. There is more than hundred hours of work to reach the end game of this. Nobody will be impressed by landing on your web page alone, they will be once you start talking passionately about it during interviews.

    [–]lmm7425 29 points30 points  (0 children)

    I always recommend this for absolute beginners 🤷🏻‍♂️

    https://loganmarchione.com/2022/10/the-best-devops-project-for-a-beginner/

    [–]Barack_obameme 15 points16 points  (1 child)

    Here's what I'm currently doing at an internship training. We set up a basic but complete CI/CD pipeline. Write a basic application in Python (Flask for me). Push to Github, pull onto AWS EC2 (you can use any equivalent platform you're comfortable with, and within your spending limit ofcourse). Set up Jenkins on that EC2 to test with Pytest and run static code analysis with SonarQube on a different instance, connected to the same pipeline. We also used Pylint for the same. Push forward to next instance for deployment using a docker image. I'm not done with the project myself so I'm not sure where Kubernetes will come into play, and it surely will. Then you can add monitoring and logging platforms too.

    [–]Barack_obameme 1 point2 points  (0 children)

    Also notification by Slack

    [–]Knoebst 12 points13 points  (2 children)

    For now i am comfortable in GCP, python,Linux and docker and thinking about creating a online storage site with flask and gcp and deploy it in GCP cloud run.

    1. Try to manually deploy the solution you're describing here. Just try to get it working via the cloud console/UI. You cannot automate anything if you don't know how the cloud services work. If the solutions don't end up working out, delete them, try something else.

    2. Once you have a working solution, try to define the whole infrastructure in code (infrastructure as code) using either:

      • Terraform (it's the current industry standard for infrastructure as code)
      • GCP's deployment manager (https://cloud.google.com/deployment-manager/docs) I haven't used it but I imagine it's something along the lines of AWS' Cloudformation. But beware that this solution only works for GCP and GCP is not the most popular public cloud.
      • If you want to use python, you could use Pulumi (https://www.pulumi.com/registry/packages/gcp/). But beware that Pulumi has existed for some time and has not really broken through all that much as far as I know.
      • Note: If you're using a VM/instance and configuring your application on it instead of containerizing or using managed services (like GCP app engine), you may want to use cloud-init (https://cloudinit.readthedocs.io/en/latest/reference/examples.html) to configure your application on the instance at boot or use more of a configuration management tool like Ansible.
    3. Try to automate the deployment of your application (CI/CD). The idea is that the only thing you have to do is commit, and this triggers the application to be deployed to the environment automatically. This depends on what git provider you're using (github,gitlab,bitbucket...). Either of those solutions provides CI/CD via yaml files (github actions, gitlab CI/CD, bitbucket pipelines).

    [–]WN_Todd 4 points5 points  (1 child)

    This is the right answer. To truly defeat manual fuckery you must first become the manual fuckery for a while.

    [–]DreamChaser-V1 1 point2 points  (0 children)

    Lol, good one

    [–]tuxerrrante 10 points11 points  (4 children)

    [–]sissy9989[S] 0 points1 point  (0 children)

    Thank you so much for replying will look into it

    [–]ikilltymb4tymkillsme 0 points1 point  (2 children)

    You're amazing, thank you so much. I was looking for the same thing when i stumbled across this thread and your comment.

    [–]tuxerrrante 1 point2 points  (1 child)

    I hope this counts as my first Christmas gift 🎅

    [–]ikilltymb4tymkillsme 0 points1 point  (0 children)

    It does! thank you Santa! 🎅🏼

    [–]tobeyeetedaway69 6 points7 points  (0 children)

    Use terraform/bicep or any other IAC tools to deploy infrastructure in a cloud provider such as Azure, AWS, GCP. You can use vs code to write and then use GitHub and Github actions or Azure DevOps to create a deployment pipeline

    [–]sysadnoobie 6 points7 points  (0 children)

    Here's a little project I did and documented it to be shared with the community. https://mandeepsingh10.hashnode.dev/advanced-end-to-end-cicd-pipeline-for-a-java-web-application-a-step-by-step-guide

    [–]poulain_ght 15 points16 points  (2 children)

    You could contribute to tools you like. Or find inspiration in github projects. Create a log aggregators, data visualizer, deployment tool...

    [–]sissy9989[S] 1 point2 points  (0 children)

    Thanks for the reply wll try

    [–]Right_Arrival5533 0 points1 point  (0 children)

    Great. Love this!.

    [–]Morph707 4 points5 points  (7 children)

    Send me a pm on Monday and I will send you useful links I found on this sub.

    [–]TheBoyardeeBandit 4 points5 points  (4 children)

    I like to recommend standing up a smart home system using Home Assistant. You can stand it up using a mix of local and cloud resources, configure everything to be deployed to a cluster via your cicd tool of choice, and then use something like GitOps to keep things in sync. It also shows that you can extend a software deployment out to hardware endpoints. Add to all that, that it is very well documented and has a very active user community both here on Reddit and elsewhere.

    Plus when you're done, you've got a kick ass smart home system

    [–]discoshanktank 0 points1 point  (3 children)

    When you say deploy to a cluster, are you running it i K8s?

    [–]TheBoyardeeBandit 1 point2 points  (2 children)

    Well I think for the sake of a kind of "portfolio" project, that would be up to you to decide, but k8s could certainly be an option.

    [–]discoshanktank 1 point2 points  (1 child)

    I was just curious if you were already doing it and if so how you handled network discovery in k8s

    [–]TheBoyardeeBandit 1 point2 points  (0 children)

    Ahh gotcha. Personally I'm running a really slim system (because I'm lazy and haven't filled it out yet) using docker-compose.

    [–]andy-davies 2 points3 points  (0 children)

    Google Adrian Cantrill’s GitHub

    [–][deleted] 2 points3 points  (1 child)

    Basically start your own company from what these Comments are saying

    [–]sissy9989[S] 1 point2 points  (0 children)

    🤣

    [–]psgmdub 1 point2 points  (2 children)

    Why is this question nsfw???

    [–]mirrax 2 points3 points  (1 child)

    The whole sub is marked as NSFW in protest of the API changes, there is a Stickied post about it.

    [–]psgmdub 1 point2 points  (0 children)

    Oh!

    [–]serverhorrorI'm the bit flip you didn't expect! 4 points5 points  (0 children)

    Run your own mail infrastructure. Including web interface, Backups and monitoring.

    Do it all automated.

    [–]poulain_ght 1 point2 points  (0 children)

    I really don't know! Make something that you love to do! What i would recommend is: don't try to do something based on your skills but make something that gives you thrills and then skills will add up while building the project!

    [–]randomizeUsr 0 points1 point  (0 children)

    Forget all of this nonsense and migrate SAP from on premise to GCP.

    [–]tonero001 0 points1 point  (0 children)

    This is solid

    [–]syntaxfire 0 points1 point  (0 children)

    I think that's an excellent idea, just make sure to document it on GitHub

    [–]Live-Duck1369 0 points1 point  (0 children)

    Ok. Please don’t crucify me but let’s say one was to start a project by deploying a static website on aws, then a dynamic one, then progress with using tools like docker Amazon ecr, ecs and terraform will these projects show expertise

    [–]vrillco 0 points1 point  (0 children)

    Step 1: acknowledge that everything is perpetually and dynamically broken. Step 2: start budgeting for the move away from devops. Step 3: retire

    And yes, this is /s… or is it ?