Changeset - aaa7c3331186
[Not reviewed]
Bradley M. Kuhn - 11 years ago 2014-07-03 01:04:00
bkuhn@sfconservancy.org
Rename paster command setup-rhodecode to setup-db
5 files changed with 9 insertions and 9 deletions:
0 comments (0 inline, 0 general)
docs/installation_win.rst
Show inline comments
 
@@ -218,13 +218,13 @@ port, mail settings, database, whatever)
 
character differences between Unix and Windows
 
(http://notepad-plus-plus.org/)
 

	
 
For the sake of simplicity lets run it with the default settings. After
 
your edits (if any), in the previous Command Prompt, type::
 

	
 
 paster setup-rhodecode production.ini
 
 paster setup-db production.ini
 

	
 
(this time a NEW database will be installed, you must follow a different
 
step to later UPGRADE to a newer RhodeCode version)
 

	
 
The script will ask you for confirmation about creating a NEW database,
 
answer yes (y)
docs/setup.rst
Show inline comments
 
@@ -23,26 +23,26 @@ Next, you need to create the databases u
 
use postgresql or sqlite (default). If you choose a database other than the
 
default ensure you properly adjust the db url in your production.ini
 
configuration file to use this other database. RhodeCode currently supports
 
postgresql, sqlite and mysql databases. Create the database by running
 
the following command::
 

	
 
    paster setup-rhodecode production.ini
 
    paster setup-db production.ini
 

	
 
This will prompt you for a "root" path. This "root" path is the location where
 
RhodeCode will store all of its repositories on the current machine. After
 
entering this "root" path ``setup-rhodecode`` will also prompt you for a username
 
and password for the initial admin account which ``setup-rhodecode`` sets
 
entering this "root" path ``setup-db`` will also prompt you for a username
 
and password for the initial admin account which ``setup-db`` sets
 
up for you.
 

	
 
setup process can be fully automated, example for lazy::
 

	
 
    paster setup-rhodecode production.ini --user=nn --password=secret --email=nn@your.kallithea.server --repos=/home/nn/my_repos
 
    paster setup-db production.ini --user=nn --password=secret --email=nn@your.kallithea.server --repos=/home/nn/my_repos
 

	
 

	
 
- The ``setup-rhodecode`` command will create all of the needed tables and an
 
- The ``setup-db`` command will create all of the needed tables and an
 
  admin account. When choosing a root path you can either use a new empty
 
  location, or a location which already contains existing repositories. If you
 
  choose a location which contains existing repositories RhodeCode will simply
 
  add all of the repositories at the chosen location to it's database.
 
  (Note: make sure you specify the correct path to the root).
 
- Note: the given path for mercurial_ repositories **must** be write accessible
 
@@ -54,13 +54,13 @@ You are now ready to use RhodeCode, to r
 

	
 
    paster serve production.ini
 

	
 
- This command runs the RhodeCode server. The web app should be available at the
 
  127.0.0.1:5000. This ip and port is configurable via the production.ini
 
  file created in previous step
 
- Use the admin account you created above when running ``setup-rhodecode``
 
- Use the admin account you created above when running ``setup-db``
 
  to login to the web app.
 
- The default permissions on each repository is read, and the owner is admin.
 
  Remember to update these if needed.
 
- In the admin panel you can toggle ldap, anonymous, permissions settings. As
 
  well as edit more advanced options on users and repositories
 

	
rhodecode/lib/paster_commands/setup_db.py
Show inline comments
 
file renamed from rhodecode/lib/paster_commands/setup_rhodecode.py to rhodecode/lib/paster_commands/setup_db.py
rhodecode/tests/scripts/create_rc.sh
Show inline comments
 
#!/bin/sh
 
psql -U postgres -h localhost -c 'drop database if exists rhodecode;'
 
psql -U postgres -h localhost -c 'create database rhodecode;'
 
paster setup-rhodecode rc.ini --force-yes --user=marcink --password=qweqwe --email=marcin@python-blog.com --repos=/home/marcink/repos --no-public-access
 
paster setup-db rc.ini --force-yes --user=marcink --password=qweqwe --email=marcin@python-blog.com --repos=/home/marcink/repos --no-public-access
 
API_KEY=`psql -R " " -A -U postgres -h localhost -c "select api_key from users where admin=TRUE" -d rhodecode | awk '{print $2}'`
 
echo "run those after running server"
 
paster serve rc.ini --pid-file=rc.pid --daemon
 
sleep 3
 
rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo1 password:qweqwe email:demo1@example.com
 
rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo2 password:qweqwe email:demo2@example.com
setup.py
Show inline comments
 
@@ -166,13 +166,13 @@ setup(
 
    main = rhodecode.config.middleware:make_app
 

	
 
    [paste.app_install]
 
    main = pylons.util:PylonsInstaller
 

	
 
    [paste.global_paster_command]
 
    setup-rhodecode=rhodecode.lib.paster_commands.setup_rhodecode:Command
 
    setup-db=rhodecode.lib.paster_commands.setup_db:Command
 
    update-repoinfo=rhodecode.lib.paster_commands.update_repoinfo:Command
 
    make-rcext=rhodecode.lib.paster_commands.make_rcextensions:Command
 
    repo-scan=rhodecode.lib.paster_commands.repo_scan:Command
 
    cache-keys=rhodecode.lib.paster_commands.cache_keys:Command
 
    ishell=rhodecode.lib.paster_commands.ishell:Command
 
    make-index=rhodecode.lib.paster_commands.make_index:Command
0 comments (0 inline, 0 general)