ScriptCommander is a Ruby cgi / AJAX web web application written by Nik Wolfgramm. The application can launch svn update/switch commands and other project maintenance scripts to manage (svn enabled) web application projects.
Go to your desired web root and create the application directory:
mkdir ScriptCommander mkdir ScriptCommander/htdocs
Checkout the desired release from svn.
Set ownership an permissions:
chown -R scriptcmd:scriptcmd ScriptCommander/htdocs chmod -R 755 ScriptCommander/htdocs chmod -R 750 ScriptCommander/htdocs/include chmod -R 750 ScriptCommander/htdocs/config chmod -R 750 ScriptCommander/htdocs/log
Copy example config files and adapt them to your needs:
cp ScriptCommander/htdocs/config/propjects.yml.example ScriptCommander/htdocs/config/propjects.yml cp ScriptCommander/htdocs/config/svn.yml.example ScriptCommander/htdocs/config/svn.yml
Create a user for the application:
htpasswd -cm ScriptCommander/.htpasswd scriptcmd
The host running the ScriptCommander applications needs to be setup for cgi execution of ruby files and suexec. See the following example configuration:
# scriptcmd ScriptCommander <VirtualHost 127.0.0.1:80> ServerName scriptcmd.com DocumentRoot /var/www/ScriptCommander/htdocs CustomLog logs/scriptcmd.com-access_log combined ErrorLog logs/scriptcmd.com-error_log TimeOut 600 SuexecUserGroup scriptcmd scriptcmd <Directory /var/www/ScriptCommander/htdocs> AddHandler cgi-script .rb Options +ExecCGI DirectoryIndex index.rb Order deny,allow Allow from 127.0.0.1 AuthType Basic AuthName "admin.scriptcmd.com" AuthUserFile "/var/www/ScriptCommander/.htpasswd" Require valid-user scriptcmd </Directory> </VirtualHost>
chown -R scriptcmd:scriptcmd htdocs/
sudo -u scriptcmd svn log --username scriptcmdadmin-reader --password "<password>" --config-dir htdocs/.svn/ htdocs/
All projects are configured in the configuration file include/config.rb. An example can be found under include/config.rb.example.
Configure the user which has read access to the svn repositories in config/svn.yml
# configure a user which has read access your subversion repositories username: scriptcmdadmin-reader password: secret
|display||project display name||will be shown in the menu and title|
|description||project description||short description of the project|
|active||true OR false||projects are only loaded if active|
|local_path||local project path||absolute path to the working copy|
|url||URL of the application domain||full URL with prorocol|
|svn_url||URL of the svn repository root||full URL with protocol|
|users||users which can work on the project|| user name comes from HTTP basic auth
'ALL' opens project for all users
|actions||all actions for the project grouped under group name||see /config/actions.yml for all configured actions|
Configure projects in config/projects.yml. Below you see an example project configuration:
# configure all projects you wish to appear on the interface # - the first in the list is automatically the default project # - set "active" to false to hide it from the interface scriptcmd.com: description: scriptcmd.com live site display: www.scriptcmd.com active: true local_path: /mnt/nas/srv/www/scriptcmd/scriptcmd.com/htdocs/ url: http://www.scriptcmd.com/ svn_url: https://svn.icc.scriptcmdgroup.com/repos/scriptcmd.com/ users: - scriptcmd - example actions: subversion: - svn_info - svn_log - svn_list_tags
Projects / Tabs are sorted by key, this means you can simply rename keys to have the tabs sorted in the manner you like. As example you could insert a two number digit as first values of the key:
01-project1: ... 02-myproject: ...
If a local user executed svn commands directly on the server, it's possible that ScriptCommander hasn't the access rights anymore to execute commands on the project.
How to fix this issue: