ucdavis / sitefarm-distro-template

13 stars 9 forks source link

Lando recipe for SiteFarm fun. #16

Open reynoldsalec opened 6 years ago

reynoldsalec commented 6 years ago

This adds the .lando.yml file and a necessary lando settings.php file to get the easy Lando setup detailed in the documentation changes proposed on PR https://github.com/ucdavis/sitefarm_seed/pull/177

mrkmiller commented 6 years ago

Awesome Alec! I watched the badcamp presentation and have been interested to play with Lando.

I've run into a couple issues. I'm on OSx 10.11.6 using Lando v3.0.0-beta.25.

Attempt 1: First I checked out your branch in my current repo (where I already had previous installation with composer) and ran lando start. Everything appeared to go well, but when going to the provided urls I would get the following error.

The website encountered an unexpected error. Please try again later.
PDOException: SQLSTATE[HY000] [2002] No such file or directory in Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (line 79 of /app/web/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php).

Drupal\Component\DependencyInjection\PhpArrayContainer->createService(Array, 'database') (Line: 171)
Drupal\Component\DependencyInjection\Container->get('database', 1) (Line: 260)
Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters(Array) (Line: 62)
Drupal\Component\DependencyInjection\PhpArrayContainer->createService(Array, 'cache.container') (Line: 171)
Drupal\Component\DependencyInjection\Container->get('cache.container') (Line: 513)
Drupal\Core\DrupalKernel->getCachedContainerDefinition() (Line: 868)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 466)
Drupal\Core\DrupalKernel->boot() (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Attempt 2: I did a fresh clone into a new directory. Composer installed everything and cleanly applied patches. When going to a provided url it brought up the drupal install page. I clicked "install" and got the following:

Additional uncaught exception thrown while handling exception.
Original

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "cache.backend.null". Did you mean one of these: "cache.backend.memory", "cache.backend.apcu", "cache.backend.php"? in Drupal\Component\DependencyInjection\Container->get() (line 151 of /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Drupal\Component\DependencyInjection\Container->get('cache.backend.null') (Line: 83)
Drupal\Core\Cache\CacheFactory->get('render')
call_user_func_array(Array, Array) (Line: 248)
Drupal\Component\DependencyInjection\Container->createService(Array, 'cache.render') (Line: 171)
Drupal\Component\DependencyInjection\Container->get('cache.render') (Line: 71)
Drupal\Core\Cache\CacheTagsInvalidator->getInvalidatorCacheBins() (Line: 33)
Drupal\Core\Cache\CacheTagsInvalidator->invalidateTags(Array) (Line: 145)
Drupal\Core\Cache\Cache::invalidateTags(Array) (Line: 224)
Drupal\Core\Config\Config->save() (Line: 632)
drupal_install_system(Array) (Line: 1049)
install_base_system(Array) (Line: 676)
install_run_task(Array, Array) (Line: 554)
install_run_tasks(Array) (Line: 117)
install_drupal(Object) (Line: 44)

Additional

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal8.key_value' doesn't exist: SELECT 1 AS expression FROM {key_value} key_value WHERE (name = :db_condition_placeholder_0) AND (collection = :db_condition_placeholder_1); Array ( [:db_condition_placeholder_0] => system.theme.files [:db_condition_placeholder_1] => state ) in Drupal\Core\State\State->set() (line 71 of /app/web/core/lib/Drupal/Core/State/State.php).

Drupal\Core\State\State->set('system.theme.files', Array) (Line: 337)
Drupal\Core\Extension\ThemeHandler->rebuildThemeData() (Line: 73)
_drupal_maintenance_theme() (Line: 724)
drupal_maintenance_theme() (Line: 977)
install_display_output(Array, Array, Array) (Line: 264)
_drupal_log_error(Array, 1) (Line: 584)
_drupal_exception_handler(Object)

Any ideas?

mrkmiller commented 6 years ago

I just tried lando drush site-install ... and got the same error.

cfblack commented 6 years ago

@reynoldsalec I received the same error as @mrkmiller did.

reynoldsalec commented 6 years ago

Guessing this is an issue with a (Drupal) config file not getting linked, will have to check this out. Sorry for the lag here, didn't see the comments for some reason!

dsaludares commented 6 years ago

I was able to install SiteFarm on Lando by doing the following:

mkdir lando-sf && cd lando-sf

lando init

? What recipe do you want to use? drupal8
? Where is your webroot relative to the init destination? web
? What do you want to call this app? lando-sitefarm

lando start

git clone https://github.com/ucdavis/sitefarm-distro-template.git

cd sitefarm-distro-template

lando composer install

cd ..

mv sitefarm-distro-template/* .

mv sitefarm-distro-template/.* .

rm -rf sitefarm-distro-template/

lando info

Obtain https URL and database credentials from lando info. Go to URL to install Drupal.

Hope this helps!