Revision ebe0f1e0

b/README
5 5
synnefo.
6 6

  
7 7
It comes in 2 variants:
8
 * snf-image-creator: A non-interactive command line program
9
 * snf-mkimage: A user-friendly dialog-based program
8
 * snf-image-creator: A user-friendly dialog-based program
9
 * snf-mkimage: A non-interactive command line program
b/docs/conf.py
238 238
# (source start file, name, description, authors, manual section).
239 239
man_pages = [
240 240
    ('man/snf-image-creator', 'snf-image-creator',
241
     'Command line image creator for Synnefo',
241
     'Dialog-based image creator for Synnefo',
242 242
     'Synnefo development team <synnefo-devel@googlegroups.com>', 1),
243 243
    ('man/snf-mkimage', 'snf-mkimage',
244
     'Dialog-based image creator for Synnefo',
244
     'Command line image creator for Synnefo',
245 245
     'Synnefo development team <synnefo-devel@googlegroups.com>', 1)
246 246
]
247 247

  
b/docs/man/snf-image-creator.rst
1 1
:orphan:
2 2

  
3 3
snf-image-creator manual page
4
=============================
4
=======================
5 5

  
6 6
Synopsis
7 7
--------
8 8

  
9
**snf-image-creator** [OPTION] <INPUT MEDIA>
9
**snf-image-creator** [OPTION] [<INPUT MEDIA>]
10 10

  
11 11
Description
12 12
-----------
13 13
Create image out of an <INPUT MEDIA>. The <INPUT MEDIA> may be a block device,
14 14
a regular file that represents a hard disk or \`/' to bundle the host system
15
itself.
15
itself. If the <INPUT MEDIA> argument is missing, the user will be asked during
16
the program initializaton to specify one.
16 17

  
17 18
Options
18 19
-------
19
-a URL, --authentication-url=URL
20
	use this authentication URL when uploading/registering images
21

  
22
-c CLOUD, --cloud=CLOUD
23
        use this saved cloud account to authenticate against a cloud when
24
        uploading/registering images
25

  
26
--disable-sysprep=SYSPREP
27
	prevent SYSPREP operation from running on the input media
28

  
29
--enable-sysprep=SYSPREP
30
	run SYSPREP operation on the input media
31

  
32
-f, --force
33
	overwrite output files if they exist
34

  
20
--version
21
	show program's version number and exit
35 22
-h, --help
36 23
	show this help message and exit
37

  
38
-m KEY=VALUE, --metadata=KEY=VALUE
39
	add custom KEY=VALUE metadata to the image
40

  
41
--no-shrink
42
	don't shrink any partition
43

  
44
--no-sysprep
45
	don't perform any system preparation operation
46

  
47
-o FILE, --outfile=FILE
48
	dump image to FILE
49

  
50
--public
51
	register image with the storage service as public
52

  
53
--print-sysprep
54
	print the enabled and disabled system preparation operations for this
55
	input media
56

  
57
-r IMAGENAME, --register=IMAGENAME
58
	register the image with the compute service with name IMAGENAME
59

  
60
-s, --silent
61
	output only errors
62

  
63
-t TOKEN, --token=TOKEN
64
	use this token when uploading/registering images
65

  
24
-l FILE, --logfile=FILE
25
	log all messages to FILE
66 26
--tmpdir=DIR
67 27
	create large temporary image files under DIR
68

  
69
-u FILENAME, --upload=FILENAME
70
	save the image to the storage service with remote name FILENAME
71

  
72
--version
73
	show program's version number and exit
74

  
b/docs/man/snf-mkimage.rst
1 1
:orphan:
2 2

  
3 3
snf-mkimage manual page
4
=======================
4
=============================
5 5

  
6 6
Synopsis
7 7
--------
8 8

  
9
**snf-mkimage** [OPTION] [<INPUT MEDIA>]
9
**snf-mkimage** [OPTION] <INPUT MEDIA>
10 10

  
11 11
Description
12 12
-----------
13 13
Create image out of an <INPUT MEDIA>. The <INPUT MEDIA> may be a block device,
14 14
a regular file that represents a hard disk or \`/' to bundle the host system
15
itself. If the <INPUT MEDIA> argument is missing, the user will be asked during
16
the program initializaton to specify one.
15
itself.
17 16

  
18 17
Options
19 18
-------
20
--version
21
	show program's version number and exit
19
-a URL, --authentication-url=URL
20
	use this authentication URL when uploading/registering images
21

  
22
-c CLOUD, --cloud=CLOUD
23
        use this saved cloud account to authenticate against a cloud when
24
        uploading/registering images
25

  
26
--disable-sysprep=SYSPREP
27
	prevent SYSPREP operation from running on the input media
28

  
29
--enable-sysprep=SYSPREP
30
	run SYSPREP operation on the input media
31

  
32
-f, --force
33
	overwrite output files if they exist
34

  
22 35
-h, --help
23 36
	show this help message and exit
24
-l FILE, --logfile=FILE
25
	log all messages to FILE
37

  
38
-m KEY=VALUE, --metadata=KEY=VALUE
39
	add custom KEY=VALUE metadata to the image
40

  
41
--no-shrink
42
	don't shrink any partition
43

  
44
--no-sysprep
45
	don't perform any system preparation operation
46

  
47
-o FILE, --outfile=FILE
48
	dump image to FILE
49

  
50
--public
51
	register image with the storage service as public
52

  
53
--print-syspreps
54
	print the enabled and disabled system preparation operations for this
55
	input media
56

  
57
-r IMAGENAME, --register=IMAGENAME
58
	register the image with the compute service with name IMAGENAME
59

  
60
-s, --silent
61
	output only errors
62

  
63
-t TOKEN, --token=TOKEN
64
	use this token when uploading/registering images
65

  
26 66
--tmpdir=DIR
27 67
	create large temporary image files under DIR
68

  
69
-u FILENAME, --upload=FILENAME
70
	save the image to the storage service with remote name FILENAME
71

  
72
--version
73
	show program's version number and exit
74

  
b/docs/usage.rst
3 3

  
4 4
snf-image-creator comes in 2 variants:
5 5

  
6
 * snf-image-creator: A non-interactive command line program
7
 * snf-mkimage: A user-friendly dialog-based program
6
 * snf-mkimage: A non-interactive command line program
7
 * snf-image-creator: A user-friendly dialog-based program
8 8

  
9 9
Both expect the input media as first argument. The input media may be a local
10 10
file, a block device or *"/"* if you want to create an image out of the running
......
13 13
Non-interactive version
14 14
=======================
15 15

  
16
snf-image-creator receives the following options:
16
snf-mkimage receives the following options:
17 17

  
18 18
.. code-block:: console
19 19

  
20
  $ snf-image-creator --help
21
  Usage: snf-image-creator [options] <input_media>
20
  $ snf-mkimage --help
21
  Usage: snf-mkimage [options] <input_media>
22 22

  
23 23
  Options:
24 24
    --version             show program's version number and exit
......
70 70
VM's out of it. If you want the image to be visible by other user too, use the
71 71
*--public* option.
72 72

  
73
By default, before extracting the image, snf-image-creator will perform a
73
By default, before extracting the image, snf-mkimage will perform a
74 74
number of system preparation operations on the snapshot of the media and will
75 75
shrink the last partition found. Both actions can be disabled by specifying
76 76
*--no-sysprep* and *--no-shrink* respectively.
......
81 81
*-{enable,disable}-sysprep* options. The user may specify those options
82 82
multiple times.
83 83

  
84
Running *snf-image-creator* with *--print-sysprep* on a raw file that hosts a
84
Running *snf-mkimage* with *--print-sysprep* on a raw file that hosts a
85 85
debian system, we print the following output:
86 86

  
87 87
.. _sysprep:
88 88

  
89 89
.. code-block:: console
90 90

  
91
   $ snf-image-creator --print-sysprep ubuntu.raw
92
   snf-image-creator 0.3
91
   $ snf-mkimage --print-syspreps ubuntu.raw
92
   snf-image-creator 0.6
93 93
   =====================
94 94
   Examining source media `ubuntu_hd.raw' ... looks like an image file
