Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with Acquia cloud hosting #125

Closed
miiimooo opened this issue Mar 15, 2016 · 10 comments
Closed

Doesn't work with Acquia cloud hosting #125

miiimooo opened this issue Mar 15, 2016 · 10 comments

Comments

@miiimooo
Copy link

When deploying a project based on drupal-composer to Acquia cloud I run into a problem that has to do with the filesystem layout on Acquia cloud. Although we have #64 and this fork https://github.com/caxy/drupal-project mentions Acquia cloud I think it's a fundamental problem. Acquia cloud expects you to import your site starting from the docroot/web folder and everything below. It doesn't allow for the vendor folder to be outside. So you end up with a problem that the automated drush archive-dump doesn't include the vendor folder and after the import you get an autoloader error, something similar to:
require(/mnt/www/html/YOURSITE/docroot/../vendor/autoload.php): failed to open stream: No such file or directory autoload.php:16
Fatal error: require(): Failed opening required '/mnt/www/html/YOURSITE/docroot/../vendor/autoload.php' (include_path='.:/usr/local/php5.6/lib/php') in /mnt/www/html/YOURSITE/docroot/autoload.php on line 16

Personally, I prefer having the vendor folder outside the docroot/web so I just want to flag this issue. I think Acquia should make their workflow composer drupal friendly instead of this project trying to move the vendor folder or some other hack.

@weitzman
Copy link
Contributor

Acquia Cloud should handle drupal-project style projects just fine.

The issue here is that Drush's archive-dump has not yet decided how to handle Composer managed sites. This issue can be closed in favor of that one.

P.S. I work for Acquia and am the Drush maintainer.

@davidgil
Copy link

Hi weitzman,

can you explain how can i deploy code in acquia cloud. I mean, if i have vendor folder excluded from .git, how can i run composer update in acquia cloud?.

thx in advance

@weitzman
Copy link
Contributor

My recommendation is to develop on Github/Bitbucket and then in your CI, run composer install and if you r tests pass, push the fully built codebase to Acquia's git. So, only use Acquia's git for deployment, and not development.

@webflo
Copy link
Member

webflo commented May 20, 2016

I’m closing this issue because it has been inactive for a few weeks. @weitzman proposed a possible solution. We can add some docs to the README.md or provide docs for the various hosting providers in our wiki.

Please submit PRs.

Thanks!

@webflo webflo closed this as completed May 20, 2016
@cainaru
Copy link

cainaru commented Dec 14, 2016

We're having the same error as @miiimooo with attempting to push a local drupal-composer/drupal-project site to Acquia Cloud.

I'm new to D8 and Composer; I come from the world of D7, the world of using drush dl module_name and drush up, and I am working with a team that is new to Drupal, so please bear with me. Also, I apologize ahead of time if it seems like I am asking stupid questions or have completely misunderstood how to use Composer/this project.

We're redesigning our university's main site in D8 and hosting it with Acquia, and some of the modules we plan to use (Address and Search API Solr) require installation via Composer. Since Composer is where Drupal is headed, our Customer Success Engineer at Acquia agreed that it would probably be best for us to switch to a 100% Composer-based management for our site (we're extremely early in development and our early dev site was a standard Drush D8 site before we discovered the need for modules which require installation via Composer). So, right now we're trying to switch over to a Composer-managed site.

Here are the steps I took when trying to get my local drupal-composer/drupal-project onto an Acquia Cloud subscription:

  1. In terminal, navigated to Sites/devdesktop and ran composer create-project drupal-composer/drupal-project:8.x-dev composer_sandbox_test-dir --stability dev --no-interaction
  2. In Acquia Dev Desktop, clicked the plus button and then selected “Import local Drupal site”, and selected composer_sandbox_test-dir/web as local codebase folder
  3. Went to http://composer-sandbox-test.dd:8083/core/install.php and completed the steps
  4. Back in Acquia Dev Desktop, clicked “Host this site on Acquia Cloud” and selected devcloud:sandbox77 as the Acquia Cloud subscription that should host this local site and selected Dev as the environment to overwrite.

The error I received is the following:

require(/mnt/www/html/sandbox77rbrpgvas3z/docroot/../vendor/autoload.php):  [warning]
failed to open stream: No such file or directory autoload.php:17

Fatal error: require(): Failed opening required '/mnt/www/html/sandbox77rbrpgvas3z/docroot/../vendor/autoload.php' (include_path='.:/usr/local/php5.6/lib/php') in /mnt/www/html/sandbox77rbrpgvas3z/docroot/autoload.php on line 17
Drush command terminated abnormally due to an unrecoverable error.       [error]
Error: require(): Failed opening required
'/mnt/www/html/sandbox77rbrpgvas3z/docroot/../vendor/autoload.php'
(include_path='.:/usr/local/php5.6/lib/php') in
/mnt/www/html/sandbox77rbrpgvas3z/docroot/autoload.php, line 17
Removing /home/sandbox77/acquia-drupal.tmp.tar.gz...
Acquia Cloud was unable to import the site archive

I see that @weitzman proposed a possible solution, but we're currently not using a CI or developing on Github/Bitbucket. We git pull the site that is on our Acquia Cloud dev environment into our local environment(s), make our changes to the local copy (including core updates and/or module updates), and then git add -A , git commit -vm"Commit message", and git push to our Acquia Cloud dev environment.

My question is: Based on my situation here, what are the steps for getting a local drupal-composer/drupal-project based site into Acquia Cloud?

I'm not really sure what to do or where to go from here, especially since there's not much documentation out there. Any help would be greatly appreciated.

@drobinson
Copy link

@cainaru did you come to any resolution on this?

@alexisdray
Copy link

this issue for us is that vendor folder built via composer install runs fine locally, so as per acquia recommendations we commit the vendor folder to git and deploy.
fatal errors are produced on acquia environment, due to some variations in local versus acquia environment, probably PHP version.
removing vendor from git, manually downloading composer in livedev and rerunning on acquia cloud does work, however it quickly starts failing with memory errors as the composer.json grows.

@emb03
Copy link

emb03 commented Sep 22, 2018

I am having issues also with trying to understand how to deploy a drupal site built locally with composer drupal project. There is no documentation on how to do this. I am not using dev desktop, just git to move my code. Does anyone have any success with this? The basic problem is that when you install a site using composer the folder structure is different from what Acquia requires.

@FatherShawn
Copy link

You might look at http://github.com/digitalpulp/ballast which is our Docker based setup based on this project for some pointers on setup. We build on Codeship Pro, which has a free plan, but you could build in a deployment branch locally. Most of our projects are hosted on Acquia with this setup.

@emb03
Copy link

emb03 commented Sep 23, 2018

Thanks for this. I have two questions:
Can you clarify what you mean here:

After the initial setup, you should delete the Initial Setup section of this README.

Does this method preclude you from using DevDesktop to pull code and clone the site?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants