Monthly Archives: January 2014

Fabric API

Fabric is made up of Core API + Contrib API. Operations is part of the core api: local – Run a command on the local system. run – Run a shell command on a remote host. sudo – Run a

Posted in Fabric, Python

Fabric (SSH & passwords)

Option 1 – provide password with -p flag fab -H hostname -p password123 … Downside: password will show up in process listing Downside: password will show up in command history Option 2 – get prompted for password fab -I Initial

Posted in Fabric, Linux, Python, Security

Users & Groups

Create User (usermod): Note: useradd cannot be used to modify an existing user useradd <username>  -c comment, any text, usually user’s name  -d home-directory  -g primary group; must exist, if not specified a default group is created  -G group-list (secondary;

Posted in Linux

Jenkins

Settings: JENKINS_HOME – set to ~/.jenkins by default Jenkins Workspace – set to /var/lib/jenkins/workspace Distributed Builds: master – Jenkins installation that serves HTTP requests, build projects, and distributes load to slaves slaves – nodes that build projects for the master,

Tagged with:
Posted in Java

Zip commands

zip files zip <archive.zip> <files-to-compress> — unzip archive.zip unzip archive.zip <file.jpg> -t test file -l list files from archive -j do not make directories tar files tar xvf archive.tar Z (compressed) files tar -xZf archive.tar.gz tar -C /tmp/test archive.tar.gz #extra

Tagged with:
Posted in Linux

Installing Fabric

Linux Installing fabric on LInux/Unix machine is quite simple: apt-get install fabric or aptitude install fabric Windows On windows the process is a bit more complex, see: https://fabric.readthedocs.org/en/1.8/installation.html The installation page mentions the dependencies that are required, however there are

Tagged with: ,
Posted in Fabric, Python

Python package managers

We have the following options: setuptools (easy_install) installed using pythong script: “python ez_setup.py” can install binary files easy_install <module> pip easy_install pip wrapper around easy_install provides uninstallation of modules leaves failed installations in clean state can’t install binaries pip install

Tagged with:
Posted in Python