NASA-PDS / portal-wp

New PDS Website driven by the PDS Web Modernization Working Group
Apache License 2.0
0 stars 0 forks source link

Test instructions for running WST Drupal Site #107

Open jordanpadams opened 1 week ago

jordanpadams commented 1 week ago

💡 Description

See emails from Paul P. re-access to GitHub repo and deployment.

⚔️ Parent Epic / Related Tickets

No response

nutjob4life commented 2 days ago

@jordanpadams could you copy/paste these emails from Paul P. into this ticket (or just forward them to my email if they're private)?

(Side note: who is Paul P.?)

jordanpadams commented 1 day ago

Instructions should be here: https://github.com/Web-Strategy-Team/Docker-Drupal-Demo/

jordanpadams commented 1 day ago

@nutjob4life ☝️

nutjob4life commented 1 day ago

Thanks @jordanpadams!

I'm starting with:

⬇️ Step 1: Clone the Repository

The instructions state:

git clone ssh://git@bitbucket.gsfc.nasa.gov:7999/wst/docker-drupal.git

This fails outside of JPL full tunnel VPN since the host bitbucket.gsfc.nasa.gov won't resolve, which makes sense.

After turning the JPL full tunnel VPN on, bitbucket.gsfc.nasa.gov does resolve, but connections to port 7999 time out. GSFC must be blocking access from JPL to port 7999, so no git clone using ssh protocol.

On the outside chance they have their BitBucket set up similarly to GitHub (with both ssh and https) access, I tried

git clone https://bitbucket.gsfc.nasa.gov/wst/docker-drupal.git

But that just gives a 404. (You can visit https://bitbucket.gsfc.nasa.gov/ with a browser and get redirected to NASA IdMAX login; but after logging in I just get an error, presumably because I'm not at GSFC.)

Anyway, that's as far as I can get. Hope this helps!

jordanpadams commented 1 day ago

@nutjob4life some background, the repo at https://github.com/Web-Strategy-Team/Docker-Drupal-Demo/ is a fork of that bitbucket. So anywhere you see anything in those instructions related to bitbucket, so assume they mean the github repo you are at: https://github.com/Web-Strategy-Team/Docker-Drupal-Demo/

nutjob4life commented 1 day ago

Okay, @jordanpadams , I interpreted testing the instructions meant literally following them to a T.

But with the caveat in mind that they haven't updated them after publishing to "GitHub", here's what I get:

⬇️ Step 1: Clone the Repository

Using:

git clone https://github.com/Web-Strategy-Team/Docker-Drupal-Demo.git

🔧 Step 2: Create the .env File

Easy enough:

cp .env.example .env

🔧 Step 3: Replacements (replace_me)

Replaced replace_me with various values—although the instructions give specifics for those in the next step.

🔧 Step 4: Configure .env Variables

Replaced specific .env variables as needed.

🔌 Step 5: Install Docker Drupal

Running

scripts/build.sh -l

This fails with:

Copying dummy default certs...
No settings.local.php file found. Copying project.settings.local.php to settings.local.php
1+0 records in
1+0 records out
32 bytes transferred in 0.000066 secs (484848 bytes/sec)
== Checking for existing containers...
Running: docker-compose --file docker-compose.yml --file docker-compose-services.yml --file docker-compose-dev-tools.yml --file docker-compose-local.yml  up --build --detach
scripts/docker-compose.sh: line 80: docker-compose: command not found

Instead of stopping here, let's dig deeper: apparently build.sh calls docker-compose.sh which wraps docker-compose so luckily there's one place to edit the call to the more modern docker compose.

Now … it's taking quite a bit of time! But failed with

failed to create network drupal_network: Error response from daemon: invalid pool request: Pool overlaps with other one on this address space

The README recommends increasing the subnet number by 1 in case it collides with another project, which I guess it does on my Mac Studio. Trying again!

After another long wait, there's:

…
…
…
 [success] The configuration was imported successfully.
 [success] Added administrator role to admin
 [success] Created a new user with uid 2
 --------- ----------- ----------- --------------- ------------- 
  User ID   User name   User mail   User roles      User status  
 --------- ----------- ----------- --------------- ------------- 
  2         auth_user               authenticated   1            
 --------- ----------- ----------- --------------- ------------- 
== Drupal Reset Complete...
You can login with u:admin p:F@rTmaguk3TF!hFl1nGeR
== Memory Limit...
1024M
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
Done in 36.70s.

         _/                                          _/   
    _/_/_/  _/  _/_/  _/    _/  _/_/_/      _/_/_/  _/    
 _/    _/  _/_/      _/    _/  _/    _/  _/    _/  _/     
_/    _/  _/        _/    _/  _/    _/  _/    _/  _/      
 _/_/_/  _/          _/_/_/  _/_/_/      _/_/_/  _/       
                            _/                            
                           _/                             
== Build complete 
You can reach your site under: https://localhost:8443
==========
You are ready to get started!
==========

Visiting https://localhost:8443 gives this:

Screenshot 2024-11-04 at 2 22 07 PM

The README says you can log into https://localhost:8443/user/login with

But that's not correct. Instead, you need to look at the output of build.sh -l for the correct, randomly-generated password.

Solr is available at http://localhost:8983/ as advertised, as is phpMyAdmin at http://localhost:8181

I ran the "Behat" tests and they all passed too (although there are just 3 scenarios of tests included).

Hope this helps!

nutjob4life commented 1 day ago

Oh and one other note; the instructions mention:

Bash, Composer, and Drush Commands

docker exec -it DRUPAL_web bash - Run a bash session on the web server. docker exec -it DRUPAL_web composer - Run composer commands on the web server. docker exec -it DRUPAL_web drush - Run drush commands on the web server. docker exec -it DRUPAL_mysql bash - Run a bash session on the database server.

Yes, this works, assuming you haven't changed the compose project name in your .env. The right way to do this is with docker compose exec.

jordanpadams commented 18 hours ago

@nutjob4life looks great! will assign next tasks from parent task: https://github.com/NASA-PDS/portal-wp/issues/106

nutjob4life commented 18 hours ago

@jordanpadams superb, thanks!

Okay to go ahead and close this one?