Make snf-image-creator be the dialog-based program and snf-mkimage be
the command line one.
synnefo.
It comes in 2 variants:
synnefo.
It comes in 2 variants:
- * snf-image-creator: A non-interactive command line program
- * snf-mkimage: A user-friendly dialog-based program
+ * snf-image-creator: A user-friendly dialog-based program
+ * snf-mkimage: A non-interactive command line program
# (source start file, name, description, authors, manual section).
man_pages = [
('man/snf-image-creator', 'snf-image-creator',
# (source start file, name, description, authors, manual section).
man_pages = [
('man/snf-image-creator', 'snf-image-creator',
- 'Command line image creator for Synnefo',
+ 'Dialog-based image creator for Synnefo',
'Synnefo development team <synnefo-devel@googlegroups.com>', 1),
('man/snf-mkimage', 'snf-mkimage',
'Synnefo development team <synnefo-devel@googlegroups.com>', 1),
('man/snf-mkimage', 'snf-mkimage',
- 'Dialog-based image creator for Synnefo',
+ 'Command line image creator for Synnefo',
'Synnefo development team <synnefo-devel@googlegroups.com>', 1)
]
'Synnefo development team <synnefo-devel@googlegroups.com>', 1)
]
:orphan:
snf-image-creator manual page
:orphan:
snf-image-creator manual page
-=============================
-**snf-image-creator** [OPTION] <INPUT MEDIA>
+**snf-image-creator** [OPTION] [<INPUT MEDIA>]
Description
-----------
Create image out of an <INPUT MEDIA>. The <INPUT MEDIA> may be a block device,
a regular file that represents a hard disk or \`/' to bundle the host system
Description
-----------
Create image out of an <INPUT MEDIA>. The <INPUT MEDIA> may be a block device,
a regular file that represents a hard disk or \`/' to bundle the host system
+itself. If the <INPUT MEDIA> argument is missing, the user will be asked during
+the program initializaton to specify one.
--a URL, --authentication-url=URL
- use this authentication URL when uploading/registering images
-
--c CLOUD, --cloud=CLOUD
- use this saved cloud account to authenticate against a cloud when
- uploading/registering images
-
---disable-sysprep=SYSPREP
- prevent SYSPREP operation from running on the input media
-
---enable-sysprep=SYSPREP
- run SYSPREP operation on the input media
-
--f, --force
- overwrite output files if they exist
-
+--version
+ show program's version number and exit
-h, --help
show this help message and exit
-h, --help
show this help message and exit
-
--m KEY=VALUE, --metadata=KEY=VALUE
- add custom KEY=VALUE metadata to the image
-
---no-shrink
- don't shrink any partition
-
---no-sysprep
- don't perform any system preparation operation
-
--o FILE, --outfile=FILE
- dump image to FILE
-
---public
- register image with the storage service as public
-
---print-sysprep
- print the enabled and disabled system preparation operations for this
- input media
-
--r IMAGENAME, --register=IMAGENAME
- register the image with the compute service with name IMAGENAME
-
--s, --silent
- output only errors
-
--t TOKEN, --token=TOKEN
- use this token when uploading/registering images
-
+-l FILE, --logfile=FILE
+ log all messages to FILE
--tmpdir=DIR
create large temporary image files under DIR
--tmpdir=DIR
create large temporary image files under DIR
-
--u FILENAME, --upload=FILENAME
- save the image to the storage service with remote name FILENAME
-
---version
- show program's version number and exit
-
:orphan:
snf-mkimage manual page
:orphan:
snf-mkimage manual page
+=============================
-**snf-mkimage** [OPTION] [<INPUT MEDIA>]
+**snf-mkimage** [OPTION] <INPUT MEDIA>
Description
-----------
Create image out of an <INPUT MEDIA>. The <INPUT MEDIA> may be a block device,
a regular file that represents a hard disk or \`/' to bundle the host system
Description
-----------
Create image out of an <INPUT MEDIA>. The <INPUT MEDIA> may be a block device,
a regular file that represents a hard disk or \`/' to bundle the host system
-itself. If the <INPUT MEDIA> argument is missing, the user will be asked during
-the program initializaton to specify one.
---version
- show program's version number and exit
+-a URL, --authentication-url=URL
+ use this authentication URL when uploading/registering images
+
+-c CLOUD, --cloud=CLOUD
+ use this saved cloud account to authenticate against a cloud when
+ uploading/registering images
+
+--disable-sysprep=SYSPREP
+ prevent SYSPREP operation from running on the input media
+
+--enable-sysprep=SYSPREP
+ run SYSPREP operation on the input media
+
+-f, --force
+ overwrite output files if they exist
+
-h, --help
show this help message and exit
-h, --help
show this help message and exit
--l FILE, --logfile=FILE
- log all messages to FILE
+
+-m KEY=VALUE, --metadata=KEY=VALUE
+ add custom KEY=VALUE metadata to the image
+
+--no-shrink
+ don't shrink any partition
+
+--no-sysprep
+ don't perform any system preparation operation
+
+-o FILE, --outfile=FILE
+ dump image to FILE
+
+--public
+ register image with the storage service as public
+
+--print-syspreps
+ print the enabled and disabled system preparation operations for this
+ input media
+
+-r IMAGENAME, --register=IMAGENAME
+ register the image with the compute service with name IMAGENAME
+
+-s, --silent
+ output only errors
+
+-t TOKEN, --token=TOKEN
+ use this token when uploading/registering images
+
--tmpdir=DIR
create large temporary image files under DIR
--tmpdir=DIR
create large temporary image files under DIR
+
+-u FILENAME, --upload=FILENAME
+ save the image to the storage service with remote name FILENAME
+
+--version
+ show program's version number and exit
+
snf-image-creator comes in 2 variants:
snf-image-creator comes in 2 variants:
- * snf-image-creator: A non-interactive command line program
- * snf-mkimage: A user-friendly dialog-based program
+ * snf-mkimage: A non-interactive command line program
+ * snf-image-creator: A user-friendly dialog-based program
Both expect the input media as first argument. The input media may be a local
file, a block device or *"/"* if you want to create an image out of the running
Both expect the input media as first argument. The input media may be a local
file, a block device or *"/"* if you want to create an image out of the running
Non-interactive version
=======================
Non-interactive version
=======================
-snf-image-creator receives the following options:
+snf-mkimage receives the following options:
- $ snf-image-creator --help
- Usage: snf-image-creator [options] <input_media>
+ $ snf-mkimage --help
+ Usage: snf-mkimage [options] <input_media>
Options:
--version show program's version number and exit
Options:
--version show program's version number and exit
VM's out of it. If you want the image to be visible by other user too, use the
*--public* option.
VM's out of it. If you want the image to be visible by other user too, use the
*--public* option.
-By default, before extracting the image, snf-image-creator will perform a
+By default, before extracting the image, snf-mkimage will perform a
number of system preparation operations on the snapshot of the media and will
shrink the last partition found. Both actions can be disabled by specifying
*--no-sysprep* and *--no-shrink* respectively.
number of system preparation operations on the snapshot of the media and will
shrink the last partition found. Both actions can be disabled by specifying
*--no-sysprep* and *--no-shrink* respectively.
*-{enable,disable}-sysprep* options. The user may specify those options
multiple times.
*-{enable,disable}-sysprep* options. The user may specify those options
multiple times.
-Running *snf-image-creator* with *--print-sysprep* on a raw file that hosts a
+Running *snf-mkimage* with *--print-sysprep* on a raw file that hosts a
debian system, we print the following output:
.. _sysprep:
.. code-block:: console
debian system, we print the following output:
.. _sysprep:
.. code-block:: console
- $ snf-image-creator --print-sysprep ubuntu.raw
- snf-image-creator 0.3
+ $ snf-mkimage --print-syspreps ubuntu.raw
+ snf-image-creator 0.6
=====================
Examining source media `ubuntu_hd.raw' ... looks like an image file
Snapshotting media source ... done
=====================
Examining source media `ubuntu_hd.raw' ... looks like an image file
Snapshotting media source ... done
- $ snf-image-creator --enable-sysprep cleanup-mail --enable-sysprep remove-user-accounts ...
+ $ snf-mkimage --enable-sysprep cleanup-mail --enable-sysprep remove-user-accounts ...
Dialog-based version
====================
Dialog-based version
====================
-*snf-mkimage* receives the following options:
+*snf-image-creator* receives the following options:
- $ snf-mkimage --help
- Usage: snf-mkimage [options] [<input_media>]
+ $ snf-image-creator --help
+ Usage: snf-image-creator [options] [<input_media>]
Options:
--version show program's version number and exit
Options:
--version show program's version number and exit
`Host bundling operation`_).
After the input media is examined and the program is initialized, the user will
`Host bundling operation`_).
After the input media is examined and the program is initialized, the user will
-be given the choice to run *snf-mkimage* in *wizard* or *expert* mode.
+be given the choice to run *snf-image-creator* in *wizard* or *expert* mode.
-When *snf-mkimage* runs in *wizard* mode, the user is just asked to provide the
+When *snf-image-creator* runs in *wizard* mode, the user is just asked to provide the
following basic information:
* Cloud: The cloud account to use to upload and register the resulting image
following basic information:
* Cloud: The cloud account to use to upload and register the resulting image
$ sudo kvm -m 1G -boot c -drive file=ubuntu.raw,format=raw,cache=none,if=virtio
$ sudo kvm -m 1G -boot c -drive file=ubuntu.raw,format=raw,cache=none,if=virtio
-After you're done, you may use *snf-mkimage* as root to create and upload the
+After you're done, you may use *snf-image-creator* as root to create and upload the
image:
.. code-block:: console
$ sudo -s
image:
.. code-block:: console
$ sudo -s
- $ snf-mkimage ubuntu.raw
+ $ snf-image-creator ubuntu.raw
In the first screen you will be asked to choose if you want to run the program
in *Wizard* or *Expert* mode. Choose *Wizard*.
In the first screen you will be asked to choose if you want to run the program
in *Wizard* or *Expert* mode. Choose *Wizard*.
sys.exit(ret)
except FatalError as e:
colored = sys.stderr.isatty()
sys.exit(ret)
except FatalError as e:
colored = sys.stderr.isatty()
+ warning = \
+ "The name of the executable has changed. If you want to use the " \
+ "user-friendly dialog-based program try `snf-image-creator'"
+ SimpleOutput(colored).warn(warning)
SimpleOutput(colored).error(e)
sys.exit(1)
SimpleOutput(colored).error(e)
sys.exit(1)
install_requires=['sh', 'ansicolors', 'progress>=1.0.2'],
entry_points={
'console_scripts': [
install_requires=['sh', 'ansicolors', 'progress>=1.0.2'],
entry_points={
'console_scripts': [
- 'snf-image-creator = image_creator.main:main',
- 'snf-mkimage = image_creator.dialog_main:main']
+ 'snf-mkimage = image_creator.main:main',
+ 'snf-image-creator = image_creator.dialog_main:main']
}
)
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
}
)
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :