xoops forums

redheadedrod

Home away from home
Posted on: 2011/9/5 3:10
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#1

Xoops install script upgrades

Due to some unexpected time on my hands I am starting to make some changes that I can see we need. I am stalled at the moment on my other projects so thought I would start making some much needed modifications to the Install program.


I find that installing Xoops tends to be a pain and takes time to do. While developing software I have a test server I am installing different versions of xoops from scratch and I find that it can be cumbersome to install a new site and too many of the install problems we have are due to things that the install program could do automatically for us.

So I am looking to make the install process much smoother.

The first step is to make it much easier to install by just uploading the files to the server and running the program. There is some tweaking that currently has to be done that is unnecessary when the script should be able to do it.

What I am currently working on is giving the install an unattended option as well as allowing defaults for most of the options in an external file. Also building the checksum feature into the program along with file permission checks. If the system will allow then changes to the permissions will be done if needed. I am also building into it a method allowing the trusted directory to be moved and renamed assuming the system allows.

Once this is done I am looking at a way to upload a compressed file, a script and setup file from which it will do the full installation. This would allow rapid deployment of xoops on multiple servers if desired by simply changing the data file that allows the install to be unintended. I will also be working on a method that will support upgrades with this version as well.


Anyone else have any ideas about stuff they would like to see added to the install script?

redheadedrod

Home away from home
Posted on: 2011/10/17 1:49
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#2

Re: Xoops install script upgrades

I am slowly working on this but I am slowly progressing and plan to have the main installation script done by the time 2.6 is available. My next class is on Javascript so I expect to heavily make use of Javascript in the install script when I am further along.

My current plans are to:
#1 redo the current script and include some new features to make it very flexible.
As mentioned, unintended installs is a big addition. I will also be adding an
"advanced settings" portion to allow for most common settings to be setup
if desired. In the process I will be doing some things to make it more
compatible with my "step #2". (May also make a new upgrade script, not sure
yet)

#2 Combo install/upgrade system. This will let you install or upgrade your site. I plan
to evolve this system from having the tar.gz file on the server along with this
install/upgrade system to eventually allowing a very small install script that
will download all you need if it is not already on the server.

#3 building an external install/upgrade system. Written (maybe) initially in Vbasic (Just
finishing up a class in it and want to build a project with it. ) If I do it will eventually
moved to C++ so it can be used on M$ or Linux systems. This will evolve into a remote
admin system that will allow installations, upgrades, option changes and lots more on
xoops sites without needing to use ftp or phpmyadmin.

Timeline for these is not set as I am working 2 jobs, am a single parent and going to school to gain a couple degrees in computers relating to security and programming. I am pushing to have #1 complete by the time xoops 2.6 is available. I want to help out on the core for 2.6 for a couple areas so I may not work on anything further past #1 until I am able to get what I can get done finished for 2.6.

redheadedrod

Home away from home
Posted on: 2011/10/17 2:01
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#3

#1 install script progress

So far I have designed 3 "xoops_version" type config files for this.

settings.php will contain all the version related information. Will also contain all the static user interface information that is related to "this" version such as the bottom link buttons and anything else I can think to pull into it.

site.php will contain all the settings related to the site. If this file exists it will allow unintended installs with ALL information needed included in this file. Including any "advanced" settings as well. When I build the "#2 install/upgrade combo" script that will initially create this file to allow unintended installs by using these scripts so as to not need a script for each version. Note that you don't HAVE to do an unintended install with this file, if you don't then it will let you step through the steps but using default values pulled from this file.

defaultsite.php This file will be available to use as a template for site.php but if there is no site.php this file will be used with default settings for everything listed above for site.php.

Theoretically installing xoops with this script will be easy if you setup site.php files for each site. You can then install many sites easily in a short period of time just by copying the site.php file into the directories and running the install script. The unintended install will also check for any errors as well and if any are found it will stop the script and show the errors. Use of a site.php file will be forced by the code to make use of custom directories. You will not be allowed to just modify the defaultsite.php and use that file.

markesh

Just popping in
Posted on: 2011/11/2 10:36
markesh
markesh (Show more)
Just popping in
Posts: 79
Since: 2007/7/14
#4

Re: #1 install script progress

Hi,

I happened to find this thread while searching for something else...

I'm very excited about your scripting, because I also think that XOOPS is lacking this. I don't need to sit in front of the monitor waiting. There are more important things to be done. At least I would like to go to sleep, while the machine does its work, and when I get up, I can go on with the rest of setting up my domain

I had to install XOOPS yesterday, and it almost drove me crazy to always do the same steps...

Some ideas which you maybe can add to your scripts:

It's always awful to transfer the files to my web space and then install XOOPS. We have now more than 3 000 files and 20 MB only for the htdocs. The usual way is download the zip, decompress it locally, send it to the server (which lasts several hours, I hate to say it...), manage the files and rights, then start the install etc. My aim is to have the complete installation files on my server, ready to install (directories ok, permissions ok). Then I copy this (on my server) only into the new directory, so I can start installation in an instance. Next time I need a new installation (e.g. for a new domain), I also copy the files the same way. And so on.

So this is the point where your script would start, as you are developing by now. It would be great if you could find a way to add such a feature.

