-
-
Can you rename this to --noinput? That way we're more consistent with some of the manage commands we use.
-
-
We should have some constants for these defaults, since we use them in a couple of places now. It'd be nice to define them once.
-
I'd prefer to split this up a bit. Do the option handling in here, and force ConsoleUI if the noinput option is set in main(), just like how we have "force_console." Also, some style guidelines: 1) One statement per line. Don't put the for loop and the setattr in the same line. 2) No space before colons. I think we can actually condense this, though. Try: site.__dict__.update(options.__dict__)
Update rb-site to allow for automation
Review Request #693 — Created Jan. 12, 2009 and submitted
Adds a --noinput option that requires the use of a new set of options to specify answers to the normally prompted questions.
$ ./rb-site install /tmp/rbtest --domain-name review.example.com --db-type postgresql --db-user reviewboard --db-pass foo --cache-type memcached --cache-info memcached://localhost:11211/ --web-server-type apache --python-loader modpython --admin-password bar --admin-email foo@example.com --noinput * Installing the site... Building site directories ... OK Building site configuration files ... OK Creating database ... Installing json fixture 'initial_data' from '/usr/lib/python2.5/site-packages/ReviewBoard-0.9.dev_20090108-py2.5.egg/reviewboard/scmtools/fixtures'. Installed 6 object(s) from 1 fixture(s) OK Performing migrations ... No evolution required. OK Creating administrator account ... OK Saving site settings ... OK * The site has been installed The site has been installed in /tmp/rbtest Sample configuration files for web servers and cron are available in the conf/ directory. You need to modify the ownership of htdocs/media/uploaded directory and all of its contents to be owned by the web server.
- Change Summary:
-
I have had a new diff up for about three days. Is there anything else you are waiting on from me?
- Description:
-
~ Adds a --no-questions option that enables/requires the use of a new set of options to specify answers to the normally prompted questions.
~ Adds a --noinput option that enables/requires the use of a new set of options to specify answers to the normally prompted questions.
- Testing Done:
-
~ $ ./rb-site install /tmp/rbtest --domain-name review.example.com --db-type postgresql --db-user reviewboard --db-pass foo --cache-type memcached --cache-info memcached://localhost:11211/ --web-server-type apache --python-loader modpython --admin-password bar --admin-email foo@example.com --no-questions
~ $ ./rb-site install /tmp/rbtest --domain-name review.example.com --db-type postgresql --db-user reviewboard --db-pass foo --cache-type memcached --cache-info memcached://localhost:11211/ --web-server-type apache --python-loader modpython --admin-password bar --admin-email foo@example.com --noinput
- Installing the site...
Building site directories ... OK
Building site configuration files ... OK
Creating database ... Installing json fixture 'initial_data' from '/usr/lib/python2.5/site-packages/ReviewBoard-0.9.dev_20090108-py2.5.egg/reviewboard/scmtools/fixtures'.
Installed 6 object(s) from 1 fixture(s)
OK
Performing migrations ... No evolution required.
OK
Creating administrator account ... OK
Saving site settings ... OK
-
The site has been installed
The site has been installed in /tmp/rbtest
Sample configuration files for web servers and cron are available
in the conf/ directory.You need to modify the ownership of htdocs/media/uploaded
directory and all of its contents to be owned by the web server.
- Installing the site...
-
Thanks for your work on this. Sorry for the delay in getting back to you. I've been busy this past couple of weeks and haven't been able to devote as much time to contributions. There's still some things to fix before this goes in.
-
-
-
Something like "uses values passed to rb-site instead of prompting for input" might make more sense here.
-
-
I'd prefer help descriptions that are more in line with what we say in the installer. Instead of just listing possible values, for instance, these should describe what the parameter does and then list possible options in parenthesis.
-
I think if we just always do the update, even when not dependent on noinput, we'll get the script defaults for free. This is actually useful for companies that are doing multiple site installations but always want to use, say, the same media path. They can wrap rb-site to provide those defaults for the interactive installer.
- Change Summary:
-
Updated diff based on feedback.
- Description:
-
~ Adds a --noinput option that enables/requires the use of a new set of options to specify answers to the normally prompted questions.
~ Adds a --noinput option that requires the use of a new set of options to specify answers to the normally prompted questions.
- Diff:
-
Revision 3 (+68 -26)