Advanced Usage of Deploy

Content

The same technique used in the "Basic usage" section can be used for custom content types using any of the standard CCK field types, including nodereferences. One feature of using Deploy in the more complex content types is that if you deploy a node that noderferences another node, then both nodes will be pushed to the remote server. Deploy will continue following nodereferences down the chain until all dependencies have been accounted for.

Basic usage of Deploy

For this demo we will create and deploy a new node, then deploy an update to the node.

  1. So on your staging server go to node/add/story and create a new story. Give it whatever options you like and save it.
  2. Go to admin/content/node. Check the node you just created, choose 'Deploy' from Update Options, and click the Update button.
  3. Choose 'Live Server' from the Server select list, and enter the username and password for the user you wish your deployment to run as on the destination server. Click the Submit button.
  4. Your deployment should go through two phases - Processing deployment plan dependencies and Pushing deployment plans.
  5. You should end up at Deployment Log Details, which lists the node you just deployed and a Result of 'Success'.
  6. Go to admin/content/node on your destination server. Your node should be listed there, and if you edit the node your settings should have all been transferred properly.
  7. Now if you like you can return to this node on your source server, make some changes to the node, and go through the same process to deploy it to the destination server. Your changes should be transferred properly.

Deployment plans

You can build a deployment plan which groups together selected pieces of content to be pushed to live at the same time.

    Installing Deploy

    Deploy requires two servers

    • A source server (which you will be deploying from)
    • A destination server (which you will be deploying to)

    While these do need to be separate and distinct Drupal installations, they do not actually need to be on two servers. They can be in separate subdirectories or virtual hosts on a single server and everything will work perfectly well. Two sites in a multi-site installation may work depending on the table sharing scenarios. This is beyond the scope of this guide.

    Note: There is a different installation process depending on whether you are installing a new fresh install of Drupal on both servers or if you already have an existing site with lots of content that you want to split into "source" and "receiving" sites (a.k.a. "stage" and "live").

    In either case, you'll want to make sure the servers have the same time, otherwise there may be synchronization issues. See http://www.cyberciti.biz/faq/howto-install-ntp-to-synchronize-server-clock/ for a nice set of instructions on installing the network time protocol (ntp) on CentOS, or search the internet for instructions for your OS.

    Instructions for Fresh Drupal Install on Both Servers

    Source server

      Deploy for Drupal 6

      The Deploy module for Drupal 6 is designed to have three parts that work together:

      • Deployment API - This implements the concept of a deployment plan. You create a deployment plan and add objects to it which will be deployed (content types, views, etc.) When the time comes these items are pushed to a server you specify via XMLRPC with an API key. The data stored about each item is extremely minimal, relying largely on the implementers to implement object-specific knowledge.
      • Deployment Implementers - Individual modules implement the deployment API to add the data they need to a deployment plan, and expose that ability to the front end. Currently there are three deployment implementers - Content Copy, System Settings and Views.
      • Deployment Services - Services modules which contain the knowledge to receive deployed data and do what is appropriate on the destination server. There are two deployment services included in this package - Content Copy and System Settings. This package also uses the Views service which comes included with the Services module, but it requires the most recent dev snapshot of Services.

      CMIS Alfresco

      Setting up a development environment should be pretty straightforward since this is mostly a vanilla installation of the products. But just so we have consistent environments here is a quick guide.
      Prerequisites

      • Apache 2.x with PHP 5 (curl, json, SimpleXML)
      • MySQL
      • Java and Ant

      Setup

      1. Setup Acquia out-of-the-box install from http://acquia.com/downloads
      • If not using Aquia Drupal, be sure to install CCK, as we'll be using this shortly
    1. Setup Alfresco Labs 3.0c out-of-the-box install
      • Assume using Tomcat bundle and configured for MySQL
      • Alfresco Labs 3 Stable (aka "3d") also works
      • Alfresco 3.x Enterprise also works.
    2. Download code from http://www.drupal.org/project/cmis-alfresco
    3. Install Alfresco-Drupal modules
      • Copy (or symlink) modules/alfresco to Drupal install modules directory (sites/all/modules or sites//modules)
    4. Enable the Alfresco module
    5. Set the Alfresco configuration settings
    6. Pages

      Subscribe with RSS Subscribe to RSS - Site administrators