Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) Automatic instalation/updat feature (Read 6,334 times)
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Automatic instalation/updat feature
Jun 4th, 2009 at 9:10pm
Post Tools
I want to see a script that users our zip or tar.gz files to install (not setup!) a new forum on the server with all CHMOD settings set as needed and that has also the ability to update existing forums.

I imagine it this way:
- You upload the installation file and the zip/tar.gz on your server
- You call the installation file it ask you for the paths to the cgi-bin and the public_html folder and then extracts the compressed file into this folders.
   If you update, it ask for your admin name and password and will then take your forum path settings and extract the files there.

Obviously the upgrade will only work with non moded forums that have no changes in the default and yabb21 template folders. Other files and folders will not be touched and therefore the other templates must then be updated by hand as it is now.
« Last Edit: Jun 4th, 2009 at 9:13pm by deti »  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
Unilat
Development Team
Theme Team
****
Offline



Posts: 1,047
Location: Columbus Ohio, USA
Re: Automatic instalation/updat feature
Reply #1 - Jun 4th, 2009 at 10:31pm
Post Tools
This is something that I've wanted to see for a long time and would be an incredible help to novice users.
  
Back to top
 
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Automatic instalation/updat feature
Reply #2 - Jun 4th, 2009 at 11:38pm
Post Tools
For what it's worth, the CHMOD settings appear to already be correct for anyone using a UNIX host and the .tar.gz file.  I installed v2.4 on two CentOS (Linux) servers using the permissions that came out of the tarball, and everything works perfectly in that regard.

I'm not sure about permissions settings using the zip file and/or on Windows hosts, but on a UNIX server (including Mac OS X) using the tarball, the CHMOD doesn't seem to be an issue.

So, for installation purposes, I'd say there's no need for any other script for UNIXers.  For upgrade, yes, a script is needed.  It should be an easy script and I'll see if I have some time to write one up.

(For update, the admin user/pass should not be needed, because the installation uses the default pass and the settings file then gets replaced with the old one.)

deti, would you imagine that this script automatically runs through the maintenance procedures (rebuild memberlist, rebuild thread index, etc.) automatically?  Or, would the user still have to do that?
  
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,932
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: Automatic instalation/updat feature
Reply #3 - Jun 5th, 2009 at 2:33am
Post Tools
Well ALLLL RIGHT NOW!

Lets make it four people who think its a good idea.  I'm quite unsure how easy a fix would be for Windows.  For self-hosting Windows a Powershell script might work (I was actually thinking about exactly this issue last week)  and I thought a self-installer should be part of YaBB 3.0

Last year, when I was just getting YaBB to work consistently on Windows, someone here asked me if I had looked at what SMF had done.  I tested their software and themed a test forum in case I could not make YaBB work. err - Snap, Bang, Done.

Worth looking at.

Smiley
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,037
Location: Rock Hill, South Carolina

None
Re: Automatic instalation/updat feature
Reply #4 - Jun 5th, 2009 at 5:24am
Post Tools
Great idea.
  

Back to top
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Automatic instalation/updat feature
Reply #5 - Jun 5th, 2009 at 10:56am
Post Tools
cepheid wrote on Jun 4th, 2009 at 11:38pm:
I'm not sure about permissions settings using the zip file and/or on Windows hosts,

I'm not experienced also. zip files normally don't have permission info as far as I know. Also i got the impression that for Windows servers the matter of permissions is not a such big problem, but I might be wrong.

cepheid wrote on Jun 4th, 2009 at 11:38pm:
, but on a UNIX server (including Mac OS X) using the tarball, the CHMOD doesn't seem to be an issue.

But not every user has shell access on his server and therefore can't extract the tarball Wink So he needs a program to do this for him:
"The YaBB instalation tool".

cepheid wrote on Jun 4th, 2009 at 11:38pm:
It should be an easy script and I'll see if I have some time to write one up.

This would be nice, but I am still waiting for other things you told us you will write something for. Maybe you do this first. Wink

cepheid wrote on Jun 4th, 2009 at 11:38pm:
For update, the admin user/pass should not be needed, because the installation uses the default pass and the settings file then gets replaced with the old one.

