1Push

1Push was built to help reduce workload of IT teams who have to cater to an entire organization and have repetitive tasks throughout the day. I've personally witnessed these situations and wanted to work on something that'll take some load off of the IT department.

Inspiration

I've personally witnessed these mundane tasks that IT has to do. If a new resource joined the organization, setting up firewalls, upgrading the operating system, installing default software, and whatnot. IT teams have to do it every single time and it's much more of a headache when we hire freshers because they come in batches and it's one of the most hectic time for IT teams.

Then there's another situation I've seen because of this "Work From Home" setup. IT team needs to update operating systems with new security patches every month and it might be straightforward for developers to follow the instructions, non-technical staff generally doesn't know and someone from IT team would connect over a call and perform the upgradation. You can imagine the nightmare.

There's the third scenario which also happens from time to time. When a new resource is brought onto a project, we'll have to get those specific tools installed in their system and remove the older ones. This also lies in the IT team's path because not everyone has admin privileges to install whichever software they need.

What it does

1Push is a very simple web app-based solution to minimize the work of IT teams. The web app allows us to create groups and add nodes to it. Whenever we want to send some updates downstream, we can use the Chef workstation to push these updates to selected nodes.

IT teams have to just set up their Chef Infra server and Chef automate server and they can add any number of recipes they want and then use those to run on the systems. Every system/on-premise server will be a “Node” and we can create ”Groups”, which represent a collective set of nodes that serve the same purpose.

For example, A project can be termed as a group and people working on that project will be added as nodes under that group. Now, any time IT team wants to push any update or if a new node is added, they can add a custom “run_list” that’ll be executed on the node.

Project Architecture

Project Architecture

How It Works

Whenever a user interacts with the web app, the app sends those requests to our public API which has the logic of:

  • Saving/retrieving group/node/recipes etc.
  • Generating commands for CLI tools and executing those queries.

The organization would have to set up a workstation initially and configure Chef's CLI tools which include knife and then set up the Flask APIs and Angular Web App and that's pretty much it. You can push your recipe to the Chef workstation as you normally would and then you can re-use those recipes via this web app. Just make sure that Flask APIs are on the same system as where knife is installed. APIs interact with the CLI tools and perform those actions.

How I built it

This project is very basic at its heart and was built via:

  • Angular: Front-end web application.
  • Python: Back-end APIs that interact with Chef Workstation.
  • Ubuntu Server: Servs as our Chef Infra and Workstation and has CLI tools installed.
  • Chef Infra/Automation: The heart of the whole workflow that does the actual heavy lifting of syncing nodes, pushing down the updates.

Challenges I ran into

I've not worked in the DevOps field professionally, so this had a steep learning curve to first understand what Chef does and then think of how I could leverage it. Initially, I was planning on running my Infra server on a docker, but that was quite challenging, so I went with a virtual machine running in my system instead.

Accomplishments that I am proud of

I wasn't sure whether I'll be able to complete everything on the time or not. Because this is the first time that I'm building anything with DevOps principles in mind and the very first time building APIs via flask. In earlier days, I would've just built the APIs with PHP, but I wanted to utilize this time and work with flask as well and python is my first go-to choice when I have to automate anything.

What's next for 1Push

There are a few things that still need some manual setup. I'd like to remove that from the equation altogether.

I'd want to automate the steps of setting up and configuring Infra servers a bit more. I've written some bash scripts to automate that job to some extent, but not enough. Also, I'd want to be able to let users create and save their recipes from this web app itself. Eliminating the chances of interacting with the Infra server via SSH or CLI.

Built With

Share this project:

Updates