Tuesday Dec 02, 2008

Many of you asked me which type of access you have to the virtual servers on EZstack.

In addition to the web interface,  you can access your dedicated virtual servers through ssh. In fact you have root - or super-user - access to the virtual servers, but you won't be able to modify the operating system:

# touch /usr/foo
  touch: /usr/foo cannot create

Many of the directories of your virtual servers are actually shared in read-only mode with the underlying operating system. Here is a list of directories that you can not modify:

  • /usr
  • /lib
  • /bin
  • /sbin
  • /platform
This sharing mechanism reduces the disk space required for each virtual server. In fact on EZstack by sharing these directories and using other optimization from ZFS to save disk space, we got the storage footprint of a virtual server dedicated to Apache to less than 8MBytes - and you still have your own copy of AMP.

Apache and MySQL are both installed in /opt/coolstack, and the /opt directory  is not shared with the underlying OS, so in /opt you can make any modification you'd like,  it will be only visible/available to you.

In fact, installing additional software or applications, /opt should be your preferred directory.

Thursday Oct 30, 2008

So here is the schema of what you get on EZstack:

Once you have an account you get a virtual server where Apache is up & running and in which you can deploy your PHP and HTML code. You also get a second virtual server where MySQL is up & running and that you can populate with your data. Servers can only communicate through the network - each has its own IP address so when populating MySQL, make sure that the Apache virtual server - named zoneApache* - and the cloned virtual server - named cloneApache* - can actually access to the database. Assuming you where allocated zoneApache2 (hence cloneApache2) you should add something similar to the following commands in your script when creating you database:

GRANT ALL PRIVILEGES ON MyDB.* TO dbAdmin@zoneApache2 IDENTIFIED BY 'adminPassword';
GRANT ALL PRIVILEGES ON MyDB.* TO dbAdmin@cloneApache2 IDENTIFIED BY 'adminPassword';

Now what is the cloned virtual server?

It's yet another v-server where Apache is running. It does not exist when you first connect to your account, but you can provision it within a click by using the EZstack web interface and it shares the application code - PHP & HTML located under htdocs - with the first Apache virtual server: the application code is actually located on a ZFS file system that is NFS mounted in the two virtual servers.

As soon as the cloned virtual server is provisioned, the load balancing is activated. This is a simple L7 load balancing performed on the HTTP requests, so if you are using another protocol than HTTP load balacing won't work.

The interest of this infrastructure is that you can test if your application can scale horizontally, by adding more servers. Note that EZstack is not designed for measuring performance or running benchmark, but it is good enough to perform functionnal tests and to see how scaling is easy with Solaris zones and containers.

Monday Oct 27, 2008

By default on EZstack, PHP is configured with the Alternate PHP Cache (APC) turned on. This gives you an extra boost in peformance but if you modify your PHP code it is likely that the modifications won't be visible until you restart Apache.

To restart Apache you can use the EZstack web-interface. Follow the Manage link in the main menu, and stop and restart the targeted Apache server:

This can be cumbersome if you have a lot of code to modify. Alternatively you can turn APC off. Just connect to the targeted virtual server, and edit the php.ini file located in /opt/coolstack/php5/lib , and switch apc.stat from 0 to 1.
You need to restart Apache for the new config to be taken into account, but after, any modification you make to the PHP code is immediately visible when browsing the application.

If you wonder what does it take to run your application on a cloud computing infrastructure you came to the right place.

This blog is designed to provide you with technical information and receipes to run an AMP or J2EE application on a cloud.

In addition, for companies and startups that are members of the Startup Essentials or Sun Partner Advantage communities, you will also find information about how to get all the benefits of the EZstack offering.

And if you do not have your EZstack account yet, here is the call to action: register into Startup Essentials or Sun Parntner Advantage and then request you account by sending a mail to asksun-ezstack@sun.com.

This blog copyright 2008 by Thierry Manfe