HowTo: Upgrade Salt-Minions and Don’t Lose Them

If you try to upgrade salt-minions from the salt-master, in most cases salt-master would probably lose access to the minions.

If the access is lost, you would have to log in to each host and restart the salt-minion service manually to make it communicate back with the salt-master.

This problem is caused by the salt-minion service that often doesn’t restart after update. (more…)

Salt – Download a File With Unknown Source_Hash

In salt, there is a useful file.managed state that can download files over HTTP/HTTPS and save them on the target system.

Unfortunately for the moment it is not possible to download a file using salt in an normal way without knowing the file’s hash.

If you try to download a file using salt state without source_hash, salt will fail with “Unable to determine upstream hash of source file” error. (more…)

Git – The Basic Workflow

Git is a version control system (VCS) that allows to keep track of the changes made to a project over time.

Git records the changes you make to a project, stores those changes and then allows you to reference them as needed.

From the following article you will learn what does the basic Git workflow consist of and the simple Git commands for everyday use. (more…)

mod_wsgi – Find Out The Version

The mod_wsgi is an Apache module that provides a WSGI compliant interface and serves for hosting Python based web applications under Apache (for example Django).

To find out which version of mod_wsgi is installed or compiled, it is required to create a simple WSGI application.

From the following article you will learn how to create and run on Apache a simple WSGI application that prints the version of mod_wsgi. (more…)

Apache Modules – List All Enabled (Loaded)

Apache has a lot of modules (or “mods”) that extend its core functionality for special purposes.

How to list installed Apache modules – is a common question as it is very often required to check which Apache modules are loaded/enabled.

List of installed Apache modules can be found using special option for httpd/apachectl (CentOS, RHEL etc.) or apache2/apache2ctl (Ubuntu, Debian etc.) commands. (more…)

Git – Undo All Uncommitted Changes

Lets say you have been working on a project that is tracked by Git and suddenly realized that you did something wrong.

You have some not yet committed changes and you want to undo everything.

In particular you want to delete all newly created files and folders and restore all modified or deleted.

In short you need to revert all changes back to the last commit. (more…)