From 3251a62cdb270714c6b25286e77c7e48f3a43e5e Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos <skalkoto@grnet.gr> Date: Tue, 19 Jun 2012 17:54:51 +0300 Subject: [PATCH] Add help subpackage This dir will host help files used by snf-image-create-dialog --- MANIFEST.in | 1 + image_creator/help/__init__.py | 41 ++++++++++++++++ image_creator/help/configuration_tasks.rst | 54 ++++++++++++++++++++++ setup.py | 6 +-- 4 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 MANIFEST.in create mode 100644 image_creator/help/__init__.py create mode 100644 image_creator/help/configuration_tasks.rst diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f6a1e70 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include image_creator/help/*.rst diff --git a/image_creator/help/__init__.py b/image_creator/help/__init__.py new file mode 100644 index 0000000..7ec191e --- /dev/null +++ b/image_creator/help/__init__.py @@ -0,0 +1,41 @@ +# Copyright 2012 GRNET S.A. All rights reserved. +# +# Redistribution and use in source and binary forms, with or +# without modification, are permitted provided that the following +# conditions are met: +# +# 1. Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# 2. Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and +# documentation are those of the authors and should not be +# interpreted as representing official policies, either expressed +# or implied, of GRNET S.A. + +import sys +import os + +def get_help_file(name): + dirname = os.path.dirname(sys.modules[__name__].__file__) + return "%s%s%s.rst" % (dirname, os.sep, name) + +# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : diff --git a/image_creator/help/configuration_tasks.rst b/image_creator/help/configuration_tasks.rst new file mode 100644 index 0000000..cc489e9 --- /dev/null +++ b/image_creator/help/configuration_tasks.rst @@ -0,0 +1,54 @@ +Configuration tasks performed during deployment +=============================================== + +Partition Table manipulation +---------------------------- +During image deployment the last partiton is enlarged to use all +the available disk space. If SWAP property is present an extra +swap partition is also added. + +File system Resize +------------------ +This task enlarges the file system of the last partition to use +all the available partition space. + +Swap partition configuration +---------------------------- +If swap partition is added during the image deployment, the swap +partition is formated and a swap entry is added to the instance's +fstab. + +SSH keys removal +---------------- +All SSH keys found in the image are removed. For debian instance, +where the key creation is not perfored automatically, the keys +are recreated by this task. + +Tempory disable Remote Desktop (RDP) connections +------------------------------------------------ +RDP connections are temporarily disabled during windows +configuration. This is done because when sysprep runs, there is a +small time interval where the new password is not applied yet and +allowing RDP connections raises security conserns. + +Perform SELinux file system relabeling +-------------------------------------- +For redhat-based images, since the instance's disk is modified +during during deployment, a full SELinux file system relabeling +needs to be performed. This tasks triggeres a full file system +relabel at the next boot. + +Hostname or Computer name assignment +------------------------------------ +The instance name is assigned as hostname (or Computer Name for +Windows instances). + +Change password +--------------- +This task will change the password for the users specified by +the USERS property. + +File Injection +-------------- +The files specified by the PERSONALITY image property are +injected into the instances hard disk. diff --git a/setup.py b/setup.py index 05ddcec..acb075b 100755 --- a/setup.py +++ b/setup.py @@ -35,8 +35,7 @@ import image_creator -from setuptools import setup - +from setuptools import setup, find_packages setup( name='snf_image_creator', @@ -45,8 +44,7 @@ setup( # long_description=open('README.rst').read(), url='https://code.grnet.gr/projects/snf-image-creator', license='BSD', - packages=['image_creator', 'image_creator.os_type', - 'image_creator.output'], + packages = find_packages(), include_package_data=True, install_requires=['pbs', 'ansicolors', 'progress', 'pysendfile'], entry_points={ -- GitLab