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

Make local from demo #159

Closed
wants to merge 10 commits into from
Closed

Make local from demo #159

wants to merge 10 commits into from

Conversation

dannylamb
Copy link
Member

Adding back in old "make dev" functionality to give folks the demo box as a 'local' install.

@misilot
Copy link
Contributor

misilot commented Apr 23, 2021

Thanks for putting this up @dannylamb

Working through this I am getting the following error when running make local-from-demo and on the $(MAKE) update-settings-php ENVIROMENT=demo step from the call to the demo task.

Starting ksul-isle-dc_matomo_1  ... done
make[2]: Entering directory '/klib/app/isle-dc'
realpath: The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located./sites: No such file or directory
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.
The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:
  - Navigate to any where within your Drupal project and try again.
  - Add --root=/path/to/drupal so Drush knows where your site is located.
chmod: /settings.php: No such file or directory
make[2]: *** [Makefile:128: update-settings-php] Error 1
make[2]: Leaving directory '/klib/app/isle-dc'
make[1]: *** [Makefile:327: demo] Error 2
make[1]: Leaving directory '/klib/app/isle-dc'
make: *** [Makefile:359: local-from-demo] Error 2

However if I run make demo it seems to build correctly as expected.

UPDATE 4/26/2021:

So I believe this is related to USE_SECRETS=true and trying to set ENVIRONMENT=local if I don't touch those settings it seems to build correctly.

@dannylamb
Copy link
Member Author

Thanks for this @misilot , I'll circle back soon and investigate.

@mdlincoln
Copy link

This is an extremely useful task for us to be able to run. Our use case: we want to generate a codebase folder with all of the latest islandora_defaults (with taxonomy definitions, Islandora Models content, etc.) fully installed, and use that as a foundation for further development.

During the 2021-05-25 Open Meeting, @dannylamb did a walk-through of the local-from-demo task, and we isolated an issue where the codebase downloaded from the task was outdated and didn't include a number of taxonomy definitions currently in islandora_defaults (re: Islandora/documentation#1818) After some investigation, we found that this task skipped over enabling islandora_defaults, thus the hydrate task never imported the config from it b/c there was already existing config in the codebase.

Proposed solution was to add some kind of flag/logic that lets the user state whether or not they want to force an install of cmu_defaults.

DonRichards and others added 2 commits May 25, 2021 14:50
* Add Docs for the .env file

* Correct formatting

* Extend definition of secret

Co-authored-by: Don <Don@born-digital.com>
@dannylamb
Copy link
Member Author

@misilot Would you mind giving this another go? I've made some changes and have managed to get this working for @mdlincoln , @hachacha and @bondjimbond.

Curious to see if it works for you as well. Thanks for being patient with us while we sort this out.

@dannylamb
Copy link
Member Author

@mdlincoln I just pushed up a toggle for enabling islandora defaults when you run make local. In your .env file, set ENABLE_ISLANDORA_DEFAULTS to control the behaviour (defaults to 'true').

@misilot
Copy link
Contributor

misilot commented May 26, 2021

@dannylamb

grep: /var/www/drupal/web/sites/default/settings.php: No such file or directory

In Filesystem.php line 202:

  Failed to chmod file "/var/www/drupal/web/sites/default/settings.php".


islandora:settings:set-hash-salt [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command> <salt>


In Filesystem.php line 202:

  Failed to chmod file "/var/www/drupal/web/sites/default/settings.php".


islandora:settings:set-flystem-fedora-url [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command> <url>

PHP Notice:  Uninitialized string offset: 0 in /var/www/drupal/vendor/drush/drush/src/Preflight/ArgsPreprocessor.php on line 72
make[2]: *** [Makefile:128: update-settings-php] Error 129
make[2]: Leaving directory '/klib/app/isle-dc'
make[1]: *** [Makefile:327: demo] Error 2
make[1]: Leaving directory '/klib/app/isle-dc'
make: *** [Makefile:359: local-from-demo] Error 2


When running make local-from-demo

@noahwsmith
Copy link
Contributor

This is super duper obsolete

@noahwsmith noahwsmith closed this Apr 15, 2022
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

Successfully merging this pull request may close these issues.

5 participants