Re: Custom file role
| From: | Brett Bieber | Date: | Fri, 01 Dec 2006 22:53:54 +0000 |
| Subject: | Re: Custom file role | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-45061@lists.php.net to get a copy of this message | ||
On 11/28/06, Tony Bibbs <tony@tonybibbs.com> wrote:
I'm trying to use PEAR for deploying an entire web application as opposed to just libraries. My scenario is simple...everything in my tarball needs to go into a web tree. I've created a Web role (Web.php) extending the Custom role and I've got it packaged up and installing fine to the PEAR/Installer/Role directory. Problem is when I try to deploy my app using the Web role I'm getting: PEAR_PackageFileManager2 Error: Invalid file role passed to addRole, must be one of "data, doc, php, script, test", was passed "web" I'm not 100% how all this stuff stitches together but I noticed in the PEAR/Installer/Role directory each role PHP script has a corresponding .xml file. Is that my problem? I'm guessing I'm missing a simple step here. --TonyAha! So Tony is in Iowa!?!? I'm in Lincoln, NE. From what I've picked up it sounds like you're testing out some application deployment methods using PEAR? Once I started using PEAR for application deployment I don't see myself ever going back. It's a very nice system... I've built a few applications for UNL like http://events.unl.edu/ , as well as my personal site ( http://saltybeagle.com/ ) using pear packages --- installing the web files, configuring databases etc. The methods are pretty straightforward --- using Clay's Role_Web works fairly well as long as you want all specific files to go into one directory without much modification. I use a method which uses a post-install script to ask for the location and configuration details then copies the files over and creates a config.inc.php in the correct location. Every time you upgrade the pear package it tells you to run the post install script... but since the post-install script is simply PHP I just write a small php script with an array of my answers and automate the whole release deployment as well as building/upgrading on the machines it runs on. Greg's book is a great reference now, but if you have any questions I'd be happy to give any help I can. Talk to you later... and Greetings from Nebraska. Go Huksers! -- -Brett http:saltybeagle.com aim:ianswerq