top of page

Some python projects

Here are some problems and solutions I provided while working for a client in a DevOps role.

"Nick, you own these environments. It's up to you to monitor them and FAST! The duration of this lab is only 3 weeks."

solution:

I wrote this script in python that I named "heartbeats". Performs a variety of health checks as simple as ping, to validating a json api response and even ensuring an sftp login works.

"Nick, the federated cloud environment that the Release Engineering deptartment provisioned for us expired. This keeps happening and we have no control because RE owns these environments".

solution:

Researched and discovered metadata for Time To Live in days before these environments are destroyed (which would cause considerable delay for my team). Wrote a python script to periodically check this value and provide an alert when expiration was near.

"Nick, some of the code our team's developers check into a legacy monolithic code base along with the rest of the enterprise. Sometimes their code is delayed in CI due to a build error and we are not alerted. Can you keep an eye on their specific build jobs and personally ensure their code is merged to master?"

solution:

Researched some endpoints in gerrit and discovered I could use the employees ID number or Name and query each of the git repos to be alerted of their checkins.

"Nick, for our federated cloud environments owned by the RE team, can you deploy the artifacts in the evening after all our team's developers have checked in their code for the day so that the environments are ready in the morning for showcase in our morning standup meetings?"

solution:

The RE team provides a multi-page web portal as a front end for uDeploy and would not share access. I worked with one of their RE contacts and he enabled an API for deployments and here is a pyhon script I used with a json payload to start a deployment in their environments.

"Nick, is there a way you can notify us in Skype when X is complete?"

solution:

python messaging wrapper can be called from any of my script to send messages to the team's chatroom.

"Nick, we need you to trigger a jenkins build at a certain time each night. We don't have administration rights on this jenkins job."

solution:

Without administrator access to the jenkins job we are unable to use the 'build periodically' cron format job scheduling. Scheduled a this python script as a scheduled cron job to kick off a particular jenkins build.

"Nick, sometimes after a certain deployment the version is not updated. Is there a way you can validate the deployment was successful before notifying QA the build is ready for testing"

solution:

python script that uses credentials in the http headers and returns the artifact details.

"Nick, we have added a customer survey to our public website and we'd like to have the results of their survey delivered to us in email. We are using agile and LEAN and we are bypassing waiting on the database team adding a new table to the db schema and instead sharing an existing table with another team. All the data is concatenated into just one database field using a special deliminator. We need this db dump filtered to remove erroneous data and reformatted to a readable format and delivered to use via email. This is agile with LEAN so this needs to be done ASAP"

solution:

Here's a portion of the process were I massage the database dump using a pythong script

Single post: Blog_Single_Post_Widget
bottom of page