If you update a existing forum normally the admin should have changed his password from "admin" to something else! To prevent hackers doing something bad on your files you must use the username and PW from the admin.vars file!!!

cepheid wrote on Jun 4th, 2009 at 11:38pm:
deti, would you imagine that this script automatically runs through the maintenance procedures (rebuild memberlist, rebuild thread index, etc.) automatically?  Or, would the user still have to do that?

Hmmm, I didn't think about this jet. But if it's not to hard to code it also should run though the other things needed for upgrade, so that it is ready to use after update.
« Last Edit: Jun 5th, 2009 at 10:57am by deti »  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Automatic instalation/updat feature
Reply #6 - Jun 5th, 2009 at 11:18am
Post Tools
deti wrote on Jun 5th, 2009 at 10:56am:
But not every user has shell access on his server and therefore can't extract the tarball

Oh, I understand, that's not a problem.  I just meant that if the user has the tarball, the permissions should be just fine - there should be no need to use chmod at all.  The installation script merely needs to unpack the tarball, and all should be well.

deti wrote on Jun 5th, 2009 at 10:56am:
This would be nice, but I am still waiting for other things you told us you will write something for. Maybe you do this first.

Well, yeah... Smiley  But hey, I'm a graduate student, other priorities have to come first.  I'll do this as soon as I can, and the other stuff, too.

I guess based on your previous replies that you intend this to be usable by people without shell access?  Then it can't be a shell script, or rather, it can be a shell script but will still need a web interface...

deti wrote on Jun 5th, 2009 at 10:56am:
If you update a existing forum normally the admin should have changed his password from "admin" to something else!

Ah, I get it.  But, this is only true if people are updating from 2.3 and up, because anyone updating an older version has to install 2.4 from scratch.  Nevertheless, no problem, it's easy enough to check the admin password.

deti wrote on Jun 5th, 2009 at 10:56am:
But if it's not to hard to code it also should run though the other things needed for upgrade, so that it is ready to use after update.

If the installation script is Perl, then it shouldn't be too hard to code that part... we simply need to put in calls to the appropriate rebuild functions.  If the installation script is a shellscript or in PHP, then this would be much more difficult.  I guess that means it should be in Perl, huh?
  
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Automatic instalation/updat feature
Reply #7 - Jun 5th, 2009 at 11:28am
Post Tools
cepheid wrote on Jun 5th, 2009 at 11:18am:
I guess that means it should be in Perl, huh?

Yes and working the same way as Setup.pl is working at the moment.

You put the tar.gz (on Windows the zip) and the installation-file in the same folder on your server and then call the script with your browser. On first installation it asks you for the paths and then installs everything there. Then you can do the normal setup. After this is done you should delete at least the installation script and can delete also the compressed file to save disk space and because it's not needed any more.

For update there should then be a script in Admin/ doing the upgrade: Upload the tar/zip from your PC to the server, extract it, run the upgrade procedure and then delete the uploaded file if you allow it.
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Automatic instalation/updat feature
Reply #8 - Jun 5th, 2009 at 11:36am
Post Tools
deti wrote on Jun 5th, 2009 at 11:28am:
run the upgrade procedure

I'm not familiar with the upgrade procedure since I've never run it - I've only done a clean install - so I might have to let you write that part. Smiley  The upgrade script could become part of the Admin Center, really.

Also:
deti wrote on Jun 5th, 2009 at 11:28am:
Upload the tar/zip from your PC to the server

You know, we could even implement an auto-download, so that you don't have to download the file to your PC and then upload to the server... the upgrade/install script could download the tarball for you.  We would need to code in the URLs of some fixed mirrors, but that shouldn't be too difficult at all.  It may require a curl module for Perl though.
  
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Automatic instalation/updat feature
Reply #9 - Jun 5th, 2009 at 11:44am
Post Tools
cepheid wrote on Jun 5th, 2009 at 11:36am:
It may require a curl module for Perl though.