95 95
   Snapshotting media source ... done
......
150 150

  
151 151
.. code-block:: console
152 152

  
153
   $ snf-image-creator --enable-sysprep cleanup-mail --enable-sysprep remove-user-accounts ...
153
   $ snf-mkimage --enable-sysprep cleanup-mail --enable-sysprep remove-user-accounts ...
154 154

  
155 155
Dialog-based version
156 156
====================
157 157

  
158
*snf-mkimage* receives the following options:
158
*snf-image-creator* receives the following options:
159 159

  
160 160
.. code-block:: console
161 161

  
162
 $ snf-mkimage --help
163
 Usage: snf-mkimage [options] [<input_media>]
162
 $ snf-image-creator --help
163
 Usage: snf-image-creator [options] [<input_media>]
164 164

  
165 165
 Options:
166 166
   --version             show program's version number and exit
......
179 179
`Host bundling operation`_).
180 180

  
181 181
After the input media is examined and the program is initialized, the user will
182
be given the choice to run *snf-mkimage* in *wizard* or *expert* mode.
182
be given the choice to run *snf-image-creator* in *wizard* or *expert* mode.
183 183

  
184 184
Wizard mode
185 185
-----------
186 186

  
187
When *snf-mkimage* runs in *wizard* mode, the user is just asked to provide the
187
When *snf-image-creator* runs in *wizard* mode, the user is just asked to provide the
188 188
following basic information:
189 189

  
190 190
 * Cloud: The cloud account to use to upload and register the resulting image
......
278 278

  
279 279
   $ sudo kvm -m 1G -boot c -drive file=ubuntu.raw,format=raw,cache=none,if=virtio
280 280

  
281
After you're done, you may use *snf-mkimage* as root to create and upload the
281
After you're done, you may use *snf-image-creator* as root to create and upload the
282 282
image:
283 283

  
284 284
.. code-block:: console
285 285

  
286 286
   $ sudo -s
287
   $ snf-mkimage ubuntu.raw
287
   $ snf-image-creator ubuntu.raw
288 288

  
289 289
In the first screen you will be asked to choose if you want to run the program
290 290
in *Wizard* or *Expert* mode. Choose *Wizard*.
b/image_creator/main.py
402 402
        sys.exit(ret)
403 403
    except FatalError as e:
404 404
        colored = sys.stderr.isatty()
405
        warning = \
406
            "The name of the executable has changed. If you want to use the " \
407
            "user-friendly dialog-based program try `snf-image-creator'"
408
        SimpleOutput(colored).warn(warning)
405 409
        SimpleOutput(colored).error(e)
406 410
        sys.exit(1)
407 411

  
b/setup.py
52 52
    install_requires=['sh', 'ansicolors', 'progress>=1.0.2'],
53 53
    entry_points={
54 54
        'console_scripts': [
55
                'snf-image-creator = image_creator.main:main',
56
                'snf-mkimage = image_creator.dialog_main:main']
55
                'snf-mkimage = image_creator.main:main',
56
                'snf-image-creator = image_creator.dialog_main:main']
57 57
    }
58 58
)
59 59
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :

Also available in: Unified diff