btw: This could be a great service to XOOPS hosting services. There are already services that provide CMS like Drupal or Joomla to their customers: The customer decides whether he wants to instal this or that, and tho whole thing is done online from the server to the customer's account. That's my vision for XOOPS

kind regards and thanks for your work
markesh aka karim

First German XOOPS book: XOOPS-Buch.de

redheadedrod

Home away from home
Posted on: 2011/11/2 11:39
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#5

Re: #1 install script progress

My goal is to have a working replacement for the current script by the time 2.6 xoops comes out. I hope to have a beta version available by just after the first of the year. The first version will mostly just be a total revamp of the current script which should hopefully simplify installs for most people and allow you to install without sitting there.

After I have this done I will move on to the second stage which I mentioned as well. So that hopefully by the time 2.6 is in Beta I want to have the install script working so all you need to do is upload the install script and your zip file for xoops and it will handle the work for you after you set it up. (The original type script will also still be there if you don't want to use this. Atleast until this is proven to work well. )

This second script will hopefully evolve to allow someone to just download the install script and it will allow you to download the version of xoops you want, any compatible modules for that version and install or update anything you want. This however will take a while as my current class load is over whelming me so most work will likely be done during breaks.

Why don't you move the zip file to your host and unzip it there? Most hosts allow you to do this through a cpanel file manager. MUCH faster... Just a couple minutes instead of hours.

Attending College working towards Bachelors in Software Engineering and Network Security.

redheadedrod

Home away from home
Posted on: 2011/11/12 2:27
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#6

Re: Xoops install script upgrades

I am working on the install script this weekend and I hope to have the main structure and basic Functionality done by the end of the month. (Depending on my school load)

But I am curious about a few things while I am working on this.

What file permissions should the files have that are writable and what should they have when they are NOT writable?

At this point in time I am guessing the file permissions to be...

Writable = rwxrwxrwx or 777
non-writable = r-xr-xr-x or 555

With this I am requiring JavaScript to be enabled and I plan to include The latest Jquery (And maybe JqueryUI if it has anything I can use.)

I am also considering including the latest smarty even though there isn't much in the way of templates.

Depending on my Homework Load I am hoping to have something to test by the end of the month. Just not sure where I should post it to make it available since I haven't made anything I have done available to the public before.

Would like to have some feed back so I am not shooting in the dark here. Thanks!

Rodney
Attending College working towards Bachelors in Software Engineering and Network Security.

trabis

Core Developer
Posted on: 2011/11/12 12:41
trabis
trabis (Show more)
Core Developer
Posts: 2268
Since: 2006/9/1 1
#7

Re: Xoops install script upgrades

Hi Rodney,

Files:
writable - 777
non-writable - 644
mainfile.php - 444

Directories:
writable - 777
non-writable - 755

I don't understand why you want to include jquery and jquery UI in the install package since they are available in Xoops core. Do you want to make the install script standalone, not using any core file?

Xoops 2.6 will probably be using Smarty 2 because migration is not straight forward.

It would nice if you were using a public subversion repository, that way we could follow the development closely.

redheadedrod

Home away from home
Posted on: 2011/11/12 13:39
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#8

Re: Xoops install script upgrades

Thanks Trabis,

My intent is to make the Install Script Stand alone and easily flexible for current and future versions of xoops.

I don't want to assume that X3 will be using the same structure as X2 and then we need a total rewrite of the install script if it isn't.

My LOWEST priority is removing the xoops core dependencies but for anything I am adding I want to start without needing that dependency.

I am finding a lot of hard coded things related to defaults and settings. I will be moving these to a single class instead of the numerous places through out the code that is there now.

My intent is that once complete all anyone really needs to do to update the install script is update the configuration object.

I have not used a SVN before. So I am not real sure how to use it yet but I have started a repository at github.

https://github.com/redheadedrod/xoops-install





Attending College working towards Bachelors in Software Engineering and Network Security.

redheadedrod

Home away from home
Posted on: 2011/11/13 13:33
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#9

Re: Xoops install script upgrades

The main reason I am looking to make this able to install unattended is I will be building another, stand alone script that a user can put on their host and that script will download the latest version of xoops. That script will allow the user to upgrade or install from scratch. On a new install it will also allow inclusion of new modules as well.
Attending College working towards Bachelors in Software Engineering and Network Security.

redheadedrod

Home away from home
Posted on: 2011/11/19 2:47
redheadedrod
redheadedrod (Show more)
Home away from home
Posts: 1296
Since: 2008/2/26
#10

Re: Xoops install script upgrades

Ok, I am seriously thinking that this install script is in need of a serious overhaul well beyond what I was going to do. As this gets more complex I can see it could get really slow since the script is designed to reload the same page in over and over again including all the data. I am Learning Ajax to go along with my JavaScript right now and it looks like it would make ALOT of sense for me to basically scrap the majority of the install script and write an Ajax based application.

Unless I hear that this is a bad Idea I am going to be reworking this in that direction. I still am hopeful I can get this done quickly as I think the Ajax application can be developed alot quicker than my trying to rewrite the current code.

So if you don't see alot of activity on my Github this is why..

Rodney
Attending College working towards Bachelors in Software Engineering and Network Security.