Installing Deploy

Last updated on
30 April 2025

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

Here is a video of the below instructions.

Source server

  1. Download the following modules. As of June 2013 you will need entity_dependency 7.x-1.x-dev (or a release newer than 7.x-1.0-alpha1)

    For now, you need latest dev version of at least deploy, services, uuid, ctools, entity_dependency, : Deployment, Services, Entity API, UUID, CTools, Views, Entity Dependency, File Entity:

    drush dl deploy services entity uuid ctools views entity_dependency
    
  2. Enable the following modules: Deployment, Deployment UI, Views, Views UI, Chaos Tools, Universally Unique ID, Services, REST Server, Universally Unique IDentifier, UUID Services, Entity, Entity Dependency, File Entity
    drush en deploy deploy_ui services rest_server uuid entity uuid_services ctools views views_ui entity_dependency file_entity
    
  3. Temporary solution: make sure you've put spyc.php into the /sites/all/modules/contrib/services/servers/rest_server/lib folder, [You may or may not have /contrib/ directory] it can be found at http://drupal.org/node/1313976#comment-5317796 or https://github.com/mustangostang/spyc/. Although this works, it is advised to install the libraries module and place the spyc.php file in the sites/all/libraries/spyc folder (sites/all/libraries/spyc/spyc.php).
  4. Temporary solution: Patch the deploy module with the patch from here: #2290059: File deployment doesn't work due to missing DeployIterator plugin. - this one is already commited to latest dev
  5. Go to admin/structure/deploy/endpoints and click "Add".
  6. Enter 'Live Server' (or whatever you want to call your destination server) for the Name. Choose "Session authentication" for Authenticator, and "REST JSON" for Service. Click "Continue."
  7. When prompted for a username and password, choose the username and password for user 1 on the destination site. Click "Continue."
  8. For Endpoint URL, enter 'http://your-destination-site.example.com/services/rest'. Click 'Finish'. Note that it appears that any path other than '/services/rest' on either origin or destination generates a #1388862: Request response error: -1002 missing schema.
  9. Now, create a deployment plan. Go to admin/structure/deploy/plans and click "Add".
  10. Give it a name like "Push to live server." Aggregator: Managed aggregator. Fetch only: unchecked. Deployment processor: Queue API. Endpoints: the endpoint you just created. Click "Continue." Plugin: Deploy Iterator (from patch to deploy module listed in #4 above).
  11. Delete successfully deployed items: unchecked. Click "Continue".
  12. Click "Finish".

Destination Server

  1. Download the following modules: Services, Entity API, UUID, CTools, Views,
    File Entity
    drush dl services-3.x-dev entity uuid-1.x-dev ctools-1.x-dev views file_entity
    
  2. Enable the following modules: Views, Views UI, Chaos Tools, Universally Unique ID, Services, REST Server, UUID Services, File Entity
    drush en services rest_server uuid entity uuid_services ctools views views_ui
     file_entity
  3. * rest_server will require libraries if it is not installed.

  4. If you will not be authenticating with user 1, you must ensure that the administrator role on your destination server has all permissions explicitly for the above modules, otherwise file entities may not deploy. For example, the File Entity module's 'Bypass file access control' permission is important to getting file deployment working if you are not authenticating as user 1. See this issue for some background.
  5. Go to admin/structure/services and click "Add".
  6. Under Name fill in 'live' (or whatever you want to call your destination server -- must be a machine name). Server: REST, path to endpoint services/rest, Authentication: Session authentication. Click 'Save'.
  7. Back at the listing page, click the "Edit resources" link and check off the things you want to be pushable from the source site, e.g. file: create/retrieve, node: create/retrieve...
    You must enable the User actions "Login" and "Logout" in the resources section for Session Authentication to work.
  8. Back at the listing page, click on the arrow next to the "Edit resources" link and click on "Edit server". Check "application/x-www-form-urlencoded" and save.

Help improve this page

Page status: Not set

You can: