Yii appliance - VMware image at your service

Let’s discuss it here because Qiang didn’t open a new announcement topic for it.

Could someone tell me the reason why PostgreSQL got included in the package instead of MySQL? Is it better in terms of performance? I thought InnoDB couldn’t be overtaken. :P

I see the point of lighthttpd. During debugging, you don’t need the additional features Apache can offer.

What can be done to this software to be usable in production sites? Isn’t this something that also can be installed as a standalone OS with preconfigured applications?

Does it have any advantage comparing to XAMPP?

This is only for demo purpose. Because wei is the author behind it, I don't know exactly the reason why choosing pgsql over mysql. The main goal is to keep the image as small as possible.

The other reason for pgsql was simply that I was able to compile pgsql server and the client libs with uclibc. I had a tough time with mysql and its client libs. Same reason with using xcache instead of APC.

Comparing to XAMPP is not appropriate since this image contains an OS and requires vmware to run. This is a virtualization solution that provides a complete self contained system.

Since it uses virtual disk, you can have multiple copies of your application in different stages.

For production purposes, using an existing well known server platform is necessary as this image lacks support, security, etc.

Also, we noticed that many people faced problems in setting up their PHP environment. May be this solution is easier? Although vmware server can be a complex beast as well. VMware player (the version that doesn't allow editing of the images) is not less complicated either.

This option also expose the user to running a linux server environment, akin to most web hosting.

Do you have long term goals with this package? Demonstration purpose has been mentioned, although simply showing off your knowledge regarding WMware doesn’t deserve this much effort. Are you willing to create a well-tailored development system?

Why couldn’t I have different revisions of my application without a virtual disk? Or did I misunderstand you?

I also can’t see the point of forcing developers to use Linux. What difference would it make when it comes to PHP development?

If using virtualization can be as difficult as setting up a PHP environment, then why bother? (I personally don’t have experience with VMware. If it is so hard to use, I think a bunch of people would appreciate a good short tutorial, or a link to one, at the download section.)

When using virtualization techniques, isn’t performance degraded? Adding layers to the underlying system always makes benchmarks worse. (I know, this only applies to development computers, but this still makes sense to me.)

Due to generally lower costs (much everything is open-source), and a perceived performance advantage (less GUI bloat), most web hosting is Linux-based.

Also, the advantage of this of course is to provide a fully configured package that is almost "Plug and Play". However for someone who may never have used VMWare it may be a little tougher to set up.

For Windows users, maybe we could provide some XAMPP-based package as well?

I think this is great. Things like that are one of the reasons that make me prefer Yii. Thanks alot guys!

The wheel has been invented. This package would be totally pointless. Although redistributing xampp with built-in yii could be appreciated, if their license allows to do so.

      I think my concern problem will be finish .,After I saw the answer to my question here in this discussion.,


inventory control

Quote

Quote

For Windows users, maybe we could provide some XAMPP-based package as well?

The wheel has been invented. This package would be totally pointless. Although redistributing xampp with built-in yii could be appreciated, if their license allows to do so.

Yes, that's basically what i meant.

And it would be pretty easy to set up, just use the default XAMPP package, insert Yii in an appropriate place and setup include_path to have the path to the Yii framework folder.

But it could be helpful for newbies.

Qiang or Wei, whoever is responsible for downloads and sister projects: if I made a special xampp redistribution, will you publish it?

How big will be the release file? Google code project has an upper limit 100MB per file, I think.

If you can make this, I will make it available to other Yii users.

Do make sure the package is configured such that all Yii demos work and yiic shell works.

Thank you very much!

The linux package is compressed by tar.gz, and its pure size without yii is 57 MB.

The zipped windows lite edition is around 50 MB (I don’t want to go with the full version as it contains several add-ons like webalizer, adodb, zend optimizer, eaccelator and so forth, which are mostly unneeded during development). The self-extracting 7-zipped version is 18 MB.

Tar.gz is fine for the linux version. Should I create two packages for windows, as 7-zip compression is not supported by default? (A PHP developer should be prepared, but who knows.)

If exe files were allowed at Google Code, I can compress self-extracting 7-zip files for the windows version. Are executables forbidden? (If so, I still can zip the exe. It’s soo complicated to decide. ;D )

Also let me know which Yii revision should get implemented. I believe the latest stable version is the recommended one, but you may want me to add the nightly snapshot.

Another update: should I include the documentation files, so this could be an all-in-one pack?

Quote

If using virtualization can be as difficult as setting up a PHP environment, then why bother? (I personally don't have experience with VMware. If it is so hard to use, I think a bunch of people would appreciate a good short tutorial, or a link to one, at the download section.)

VMware Server is really not that hard to use, or even VMware Player. Start it, open the virtual machine provided, click on the machine to start and you are good to go. Especially because of the fact that these products are free, you cannot alter the properties of an existing vm or create a new one, so there are really no complicated settings to deal with.

Quote

When using virtualization techniques, isn't performance degraded? Adding layers to the underlying system always makes benchmarks worse. (I know, this only applies to development computers, but this still makes sense to me.)

Just for the record, virtualization is the future. Because hardware tends to evolve more quickly than operating systems and software, it's a generic rule that it does not get fully exploited, thus wasting resources. Virtualization fits in this gap. Imagine a powerful server that hosts 5-6 virtual machines, each running a different OS, different software, separated from the other environments. The added benefit of running a variety of vm(s), each serving a different purpose is more than if you had one system, with one OS, a bunch of software packages that might conflict with each other… There are hardware vendors, like HP, that sell VMware-targetted servers. Imagine a rack, that consists of "slices" of servers, each with 12 (and more) GB of RAM, running a specialized version of VMware (VMware ESX), which is a light Linux OS, added with a VMware software layer that provides the ability to host a VMware guests on this server. Each server ("slice" as I mention above) is capable of running at least 5-6 vm(s) with a very good performance.

Try VMware Player.

@pestaa: the purpose of providing XAMPP is to help new users to install their development environment. This is different from the Yii appliance which is for demo purpose.

For this reason, the XAMPP package should be bundled with Yii 1.0.6. And it should be bundled in a way such that  in future if a user wants to upgrade Yii, it can be done easily (because we don't want to maintain this XAMPP package all the time.)

In this package, I think it would need at least PHP PDO and sqlite/mysql PDO drivers. And all the Yii demos should work. Also, yiic commands need to work (which seems to be the biggest problem that new users are facing).

I just confirmed that Google code allows uploading .exe file.

Do not use 7-zip because not everyone has software to uncompress it. Using either .zip or .tar.gz is sufficient, even though the size is a little bigger.

Thank you very much.

Qiang,

Thanks for the clarifications.

I’m happened to have tested xampp lite for windows so far. It comes with ‘factory enabled’ pdo+pdo_mysql, I’ll change the default option so pdo_sqlite will be turned on as well.

I modified the framework/yiic.bat so it uses relative path to php.exe instead of environmental variable. Is this fair enough?

Since Google code grants to upload executables, I think it should be fine with users to provide self-extracting 7-zipped files. That format doesn’t need any third party software to uncompress. Of course I’ll wait for your approvement and choose the output accordingly.

You haven’t answered the question regarding documentation. Should I add to the package?

I thought it’s as simple as deleting the old framework directory and copying the new one. What could a xampp installation do about this?

@GoofyX

Thanks for the deep introduction. This all sounds very exciting. I’ve seen some kind of virtual private host, so this isn’t very new to me. :)

Modifying framework/yiic.bat is probably not a good idea because if users later upgrade to a new version, they will still have the same problem. So let's just leave it as si.

Do not include documentation.

Yes, using self-extracting 7-zipped file is fine. Thanks!

@pestaa:

Glad you are taking my suggestion so seriously!

If you might need any help whatsover do let me know.

The default XAMPP actually comes with a large number of extensions, but alot of them are not enabled in php.ini. Among those i think especially these should be enabled:

  • pdo_sqlite (but you guys already knew)
  • APC, since the Yii guides have such a strong focus on using it. But you'll then have to disable Zend Optimizer as there's a conflict between the two extensions.

One more thing, please make sure you include the license file in the package. AFAIK, XAMPP is using GPL. So we can re-distribute it as long as the license file is included.

@WilsonC,

I will contact you in the future if help is needed. :) Thank you very much.

Yes, sqlite is now turned on by default. It’s a good idea to replace Zend Optimizer with APC. I’ll figure out what additional extensions should be enabled as well while also taking performance into consideration.

@Qiang,

I have written a tutorial/introduction to this package, including release notes, licenses and responsibility statements. I do everything I can.

May I have the pleasure to announce it to the public?

Thank you, pestaa!

Would it be possible that this package also contains the latest phpunit and selenium RC? The reason I am asking this is because I just added a testing framework based on phpunit and selenium in 1.1. I think sooner or later, people will start looking for how to set up phpunit. If it is too much trouble, just forget about this request.