Revision df285bb3
b/runtests-venvs.sh | ||
---|---|---|
49 | 49 |
# avoid vncauthproxy errors |
50 | 50 |
rm bin/vncauthproxy.py |
51 | 51 |
echo "running django tests..." >&2 |
52 |
synnefo-manage test aai admin api db helpdesk invitations logic userdata --settings=synnefo.settings.test
|
|
52 |
snf-manage test aai admin api db helpdesk invitations logic userdata --settings=synnefo.settings.test
|
|
53 | 53 |
cd .. |
54 | 54 |
deactivate |
55 | 55 |
|
... | ... | |
65 | 65 |
# avoid vncauthproxy errors |
66 | 66 |
rm bin/vncauthproxy.py |
67 | 67 |
echo "running django tests..." >&2 |
68 |
synnefo-manage test aai admin api db helpdesk invitations logic userdata --settings=synnefo.settings.test
|
|
68 |
snf-manage test aai admin api db helpdesk invitations logic userdata --settings=synnefo.settings.test
|
|
69 | 69 |
cd .. |
70 | 70 |
deactivate |
71 | 71 |
rm -rf env |
b/snf-app/docs/src/configuration.rst | ||
---|---|---|
13 | 13 |
defined in ``/etc/synnefo/*.conf`` files. The location can be altered by |
14 | 14 |
setting an enviromental variable named ``SYNNEFO_SETTINGS_DIR`` to the |
15 | 15 |
appropriate path, or by using the ``--settings-dir`` option of the |
16 |
``synnefo-manage`` tool.
|
|
16 |
``snf-manage`` tool.
|
|
17 | 17 |
|
18 | 18 |
Synnefo package bundles a `Django` project with predefined common `settings` |
19 | 19 |
and `urls` set. The corresponding ``manage.py`` for the bundled project is |
20 |
``synnefo-manage``. After the package installation the tool should be available
|
|
21 |
as a command from your system's terminal. Due to this nature of `synnefo-manage`
|
|
20 |
``snf-manage``. After the package installation the tool should be available
|
|
21 |
as a command from your system's terminal. Due to this nature of `snf-manage`
|
|
22 | 22 |
it is possible to alter settings not only using ``.conf`` files but also by |
23 | 23 |
providing a custom python module by using ``DJANGO_SETTINGS_MODULE`` |
24 | 24 |
evnironmental variable or ``--settings`` option of the tool. |
... | ... | |
93 | 93 |
Try it out. The following command will attempt to connect to the DB and |
94 | 94 |
print out DDL statements. It should not fail:: |
95 | 95 |
|
96 |
$ synnefo-manage sql db
|
|
96 |
$ snf-manage sql db
|
|
97 | 97 |
|
98 | 98 |
|
99 | 99 |
.. _database-initialization: |
... | ... | |
103 | 103 |
|
104 | 104 |
You need to initialize the Synnefo DB:: |
105 | 105 |
|
106 |
$ synnefo-manage syncdb
|
|
107 |
$ synnefo-manage migrate
|
|
106 |
$ snf-manage syncdb
|
|
107 |
$ snf-manage migrate
|
|
108 | 108 |
|
109 | 109 |
and load fixtures {users,flavors,images}, |
110 | 110 |
which make the API usable by end users by defining a sample set of users, |
111 | 111 |
hardware configurations (flavors) and OS images:: |
112 | 112 |
|
113 |
$ synnefo-manage loaddata /path/to/users.json
|
|
114 |
$ synnefo-manage loaddata flavors
|
|
115 |
$ synnefo-manage loaddata images
|
|
113 |
$ snf-manage loaddata /path/to/users.json
|
|
114 |
$ snf-manage loaddata flavors
|
|
115 |
$ snf-manage loaddata images
|
|
116 | 116 |
|
117 | 117 |
.. warning:: |
118 | 118 |
Be sure to load a custom users.json and select a unique token |
b/snf-app/docs/src/deployment.rst | ||
---|---|---|
48 | 48 |
functions run. It uses Django ORM to connect to the common DB and update the |
49 | 49 |
state of the system, based on notifications received from the rest of the |
50 | 50 |
infrastructure, over AMQP. |
51 |
Services: the Synnefo logic dispatcher [``synnefo-dispatcher``]
|
|
51 |
Services: the Synnefo logic dispatcher [``snf-dispatcher``]
|
|
52 | 52 |
|
53 | 53 |
|
54 | 54 |
.. _GANETI_NODES: |
... | ... | |
104 | 104 |
|
105 | 105 |
For the time being The dispatcher must be run by hand:: |
106 | 106 |
|
107 |
$ synnefo-dispatcher
|
|
107 |
$ snf-dispatcher
|
|
108 | 108 |
|
109 | 109 |
The dispatcher should run in at least 2 instances to ensure high |
110 | 110 |
(actually, increased) availability. |
... | ... | |
127 | 127 |
* Change ``MEDIA_ROOT`` value in your settings to point to that directory. |
128 | 128 |
* Run the following command:: |
129 | 129 |
|
130 |
$ synnefo-manage link_static
|
|
130 |
$ snf-manage link_static
|
|
131 | 131 |
|
132 | 132 |
the command will create symlinks of the appropriate static files inside the choosen |
133 | 133 |
directory. |
... | ... | |
149 | 149 |
|
150 | 150 |
run the fcgi server:: |
151 | 151 |
|
152 |
$ synnefo-manage runfcgi host=127.0.0.1 port=8015
|
|
152 |
$ snf-manage runfcgi host=127.0.0.1 port=8015
|
|
153 | 153 |
|
154 | 154 |
|
155 | 155 |
Console scripts |
156 | 156 |
--------------- |
157 | 157 |
|
158 |
synnefo-manage
|
|
158 |
snf-manage
|
|
159 | 159 |
************** |
160 | 160 |
|
161 |
synnefo-dispatcher
|
|
161 |
snf-dispatcher
|
|
162 | 162 |
****************** |
163 | 163 |
|
164 |
synnefo-admin
|
|
164 |
snf-admin
|
|
165 | 165 |
************* |
166 | 166 |
|
167 |
synnefo-cloud
|
|
167 |
snf-cloud
|
|
168 | 168 |
************* |
169 | 169 |
|
170 |
synnefo-burnin
|
|
170 |
snf-burnin
|
|
171 | 171 |
************** |
b/snf-app/docs/src/develop.rst | ||
---|---|---|
99 | 99 |
|
100 | 100 |
* Initialize database:: |
101 | 101 |
|
102 |
(synnefo-env)$ synnefo-manage syndb
|
|
103 |
(synnefo-env)$ synnefo-manage migrate
|
|
104 |
(synnefo-env)$ synnefo-manage loaddata users flavors images
|
|
102 |
(synnefo-env)$ snf-manage syndb
|
|
103 |
(synnefo-env)$ snf-manage migrate
|
|
104 |
(synnefo-env)$ snf-manage loaddata users flavors images
|
|
105 | 105 |
|
106 | 106 |
|
107 | 107 |
Development tips |
... | ... | |
109 | 109 |
|
110 | 110 |
* Running a development web server:: |
111 | 111 |
|
112 |
(synnefo-env)$ synnefo-manage runserver
|
|
112 |
(synnefo-env)$ snf-manage runserver
|
|
113 | 113 |
|
114 | 114 |
or, if you have django_extensions and werkzeug packages installed:: |
115 | 115 |
|
116 |
(synnefo-env)$ synnefo-manage runserver_plus
|
|
116 |
(synnefo-env)$ snf-manage runserver_plus
|
|
117 | 117 |
|
118 | 118 |
|
119 | 119 |
* Opening a python console with synnefo environment initialized:: |
120 | 120 |
|
121 |
(synnefo-env)$ synnefo-manage shell
|
|
121 |
(synnefo-env)$ snf-manage shell
|
|
122 | 122 |
|
123 | 123 |
or, if you have django_extensions package installed:: |
124 | 124 |
|
125 |
(synnefo-env)$ synnefo-manage shell_plus
|
|
125 |
(synnefo-env)$ snf-manage shell_plus
|
|
126 | 126 |
|
127 | 127 |
|
128 | 128 |
South Database Migrations |
... | ... | |
134 | 134 |
To initialise south migrations in your database the following commands must be |
135 | 135 |
executed:: |
136 | 136 |
|
137 |
$ synnefo-manage syncdb # Create / update the database with the south tables
|
|
138 |
$ synnefo-manage migrate db # Perform migration in the database
|
|
137 |
$ snf-manage syncdb # Create / update the database with the south tables
|
|
138 |
$ snf-manage migrate db # Perform migration in the database
|
|
139 | 139 |
|
140 | 140 |
Note that syncdb will create the latest models that exist in the db app, so some |
141 | 141 |
migrations may fail. If you are sure a migration has already taken place you |
... | ... | |
143 | 143 |
|
144 | 144 |
For example:: |
145 | 145 |
|
146 |
$ synnefo-manage migrate db 0001 --fake
|
|
146 |
$ snf-manage migrate db 0001 --fake
|
|
147 | 147 |
|
148 | 148 |
To be sure that all migrations are applied type:: |
149 | 149 |
|
150 |
$ synnefo-manage migrate db --list
|
|
150 |
$ snf-manage migrate db --list
|
|
151 | 151 |
|
152 | 152 |
All starred migrations are applied. |
153 | 153 |
|
... | ... | |
165 | 165 |
Every time you make changes to the database and data migration is not required |
166 | 166 |
(WARNING: always perform this with extreme care):: |
167 | 167 |
|
168 |
$ synnefo-manage schemamigration db --auto
|
|
168 |
$ snf-manage schemamigration db --auto
|
|
169 | 169 |
|
170 | 170 |
The above will create the migration script. Now this must be applied to the live |
171 | 171 |
database:: |
172 | 172 |
|
173 |
$ synnefo-manage migrate db
|
|
173 |
$ snf-manage migrate db
|
|
174 | 174 |
|
175 | 175 |
Consider this example (adding a field to the SynnefoUser model):: |
176 | 176 |
|
... | ... | |
240 | 240 |
|
241 | 241 |
4. To migrate the database to the latest version, we execute:: |
242 | 242 |
|
243 |
$ synnefo-manage migrate db
|
|
243 |
$ snf-manage migrate db
|
|
244 | 244 |
|
245 | 245 |
To see which migrations are applied:: |
246 | 246 |
|
247 |
$ synnefo-manage migrate db --list
|
|
247 |
$ snf-manage migrate db --list
|
|
248 | 248 |
|
249 | 249 |
db |
250 | 250 |
(*) 0001_initial |
b/snf-app/docs/src/install.rst | ||
---|---|---|
373 | 373 |
``virtualenv`` python installation and the following commands should be |
374 | 374 |
available from the command line:: |
375 | 375 |
|
376 |
$ synnefo-manage
|
|
377 |
$ synnefo-dispatcher
|
|
378 |
$ synnefo-admin
|
|
376 |
$ snf-manage
|
|
377 |
$ snf-dispatcher
|
|
378 |
$ snf-admin
|
|
379 | 379 |
|
380 | 380 |
Notice that Synnefo installation does not handle the creation of |
381 | 381 |
``/etc/synnefo/`` directory which is the place where custom configuration |
b/snf-app/docs/src/upgrade.rst | ||
---|---|---|
12 | 12 |
projects: |
13 | 13 |
|
14 | 14 |
* To keep consistency with future changes you should change ``python |
15 |
manage.py`` calls with deployed ``synnefo-manage`` console script.
|
|
15 |
manage.py`` calls with deployed ``snf-manage`` console script.
|
|
16 | 16 |
This includes automation scripts, service scripts etc. |
17 | 17 |
|
18 | 18 |
Same applies for calls to ``dispatcher.py``, ``snf-tools/admin.py``, |
19 | 19 |
``snf-tools/burnin.py`` and ``snf-tools/cloud.py`` which are replaced |
20 |
respectively by ``synnefo-dispatcher``, ``synnefo-admin``,
|
|
21 |
``synnefo-burnin`` and ``synnefo-cloud``.
|
|
20 |
respectively by ``snf-dispatcher``, ``snf-admin``,
|
|
21 |
``snf-burnin`` and ``snf-cloud``.
|
|
22 | 22 |
|
23 | 23 |
* Copy custom settings files located in projects ``settings.d`` directory |
24 | 24 |
to ``/etc/synnefo/`` directory. |
b/snf-app/setup.py | ||
---|---|---|
162 | 162 |
|
163 | 163 |
entry_points = { |
164 | 164 |
'console_scripts': [ |
165 |
'synnefo-manage = synnefo.manage:main',
|
|
166 |
'synnefo-dispatcher = synnefo.logic.dispatcher:scriptmain',
|
|
167 |
'synnefo-burnin = synnefo.tools.burnin:main',
|
|
168 |
'synnefo-admin = synnefo.tools.admin:main',
|
|
169 |
'synnefo-cloud = synnefo.tools.cloud:main',
|
|
165 |
'snf-manage = synnefo.manage:main',
|
|
166 |
'snf-dispatcher = synnefo.logic.dispatcher:scriptmain',
|
|
167 |
'snf-burnin = synnefo.tools.burnin:main',
|
|
168 |
'snf-admin = synnefo.tools.admin:main',
|
|
169 |
'snf-cloud = synnefo.tools.cloud:main',
|
|
170 | 170 |
], |
171 | 171 |
}, |
172 | 172 |
) |
Also available in: Unified diff