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

No longer use volume for Matomo install #143

Merged
merged 2 commits into from May 12, 2022
Merged

Conversation

nigelgbanks
Copy link
Contributor

@nigelgbanks nigelgbanks commented Apr 15, 2021

Having the code base in a volume makes upgrades and migrations a pain,
additionaly the file copies on initial startup can be really slow on NFS
drives.

Having a volume allows for the dynamic installation of plugins, but then
that is specific to that instance, if you were to run a several stage
environment dev/stage/prod then one would need to manually check that
the plugins exist is each environment. Better would be to extend the
image and pack the plugins in with the installation.

@see matomo-org/docker#57
@see matomo-org/docker#161

Additionally creates an administrator user per registered site so that they can be managed in an isolated way. These site administrators cannot modify other sites configuration or install plugins on their own. This is the user you should provided to the users of your site.

@nigelgbanks
Copy link
Contributor Author

Not 100% sure if related but seeing something odd in AWS when testing further, putting it into draft until I can confirm it's unrelated.

@nigelgbanks nigelgbanks marked this pull request as ready for review April 20, 2021 12:58
@nigelgbanks
Copy link
Contributor Author

I can't reproduce the issue I encountered in AWS and I have a sneaking suspicions it was due to my environment configuration rather than this change. That being said please test.

@g7morris
Copy link
Contributor

Hi @nigelgbanks curious what action or review is further required here? Should this go into the March / April 2022 - isle-buildkit 1.0.0 release ?

@g7morris g7morris added the question Further information is requested label Mar 14, 2022
@g7morris g7morris added this to Questions / Consider for release in March / April 2022 - isle-buildkit 1.0.0 release Mar 14, 2022
@nigelgbanks
Copy link
Contributor Author

Just needs to be tested & merged, it would be good to get this in prior to the release.

@g7morris g7morris moved this from Questions / Consider for release to To Do in March / April 2022 - isle-buildkit 1.0.0 release Mar 23, 2022
@g7morris
Copy link
Contributor

Reporting results from testing process:

Test Environment:

  • OS: Ubuntu 20.04 LTS Desktop
  • CPU: Intel i7-10510U (8 cores) @ 4.900 GHZ
  • Mem: 32 GB

Test process / steps

  • git clone git@github.com:Islandora-Devops/isle-buildkit.git to local laptop
  • git checkout /matomo-volume-redux`
  • ./gradlew build

Attempt 1

Ran for about ~15 mins with full CPU lockup the entire time. @nigelgbanks Any way we can reduce that?

#30 [stage-3 11/11] RUN chmod a=r,u+w /etc/sudo.conf
#30 DONE 1.5s

#31 exporting to image
#31 exporting layers
#31 exporting layers 8.6s done
#31 writing image sha256:f4a0d7565b355033e6039e19c4b4a3e43d48b20266ea99c5bae0f1005f879ec8 done
#31 naming to docker.io/local/code-server:latest done
#31 DONE 8.6s

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':demo:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':milliner:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 12m 28s
29 actionable tasks: 29 executed

Attempt 2

  • ./gradlew build
#19 exporting to image
#19 exporting layers
#19 exporting layers 0.5s done
#19 writing image sha256:93387fedb2d06c8ea27d34da39d80312258fb7d3e838715ccf4a8249e6f9a861 done
#19 naming to docker.io/local/solr:latest done
#19 DONE 0.5s

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':milliner:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':recast:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':demo:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 28s
33 actionable tasks: 7 executed, 26 up-to-date

Attempt 3

  • ./gradlew build
> Task :demo:build FAILED

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':milliner:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':recast:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':demo:build'.
> Process 'command 'docker'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 9s
33 actionable tasks: 4 executed, 29 up-to-date

@nigelgbanks I'm not having any luck trying to get this to work?

Having the code base in a volume makes upgrades and migrations a pain,
additionaly the file copies on initial startup can be really slow on NFS
drives.

Having a volume allows for the dynamic installation of plugins, but then
that is specific to that instance, if you were to run a several stage
environment dev/stage/prod then one would need to manually check that
the plugins exist is each environment. Better would be to extend the
image and pack the plugins in with the installation.

@see matomo-org/docker#57
@see matomo-org/docker#161
@nigelgbanks
Copy link
Contributor Author

Ran for about ~15 mins with full CPU lockup the entire time. @nigelgbanks Any way we can reduce that?

Nothing to be done about that, it's due to compiling Imagemagick and a few other things. Normally it'd download a cached version from the server but since this pull request is a year old it's image is not in the remote cache anymore.

I'm not having any luck trying to get this to work?

Looks to be failing on demo and crayfish based images, mostly likely this is cause they refer to commits in that no longer exists so it's failing to build. I'll rebase main and push.

@nigelgbanks
Copy link
Contributor Author

Bit of a side note when testing you can just pull down the latest commit rather than building locally. Though since this is so old it's probably best to wait for https://github.com/Islandora-Devops/isle-buildkit/runs/5665122574?check_suite_focus=true rather than using the older commit before I just rebased now.

@g7morris
Copy link
Contributor

@nigelgbanks I don't think I'm understanding what you mean.

What are you recommending I change about the following test steps?

  • git clone git@github.com:Islandora-Devops/isle-buildkit.git to local laptop
  • git checkout /matomo-volume-redux
  • ./gradlew build

@nigelgbanks
Copy link
Contributor Author

nigelgbanks commented Mar 23, 2022

The pull requests trigger an auto-build and push system so that you can use the commit hash as a TAG in isle-dc. So when https://github.com/Islandora-Devops/isle-buildkit/runs/5665122574?check_suite_focus=true is finished you can use the commit 0c6e9de3933071648c88e69b7b6185e5c9e2f5a6 as TAG without the need to build locally.

@g7morris
Copy link
Contributor

Ah so I can leave out the .gradle bits and go straight to using isle-dc with the resulting commit tag. Hmm I get that but at the same time testing the mechanics of the ./gradlew build seems warranted too no? Otherwise we would have merged and not found this issue?

I'm fine with doing both in this sense.

@nigelgbanks
Copy link
Contributor Author

./gradlew build seems warranted too no?

Doesn't hurt. It's the same as what Github actions is doing so it can be skipped.

Otherwise we would have merged and not found this issue?

This issue wouldn't have occurred after it was merged. After merging it would be in the same state as my rebase just now.

@g7morris
Copy link
Contributor

g7morris commented Mar 23, 2022

Test Environment

  • OS: Ubuntu 20.04 LTS Desktop
  • CPU: Intel i7-10510U (8 cores) @ 4.900 GHZ
  • Mem: 32 GB

Steps taken to test

  • git clone git@github.com:Islandora-Devops/isle-dc.git to local laptop
  • cd isle-dc
  • cp sample.env .env
  • vi / nano .env
    • Changed TAG= to TAG=0c6e9de3933071648c88e69b7b6185e5c9e2f5a6
  • make demo

Results

@nigelgbanks Process worked great. Only error worth reporting from https://islandora.traefik.me/admin/reports/status#error is

Screenshot from 2022-03-23 16-24-31

Should an enduser expect this to work on a local in this manner?

I would think yes but I defer to you and @dannylamb for thoughts

Should this be a new ticket / issue?

@nigelgbanks
Copy link
Contributor Author

@g7morris not 100% sure but that might be something about the configure in isle-dc, Ya I'd say that'd be a new ticket. It's not really related to Matomo.

@g7morris
Copy link
Contributor

g7morris commented Mar 23, 2022

Roger that. I'll file a new issue in isle-dc land. Should I be testing logging into Matomo on my local then? Feels like we're almost there but I'm not sure on what to test per se for Matomo specifically?

@nigelgbanks
Copy link
Contributor Author

@g7morris yup that sounds good

@g7morris
Copy link
Contributor

g7morris commented Mar 23, 2022

Okay I'll just test logging in and see what there is. If it works and I see things, then this should pass. If not, then we'll just discuss and go from there.

@g7morris
Copy link
Contributor

Okay new issue filed here Islandora-Devops/isle-dc#241

@g7morris g7morris moved this from In Progress - Dev or Testing to Tested - Back to Dev for review or merge in March / April 2022 - isle-buildkit 1.0.0 release Mar 24, 2022
@g7morris
Copy link
Contributor

Results

@nigelgbanks Can't let this one pass yet as I'm unable to login to Matomo when I navigate to https://islandora.traefik.me/matomo/?module=Login using the following user and password combos

  • User = admin

  • Password = any of these fail

    • password
    • value of generated isle-dc/secrets/live/MATOMO_USER_PASS
    • value of generated isle-dc/secrets/live/MATOMO_USER_PASS_NON_HASHED

None of the passwords seem to work.

As an aside, discussed with @noahwsmith and he is also currently having the same issue with this service and generated secrets / passwords.

Can you please review and see what might be blocking this service from accepting the passwords? Not clear if this behavior is the result of the changes or if this has been an issue all along but it is a blocker to testing this PR for sure.

Thank you!


isle-dc

Test Environment

  • OS: MacOS Monterey 12.3 - (Mac Mini 9,1)
  • CPU: 8 cores
  • Mem: 16 GB

Test process / steps

isle-dc

Test Environment

  • OS: MacOS Monterey 12.3 - (Mac Mini 9,1)
  • CPU: 8 cores
  • Mem: 16 GB

Steps taken to test

  • git clone git@github.com:Islandora-Devops/isle-dc.git to local laptop
  • cd isle-dc
  • cp sample.env .env
  • vi / nano .env
    • Changed TAG= to TAG= 0c6e9de3933071648c88e69b7b6185e5c9e2f5a6
  • make demo

@g7morris g7morris removed the request for review from dannylamb March 24, 2022 15:15
@g7morris g7morris added bug Something isn't working help wanted Extra attention is needed matomo release labels Mar 24, 2022
@noahwsmith
Copy link
Contributor

My issue was unrelated, it turned out. The value in the PASS file for what I was working on reflected a blank NON_HASHED value, rather than the value I thought I was providing.

@nigelgbanks
Copy link
Contributor Author

nigelgbanks commented Apr 10, 2022

@g7morris you'll need to test with this branch (which also has some fixes from a previous change to buildkit that needs going in, somehow lost in the fray).

Islandora-Devops/isle-dc#222

Also as @noahwsmith says the password in MATOMO_USER_PASS_NON_HASHED is what needs to be entered when logging in.

@g7morris
Copy link
Contributor

g7morris commented May 3, 2022

@nigelgbanks From your last comment re using a specific branch, I notice that Islandora-Devops/isle-dc#222 has already been merged in as fix, so perhaps enough time has passed along with fixes that I can't test that exactly.

I can report that when I run make demo using TAG=1.0.0-alpha-15 this passes. I am able to see the Matomo dashboard / url of https://islandora.traefik.me/matomo/ and now able to login using admin and the value of the secrets/MATOMO_USER_PASS_NON_HASHED

So fixed it appears!


Side question

Should I be using 1.0.0-alpha-16 or 1.0.0-alpha-17 as well to test? If so, be aware there appears to be an issue using these images.

If so, then both fail when I run make demo - I opened up a new ticket to review.


isle-dc

Test Environment

  • OS: Ubuntu 20.04 LTS
  • CPU: 8 cores
  • Mem: 32 GB

Steps taken to test

  • git clone git@github.com:Islandora-Devops/isle-dc.git to local laptop
  • cd isle-dc
  • cp sample.env .env
  • vi / nano .env
    • Changed TAG= to TAG= 1.0.0-alpha-15
  • make demo
  • Navigated to https://islandora.traefik.me/matomo/ and logged in using admin and the value of the secrets/MATOMO_USER_PASS_NON_HASHED

Results

  • Able to login now. Problem appears fixed. Though this branch is still open? @nigelgbanks Did I miss something? The original hash isn't an image available.

@g7morris g7morris removed bug Something isn't working help wanted Extra attention is needed question Further information is requested labels May 3, 2022
@nigelgbanks
Copy link
Contributor Author

nigelgbanks commented May 10, 2022

TAG should be set to the latest commit for this branch 0c6e9de3933071648c88e69b7b6185e5c9e2f5a6 at the time of writing, otherwise you wouldn't be testing these changes, you'd be testing what was previously released. Since Islandora-Devops/isle-dc#222 was merged you could test on the develop branch of isle-dc.

@g7morris
Copy link
Contributor

@nigelgbanks I can report that when I run make demo using TAG=0c6e9de3933071648c88e69b7b6185e5c9e2f5a6 this passes. I am able to see the Matomo dashboard / url of https://islandora.traefik.me/matomo/ and now able to login using admin and the value of the secrets/live/MATOMO_USER_PASS_NON_HASHED

So fixed it appears!

Merge time?


isle-dc

Test Environment

  • OS: Ubuntu 20.04 LTS
  • CPU: 8 cores
  • Mem: 32 GB

Steps taken to test

  • git clone -b development git@github.com:Islandora-Devops/isle-dc.git to local laptop
  • cd isle-dc
  • cp sample.env .env
  • vi / nano .env
    • Changed TAG= to TAG= 0c6e9de3933071648c88e69b7b6185e5c9e2f5a6
  • make demo
  • Navigated to https://islandora.traefik.me/matomo/ and logged in using admin and the value of the secrets/live/MATOMO_USER_PASS_NON_HASHED

Results

  • Able to login now. Problem appears fixed.

@nigelgbanks nigelgbanks merged commit 624cbf8 into main May 12, 2022
March / April 2022 - isle-buildkit 1.0.0 release automation moved this from Tested - Back to Dev for review or merge to Done May 12, 2022
@nigelgbanks nigelgbanks deleted the matomo-volume-redux branch May 12, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants