1

Install Package dependencies separately over Cloud

Hi all,

I am working on a project that sets up packages on the cloud.

For example, If i want to setup Drupal, i need seperate machines to maintain separate tasks, like mysql in one machine(cloud instance/node 1), apache server in another machine(cloud instance/node 2), etc.

So if drupal.rpm has dependencies apache.rpm(has deps too) and mysql.rpm(has deps too)

Is it possible in rpm package manager(yum) to handle such customizations & above requirement?

please suggest any other way to implement the same.

2 Answers2

1

You'll probably have to rebuild the RPM package for Drupal after modifying its spec to only depend on Apache httpd and adding MySQL only as an optional dependency.

See http://wiki.centos.org/HowTos/RebuildSRPM for more information about rebuilding RPM packages from the SRPM.

joschi
  • 20,747
  • 3
  • 46
  • 50
1

RPM dependences reflect only the packages necessary on that server to make your package work. There's no such thing as cross-server dependencies in the RPM world (or .deb or any other package management solution).

In the case you described above, you've incorrectly marked MySQL Server as a requirement for drupal. Drupal does not require a MySQL server instance to be present on the machine where you install the software, it only requires the PHP MySQL client libraries.

By the same token, you don't have to have Apache present to install Firefox -- technically Firefox is useless without a web server to connect to, but there is no inherent assumption that the webserver has to run on the same machine as the browser. The drupal / mysql situation works exactly the same way.

tylerl
  • 14,885
  • 7
  • 49
  • 71
  • Yes i know, i mentioned it as an example, actual question was to know how to implement this remote package dependencies –  Aug 17 '10 at 05:52
  • You wouldn't use the server's package management system, since it's unaware of other servers. Instead, you'd bake it into whatever server management and provisioning system you're building. Or do it manually. – tylerl Aug 17 '10 at 06:02
  • could you please elaborate on server management and provisioning system ? –  Aug 17 '10 at 07:13
  • Presumably you're writing a server management and provisioning system -- your "project that sets up packages on the cloud". It needs to know how to assign different servers to separate roles, such as "database server", "web server", etc. – tylerl Aug 18 '10 at 02:50