Skip to content
Snippets Groups Projects
Commit ebe0f1e0 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Switch names btw snf-image-creator & snf-mkimage

Make snf-image-creator be the dialog-based program and snf-mkimage be
the command line one.
parent 9b2b47ae
No related branches found
Tags v0.3
No related merge requests found
......@@ -5,5 +5,5 @@ snf-image-creator is a command line tool for creating OS images to be used with
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
......@@ -238,10 +238,10 @@ latex_documents = [
# (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',
'Dialog-based image creator for Synnefo',
'Command line image creator for Synnefo',
'Synnefo development team <synnefo-devel@googlegroups.com>', 1)
]
......
:orphan:
snf-image-creator manual page
=============================
=======================
Synopsis
--------
**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
itself.
itself. If the <INPUT MEDIA> argument is missing, the user will be asked during
the program initializaton to specify one.
Options
-------
-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
-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
-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
=======================
=============================
Synopsis
--------
**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
itself. If the <INPUT MEDIA> argument is missing, the user will be asked during
the program initializaton to specify one.
itself.
Options
-------
--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
-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
-u FILENAME, --upload=FILENAME
save the image to the storage service with remote name FILENAME
--version
show program's version number and exit
......@@ -3,8 +3,8 @@ Usage
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
......@@ -13,12 +13,12 @@ system (see `host bundling operation`_).
Non-interactive version
=======================
snf-image-creator receives the following options:
snf-mkimage receives the following options:
.. code-block:: console
$ 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
......@@ -70,7 +70,7 @@ registered as *private*. Only the user that registers the image can create
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.
......@@ -81,15 +81,15 @@ input media. The user can enable or disable specific *syspreps*, using
*-{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
$ 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
......@@ -150,17 +150,17 @@ removed, you should use *--enable-sysprep* option like this:
.. code-block:: console
$ 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
====================
*snf-mkimage* receives the following options:
*snf-image-creator* receives the following options:
.. code-block:: console
$ 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
......@@ -179,12 +179,12 @@ button to create an image out of the running system (see
`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.
Wizard 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
......@@ -278,13 +278,13 @@ You will be able to boot your installed OS and make any changes you want
$ 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
$ 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*.
......
......@@ -402,6 +402,10 @@ def main():
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)
......
......@@ -52,8 +52,8 @@ setup(
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 :
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment