Commit 907c106c authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Merge remote branch 'origin/feature-burnin' into develop

parents 74ee7606 9db219a9
Changelog
---------
snf-tools (0.13.0)
v0.10.0
*******
* Adopt package
* Add more tests for Images
- Download image from pithos+
- Upload and register image
* Add tests for Pithos+
- Test container list actually returns containers
- Test if containers have unique names
- Create e new container
- Upload something to pithos+
- Download something from pithos+
- Remove files/containers from pithos+
* Add two (mandatory) flags
- `--pithos' for specifing pithos url
- `--pithos_user' for specifing pithos account name
* Initial snf-tools release
-- Ilias Tsitsimpis <iliastsi@grnet.gr> Tue, 29 Jan 2013
snf-tools (0.10.0)
* Initial snf-tools release
......@@ -16,7 +16,8 @@ Usage
Example:
--------
snf-burnin --api=API_URL --token=TOKEN --image-id=IMAGE-ID --log-folder=LOG_FOLDER
snf-burnin --api=API_URL --token=TOKEN \
--image-id=IMAGE-ID --log-folder=LOG_FOLDER
For more options:
......@@ -27,7 +28,10 @@ snf-burnin --help
Log files
==========
In each run, snf-burnin stores log files in the folder defined in the --log-folder parameter (default is /var/log/burnin) under the folder with the timestamp of the snf-burnin-run and the image used for it. The name prefixes of the log files are:
In each run, snf-burnin stores log files in the folder defined in the
--log-folder parameter (default is /var/log/burnin) under the folder
with the timestamp of the snf-burnin-run and the image used for it.
The name prefixes of the log files are:
- details: Showing the complete log of snf-burnin run.
- error: Showing the testcases that encountered a runtime error.
......@@ -36,12 +40,17 @@ In each run, snf-burnin stores log files in the folder defined in the --log-fold
Example scripts
-----------------
Under /snf-tools/conf/ you can find example scripts for automating snf-burnin testing using cron.
Under /snf-tools/conf/ you can find example scripts for automating
snf-burnin testing using cron.
- **snf-burnin-run.sh** runs snf-burnin with the given parameters, deletes stale instances (servers, networks) from old runs and delete logs older than a week. It aborts if snf-burnin runs for longer than expected.
- **snf-burnin-run.sh** runs snf-burnin with the given parameters, deletes
stale instances (servers, networks) from old runs and delete logs older than
a week. It aborts if snf-burnin runs for longer than expected.
- **Usage**: ./snf-burnin-run.sh TOKEN IMAGE-ID LOG_FOLDER
- **snf-burnin-output.sh** checks for failed snf-burnin tests the last 30 minutes in a given log folder. Exit status is 0 if no failures where encountered, else exit status is 1.
- **snf-burnin-output.sh** checks for failed snf-burnin tests the last 30
minutes in a given log folder. Exit status is 0 if no failures where
encountered, else exit status is 1.
- **Usage**: ./snf-burnin-output.sh LOG_FOLDER
\ No newline at end of file
- **Usage**: ./snf-burnin-output.sh LOG_FOLDER
#! /bin/bash
#!/bin/bash
#Example script for an snf-burnin cronjob.
#Starts an a snf-burnin test, deletes stale instances and archives old logs.
#It aborts if snf-burnin runs for longer than expected.
#Usage: ./snf-burnin-run.sh TOKEN IMAGE-ID LOG-FOLDER
#Usage: ./snf-burnin-run.sh
timeout --foreground 25m snf-burnin --token="$1" --image-id="$2" --action-timeout 120 --log-folder "$3"
snf-burnin --token="$1" --delete-stale
API=""
PLANKTON=""
PLANKTON_USER=""
TOKEN=""
IMAGEID=""
OUTPUT=""
# Delete previously stalled objects.
snf-burnin --api=$API --token=$TOKEN --delete-stale
# Run burnin for 25 minutes. Fail after that.
timeout --foreground 25m \
snf-burnin --api=$API \
--plankton=$PLANKTON \
--plankton-user=$PLANKTON_USER \
--token=$TOKEN \
--image-id=$IMAGEID \
--action-timeout 120 \
--log-folder=$OUTPUT \
--nofailfast
# Delete possibly stalled objects.
snf-burnin --api=$API --token=$TOKEN --delete-stale
#Delete old folders
old=$(date -d "1 week ago" +%Y%m%d%H%M%S)
for dir in ${3}/* ; do
for dir in $OUTPUT/* ; do
d=`basename $dir`
(($d<$old)) && rm -r "$dir"
done
#!/usr/bin/env python
#
# Copyright 2011 GRNET S.A. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
......@@ -37,8 +39,8 @@ distribute_setup.use_setuptools()
import os
from distutils.util import convert_path
from fnmatch import fnmatchcase
#from distutils.util import convert_path
#from fnmatch import fnmatchcase
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
......@@ -65,37 +67,37 @@ PACKAGES = find_packages(PACKAGES_ROOT)
CLASSIFIERS = []
# Package requirements
INSTALL_REQUIRES = ["fabric","IPy","unittest2", "python-prctl", "paramiko", "vncauthproxy", "kamaki"]
INSTALL_REQUIRES = [
"IPy",
"unittest2",
"python-prctl",
"paramiko",
"vncauthproxy",
"kamaki >= 0.6.2"]
setup(
name = 'snf-tools',
version = VERSION,
license = 'BSD',
url = 'http://code.grnet.gr/',
description = SHORT_DESCRIPTION,
long_description=README + '\n\n' + CHANGES,
classifiers = CLASSIFIERS,
author = 'Package author',
author_email = 'author@grnet.gr',
maintainer = 'Package maintainer',
maintainer_email = 'maintainer@grnet.gr',
packages = PACKAGES,
package_dir= {'': PACKAGES_ROOT},
include_package_data = True,
zip_safe = False,
install_requires = INSTALL_REQUIRES,
dependency_links = ['http://docs.dev.grnet.gr/pypi'],
entry_points = {
'console_scripts': [
'snf-burnin = synnefo_tools.burnin:main',
],
}
name='snf-tools',
version=VERSION,
license='BSD',
url='http://code.grnet.gr/',
description=SHORT_DESCRIPTION,
long_description=README + '\n\n' + CHANGES,
classifiers=CLASSIFIERS,
author='Package author',
author_email='author@grnet.gr',
maintainer='Package maintainer',
maintainer_email='maintainer@grnet.gr',
packages=PACKAGES,
package_dir={'': PACKAGES_ROOT},
include_package_data=True,
zip_safe=False,
install_requires=INSTALL_REQUIRES,
dependency_links=['http://docs.dev.grnet.gr/pypi'],
entry_points={
'console_scripts': ['snf-burnin = synnefo_tools.burnin:main']}
)
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment