by Farhaan Bukhsh (@fhackdroid) on Wednesday, 30 August 2017

+4
Vote on this proposal
Status: Submitted
Technical level
Intermediate

Abstract

This talk is more on the lines on how can Python help you to be a better System Administrator. This is more of a personal experience in which python has helped me to better understand the system and manage system resources. Python has also helped in scaling infrastructure and how people use it in the SysAdmin Land.

Outline

Introduction

This talk is more on the lines on how can Python help you to be a better System Administrator. This is more of a personal experience in which python has helped me to better understand the system and manage system resources. Python has also helped in scaling infrastructure and how people use it in the SysAdmin Land.

What will the audience get ?

The audience get an insight about how can basic python help them to manage their infrastructure. This talk can help audience to know about certain python tools and moreover how can they write better tools to simplify System Administration.

This talk might also help them to automate few of the monotonous task.

Topics of the talk

  • Usage of our old friend ‘os’
  • Introduction to Fabric
  • Use cases of Fabric
  • Introduction to Salt
  • Usage of Salt
  • Understanding Psutils
  • Use cases of Psutils
  • Managing container
  • Use case of docker

import os

OS is an inbuilt module which is use to interface with the underlying operating system and can be use to automate some trivial jobs.

Fabric

Fabric is an advance tool for system administration and it use to manage server, setting environment variable etc.

It provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution.

Use case of Fabric

Salt

Salt is an open source infrastructure management tool. It supports remote command execution from a central point (master host) to multiple hosts (minions). It also supports system states which can be used to configure multiple servers using simple template files.

Use case of Salt

Psutils

psutil (python system and process utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) in Python. It is useful mainly for system monitoring, profiling, limiting process resources and the management of running processes. It implements many functionalities offered by command line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap.

Usage of Psutils

Managing containers

A lot of us write containerized application, Here the focus is on Docker, Docker extensively to write applications and using container on machine to provide sandbox environment. How python can be use to get info about the spawned container, spawn a container, stop the container.

Usage of python with docker

Requirements

This talk requires the audience to know:

  • Python
  • Basics of System Administration or at least have an idea of it

Speaker bio

My name is Farhaan Bukhsh, I am a Foss enthusiast and a I contribute to Pagure under Fedora. I graduated this year and started working as a Product Engineer with jnaapti. I have been volunteering for organisations like FSMK and Mozilla. I am a part of DGPLUG too. I have been volunteering at Pycon since 2014.

Blog: https://farhaanbukhsh.wordpress.com/

Twitter: https://twitter.com/fhackdroid

Github: https://github.com/farhaanbukhsh

Linkedin: https://www.linkedin.com/in/farhaanbukhsh/

Pagure Contribution: https://github.com/pypingou/pagure/graphs/contributors

Comments

  • 1
    [-] Kushal Das (@kushaldas) Reviewer a month ago

    Thank you for submitting the talk to PyCon Pune. The talk selection team will contact you here in case of any queries. Meanwhile, please make sure that you provide a link to the presentation slides.

Login with Twitter or Google to leave a comment