November 21, 2007

State of backups

Filed under: Miscellaneous — edg @ 7:40 pm

I wish i could say i have backups finished done. Unfortunately my computers are just as disorganised as me and so i’m not certain yet without checking a few things which is the latest version i have. I’ll check with the repository but i want to take an abstract look at the whole thing and see if i can work out what needs adding, what doesn’t need adding to get something good enough to release before testing it and sending it out there.

September 21, 2007

Linux & Web-CP

Filed under: Miscellaneous — edg @ 9:29 am

I’ve had quite a busy week as i had to go to uni on monday and then had a job interview tuesday and its the last week before people go off to uni so a last chance to see some friends for a while. I’m still no further forward with my test machine’s problems. It seems ubuntu is not suitable for the job at all. I’m probably going to decide on and buy a monitor for the machine in the next few days and it will become my main box, probably likely running slackware because slackware is not plauged by broken software. I cannot believe that a modern linux distribution would have trouble staying awake on an AMD 64 X2 that is brand new.

September 10, 2007

network failures & backups

Filed under: Miscellaneous — edg @ 8:23 am

i’m not sure why but currently the machine i use to work on webcp keeps cutting out over the network…. it’s not an overheating problem and its happening with either of the two 3com 3c905 10/100Mbps network cards in there….. i can’t check it at the moment because it hasn’t got it’s own monitor (been meaning to buy one for a while). Its running ubuntu and shows no signs of whats up.. i’ll boot it up and check the sys log to see if there’s anything helpful.. Maybe the network cards are to blame because i’ve seen a freeze before with completely different hardware in the machine except those cards. It has onboard LAN as a backup anyway.

On another note I changed the backups code recently (just after i got it working pretty well) to use arrays to keep track of what backup archives are being dealt with, its not working well though. I was attempting to solve the problem of how to move the data about backups around between webcp hooks but i think my only option is to serialize individual parts.
EdG

August 8, 2007

Backups - update

Filed under: Miscellaneous — edg @ 8:27 pm

I’ve been a little busy this week and also the PC that i use to test web-cp is waiting for some memory at the moment.. when that arrives i can use it again.. in the meantime i still have the latest source on my laptop so i can work on that outside. If that PC becomes my desktop then i will have a lot more power to work with and virtual machines will be a lot easier to work with. The issue of recursive backups is coming together nicely though. As i said its been a busy week due to recent birthday and looking for a weekend job. Now i have more time on my hands :)
EdG

July 30, 2007

Backups Update - Domain backups working fully

Filed under: Miscellaneous — edg @ 5:08 pm

This is what a backup of domain.com currently contains:

domain.com_web.tar
domain.com_webcp_data.txt
domain.com_metadata.txt
ironman_1185832487.tar

In order, domain.com_web.tar is the backup from the apache module for domain.com, domain.com_webcp_data.txt is the backup of the info webcp holds about the domain, domain.com_metadata.txt is the metadata file containing a list of files in the backup. ironman_xxx.tar is a backup of the ironman user from the domain.

OK there need to be some changes, probably domain.com_web.tar should become domain.com_apache.tar, ironman_xxx should become domain_ironman_xxx (because unix_users are different in 0.6). It is a start though. I still have to refine things and this is only domain backup but that means everything else should work ok without much modification. At the moment backup file names just come from the module but you could easily get the module to call a hook from the backups module to get the name (something Gyrbo suggested and i think pdrake suggested as well).

Whether the tar files need times in their names or indexes or seals or anything like that i don’t know. Also currently data is only serialized between the frontend and backend parts so nothing is serialized in the backup_manager itself…. it could easily be done if necessary for security though. Also for security and performance forking might be a good idea for each backup to be forked by the backup manager hook. Forking of hooks that the backend calls for a module may be a good feature and would be one way of ensuring backups are forked.

I think webcp could benefit from a method of exchanging data between different hooks rather than just being able to use data between functions in the same hook. I would hope this could be done with variables rather than file or database access.
EdG

ps any suggestions are welcome and as i said there’s quite a bit still to be done but i’ve finally got a system that can make a complete backup of a domain and all of its selected users.

Users.

Filed under: Miscellaneous — edg @ 10:52 am

I was just thinking about how every user of webcp is a user at some level but if you want to backup domains you have to look at domains, not the users who own them, makes sense but would it be easier if we just used various users inside webcp and store domains as users? obviously there has to be a concept of a domain just would it be easier if a user was more than the user concept we have now.

February 3, 2007

FreeBSD…the OS for me!

Filed under: Miscellaneous — edg @ 8:19 pm

it seems i’ve found the OS for me.. i know i change things around a lot but finally after two tries of FreeBSD i really like it.

Hopefully my general use of FreeBSD will help with web-cp development whether i have a FreeBSD VM running on top of my main FreeBSD or use a jail somehow or just in general use.

The main things i like about FreeBSD on the desktop/laptop are:
- Powerful, stable, advanced (Advanced high performance memory management and very effective file system)
- Support for other platforms - SMB, MSDOS/FAT partitions support…(sometimes not something that’s always there on a linux install or always working.
- Full WIFI and Bluetooth stack supporting WPA, WEP, WPA-PSK you name it from the OFF!! I’ve not seen a single Linux distro to date that does this (only comparing with ubuntu really but that is one of the best of the Linux distros) Bluetooth and wifi are incredibly easy to get to grips with on FreeBSD with the handbook’s help and installing the ndis wifi driver was very simple. Ubuntu didn’t properly detect my card or provide the WPA options i needed.
- DVD support - all i had to do was install VLC and DVDs worked. Ubuntu is one of the best Linux distros and when you try to play a DVD on 6.10 it is useless..until you mess about with “easy ubuntu” third party software and lots of extra package repositories!
- No requirement for Gnome/KDE/Anything bloated (you can setup what you like and remove it without having hundreds of dependancies pop up in your face or ubuntu style telling you ubuntu base must be removed or debian getting confused or fedora which doesn’t give you many options with package management i found)
- Customizable to the full, you can install what you want and do just about anything.
- Hardware support easy to add if not there (just load a kernel module and your soundcard is there, add it to loader.conf and your done! no messing with hundreds of choices then to find your card stops working, also better sound quality than linux distros it seems to sound better)
- sysinstall may not be a 3d or GTK GUI but it does the job very well giving lots of options, configure everything from services to networking to packages..
- installing the kernel source (required if you have to use NDIS windows network drivers for something - my realtek LAN card which is incredibly hard to get working with linux even though they make drivers and really hard with ndis on linux) was easy peasy..

All this adds up to a very easy to use system, if something’s not as you want it you can add a line to sysctl.conf or loader.conf changing the setting, most things are done via sysctl settings or kernel modules. ACPI follows the specifications better than linux installs and works out of the box on my laptop although using the Sleep states isn’t going too well just yet but i am working on that, it may just be i have to tell ACPI that its really running on windows NT :D

The package manager is well organised on FreeBSD and the installer is flexible, small and simple…

The only annoyances i find are:
- FreeBSD has no official ati graphics support - but that’s only required for gaming in 3d something not common for me anyway.
- Sysinstall seems to always ask what FTP mirror i want to use, it only takes a couple of key presses to choose FTP Passive -> UK but it would be nice if it saved the package location you used most.
- Sysinstall package search is not the most easy thing in the world

I’m on the lookout for a package management tool for freebsd but i’m guessing that you have to use sysinstall, it would be nice to have something in GNOME which i could use.

Either way the way everything works on FreeBSD and the hardware support make it a really cool OS, not to mention the performance and solid design of the kernel. It really seems to be in a different league from most Linux distributions - but maybe i’m just tired of seeing the same old - installer, install gnome, here’s your gnome everythings the same, wifi doesn’t work, dvds don’t play, hundreds of rubbish packages i don’t want installed by default, no propper ACPI support etc..

I just re-setup GEdit so hopefully it is now ready for tackling some web-cp… depending on whether i have it setup well enough to enable me to ignore the HTML and PHP together.

FreeBSD is a very nice platform - i encourage you to try it if windows or linux is annoying you. Although obviously there are things that you may need to consider such as nothing’s perfect and you may have some obscure hardware that is not yet supported, but that applies to anything, you will probably be pleasantly suprised at just how well-supported things are on FreeBSD. It has a well-made, uncheap feel :D Maybe the best bit is you don’t have to spend hours compiling bluetooth support or something into your kernel or wifi or messing about and you don’t have to mess about in text files comenting and uncommenting, you just change a sysctl value if something affects you..

…and the best bit is it has screensavers for the text console HOW COOL IS THAT!!! well i think its quite cool…. although i was suprised that i had to download Java JDK from freebsd foundation instead of being able to select it on sysinstall (presumably because Java only recently went GPL so they couldn’t include it until now)

edg - at a very uncluttered GNOME desktop

January 24, 2007

New module pop3

Filed under: Miscellaneous — edg @ 5:18 pm

server/lib/pop3.wcp.phps has been moved to a module.

don’t know if a mail / imap / pop3 module is best or just seperate imap pop3 but pop3 just seems to ensure a user’s mailbox in /var/spool/mail is renamed if a user is renamed and removed if removed… maybe this module should be renamed mail or made to support imap i’m not sure i just thought it was good to get the functionality out of pop3.wcp.phps as i was trying to cleanup functions.inc.php on the backend end.

anyway we’d need an imap managing module at some point really…

any thoughts?

November 14, 2006

Important module system changes

Filed under: Miscellaneous — edg @ 4:09 pm

Please note that the module system has now been changed in the following way:

Dependencies and Exclusions are now written in the format “modulefilename”.

This is the name that the file name starts with for the module, e.g. for unix_users.mod.phps the dependency to name would be “unix_users”.

Please note the underscore not hyphen.

This has been changed in all places in web-cp which deal with dependencies. The is_registered and is_enabled functions now expect to receive a file name rather than a module name. If you put “unix-users” as a dependancy then there is no chance of the system recognising that you want unix_users to be installed.

This has been noted on the wiki and forums also.
Please also note that i accidently committed these changes without adding a log note in cvs… i don’t know if its possible to add a log note without changing all those files that were modified. (A few modules referenced unix-users when they need to talk about unix_users since it is the actual name of the module file)

Just to make sure people understand this, the dependencies system does NOT use the Module Name (e.g. ‘Backups’, ‘Apache’, ‘Unix Users’, ‘NSS-MySQL’), for obvious reasons it uses the module part of the filename of the module (e.g. unix_users, nss_mysql, bw_quota) So if you want to list NSS-MySQL as a dependency then you would look at the file name of the NSS-MySQL module, realise it is nss_mysql and then specify “nss_mysql” as the dependency.
EdG

November 13, 2006

Setup changes

Filed under: Miscellaneous — edg @ 4:01 pm

I just committed some significant changes to setup.

The following changes are made:

1. Moved each step in setup_config.php to its own file to make things clearer.
2. Removed unnecessary code
3. Cleaned up case statements
4. Added comments

Each step now has its own file so if you want to change step 1 you simply edit setup_step1.php

This hugely reduces the clutter that was at the bottom of setup_config.php.

However the use of case statements and ? conditionals may still cause problems so there’s lots to work on in the various setup stages.

Also please note that only the part of the step that actually shows it to the user is in setup_step1.php or setup_step2.php etc.
Certain operations are still done at the beginning before any output is provided to the user and these still remain in a switch statement at the top of setup_config.php.

I also removed some redundant code e.g. there is no reason whatsoever for send_header(’Location: http://’.$_SERVER[’SERVER_NAME’].’:’.$cfg[’port’]);
to be in every case statement for every step since it happens exactly the same where it does happen. Simply making sure it only runs when $error contains nothing is all that is necessary.

I will try to better comment the setup process and work out issues as i get time. I would also like to if possible find a way of re-organising the cfg variables because so many of them have names that are not useful and we have previously talked about caching of the config file… perhaps most could be stored in the database e.g. like phpbb and then just retrieved on each page.

I think we may need to start categorising modules since we have so many now. We may also need to work on the dependencies of modules. This would also help setup_config.php since there is a huge amount of dependency code at the modules step.

At some point we also need to go through a lot of things with a fine-tooth comb as they say and try to conform to Gyrbo’s code guidelines - see http://web.archive.org/web/20051119075844/http://www.gyrbo.be/?page_id=2

Next Page »