447 | | === Installation of hook script and server scripts === |
448 | | |
449 | | The hook script, [source:SCDB/tags/pro/src/hooks/post-commit post-commit], is provided as part of SCDB, in the `src/hooks` directory. It must be installed on your Subversion server, in the `hook` directory of the repository, and given executable permission for Apache user. This script requires a configuration file `/etc/quattor-deploy.conf`, see SCDB [wiki:Doc/SCDB/Server server-side customizations] for details. |
450 | | |
451 | | The other script, [source:SCDB/tags/pro/src/hooks/build-tag.pl build-tag.pl], also provided as part of SCDB, in the `src/hooks` directory, must be installed (root executable) in `/root/quattor/scripts` on the Quattor server. It also requires a configuration file, `/etc/build-tag.conf`. See SCDB [wiki:Doc/SCDB/Server server-side customizations] for details. |
452 | | |
453 | | `build-tag.pl` requires file `quattor.build.properties` to be created in the parent of the directory specified in `svn_cache` paramater of [source:SCDB/tags/pro/src/hooks/build-tag.pl build-tag.pl] configuration file or its default value (`/root/quattor` for example provided here). A [source:SCDB/tags/pro/src/hooks/quattor.build.properties template] of this file is available in SCDB distribution, in `src/hooks` directory. It must be edited to reflect your local configuration. |
| 447 | === Installation of deployment scripts === |
| 448 | |
| 449 | SCDB deployment uses a pair of cooperating scripts: |
| 450 | * SVN post-commit hook script: this script is launched when `ant deploy` creates a new deployment tag. This scripts run on the SVN server. |
| 451 | * Deployment script: this script is launched by the post-commit hook script to do the real work. It runs on the Quattor deployment server (which may be different from the SVN server). |
| 452 | |
| 453 | Both scripts are distributed as part of SCDB, in directory [source:SCDB/tags/pro/src/hooks src/hooks]. They have to be copied at the appropriate location on the appropriate server: |
| 454 | * The hook script, [source:SCDB/tags/pro/src/hooks/post-commit.py post-commit.py] must be copied to the `hook` directory of the SVN repository (on the SVN server, using example naming `/var/svn/quattor/hooks`, see [#SubversionInstallationandConfiguration SVN server configurion]), and given executable permission for Apache user. |
| 455 | * The other script, [source:SCDB/tags/pro/src/hooks/build-tag.py build-tag.py], must be installed (root executable) in `/root/quattor/scripts` (by default) on the Quattor server. |
| 456 | |
| 457 | Both scripts require a configuration file, `/etc/quattor-deploy.conf`, see SCDB [wiki:Doc/SCDB/Server server-side customizations] for details. If you use a configuration based on suggested defaults and a SVN server and Quattor deployment server co-located on the same machine, a typical configuration file is: |
| 458 | {{{ |
| 459 | [scdb] |
| 460 | # Update to reflect your configuration |
| 461 | repository_url=http://svn.example.org/svn/quattor |
| 462 | |
| 463 | [build-tag] |
| 464 | # If not defined, defaults to parent of this build-tag script directory. |
| 465 | # If not starting with /, relative to parent of this build-tag script directory. |
| 466 | # Ensure the path exists. |
| 467 | svn_cache: /scratch/quattor-deployment/svncache |
| 468 | }}} |
| 469 | |
| 470 | ''Note: there used to be a Perl version of these scripts that are now obsolete. The configuration file format was different, even though the name may be the same.'' |
| 471 | |
| 472 | `build-tag.py` also requires file `quattor.build.properties` to be created in the parent of the directory specified in `svn_cache` paramater of the above configuration file or its default value (`/root/quattor` for example provided here). A [source:SCDB/tags/pro/src/hooks/quattor.build.properties template] of this file is available in SCDB distribution, in `src/hooks` directory. It must be edited to reflect your local configuration. |