[fossil-users] Deploying A Web Application with Fossil and FTP
Hi to all, let say we have web site, which sources are managed using fossil. This web site is running on server and document root can be accessed via ftp. Is there some way to use fossil to deploy changed files to server? It meens to upload specified branch to server via ftp? If not, could be some change do it via cgi? Best regards, Ondrej. -- Ondrej Nemecek icq: 250163477 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
On Fri, Feb 04, 2011 at 06:12:46PM +0100, Ondrej Nemecek wrote: Hi to all, let say we have web site, which sources are managed using fossil. This web site is running on server and document root can be accessed via ftp. Is there some way to use fossil to deploy changed files to server? It meens to upload specified branch to server via ftp? If not, could be some change do it via cgi? Some time ago I wrote that I'd like a WebDAV fossil interface; I think it would be of great use. It could be implemented gradually. First readonly, and then with versions. But that is hard to do, but it may be a more complete approach than what you suggest. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
I do this myself. I wrote a Perl program to take the output from fossil status, and deploy the files via copy (devtest Samba share as target) or FTP (production). It's pretty straightforward. I have an alias for it, so I just issue fsl-deploy dev or fsl-deploy prod. Just have to remember to deploy before the commit. For the Unix target (prod), it knows to issue a chmod to set *.cgi as executable. -Clark - Original Message From: Ondrej Nemecek ondrej.nemecek.news.fossil.us...@gmail.com To: fossil-users@lists.fossil-scm.org Sent: Fri, February 4, 2011 9:12:46 AM Subject: [fossil-users] Deploying A Web Application with Fossil and FTP Hi to all, let say we have web site, which sources are managed using fossil. This web site is running on server and document root can be accessed via ftp. Is there some way to use fossil to deploy changed files to server? It meens to upload specified branch to server via ftp? If not, could be some change do it via cgi? Best regards, Ondrej. -- Ondrej Nemecek icq: 250163477 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
On 02/04/2011 04:11 PM, Ondrej Nemecek wrote: Is there some simple way to list files changed between two versions? Then can be upload procedure easily scripted (using common command-line ftp client). `fossil update -n VERSION` shows a list of file changes made when updating to VERSION from the current VERSION, but does not actually make any changes. Since you can also 'update' to revisions in the past, you can use this to see the differences between a past revision and the current. (Though you'd have to reverse the add/remove logic if you keep on the current version and parse the output of updating to the past version.) -- Joshua Paine LetterBlock: Web applications built with joy http://letterblock.com/ 301-576-1920 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
It's good idea, bud I'd like to deploy any version of source tree independently of commit. Of cource - I must know the version on the server and I must deal with deleted files etc. Dne 4.2.2011 21:57, Clark Christensen napsal(a): I do this myself. I wrote a Perl program to take the output from fossil status, and deploy the files via copy (devtest Samba share as target) or FTP (production). It's pretty straightforward. I have an alias for it, so I just issue fsl-deploy dev or fsl-deploy prod. Just have to remember to deploy before the commit. For the Unix target (prod), it knows to issue a chmod to set *.cgi as executable. -Clark -- Ondrej Nemecek icq: 250163477 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
For some personal sites, what I do is I actually have the fossil repo opened in the web directory. It's .htaccess'd off so that you can't get at it, even if you know it's there. Then, I've got a cronjob that once every 15 minutes does a 'fossil update release'. Where 'release' is just a tag that I apply to checkins that I feel are ready. I could probably also have a 'vX.Y.Z' tag so that I could force it backwards too, but, they're just personal sites. :) I could probably also wrap it in a script that did more complicated release logic, if I wanted. Just an alternate solution to your problem. Not suggesting that what you want is wrong or invalid. -B On Fri, Feb 4, 2011 at 1:29 PM, Ondrej Nemecek ondrej.nemecek.news.fossil.us...@gmail.com wrote: It's good idea, bud I'd like to deploy any version of source tree independently of commit. Of cource - I must know the version on the server and I must deal with deleted files etc. Dne 4.2.2011 21:57, Clark Christensen napsal(a): I do this myself. I wrote a Perl program to take the output from fossil status, and deploy the files via copy (devtest Samba share as target) or FTP (production). It's pretty straightforward. I have an alias for it, so I just issue fsl-deploy dev or fsl-deploy prod. Just have to remember to deploy before the commit. For the Unix target (prod), it knows to issue a chmod to set *.cgi as executable. -Clark -- Ondrej Nemecek icq: 250163477 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
On Fri, 4 Feb 2011 13:44:18 -0800 Brian Smith br...@linuxfood.net wrote: For some personal sites, what I do is I actually have the fossil repo opened in the web directory. It's .htaccess'd off so that you can't get at it, even if you know it's there. Any particular reason to keep the repo in the web directory? Wouldn't putting it somewhere outside whatever security wrapper you have on the web server make more sense? Then, I've got a cronjob that once every 15 minutes does a 'fossil update release'. Where 'release' is just a tag that I apply to checkins that I feel are ready. I could probably also have a 'vX.Y.Z' tag so that I could force it backwards too, but, they're just personal sites. :) I've done this kind of thing with perforce for a couple of clients, including automatically syncing to test, q/a and then production servers. I could probably also wrap it in a script that did more complicated release logic, if I wanted. Based on my experience, you don't really need much release logic in the script. While mine was wrapped in a script, most of the script was to parse the output of the update command to find added/changed/deleted files to have the search engine index/reindex/delete them. Just create branches for the various sites in the release process (test, q/a, production or whatever) have each site open on the appropriate branch, with the repo autosyncing so the update command will pull from the master, and then your release process can focus on updating the branches in the master repo properly, and the web sites will follow along automatically. mike -- Mike Meyer m...@mired.org http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O ascii ribbon campaign - stop html mail - www.asciiribbon.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
Unfortunately I have no command line access on server and no chance to run cron jobs there :-( Dne 4.2.2011 22:44, Brian Smith napsal(a): For some personal sites, what I do is I actually have the fossil repo opened in the web directory. It's .htaccess'd off so that you can't get at it, even if you know it's there. Then, I've got a cronjob that once every 15 minutes does a 'fossil update release'. Where 'release' is just a tag that I apply to checkins that I feel are ready. I could probably also have a 'vX.Y.Z' tag so that I could force it backwards too, but, they're just personal sites. :) I could probably also wrap it in a script that did more complicated release logic, if I wanted. Just an alternate solution to your problem. Not suggesting that what you want is wrong or invalid. -B -- Ondrej Nemecek icq: 250163477 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
On Fri, Feb 4, 2011 at 2:40 PM, Mike Meyer mwm-keyword-fossil.1d1...@mired.org wrote: On Fri, 4 Feb 2011 13:44:18 -0800 Brian Smith br...@linuxfood.net wrote: For some personal sites, what I do is I actually have the fossil repo opened in the web directory. It's .htaccess'd off so that you can't get at it, even if you know it's there. Any particular reason to keep the repo in the web directory? Wouldn't putting it somewhere outside whatever security wrapper you have on the web server make more sense? The sqlite file that contains the artifacts isn't (usually) in the webroot. It's stored elsewhere, but, the webroot is a checkout of the repository, which is necessary so that fossil up will actually update the files. I suppose I could modify it so that it opens and closes a checkout to make it more secure, but, I tend to err on the side of trusting my tool (apache in this case), rather than supposing it'll be compromised at any second. ( Especially when you consider how long apache has been around and it's generally favorable security record, I don't think it's unreasonable to trust it's security wrapper. ) As far as sense goes, I think my setup makes perfect sense. :) Then, I've got a cronjob that once every 15 minutes does a 'fossil update release'. Where 'release' is just a tag that I apply to checkins that I feel are ready. I could probably also have a 'vX.Y.Z' tag so that I could force it backwards too, but, they're just personal sites. :) I've done this kind of thing with perforce for a couple of clients, including automatically syncing to test, q/a and then production servers. I could probably also wrap it in a script that did more complicated release logic, if I wanted. Based on my experience, you don't really need much release logic in the script. While mine was wrapped in a script, most of the script was to parse the output of the update command to find added/changed/deleted files to have the search engine index/reindex/delete them. My solution requires no logic at the moment. I cd into a directory and run 'fossil update release'. What I was alluding to about complicated logic was something that maybe looked at version tags, and updated to the latest version tag that also contained the tag release. Or performed some pre-release actions such as running db schema updates. Just as an example. I won't speak to whether or not it makes sense to automatically run database schema updates. Just create branches for the various sites in the release process (test, q/a, production or whatever) have each site open on the appropriate branch, with the repo autosyncing so the update command will pull from the master, and then your release process can focus on updating the branches in the master repo properly, and the web sites will follow along automatically. As I said, these are personal sites and thus don't require anything other than a single release tag. The way to make an automatic release is: 'fossil tag add release trunk' 'fossil sync'. And, I'm done. A side-effect, that, I haven't tested, is, I could also cancel the release tag, and I'm relatively sure that the site would roll back. It also means that I could also setup any other arbitrary tags that I wanted, such as 'stable', or 'testing', or 'monkeys' (because who doesn't love monkeys?) and the process would be the same. -B ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Deploying A Web Application with Fossil and FTP
On Fri, Feb 4, 2011 at 5:55 PM, Ondrej Nemecek ondrej.nemecek.news.fossil.us...@gmail.com wrote: Unfortunately I have no command line access on server and no chance to run cron jobs there :-( As long as your webserver file tree is a duplicate of your local staging file tree, then you could the output of fossil update in your staging file tree and use that to drive a script (perhaps Perl) that generates FTP commands to put or delete the changed files. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users