diff --git a/environments/_template b/environments/_template
new file mode 100644
index 0000000..937bf7d
--- /dev/null
+++ b/environments/_template
@@ -0,0 +1,100 @@
+#!/bin/bash
+# FS QA Environment setup
+#-----------------------------------------------------------------------
+# Copyright 2014 (C) Red Hat, Inc., Jan Tulak <jtulak@redhat.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+#
+# arguments: prepare-once, prepare-always, clean
+
+
+THIS_ENVIRONMENT="$(basename $BASH_SOURCE)"
+
+
+# This function should prepare the environment
+prepare()
+{
+	target="$1"
+	echo "ENV ---- Really preparing test directory '$target'."
+}
+
+# This function should clean files created by prepare()
+clean()
+{
+	target="$1"
+	echo "ENV ---- cleaning '$target'"
+}
+
+
+
+
+# ----------------------------------------------------------------------
+# The following code usually don't need any changes for your environment
+# ----------------------------------------------------------------------
+
+prepare_once()
+{
+	target="$1"
+	# check if this environment is already created (was the last one
+	# running)
+	if [ "$env_last" != "$THIS_ENVIRONMENT" ];then
+		echo "ENV ---- There was some other environment, so lets do something in $target. ($THIS_ENVIRONMENT)"
+		prepare "$target"
+	else
+		echo "ENV ---- Stop there, I'm already prepared! ($THIS_ENVIRONMENT)"
+	fi
+
+}
+
+prepare_always()
+{
+	target="$1"
+	# We still need to check the previous environment,
+	# because if it is the same as now, it wasn't cleaned yet!
+	if [ "$env_last" = "$THIS_ENVIRONMENT" ];then
+		echo "ENV ---- I'm preparing again... but I need to clean!"
+		clean "$target"
+	else
+		echo "ENV ---- I'm preparing 'again'... but I wasn't run yet."
+	fi
+	prepare "$target"
+}
+
+usage()
+{
+echo "Usage: 
+$0 OPTION TARGET_DIR
+Where OPTION is one (and only one) of the following:
+    prepare-once, prepare-always, clean"
+}
+
+# arguments...
+if [ $# -ne 2 ];then
+	usage
+#	exit 1
+fi
+
+while [ $# -gt 0 ]; do
+	case "$1" in
+		prepare-once) prepare_once "$2"; shift ;;
+		prepare-always) prepare_always "$2"; shift ;;
+		clean) unset ENVIRONMENT_LAST; clean "$2"; shift ;;
+		*) usage ; exit 1 ;;
+	esac
+	shift
+done
+
+exit 0
diff --git a/environments/dummy1 b/environments/dummy1
new file mode 100644
index 0000000..de6dcf0
--- /dev/null
+++ b/environments/dummy1
@@ -0,0 +1,99 @@
+#!/bin/bash
+# FS QA Environment setup - a dummy file, does nothing
+#-----------------------------------------------------------------------
+# Copyright 2014 (C) Red Hat, Inc., Jan Tulak <jtulak@redhat.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+#
+# arguments: prepare-once, prepare-always, clean
+
+THIS_ENVIRONMENT="$(basename $BASH_SOURCE)"
+
+
+# This function should prepare the environment
+prepare()
+{
+	target="$1"
+#	echo "ENV ---- Really preparing test directory '$target'."
+}
+
+# This function should clean files created by prepare()
+clean()
+{
+	target="$1"
+#	echo "ENV ---- cleaning '$target'"
+}
+
+
+
+
+# ----------------------------------------------------------------------
+# The following code usually don't need any changes for your environment
+# ----------------------------------------------------------------------
+
+prepare_once()
+{
+	target="$1"
+	# check if this environment is already created (was the last one
+	# running)
+	if [ "$env_last" != "$THIS_ENVIRONMENT" ];then
+#		echo "ENV ---- There was some other environment, so lets do something in $target. ($THIS_ENVIRONMENT)"
+		prepare "$target"
+#	else
+#		echo "ENV ---- Stop there, I'm already prepared! ($THIS_ENVIRONMENT)"
+	fi
+
+}
+
+prepare_always()
+{
+	target="$1"
+	# We still need to check the previous environment,
+	# because if it is the same as now, it wasn't cleaned yet!
+	if [ "$env_last" = "$THIS_ENVIRONMENT" ];then
+#		echo "ENV ---- I'm preparing again... but I need to clean!"
+		clean "$target"
+#	else
+#		echo "ENV ---- I'm preparing 'again'... but I wasn't run yet."
+	fi
+	prepare "$target"
+}
+
+usage()
+{
+echo "Usage: 
+$0 OPTION TARGET_DIR
+Where OPTION is one (and only one) of the following:
+    prepare-once, prepare-always, clean"
+}
+
+# arguments...
+if [ $# -ne 2 ];then
+	usage
+#	exit 1
+fi
+
+while [ $# -gt 0 ]; do
+	case "$1" in
+		prepare-once) prepare_once "$2"; shift ;;
+		prepare-always) prepare_always "$2"; shift ;;
+		clean) unset ENVIRONMENT_LAST; clean "$2"; shift ;;
+		*) usage ; exit 1 ;;
+	esac
+	shift
+done
+
+exit 0
diff --git a/environments/dummy2 b/environments/dummy2
new file mode 100644
index 0000000..de6dcf0
--- /dev/null
+++ b/environments/dummy2
@@ -0,0 +1,99 @@
+#!/bin/bash
+# FS QA Environment setup - a dummy file, does nothing
+#-----------------------------------------------------------------------
+# Copyright 2014 (C) Red Hat, Inc., Jan Tulak <jtulak@redhat.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+#
+# arguments: prepare-once, prepare-always, clean
+
+THIS_ENVIRONMENT="$(basename $BASH_SOURCE)"
+
+
+# This function should prepare the environment
+prepare()
+{
+	target="$1"
+#	echo "ENV ---- Really preparing test directory '$target'."
+}
+
+# This function should clean files created by prepare()
+clean()
+{
+	target="$1"
+#	echo "ENV ---- cleaning '$target'"
+}
+
+
+
+
+# ----------------------------------------------------------------------
+# The following code usually don't need any changes for your environment
+# ----------------------------------------------------------------------
+
+prepare_once()
+{
+	target="$1"
+	# check if this environment is already created (was the last one
+	# running)
+	if [ "$env_last" != "$THIS_ENVIRONMENT" ];then
+#		echo "ENV ---- There was some other environment, so lets do something in $target. ($THIS_ENVIRONMENT)"
+		prepare "$target"
+#	else
+#		echo "ENV ---- Stop there, I'm already prepared! ($THIS_ENVIRONMENT)"
+	fi
+
+}
+
+prepare_always()
+{
+	target="$1"
+	# We still need to check the previous environment,
+	# because if it is the same as now, it wasn't cleaned yet!
+	if [ "$env_last" = "$THIS_ENVIRONMENT" ];then
+#		echo "ENV ---- I'm preparing again... but I need to clean!"
+		clean "$target"
+#	else
+#		echo "ENV ---- I'm preparing 'again'... but I wasn't run yet."
+	fi
+	prepare "$target"
+}
+
+usage()
+{
+echo "Usage: 
+$0 OPTION TARGET_DIR
+Where OPTION is one (and only one) of the following:
+    prepare-once, prepare-always, clean"
+}
+
+# arguments...
+if [ $# -ne 2 ];then
+	usage
+#	exit 1
+fi
+
+while [ $# -gt 0 ]; do
+	case "$1" in
+		prepare-once) prepare_once "$2"; shift ;;
+		prepare-always) prepare_always "$2"; shift ;;
+		clean) unset ENVIRONMENT_LAST; clean "$2"; shift ;;
+		*) usage ; exit 1 ;;
+	esac
+	shift
+done
+
+exit 0
diff --git a/environments/fill90-dvd b/environments/fill90-dvd
new file mode 100644
index 0000000..cc3286f
--- /dev/null
+++ b/environments/fill90-dvd
@@ -0,0 +1,115 @@
+#!/bin/bash
+# FS QA Environment setup
+# This environment fills the target device from 90 percents 
+# with dvd-sized files.
+#-----------------------------------------------------------------------
+# Copyright 2014 (C) Red Hat, Inc., Jan Tulak <jtulak@redhat.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#-----------------------------------------------------------------------
+#
+# arguments: prepare-once, prepare-always, clean
+
+
+THIS_ENVIRONMENT="$(basename $BASH_SOURCE)"
+
+files_prefix="env_dummy_"
+# maximum size of a file in kiB
+file_size=4194304 # 4 GiB
+
+# This function should prepare the environment
+prepare()
+{
+	target="$1"
+
+	available=$(df -P "$target"|tail -n1 |awk '{print $4}')
+	available=$(printf "%.0f" $(echo "$available*0.9"|bc )) # get 90 percent size
+
+	full_files=$((available / file_size)) # number of full-size files
+	last_file=$((available - (full_files * file_size) ))
+
+	for i in $(seq $full_files );do
+		f="$target/$files_prefix$i"
+		dd if=/dev/zero of="$f" count=$file_size bs=1024 &>/dev/null
+	done	
+
+	# last file to fill size smaller than $file_size
+	f="$target/$files_prefix""0"
+	dd if=/dev/zero of="$f" count=$last_file bs=1024 &>/dev/null
+}
+
+# This function should clean files created by prepare()
+clean()
+{
+	target="$1"
+	for f in $(ls "$target"|grep -E "^$files_prefix");do
+		rm "$target/$f"
+	done
+}
+
+
+
+
+# ----------------------------------------------------------------------
+# The following code usually don't need any changes for your environment
+# ----------------------------------------------------------------------
+
+prepare_once()
+{
+	target="$1"
+	# check if this environment is already created (was the last one
+	# running)
+	if [ "$env_last" != "$THIS_ENVIRONMENT" ];then
+		prepare "$target"
+	fi
+
+}
+
+prepare_always()
+{
+	target="$1"
+	# We still need to check the previous environment,
+	# because if it is the same as now, it wasn't cleaned yet!
+	if [ "$env_last" = "$THIS_ENVIRONMENT" ];then
+		clean "$target"
+	fi
+	prepare "$target"
+}
+
+usage()
+{
+echo "Usage: 
+$0 OPTION TARGET_DIR
+Where OPTION is one (and only one) of the following:
+    prepare-once, prepare-always, clean"
+}
+
+# arguments...
+if [ $# -ne 2 ];then
+	usage
+#	exit 1
+fi
+
+while [ $# -gt 0 ]; do
+	case "$1" in
+		prepare-once) prepare_once "$2"; shift ;;
+		prepare-always) prepare_always "$2"; shift ;;
+		clean) unset ENVIRONMENT_LAST; clean "$2"; shift ;;
+		*) usage ; exit 1 ;;
+	esac
+	shift
+done
+
+exit 0