Yes, I know we can do it that way, but then we must code both. There might be servers that don't have this modules or don't allow scripts to import files from the internet/access the internet.
« Last Edit: Jun 5th, 2009 at 11:45am by deti »  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Automatic instalation/updat feature
Reply #10 - Jun 5th, 2009 at 11:50am
Post Tools
deti wrote on Jun 5th, 2009 at 11:44am:
Yes, I know we can do it that way, but then we must code both.

Of course!  The script should always support having the tarball locally.  I was just thinking that we could add an extra feature of having the tarball downloaded automatically, that's all.  In addition, not instead. Smiley
  
Back to top
WWW  
IP Logged
 
OH Eng
Past Team Members
Documentation Team
Offline



Posts: 4,026
Location: Pensacola, Florida USA
Re: Automatic instalation/updat feature
Reply #11 - Jun 5th, 2009 at 11:56am
Post Tools
There is still the matter of permissions not being universal across all servers and server configurations.

  

 
Back to top
 
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Automatic instalation/updat feature
Reply #12 - Jun 5th, 2009 at 12:52pm
Post Tools
@ OH Eng

Yes, you are right. I think at first we can use the CHMOD from the tarball, then, in an next step, check if the script can read an write something into all folders and files where this is needed. If this fails we provide  an second alternative CHMOD setting. For this we must build a routine that sets the CHMOD according to this alternative settings. If this also doesn't work on the check the user will get an info that we can't manage it and that he must set his CHMOD by himself.
« Last Edit: Jun 5th, 2009 at 12:52pm by deti »  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,932
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: Automatic instalation/updat feature
Reply #13 - Jun 5th, 2009 at 1:41pm
Post Tools
I think part and parcel of this is defining a set of 'supported' platforms. Then the first generation 'installer' can be constrained to 'get it to work' - then you add more options and platforms.

I'll also point out that the 'path to Perl' / shebang has been a recurring problem.  I have been thinking that a 'Server Compatibility' test was/is needed.

I know you guys (well most) all love Unix, but it isn't the be-all and end-all. (Note, I was Unix System V certified - so I'm not against it).  I expect that with Server 2008 Core, Powerscript, FastCGI, and 'legal' support for MySQL, the already large Windows server share will increase.

It should also be noted that Apache and IIS 'were' very different.  But when MS designed Server 2008, they brought in the Tomcat team to help optimize the core correctly, added a universal stack scripting tool 'powershell' (it has access to the MS internals) and implemented FastCGI in the IIS core.  As I have said before, IIS and Windows Server are really 'an application server', not a webserver, even if MS sometimes uses that term.  Its not semantics, its fundamentally different.

I'm currently on my second round of Server 2008 testing, and already know that Perl on Server 2008 is not going to be the same animal. (I'm taking notes, LOL)

I'm totally in favor of a straightforward installer.  In fact, my brain says it should be a 'standard/custom' installer (like most applications). The 'standard' installation should do a basic install with default folders.

(this is off-topic a bit - but I also think there should be a 'lite' feature set switch - for basic installs) - maybe down the road).

Smiley
« Last Edit: Jun 5th, 2009 at 1:46pm by JonB »  

I find your lack of faith disturbing.
Back to top
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Automatic instalation/updat feature
Reply #14 - Jun 5th, 2009 at 5:41pm
Post Tools
JonB wrote on Jun 5th, 2009 at 1:41pm:
I'll also point out that the 'path to Perl' / shebang has been a recurring problem.I have been thinking that a 'Server Compatibility' test was/is needed.

To do a compatibility test, you either will need shell access or a CGI script that isn't Perl-based.  You could easily use PHP, but then you'd have to require PHP on the server, something which YaBB currently does not require.  Other than that, I'm not sure what cross-platform CGI you could use, since anything compiled would not be platform-independent.  Is there something that would work?

(Speaking of which, are there any plans to move YaBB to PHP in the future?  Or, is there a reason you prefer to stick to Perl, besides the fact that it's already done that way?  PHP would have the benefit of being truly cross-platform, without having to do anything with "path to Perl," etc.  Obviously, it would be a lot of work to port it.)
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools
 
  « Board Index ‹ Board  ^Top