From f89be7dbe6fe1acab36afa86109085da65549aa1 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Sun, 25 Jun 2023 23:41:09 -0700 Subject: [PATCH 01/50] start docs --- README.md | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3ce56b3..bfb884c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,43 @@ # HykuKnapsack -Short description and motivation. +Hyku Knapsack is a little wrapper around Hyku to make development and deployment easier. Primary goals of this project +include making contributing back to the Hyku project easier and making upgrades a snap. ## Usage -How to use my plugin. +Start by making a copy. You can fork on Github or simply check out this repo and add a new remote: + +Note $PROJECT_NAME can only contain letters, numbers and underscores due to a bundler limitation. + +```bash +git clone git@github.com:samvera-labs/hyku_knapsack.git $PROJECT_NAME_knapsack +cd $PROJECT_NAME_knapsack +git remote rename origin upstream +git remote add origin $NEW_REPO_URL +git branch -M main +git push -u origin main +``` + +### Overrides +Adding decorators to override features is fairly simple. We do recommend some best practices [found here](https://github.com/samvera-labs/hyku_knapsack/wiki/Decorators-and-Overrides) + +Any file with `_decorator.rb` in the app or lib directory will automatically be loaded along with any classes in the app directory. + +### Deployment scripts + +Deployment code can be added as needed. + +### Theme files + +Theme files (views, css, etc) can be added in the the Knapsack. We recommend adding an override comment as [described here](https://github.com/samvera-labs/hyku_knapsack/wiki/Decorators-and-Overrides) + +### Gems + +It can be useful to add additional gems to the bundle. This can be done w/o editing Hyku by adding them as dependencies to `hyku_knapsack.gemspec` ## Installation -Add this line to your application's Gemfile: +If not using a current version, add this line to Hyku's Gemfile: ```ruby -gem "hyku-knapsack" +gem "hyku_knapsack", github: 'samvera-labs/hyku_knapsack', branch: 'main' ``` And then execute: @@ -16,11 +45,6 @@ And then execute: $ bundle ``` -Or install it yourself as: -```bash -$ gem install hyku-knapsack -``` - ## Contributing Contribution directions go here. From 4ad1c4a7b66031c3ad23dd1a0b58469395896fd1 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 27 Jun 2023 12:57:41 -0700 Subject: [PATCH 02/50] trying to get the build to work --- .github/workflows/build-base.yaml | 3 +-- .github/workflows/build-solr.yaml | 3 +-- .github/workflows/build-test-lint.yaml | 7 +++---- README.md | 2 ++ hyrax-webapp | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-base.yaml b/.github/workflows/build-base.yaml index b52f5e1..b8b16bd 100644 --- a/.github/workflows/build-base.yaml +++ b/.github/workflows/build-base.yaml @@ -11,9 +11,8 @@ on: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.14 + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local secrets: inherit with: platforms: "linux/amd64" baseTarget: hyku-base - subdir: hyrax-webapp diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml index 3ccd3cc..ea32846 100644 --- a/.github/workflows/build-solr.yaml +++ b/.github/workflows/build-solr.yaml @@ -11,9 +11,8 @@ on: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.14 + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local secrets: inherit with: platforms: "linux/amd64" solrTarget: hyku-solr - subdir: hyrax-webapp diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index a32f0a1..599b9b4 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -17,17 +17,16 @@ on: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@add_debugger + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local secrets: inherit with: platforms: 'linux/amd64' webTarget: hyku-web workerTarget: hyku-worker - subdir: hyrax-webapp test: needs: build - uses: scientist-softserv/actions/.github/workflows/test.yaml@add_debugger + uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local with: confdir: '/app/samvera/hyrax-webapp/solr/conf' webTarget: hyku-web @@ -35,7 +34,7 @@ jobs: lint: needs: build - uses: scientist-softserv/actions/.github/workflows/lint.yaml@add_debugger + uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: webTarget: hyku-web workerTarget: hyku-worker diff --git a/README.md b/README.md index bfb884c..4a4213c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ git push -u origin main ``` ### Overrides +Before overriding anything, please think hard about whether what you are working on is a bug or feature that can apply to Hyku itself. If it is, please make a branch in your Hyku checkout (`./hyrax-webapp`) and do the work there. [See here](https://github.com/samvera-labs/hyku_knapsack/wiki/Hyku-Branches) for more information about working with Hyku branches in your Knapsack + Adding decorators to override features is fairly simple. We do recommend some best practices [found here](https://github.com/samvera-labs/hyku_knapsack/wiki/Decorators-and-Overrides) Any file with `_decorator.rb` in the app or lib directory will automatically be loaded along with any classes in the app directory. diff --git a/hyrax-webapp b/hyrax-webapp index eed16c7..b820c3b 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit eed16c74ce9b7dc0b424772971adb60997dcd1e8 +Subproject commit b820c3bd40fd43fc4e2692fb786fca9ad4f51656 From 52e4d36c57a849d2fd5d9dafdac192d544f881d2 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Wed, 28 Jun 2023 11:18:09 -0700 Subject: [PATCH 03/50] fix deps --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index b820c3b..7581d7a 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit b820c3bd40fd43fc4e2692fb786fca9ad4f51656 +Subproject commit 7581d7a2b76c540a55478e5e59fcf322ef85e794 From aece31aaaf9d09553ee1bf058260605a54e08054 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 29 Jun 2023 23:05:01 -0700 Subject: [PATCH 04/50] caching work --- docker-compose.yml | 28 ++++++++++++++++++++++++++-- hyrax-webapp | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 923b5bc..26f456a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,13 +36,30 @@ services: file: hyrax-webapp/docker-compose.yml service: db + base: + extends: + file: hyrax-webapp/docker-compose.yml + service: base + image: ghcr.io/scientist-softserv/hykuup_knapsack/base:${TAG:-latest} + build: + context: . + target: hyku-base + cache_from: + - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest + web: extends: file: hyrax-webapp/docker-compose.yml service: web - # command left commented for situations where the Gemfile.lock needs to be updated before the app starts + build: + context: . + target: hyku-web + cache_from: + - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest + - ghcr.io/scientist-softserv/hykuup_knapsack:latest image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} - command: bash -l -c "bundle && ./bin/web" + # command left commented for situations where the Gemfile.lock needs to be updated before the app starts + # command: bash -l -c "bundle && ./bin/web" environment: # This line is what makes the knapsack include use the local code instead of the remote gem - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera @@ -59,6 +76,13 @@ services: extends: file: hyrax-webapp/docker-compose.yml service: worker + build: + context: . + target: hyku-worker + cache_from: + - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest + - ghcr.io/scientist-softserv/hykuup_knapsack:latest + - ghcr.io/scientist-softserv/hykuup_knapsack/worker:latest image: ghcr.io/scientist-softserv/hykuup_knapsack/worker:${TAG:-latest} volumes: - node_modules:/app/samvera/hyrax-webapp/node_modules:cached diff --git a/hyrax-webapp b/hyrax-webapp index 7581d7a..9a3ddff 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 7581d7a2b76c540a55478e5e59fcf322ef85e794 +Subproject commit 9a3ddff8e2d596ab948acb77e8462c237b204875 From a18ab5010d35abcafb87bc63561467f602784e58 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 29 Jun 2023 23:12:55 -0700 Subject: [PATCH 05/50] context fix --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 26f456a..579a86d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ services: service: base image: ghcr.io/scientist-softserv/hykuup_knapsack/base:${TAG:-latest} build: - context: . + context: hyrax-webapp target: hyku-base cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest @@ -52,7 +52,7 @@ services: file: hyrax-webapp/docker-compose.yml service: web build: - context: . + context: hyrax-webapp target: hyku-web cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest @@ -77,7 +77,7 @@ services: file: hyrax-webapp/docker-compose.yml service: worker build: - context: . + context: hyrax-webapp target: hyku-worker cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest From e41c9f70b2d19a190772beb3b87c9940115aa1ae Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 29 Jun 2023 23:41:42 -0700 Subject: [PATCH 06/50] cache hopes --- .dockerignore | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..45c1f98 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,33 @@ +*.rdb +./artifacts +./chart +./coverage +./docker +./fcrepo +./importer +./log +./pg +./public/assets +./public/branding +./public/packs +./public/system +./public/uploads +./tmp +.coveralls.yml +.ebextensions +.fcrepo_wrapper +.git +.github +.gitignore +.hound.yml +.idea +.internal_test_app/* +.solr_wrapper + +node_modules/* +solr/solr/* +fcrpo/* +pg/* +Dockerfile* +fits.log +ImageMagick* \ No newline at end of file From 3e00cd55f6e0da976dd573a1813b612c98ea7ee5 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 29 Jun 2023 23:45:25 -0700 Subject: [PATCH 07/50] prevent rebuild of helper images --- docker-compose.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 579a86d..dc257ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,11 +95,26 @@ services: extends: file: hyrax-webapp/docker-compose.yml service: check_volumes + build: + context: hyrax-webapp + target: hyku-web + cache_from: + - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest + - ghcr.io/scientist-softserv/hykuup_knapsack:latest + image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} initialize_app: extends: file: hyrax-webapp/docker-compose.yml service: initialize_app + build: + context: hyrax-webapp + target: hyku-web + cache_from: + - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest + - ghcr.io/scientist-softserv/hykuup_knapsack:latest + image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} + # command left commented for situations where the Gemfile.lock needs to be updated before the app starts command: - > From 10d249a3b9f2fbd14f43266193d6df85fa055e73 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 30 Jun 2023 00:19:19 -0700 Subject: [PATCH 08/50] always do inline cache --- docker-compose.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index dc257ef..fcb3d09 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,6 +46,8 @@ services: target: hyku-base cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest + args: + BUILDKIT_INLINE_CACHE: 1 web: extends: @@ -57,6 +59,8 @@ services: cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - ghcr.io/scientist-softserv/hykuup_knapsack:latest + args: + BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} # command left commented for situations where the Gemfile.lock needs to be updated before the app starts # command: bash -l -c "bundle && ./bin/web" @@ -83,6 +87,8 @@ services: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - ghcr.io/scientist-softserv/hykuup_knapsack:latest - ghcr.io/scientist-softserv/hykuup_knapsack/worker:latest + args: + BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/scientist-softserv/hykuup_knapsack/worker:${TAG:-latest} volumes: - node_modules:/app/samvera/hyrax-webapp/node_modules:cached @@ -101,6 +107,8 @@ services: cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - ghcr.io/scientist-softserv/hykuup_knapsack:latest + args: + BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} initialize_app: @@ -113,8 +121,9 @@ services: cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - ghcr.io/scientist-softserv/hykuup_knapsack:latest + args: + BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} - # command left commented for situations where the Gemfile.lock needs to be updated before the app starts command: - > From e21e839acdf278d26da90555fa394616a3952e9a Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 6 Jul 2023 14:23:47 -0700 Subject: [PATCH 09/50] ignore branch names --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index fcb3d09..97779bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,6 +67,7 @@ services: environment: # This line is what makes the knapsack include use the local code instead of the remote gem - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera + - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true - VIRTUAL_PORT=3000 - VIRTUAL_HOST=.hyku.test volumes: From 9795801ce43ac6628b1e741201a97cae545cbdeb Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 09:58:43 -0700 Subject: [PATCH 10/50] try to nail build down --- .github/workflows/build-test-lint.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 599b9b4..943f0ed 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -24,8 +24,18 @@ jobs: webTarget: hyku-web workerTarget: hyku-worker - test: + get_main: needs: build + steps: + - name: Checkout all branches and shas + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: true + token: ${{ secrets.CHECKOUT_TOKEN || secrets.GITHUB_TOKEN }} + + test: + needs: get_main uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local with: confdir: '/app/samvera/hyrax-webapp/solr/conf' @@ -33,7 +43,7 @@ jobs: workerTarget: hyku-worker lint: - needs: build + needs: get_main uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: webTarget: hyku-web From 8035075f49e74522243b78d275efab595a9ab1da Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 10:17:02 -0700 Subject: [PATCH 11/50] uses --- .github/workflows/build-test-lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 943f0ed..44803b4 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -25,6 +25,7 @@ jobs: workerTarget: hyku-worker get_main: + runs-on: ubuntu-latest needs: build steps: - name: Checkout all branches and shas From de589c9b69d2caf2c73a4d5deede45262861009a Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 10:33:26 -0700 Subject: [PATCH 12/50] into the depths --- .github/workflows/build-test-lint.yaml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 44803b4..979319c 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -20,32 +20,24 @@ jobs: uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local secrets: inherit with: + fetch_depth: 0 platforms: 'linux/amd64' webTarget: hyku-web workerTarget: hyku-worker - get_main: - runs-on: ubuntu-latest - needs: build - steps: - - name: Checkout all branches and shas - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: true - token: ${{ secrets.CHECKOUT_TOKEN || secrets.GITHUB_TOKEN }} - test: - needs: get_main + needs: build uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local with: confdir: '/app/samvera/hyrax-webapp/solr/conf' + fetch_depth: 0 webTarget: hyku-web workerTarget: hyku-worker lint: - needs: get_main + needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: + fetch_depth: 0 webTarget: hyku-web workerTarget: hyku-worker From c1fb5c1a6d44dd4060512ba92dd67f6f98c595c6 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 11:00:12 -0700 Subject: [PATCH 13/50] less depth --- .github/workflows/build-test-lint.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 979319c..599b9b4 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -20,7 +20,6 @@ jobs: uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local secrets: inherit with: - fetch_depth: 0 platforms: 'linux/amd64' webTarget: hyku-web workerTarget: hyku-worker @@ -30,7 +29,6 @@ jobs: uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local with: confdir: '/app/samvera/hyrax-webapp/solr/conf' - fetch_depth: 0 webTarget: hyku-web workerTarget: hyku-worker @@ -38,6 +36,5 @@ jobs: needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: - fetch_depth: 0 webTarget: hyku-web workerTarget: hyku-worker From 14867297dec352e312f69fd0b3fff09ef749fcc1 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 16:00:01 -0700 Subject: [PATCH 14/50] just lint --- .github/workflows/build-test-lint.yaml | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 599b9b4..1e9cfd5 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -16,21 +16,21 @@ on: default: false jobs: - build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local - secrets: inherit - with: - platforms: 'linux/amd64' - webTarget: hyku-web - workerTarget: hyku-worker + # build: + # uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + # secrets: inherit + # with: + # platforms: 'linux/amd64' + # webTarget: hyku-web + # workerTarget: hyku-worker - test: - needs: build - uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local - with: - confdir: '/app/samvera/hyrax-webapp/solr/conf' - webTarget: hyku-web - workerTarget: hyku-worker + # test: + # needs: build + # uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local + # with: + # confdir: '/app/samvera/hyrax-webapp/solr/conf' + # webTarget: hyku-web + # workerTarget: hyku-worker lint: needs: build @@ -38,3 +38,4 @@ jobs: with: webTarget: hyku-web workerTarget: hyku-worker + tag: c1fb5c1a From efb333943ec3abe19fd03d55054299307045e7ae Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 16:00:05 -0700 Subject: [PATCH 15/50] just lint --- .github/workflows/build-test-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 1e9cfd5..803789e 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -33,7 +33,7 @@ jobs: # workerTarget: hyku-worker lint: - needs: build + # needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: webTarget: hyku-web From 3defe2a88968120da9b0f6dbfe8e2fc3ba0c9261 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 16:15:12 -0700 Subject: [PATCH 16/50] and checkout main --- .github/workflows/build-test-lint.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 803789e..3ecc0c3 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -32,6 +32,17 @@ jobs: # webTarget: hyku-web # workerTarget: hyku-worker + check_main: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: true + token: ${{ secrets.CHECKOUT_TOKEN || secrets.GITHUB_TOKEN }} + clean: false + ref: main lint: # needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local From 7df16e46aaf34f2085f30591f11b6181a9e80cdb Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 16:37:13 -0700 Subject: [PATCH 17/50] checkout all script --- .github/workflows/build-test-lint.yaml | 11 ----------- bin/checkout_all.sh | 24 ++++++++++++++++++++++++ hyrax-webapp | 2 +- 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100755 bin/checkout_all.sh diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 3ecc0c3..803789e 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -32,17 +32,6 @@ jobs: # webTarget: hyku-web # workerTarget: hyku-worker - check_main: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: true - token: ${{ secrets.CHECKOUT_TOKEN || secrets.GITHUB_TOKEN }} - clean: false - ref: main lint: # needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local diff --git a/bin/checkout_all.sh b/bin/checkout_all.sh new file mode 100755 index 0000000..a7c8383 --- /dev/null +++ b/bin/checkout_all.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Save the current branch name +current_branch=$(git rev-parse --abbrev-ref HEAD) + +# Fetch any updates from the origin +git fetch origin + +# Loop through all remote branches +for branch in $(git branch -r | grep -v '\->'); do + # Checkout each branch + if [[ $branch == *origin* ]]; then + branch_name="${branch#origin/}" + echo "Checking out $branch_name branch..." + git checkout $branch_name + else + echo "$branch is not from the origin" + fi +done + +# Switch back to the original branch +git checkout $current_branch + +echo "Operation complete, returned to $current_branch" diff --git a/hyrax-webapp b/hyrax-webapp index 9a3ddff..b87d01d 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 9a3ddff8e2d596ab948acb77e8462c237b204875 +Subproject commit b87d01dd17d21e65a04e9a4827bf653446f9017f From e701840f49d65f2dc7ee5fe154abeea4556667ad Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 16:39:06 -0700 Subject: [PATCH 18/50] build a fresh version --- .github/workflows/build-test-lint.yaml | 31 +++++++++++++------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 803789e..599b9b4 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -16,26 +16,25 @@ on: default: false jobs: - # build: - # uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local - # secrets: inherit - # with: - # platforms: 'linux/amd64' - # webTarget: hyku-web - # workerTarget: hyku-worker + build: + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + secrets: inherit + with: + platforms: 'linux/amd64' + webTarget: hyku-web + workerTarget: hyku-worker - # test: - # needs: build - # uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local - # with: - # confdir: '/app/samvera/hyrax-webapp/solr/conf' - # webTarget: hyku-web - # workerTarget: hyku-worker + test: + needs: build + uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local + with: + confdir: '/app/samvera/hyrax-webapp/solr/conf' + webTarget: hyku-web + workerTarget: hyku-worker lint: - # needs: build + needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: webTarget: hyku-web workerTarget: hyku-worker - tag: c1fb5c1a From d063ad4dc3f3f9db1208fb35a4299ec4e973c433 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 7 Jul 2023 17:04:24 -0700 Subject: [PATCH 19/50] back on that bs --- .github/workflows/build-test-lint.yaml | 31 +++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 599b9b4..9b25d25 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -16,25 +16,26 @@ on: default: false jobs: - build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local - secrets: inherit - with: - platforms: 'linux/amd64' - webTarget: hyku-web - workerTarget: hyku-worker + # build: + # uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + # secrets: inherit + # with: + # platforms: 'linux/amd64' + # webTarget: hyku-web + # workerTarget: hyku-worker - test: - needs: build - uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local - with: - confdir: '/app/samvera/hyrax-webapp/solr/conf' - webTarget: hyku-web - workerTarget: hyku-worker + # test: + # needs: build + # uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local + # with: + # confdir: '/app/samvera/hyrax-webapp/solr/conf' + # webTarget: hyku-web + # workerTarget: hyku-worker lint: - needs: build + # needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: webTarget: hyku-web workerTarget: hyku-worker + tag: e701840f From bb5644132bd42d98979f924ba3d1525aef9cdcf5 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Mon, 10 Jul 2023 13:28:15 -0700 Subject: [PATCH 20/50] Revert "back on that bs" This reverts commit d063ad4dc3f3f9db1208fb35a4299ec4e973c433. --- .github/workflows/build-test-lint.yaml | 31 +++++++++++++------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 9b25d25..599b9b4 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -16,26 +16,25 @@ on: default: false jobs: - # build: - # uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local - # secrets: inherit - # with: - # platforms: 'linux/amd64' - # webTarget: hyku-web - # workerTarget: hyku-worker + build: + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + secrets: inherit + with: + platforms: 'linux/amd64' + webTarget: hyku-web + workerTarget: hyku-worker - # test: - # needs: build - # uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local - # with: - # confdir: '/app/samvera/hyrax-webapp/solr/conf' - # webTarget: hyku-web - # workerTarget: hyku-worker + test: + needs: build + uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local + with: + confdir: '/app/samvera/hyrax-webapp/solr/conf' + webTarget: hyku-web + workerTarget: hyku-worker lint: - # needs: build + needs: build uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local with: webTarget: hyku-web workerTarget: hyku-worker - tag: e701840f From dcf32233bd73aadab623ba662f3143c7b224fa56 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Wed, 12 Jul 2023 13:00:04 -0700 Subject: [PATCH 21/50] fetch work --- bin/checkout_all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/checkout_all.sh b/bin/checkout_all.sh index a7c8383..ec276fa 100755 --- a/bin/checkout_all.sh +++ b/bin/checkout_all.sh @@ -4,7 +4,7 @@ current_branch=$(git rev-parse --abbrev-ref HEAD) # Fetch any updates from the origin -git fetch origin +git fetch --unshallow -a origin # Loop through all remote branches for branch in $(git branch -r | grep -v '\->'); do From 9863afb530aebb24ee68e1d1c34fa29c1935eb33 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Wed, 12 Jul 2023 13:27:11 -0700 Subject: [PATCH 22/50] update info for besties --- ops/production-deploy.tmpl.yaml | 172 ++++++++++++++++++-------------- 1 file changed, 95 insertions(+), 77 deletions(-) diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index cc85079..b29d664 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -1,14 +1,12 @@ replicaCount: 2 -# These values are currently in atla_digital_library -# Do we still like these values set? -# resources: -# requests: -# memory: '1Gi' -# cpu: '250m' -# limits: -# memory: '2Gi' -# cpu: '1000m' +resources: + limits: + memory: "4Gi" + cpu: "500m" + requests: + memory: "2Gi" + cpu: "250m" livenessProbe: enabled: false @@ -16,15 +14,11 @@ readinessProbe: enabled: false brandingVolume: - storageClass: aws-efs + storageClass: efs-sc derivativesVolume: - storageClass: aws-efs + storageClass: efs-sc uploadsVolume: - storageClass: aws-efs - size: 200Gi - -imagePullSecrets: - - name: github + storageClass: efs-sc extraVolumeMounts: &volMounts - name: uploads @@ -46,16 +40,26 @@ extraVolumeMounts: &volMounts ingress: enabled: true hosts: - - host: repo.samvera.org + - host: samvera.hykuup.com paths: - path: / - host: '*.hykuup.com' paths: - path: / + annotations: { + kubernetes.io/ingress.class: "nginx", + nginx.ingress.kubernetes.io/proxy-body-size: "0", + cert-manager.io/cluster-issuer: letsencrypt-production-dns + } + tls: + - hosts: + - samvera.hykuup.com + - "*.hykuup.com" + secretName: hykuup extraEnvVars: &envVars - name: CONFDIR - value: '/app/samvera/hyrax-webapp/solr/conf' + value: "/app/samvera/hyrax-webapp/solr/conf" - name: CLIENT_ADMIN_USER_EMAIL value: $CLIENT_ADMIN_USER_EMAIL - name: CLIENT_ADMIN_USER_PASSWORD @@ -63,21 +67,25 @@ extraEnvVars: &envVars - name: DB_ADAPTER value: postgresql - name: DB_HOST - value: hyrax20181216.cn4nhxyoxlnu.us-west-2.rds.amazonaws.com + value: acid-postgres-cluster-bravo-pooler.postgres.svc.cluster.local - name: DB_NAME - value: atla-hyku-production + value:hykuup_production + - name: DB_PASSWORD + value: $DB_PASSWORD - name: DB_USER - value: hydra_user + value: hykuup_production - name: DISABLE_SPRING value: '1' - name: FCREPO_BASE_PATH - value: /hykuprod + value: /hykuup - name: FCREPO_HOST - value: fcrepo.default.svc.cluster.local - - name: FCREPO_PORT - value: '8080' + value: fcrepo.fcrepo.svc.cluster.local:8080 - name: FCREPO_REST_PATH value: rest + - name: FCREPO_PATH + value: /rest + - name: FCREPO_URL + value: http://fcrepo.fcrepo.svc.cluster.local:8080/rest - name: HYRAX_ANALYTICS value: 'false' # - name: GOOGLE_ANALYTICS_ID @@ -99,7 +107,7 @@ extraEnvVars: &envVars - name: HYRAX_FITS_PATH value: /app/fits/fits.sh - name: HYKU_ADMIN_HOST - value: ir.atla.com + value: admin.hykuup.com - name: HYKU_ADMIN_ONLY_TENANT_CREATION value: 'false' - name: HYKU_ALLOW_SIGNUP @@ -109,77 +117,89 @@ extraEnvVars: &envVars - name: HYKU_CONTACT_EMAIL value: dev-oops@scientist.com - name: HYKU_DEFAULT_HOST - value: "%{tenant}.ir.atla.com" + value: "%{tenant}.hykuup.com" + - name: HYKU_ENABLED + value: "true" - name: HYKU_FILE_ACL - value: 'false' + value: "true" - name: HYKU_MULTITENANT - value: 'true' + value: "true" - name: HYKU_ROOT_HOST - value: ir.atla.com + value: hykuup.com - name: INITIAL_ADMIN_EMAIL value: admin@example.com - name: INITIAL_ADMIN_PASSWORD value: testing123 + - name: HYRAX_USE_SOLR_GRAPH_NESTING + value: "true" - name: IN_DOCKER - value: 'true' + value: "true" - name: LD_LIBRARY_PATH value: /app/fits/tools/mediainfo/linux - name: PASSENGER_APP_ENV value: production - name: RAILS_CACHE_STORE_URL - value: redis://:$REDIS_PASSWORD@atla-hyku-production-redis-master:6379/hykuprod + value: redis://:$REDIS_PASSWORD@hykuup-hyku-production-redis-master:6379/hykuup-hyku - name: RAILS_ENV value: production - name: RAILS_LOG_TO_STDOUT - value: 'true' + value: "true" - name: RAILS_MAX_THREADS - value: '5' + value: "5" - name: RAILS_SERVE_STATIC_FILES - value: 'true' + value: "true" - name: REDIS_HOST - value: atla-hyku-production-redis-master + value: hykuup-hyku-production-redis-master - name: REDIS_PORT value: '6379' - name: REDIS_PASSWORD value: $REDIS_PASSWORD - name: REDIS_URL - value: redis://:$REDIS_PASSWORD@atla-hyku-production-redis-master + value: redis://:$REDIS_PASSWORD@hykuup-hyku-production-redis-master:6379/hykuup-hyku + - name: ROB_EMAIL + value: rob@notch8.com + - name: ROB_PASSWORD + value: testing123 + - name: SENTRY_DSN + value: https://ab7f8b39ca414630bd07f6657f57f641@o1008683.ingest.sentry.io/6745049 + - name: SENTRY_ENVIRONMENT + value: production - name: SMTP_ADDRESS - value: email-smtp.us-east-1.amazonaws.com + value: smtp.mailtrap.io - name: SMTP_DOMAIN - value: atla.com + value: smtp.mailtrap.io - name: SMTP_ENABLED - value: 'true' + value: "true" - name: SMTP_PASSWORD value: $SMTP_PASSWORD - name: SMTP_PORT - value: '465' + value: "2525" - name: SMTP_STARTTLS value: 'true' - name: SMTP_TYPE - value: login + value: cram_md5 - name: SMTP_USER_NAME - value: $SMTP_USER_NAME - - name: SOLR_ADMIN_USER - value: admin + value: d930a4455e9287 - name: SOLR_ADMIN_PASSWORD value: $SOLR_ADMIN_PASSWORD + - name: SOLR_ADMIN_USER + value: admin - name: SOLR_COLLECTION_NAME - value: atla-hyku-production + value: hykuup-hyku - name: SOLR_CONFIGSET_NAME - value: atla-hyku-production + value: hykuup-hyku - name: SOLR_HOST - value: solr.default.svc.cluster.local + value: solr-headless.solr - name: SOLR_PORT - value: '8983' + value: "8983" - name: SOLR_URL - value: http://admin:$SOLR_ADMIN_PASSWORD@solr.default.svc.cluster.local:8983/solr/ - - name: SENTRY_DSN - value: $SENTRY_DSN - - name: SENTRY_ENVIRONMENT - value: $SENTRY_ENVIRONMENT + value: http://admin:$SOLR_ADMIN_PASSWORD@solr-headless.solr:8983/solr/ + - name: SUPPORT_EMAIL + value: support@notch8.com + - name: SUPPORT_PASSWORD + value: testing123 - name: TEST_USER_EMAIL - value: user@example.com + value: user@notch8.com - name: TEST_USER_PASSWORD value: testing123 @@ -196,6 +216,18 @@ podSecurityContext: &podSecValues worker: replicaCount: 1 + resources: + limits: + memory: "6Gi" + cpu: "3" + requests: + memory: "3Gi" + cpu: "1" + podSecurityContext: + runAsUser: 1001 + runAsGroup: 101 + fsGroup: 101 + fsGroupChangePolicy: "OnRootMismatch" extraVolumeMounts: *volMounts extraEnvVars: *envVars podSecurityContext: *podSecValues @@ -208,16 +240,6 @@ leaseRelease: fcrepo: enabled: false -# These values are currently in atla_digital_library -# Do we still like these values set? - # resources: - # limits: - # memory: '4Gi' - # cpu: '2' - # requests: - # memory: '2Gi' - # cpu: '1' - postgresql: enabled: false @@ -232,21 +254,17 @@ redis: solr: enabled: false -externalFcrepoHost: fcrepo.default.svc.cluster.local - +externalFcrepoHost: fcrepo.fcrepo.svc.cluster.local externalPostgresql: - host: hyrax20181216.cn4nhxyoxlnu.us-west-2.rds.amazonaws.com - username: hydra_user - password: $POSTGRES_PASSWORD - database: atla-hyku-production + host: acid-postgres-cluster-bravo-pooler.postgres.svc.cluster.local + username: hykuup_production + password: $DB_PASSWORD + database: hykuup_production -externalSolrHost: solr.default.svc.cluster.local -externalSolrUser: admin -externalSolrCollection: 'atla-hyku-production' externalSolrPassword: $SOLR_ADMIN_PASSWORD - -# global: - # hyraxName: atla-hyku-production-hyrax +externalSolrHost: solr.solr.svc.cluster.local +externalSolrUser: admin +externalSolrCollection: "hykuup-hyku" nginx: enabled: false From 6d3a9166d2eb316aef0b8705346fa24a729311e6 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 13 Jul 2023 00:53:54 -0700 Subject: [PATCH 23/50] smtp settings --- ops/production-deploy.tmpl.yaml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index b29d664..6df8320 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -60,10 +60,6 @@ ingress: extraEnvVars: &envVars - name: CONFDIR value: "/app/samvera/hyrax-webapp/solr/conf" - - name: CLIENT_ADMIN_USER_EMAIL - value: $CLIENT_ADMIN_USER_EMAIL - - name: CLIENT_ADMIN_USER_PASSWORD - value: $CLIENT_ADMIN_USER_PASSWORD - name: DB_ADAPTER value: postgresql - name: DB_HOST @@ -127,7 +123,7 @@ extraEnvVars: &envVars - name: HYKU_ROOT_HOST value: hykuup.com - name: INITIAL_ADMIN_EMAIL - value: admin@example.com + value: rob@scientist.com - name: INITIAL_ADMIN_PASSWORD value: testing123 - name: HYRAX_USE_SOLR_GRAPH_NESTING @@ -156,30 +152,28 @@ extraEnvVars: &envVars value: $REDIS_PASSWORD - name: REDIS_URL value: redis://:$REDIS_PASSWORD@hykuup-hyku-production-redis-master:6379/hykuup-hyku - - name: ROB_EMAIL - value: rob@notch8.com - - name: ROB_PASSWORD - value: testing123 + - name: SECRET_KEY_BASE + value: $SECRET_KEY_BASE - name: SENTRY_DSN - value: https://ab7f8b39ca414630bd07f6657f57f641@o1008683.ingest.sentry.io/6745049 + value: https://eb73063d06644d7e9a2f81713b236d61@o1008683.ingest.sentry.io/6745035 - name: SENTRY_ENVIRONMENT value: production - name: SMTP_ADDRESS - value: smtp.mailtrap.io + value: email-smtp.us-west-2.amazonaws.com - name: SMTP_DOMAIN - value: smtp.mailtrap.io + value: hykuup.com - name: SMTP_ENABLED value: "true" - name: SMTP_PASSWORD value: $SMTP_PASSWORD - name: SMTP_PORT - value: "2525" + value: "587" - name: SMTP_STARTTLS value: 'true' - name: SMTP_TYPE - value: cram_md5 + value: login - name: SMTP_USER_NAME - value: d930a4455e9287 + value: AKIAJUV5DOPWWUKISN3Q - name: SOLR_ADMIN_PASSWORD value: $SOLR_ADMIN_PASSWORD - name: SOLR_ADMIN_USER From ed1f001ccd9f021f74f5a4293716afc4e5881001 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 13 Jul 2023 00:56:40 -0700 Subject: [PATCH 24/50] hykuup update --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index b87d01d..54b368c 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit b87d01dd17d21e65a04e9a4827bf653446f9017f +Subproject commit 54b368c37aa13797279993472bf2edf2d46418a0 From fdd5ce506b2e6bf8af4c30e1231ba35871d09df6 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Sun, 16 Jul 2023 16:44:07 -0700 Subject: [PATCH 25/50] need the deploy script --- bin/helm_deploy | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 bin/helm_deploy diff --git a/bin/helm_deploy b/bin/helm_deploy new file mode 100755 index 0000000..7ccf637 --- /dev/null +++ b/bin/helm_deploy @@ -0,0 +1,44 @@ +#!/bin/sh + +# This script wraps up helm deployment. It is meant as a clear starting point for +# commandline deployment or CI based deployment. It requires the following ENV vars be set +# +# CHART_VERSION: this is the version of the hyrax chart you want to deploy. default - 0.22.0 +# DEPLOY_IMAGE: this is the build image that runs the rails application. Typically this would run puma or passenger. eg: samvera/hyrax or ghcr.io/samvera/hyku. Defaults to gcrh.io/samvera/hyku +# WORKER_IMAGE: this is the worker target, usually built from the same Dockerfile as DEPLOY_IMAGE. eg: samvera/hyrax/worker or ghcr.io/samvera/hyku/worker. Defaults to gcrh.io/samvera/hyku/worker +# DEPLOY_TAG: name of of the tag you want to deploy for deploy image. eg: "latest" or "v3.0.1" or "f123asdf1". Defaults to latest +# WORKER_TAG: name of of the tag you want to deploy for deploy image. eg: "latest" or "v3.0.1" or "f123asdf1". Defaults to DEPLOY_TAG +# HELM_EXTRA_ARGS: any additional arguments you'd like passed to helm upgrade directly. can be blank. + +if [ -z "$1" ] || [ -z "$2" ] +then + echo './bin/deploy RELEASE_NAME NAMESPACE' + exit 1 +fi +release_name="${1}" +namespace="${2}" + +CHART_VERSION="${CHART_VERSION:-2.0.0}" + +DEPLOY_IMAGE="${DEPLOY_IMAGE:-ghcr.io/samvera/hyku}" +WORKER_IMAGE="${WORKER_IMAGE:-ghcr.io/samvera/hyku/worker}" +DEPLOY_TAG="${DEPLOY_TAG:-latest}" +WORKER_TAG="${WORKER_TAG:-$DEPLOY_TAG}" +echo $DEPLOY_TAG + +helm pull --untar oci://ghcr.io/samvera/charts/hyrax --version $CHART_VERSION +helm repo update + +helm upgrade \ + --install \ + --atomic \ + --timeout 15m0s \ + --set image.repository="$DEPLOY_IMAGE" \ + --set image.tag="$DEPLOY_TAG" \ + --set worker.image.repository="$WORKER_IMAGE" \ + --set worker.image.tag="$DEPLOY_TAG" \ + $HELM_EXTRA_ARGS \ + --namespace="$namespace" \ + --create-namespace \ + "$release_name" \ + hyrax From 283e76a859ed63947fdb28aa1b543c739560f368 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Mon, 17 Jul 2023 09:06:03 -0700 Subject: [PATCH 26/50] checkout fix --- bin/checkout_all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/checkout_all.sh b/bin/checkout_all.sh index ec276fa..5fc51cf 100755 --- a/bin/checkout_all.sh +++ b/bin/checkout_all.sh @@ -4,7 +4,7 @@ current_branch=$(git rev-parse --abbrev-ref HEAD) # Fetch any updates from the origin -git fetch --unshallow -a origin +git fetch -a origin # Loop through all remote branches for branch in $(git branch -r | grep -v '\->'); do From 34f831f4882efa11d74d0e13a100b1a826d6f8dd Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Mon, 17 Jul 2023 14:33:27 -0700 Subject: [PATCH 27/50] on dasher --- bin/helm_deploy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/helm_deploy b/bin/helm_deploy index 7ccf637..a43cfe8 100755 --- a/bin/helm_deploy +++ b/bin/helm_deploy @@ -15,8 +15,8 @@ then echo './bin/deploy RELEASE_NAME NAMESPACE' exit 1 fi -release_name="${1}" -namespace="${2}" +release_name="${1//_/-}" +namespace="${2//_/-}" CHART_VERSION="${CHART_VERSION:-2.0.0}" From d14c7a86b358a9b84bf6cd546c37fa5de425cb50 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Mon, 17 Jul 2023 17:24:38 -0700 Subject: [PATCH 28/50] missing spaces --- ops/production-deploy.tmpl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index 6df8320..067e827 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -65,7 +65,7 @@ extraEnvVars: &envVars - name: DB_HOST value: acid-postgres-cluster-bravo-pooler.postgres.svc.cluster.local - name: DB_NAME - value:hykuup_production + value: hykuup_production - name: DB_PASSWORD value: $DB_PASSWORD - name: DB_USER From c9e8fb1834a8588e1ecefbdbead0c53a5d0afb91 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 18 Jul 2023 10:31:07 -0700 Subject: [PATCH 29/50] missing secret --- ops/production-deploy.tmpl.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index 067e827..19aa0ad 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -1,5 +1,8 @@ replicaCount: 2 +imagePullSecrets: + name: github + resources: limits: memory: "4Gi" From 63f26d8296aa46e15985d44e3f8eb93fff64c2ca Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 18 Jul 2023 11:54:52 -0700 Subject: [PATCH 30/50] working through deploy --- hyrax-webapp | 2 +- ops/production-deploy.tmpl.yaml | 24 ++++++++++++++---------- ops/staging-deploy.tmpl.yaml | 8 ++++---- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/hyrax-webapp b/hyrax-webapp index 54b368c..8301c89 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 54b368c37aa13797279993472bf2edf2d46418a0 +Subproject commit 8301c8961bf01ed582e6a1d7dadb02dba1387626 diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index 19aa0ad..2151a75 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -1,7 +1,7 @@ replicaCount: 2 imagePullSecrets: - name: github + - name: github resources: limits: @@ -43,7 +43,7 @@ extraVolumeMounts: &volMounts ingress: enabled: true hosts: - - host: samvera.hykuup.com + - host: samvera-repo.hykuup.com paths: - path: / - host: '*.hykuup.com' @@ -56,17 +56,21 @@ ingress: } tls: - hosts: - - samvera.hykuup.com - - "*.hykuup.com" + - samvera-repo.hykuup.com secretName: hykuup +# add back *.hykuup.com and repo.samvera.org extraEnvVars: &envVars - name: CONFDIR value: "/app/samvera/hyrax-webapp/solr/conf" - name: DB_ADAPTER value: postgresql + - name: DB_ADVISORY_LOCKS + value: "false" + - name: DB_PREPARED_STATEMENTS + value: "false" - name: DB_HOST - value: acid-postgres-cluster-bravo-pooler.postgres.svc.cluster.local + value: acid-postgres-cluster-delta-pooler.postgres.svc.cluster.local - name: DB_NAME value: hykuup_production - name: DB_PASSWORD @@ -78,7 +82,7 @@ extraEnvVars: &envVars - name: FCREPO_BASE_PATH value: /hykuup - name: FCREPO_HOST - value: fcrepo.fcrepo.svc.cluster.local:8080 + value: fcrepo.fcrepo.svc.cluster.local - name: FCREPO_REST_PATH value: rest - name: FCREPO_PATH @@ -138,7 +142,7 @@ extraEnvVars: &envVars - name: PASSENGER_APP_ENV value: production - name: RAILS_CACHE_STORE_URL - value: redis://:$REDIS_PASSWORD@hykuup-hyku-production-redis-master:6379/hykuup-hyku + value: redis://:$REDIS_PASSWORD@hykuup-knapsack-production-redis-master:6379/hykuup-hyku - name: RAILS_ENV value: production - name: RAILS_LOG_TO_STDOUT @@ -148,13 +152,13 @@ extraEnvVars: &envVars - name: RAILS_SERVE_STATIC_FILES value: "true" - name: REDIS_HOST - value: hykuup-hyku-production-redis-master + value: hykuup-knapsack-production-redis-master - name: REDIS_PORT value: '6379' - name: REDIS_PASSWORD value: $REDIS_PASSWORD - name: REDIS_URL - value: redis://:$REDIS_PASSWORD@hykuup-hyku-production-redis-master:6379/hykuup-hyku + value: redis://:$REDIS_PASSWORD@hykuup-knapsack-production-redis-master:6379/hykuup-hyku - name: SECRET_KEY_BASE value: $SECRET_KEY_BASE - name: SENTRY_DSN @@ -253,7 +257,7 @@ solr: externalFcrepoHost: fcrepo.fcrepo.svc.cluster.local externalPostgresql: - host: acid-postgres-cluster-bravo-pooler.postgres.svc.cluster.local + host: acid-postgres-cluster-delta-pooler.postgres.svc.cluster.local username: hykuup_production password: $DB_PASSWORD database: hykuup_production diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index 89690e1..0118033 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -101,7 +101,7 @@ extraEnvVars: &envVars - name: PASSENGER_APP_ENV value: production - name: RAILS_CACHE_STORE_URL - value: redis://:$REDIS_PASSWORD@atla-hyku-staging-redis-master:6379/staging + value: redis://:$REDIS_PASSWORD@hykuup-knapsack-staging-redis-master:6379/staging - name: RAILS_ENV value: production - name: RAILS_LOG_TO_STDOUT @@ -111,9 +111,9 @@ extraEnvVars: &envVars - name: RAILS_SERVE_STATIC_FILES value: "true" - name: REDIS_HOST - value: atla-hyku-staging-redis-master + value: hykuup-knapsack-staging-redis-master - name: REDIS_URL - value: redis://:$REDIS_PASSWORD@atla-hyku-staging-redis-master:6379/staging + value: redis://:$REDIS_PASSWORD@hykuup-knapsack-staging-redis-master:6379/staging - name: HYRAX_ACTIVE_JOB_QUEUE value: sidekiq - name: HYRAX_ANALYTICS @@ -226,4 +226,4 @@ global: nginx: enabled: false service: - port: 80 \ No newline at end of file + port: 80 From 41c5b7dbdc9a29694f47bd8347f913fb8d6f2e3f Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 18 Jul 2023 13:09:57 -0700 Subject: [PATCH 31/50] unshallow --- bin/checkout_all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/checkout_all.sh b/bin/checkout_all.sh index 5fc51cf..ec276fa 100755 --- a/bin/checkout_all.sh +++ b/bin/checkout_all.sh @@ -4,7 +4,7 @@ current_branch=$(git rev-parse --abbrev-ref HEAD) # Fetch any updates from the origin -git fetch -a origin +git fetch --unshallow -a origin # Loop through all remote branches for branch in $(git branch -r | grep -v '\->'); do From 6ff13d6b27b09b10ea899b2d3252459d1b762a71 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Tue, 18 Jul 2023 13:13:00 -0700 Subject: [PATCH 32/50] conditional shallowing --- bin/checkout_all.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/checkout_all.sh b/bin/checkout_all.sh index ec276fa..7875ddb 100755 --- a/bin/checkout_all.sh +++ b/bin/checkout_all.sh @@ -4,7 +4,11 @@ current_branch=$(git rev-parse --abbrev-ref HEAD) # Fetch any updates from the origin -git fetch --unshallow -a origin +if $(git rev-parse --is-shallow-repository); then + git fetch --unshallow -a origin +else + git fetch -a origin +fi # Loop through all remote branches for branch in $(git branch -r | grep -v '\->'); do From 3c9f0744a61e9147cdccfeeab0d46b54fad7c665 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 15:03:54 -0700 Subject: [PATCH 33/50] bulkrax import --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index 8301c89..97757eb 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 8301c8961bf01ed582e6a1d7dadb02dba1387626 +Subproject commit 97757ebe07ab5e7f76c8876c359d6ceabf288cc2 From 99b0ce54f09865b95bcb2e349cf74ab25d92b135 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 15:14:58 -0700 Subject: [PATCH 34/50] updates from hykuup --- .dockerignore | 33 +++++ .github/CODE_OF_CONDUCT.md | 36 +++++ .github/CONTRIBUTING.md | 184 +++++++++++++++++++++++++ .github/ISSUE_TEMPLATE.md | 18 +++ .github/PULL_REQUEST_TEMPLATE.md | 16 +++ .github/SUPPORT.md | 3 + .github/release.yml | 20 +++ .github/workflows/build-base.yaml | 18 +++ .github/workflows/build-solr.yaml | 18 +++ .github/workflows/build-test-lint.yaml | 40 ++++++ .github/workflows/deploy.yaml | 23 ++++ README.md | 2 + bin/checkout_all.sh | 28 ++++ bin/helm_deploy | 44 ++++++ docker-compose.yml | 52 ++++++- 15 files changed, 534 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/SUPPORT.md create mode 100644 .github/release.yml create mode 100644 .github/workflows/build-base.yaml create mode 100644 .github/workflows/build-solr.yaml create mode 100644 .github/workflows/build-test-lint.yaml create mode 100644 .github/workflows/deploy.yaml create mode 100755 bin/checkout_all.sh create mode 100755 bin/helm_deploy diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..45c1f98 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,33 @@ +*.rdb +./artifacts +./chart +./coverage +./docker +./fcrepo +./importer +./log +./pg +./public/assets +./public/branding +./public/packs +./public/system +./public/uploads +./tmp +.coveralls.yml +.ebextensions +.fcrepo_wrapper +.git +.github +.gitignore +.hound.yml +.idea +.internal_test_app/* +.solr_wrapper + +node_modules/* +solr/solr/* +fcrpo/* +pg/* +Dockerfile* +fits.log +ImageMagick* \ No newline at end of file diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b771691 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,36 @@ +The Samvera community is dedicated to providing a welcoming and +positive experience for all its members, whether they are at a formal +gathering, in a social setting, or taking part in activities online. +The Samvera community welcomes participation from people all over the +world and these members bring with them a wide variety of +professional, personal and social backgrounds; whatever these may be, +we treat colleagues with dignity and respect. + +Community members communicate primarily in English, though for many of +them this is not their native language. We therefore strive to express +ourselves simply and clearly remembering that unnecessary use of +jargon and slang will be a barrier to understanding for many of our +colleagues. We are sensitive to the fact that the international +nature of the community means that we span many different social norms +around language and behaviour and we strive to conduct ourselves, +online and in person, in ways that are unlikely to cause offence. + +Samvera conversations are often information-rich and intended to +generate discussion and debate. We discuss ideas from a standpoint of +mutual respect and reasoned argument. + +Community members work together to promote a respectful and safe +community. In the event that someone’s conduct is causing offence or +distress, Samvera has a detailed +[Anti-Harassment Policy and Protocol](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211680) +which can be applied to address the problem. The first step in dealing +with any serious misconduct is to contact a local meeting organizer, +the +[Samvera community helpers](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211681) +([email](mailto:helpers@samvera.org)), a community member you +trust, or the +[Samvera Steering Group](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405210594) +immediately; at Samvera events, these people can be identified by +distinctive name badges. The +[Policy and Protocol](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211680) +should be consulted for fuller details. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..4adcb7d --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,184 @@ +# How to Contribute + +We want your help to make the Samvera community great. There are a few guidelines +that we need contributors to follow so that we can have a chance of +keeping on top of things. + +## Code of Conduct + +The Samvera Community is dedicated to providing a welcoming and positive +experience for all its members, whether they are at a formal gathering, in +a social setting, or taking part in activities online. Please see our +[Code of Conduct](CODE_OF_CONDUCT.md) for more information. + +## Samvera Community Intellectual Property Licensing and Ownership + +All code contributors must have an Individual Contributor License Agreement +(iCLA) on file with the Samvera Steering Group. If the contributor works for +an institution, the institution must have a Corporate Contributor License +Agreement (cCLA) on file. + +[Samvera Community Intellectual Property Licensing and Ownership](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211651) + +You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project. + +## Language + +The language we use matters. Today, tomorrow, and for years to come +people will read the code we write. They will judge us for our +design, logic, and the words we use to describe the system. + +Our words should be accessible. Favor descriptive words that give +meaning while avoiding reinforcing systemic inequities. For example, +in the Samvera community, we should favor using allowed\_list instead +of whitelist, denied\_list instead of blacklist, or source/copy +instead of master/slave. + +We're going to get it wrong, but this is a call to keep working to +make it right. View our code and the words we choose as a chance to +have a conversation. A chance to grow an understanding of the systems +we develop as well as the systems in which we live. + +See [“Blacklists” and “whitelists”: a salutary warning concerning the +prevalence of racist language in discussions of predatory +publishing](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6148600/) for +further details. + +## Contribution Tasks + +* Reporting Issues +* Making Changes +* Documenting Code +* Committing Changes +* Submitting Changes +* Reviewing and Merging Changes + +### Reporting Issues + +* Make sure you have a [GitHub account](https://github.com/signup/free) +* Submit a [Github issue](https://github.com/samvera/{{library}}/issues/) by: + * Clearly describing the issue + * Provide a descriptive summary + * Explain the expected behavior + * Explain the actual behavior + * Provide steps to reproduce the actual behavior + +### Making Changes + +* Fork the repository on GitHub +* Create a topic branch from where you want to base your work. + * This is usually the main branch. + * To quickly create a topic branch based on main; `git branch fix/main/my_contribution main` + * Then checkout the new branch with `git checkout fix/main/my_contribution`. + * Please avoid working directly on the `main` branch. + * You may find the [hub suite of commands](https://github.com/defunkt/hub) helpful +* Make sure you have added sufficient tests and documentation for your changes. + * Test functionality with RSpec; Test features / UI with Capybara. +* Run _all_ the tests to assure nothing else was accidentally broken. + +### Documenting Code + +* All new public methods, modules, and classes should include inline documentation in [YARD](http://yardoc.org/). + * Documentation should seek to answer the question "why does this code exist?" +* Document private / protected methods as desired. +* If you are working in a file with no prior documentation, do try to document as you gain understanding of the code. + * If you don't know exactly what a bit of code does, it is extra likely that it needs to be documented. Take a stab at it and ask for feedback in your pull request. You can use the 'blame' button on GitHub to identify the original developer of the code and @mention them in your comment. + * This work greatly increases the usability of the code base and supports the on-ramping of new committers. + * We will all be understanding of one another's time constraints in this area. +* [Getting started with YARD](http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md) + +### Committing changes + +* Make commits of logical units. +* Check for unnecessary whitespace with `git diff --check` before committing. +* Make sure your commit messages are [well formed](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). +* If you created an issue, you can close it by including "Closes #issue" in your commit message. See [Github's blog post for more details](https://github.com/blog/1386-closing-issues-via-commit-messages) + +``` + Present tense short summary (50 characters or less) + + More detailed description, if necessary. It should be wrapped to 72 + characters. Try to be as descriptive as you can, even if you think that + the commit content is obvious, it may not be obvious to others. You + should add such description also if it's already present in bug tracker, + it should not be necessary to visit a webpage to check the history. + + Include Closes # when relavent. + + Description can have multiple paragraphs and you can use code examples + inside, just indent it with 4 spaces: + + class PostsController + def index + respond_to do |wants| + wants.html { render 'index' } + end + end + end + + You can also add bullet points: + + - you can use dashes or asterisks + + - also, try to indent next line of a point for readability, if it's too + long to fit in 72 characters +``` + +* Make sure you have added the necessary tests for your changes. +* Run _all_ the tests to assure nothing else was accidentally broken. +* When you are ready to submit a pull request + +### Submitting Changes + +* Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub. +* Make sure your branch is up to date with its parent branch (i.e. main) + * `git checkout main` + * `git pull --rebase` + * `git checkout ` + * `git rebase main` + * It is a good idea to run your tests again. +* If you've made more than one commit take a moment to consider whether squashing commits together would help improve their logical grouping. + * [Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/) + * `git rebase --interactive main` ([See Github help](https://help.github.com/articles/interactive-rebase)) + * Squashing your branch's changes into one commit is "good form" and helps the person merging your request to see everything that is going on. +* Push your changes to a topic branch in your fork of the repository. +* Submit a pull request from your fork to the project. + +### Reviewing and Merging Changes + +We adopted [Github's Pull Request Review](https://help.github.com/articles/about-pull-request-reviews/) for our repositories. +Common checks that may occur in our repositories: + +1. Travis CI - where our automated tests are running +2. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve. +3. Required Labels - an appropriate [semver](https://semver.org/) label (see [release.yml](https://github.com/samvera/hyku/blob/main/.github/release.yml)) + +If one or more of the required checks failed (or are incomplete), the code should not be merged (and the UI will not allow it). If all of the checks have passed, then anyone on the project (including the pull request submitter) may merge the code. + +*Example: Carolyn submits a pull request, Justin reviews the pull request and approves. However, Justin is still waiting on other checks (Travis CI is usually the culprit), so he does not merge the pull request. Eventually, all of the checks pass. At this point, Carolyn or anyone else may merge the pull request.* + +#### Things to Consider When Reviewing + +First, the person contributing the code is putting themselves out there. Be mindful of what you say in a review. + +* Ask clarifying questions +* State your understanding and expectations +* Provide example code or alternate solutions, and explain why + +This is your chance for a mentoring moment of another developer. Take time to give an honest and thorough review of what has changed. Things to consider: + + * Does the commit message explain what is going on? + * Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_ + * Do new or changed methods, modules, and classes have documentation? + * Does the commit contain more than it should? Are two separate concerns being addressed in one commit? + * Does the description of the new/changed specs match your understanding of what the spec is doing? + * Did the Travis tests complete successfully? + +If you are uncertain, bring other contributors into the conversation by assigning them as a reviewer. + +# Additional Resources + +* [General GitHub documentation](http://help.github.com/) +* [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/) +* [Pro Git](http://git-scm.com/book) is both a free and excellent book about Git. +* [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..c174596 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,18 @@ +# Story + +# Acceptance Criteria + +- [ ] + +# Screenshots / Video + +
+ + +
+ +# Testing Instructions and Sample Files + +- + +# Notes \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d0ef6ae --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +# Story + +Refs #issuenumber + +# Expected Behavior Before Changes + +# Expected Behavior After Changes + +# Screenshots / Video + +
+ + +
+ +# Notes \ No newline at end of file diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000..b138bd2 --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,3 @@ +If you would like to report an issue with Hyku, first do search [the list of issues](https://github.com/samvera-labs/hyku/issues/) to see if someone else has already reported it, and then feel free to [create a new issue](https://github.com/samvera-labs/hyku/issues/new). + +If you have questions or need help, please email [the Samvera community tech list](https://groups.google.com/forum/#!forum/samvera-tech) or stop by the #dev channel in [the Samvera community Slack team](http://slack.samvera.org/). diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..52b7aef --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,20 @@ +changelog: + exclude: + labels: + - ignore-for-release + categories: + - title: Breaking Changes 🛠 + labels: + - major-ver + - title: Exciting New Features 🎉 + labels: + - minor-ver + - title: Bug Fixes 🐞 + labels: + - patch-ver + - title: Database Changes + labels: + - database-changes + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/build-base.yaml b/.github/workflows/build-base.yaml new file mode 100644 index 0000000..b8b16bd --- /dev/null +++ b/.github/workflows/build-base.yaml @@ -0,0 +1,18 @@ +name: "Build Base" +run-name: Build Base of ${{ github.ref_name }} by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + build: + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + secrets: inherit + with: + platforms: "linux/amd64" + baseTarget: hyku-base diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml new file mode 100644 index 0000000..ea32846 --- /dev/null +++ b/.github/workflows/build-solr.yaml @@ -0,0 +1,18 @@ +name: "Build Solr" +run-name: Build Solr of ${{ github.ref_name }} by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + build: + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + secrets: inherit + with: + platforms: "linux/amd64" + solrTarget: hyku-solr diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml new file mode 100644 index 0000000..599b9b4 --- /dev/null +++ b/.github/workflows/build-test-lint.yaml @@ -0,0 +1,40 @@ +name: 'Build Test Lint' +run-name: Build Test Lint of ${{ github.ref_name }} by @${{ github.actor }} +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + build: + uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + secrets: inherit + with: + platforms: 'linux/amd64' + webTarget: hyku-web + workerTarget: hyku-worker + + test: + needs: build + uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local + with: + confdir: '/app/samvera/hyrax-webapp/solr/conf' + webTarget: hyku-web + workerTarget: hyku-worker + + lint: + needs: build + uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local + with: + webTarget: hyku-web + workerTarget: hyku-worker diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..127fb1e --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,23 @@ +name: "Deploy" +run-name: Deploy (${{ github.ref_name }} -> ${{ inputs.environment }}) by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + environment: + description: 'Deploy to Environment' + required: true + default: 'staging' + type: choice + options: + - staging + - production + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + deploy: + uses: scientist-softserv/actions/.github/workflows/deploy.yaml@v0.0.14 + secrets: inherit diff --git a/README.md b/README.md index bfb884c..4a4213c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ git push -u origin main ``` ### Overrides +Before overriding anything, please think hard about whether what you are working on is a bug or feature that can apply to Hyku itself. If it is, please make a branch in your Hyku checkout (`./hyrax-webapp`) and do the work there. [See here](https://github.com/samvera-labs/hyku_knapsack/wiki/Hyku-Branches) for more information about working with Hyku branches in your Knapsack + Adding decorators to override features is fairly simple. We do recommend some best practices [found here](https://github.com/samvera-labs/hyku_knapsack/wiki/Decorators-and-Overrides) Any file with `_decorator.rb` in the app or lib directory will automatically be loaded along with any classes in the app directory. diff --git a/bin/checkout_all.sh b/bin/checkout_all.sh new file mode 100755 index 0000000..7875ddb --- /dev/null +++ b/bin/checkout_all.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Save the current branch name +current_branch=$(git rev-parse --abbrev-ref HEAD) + +# Fetch any updates from the origin +if $(git rev-parse --is-shallow-repository); then + git fetch --unshallow -a origin +else + git fetch -a origin +fi + +# Loop through all remote branches +for branch in $(git branch -r | grep -v '\->'); do + # Checkout each branch + if [[ $branch == *origin* ]]; then + branch_name="${branch#origin/}" + echo "Checking out $branch_name branch..." + git checkout $branch_name + else + echo "$branch is not from the origin" + fi +done + +# Switch back to the original branch +git checkout $current_branch + +echo "Operation complete, returned to $current_branch" diff --git a/bin/helm_deploy b/bin/helm_deploy new file mode 100755 index 0000000..a43cfe8 --- /dev/null +++ b/bin/helm_deploy @@ -0,0 +1,44 @@ +#!/bin/sh + +# This script wraps up helm deployment. It is meant as a clear starting point for +# commandline deployment or CI based deployment. It requires the following ENV vars be set +# +# CHART_VERSION: this is the version of the hyrax chart you want to deploy. default - 0.22.0 +# DEPLOY_IMAGE: this is the build image that runs the rails application. Typically this would run puma or passenger. eg: samvera/hyrax or ghcr.io/samvera/hyku. Defaults to gcrh.io/samvera/hyku +# WORKER_IMAGE: this is the worker target, usually built from the same Dockerfile as DEPLOY_IMAGE. eg: samvera/hyrax/worker or ghcr.io/samvera/hyku/worker. Defaults to gcrh.io/samvera/hyku/worker +# DEPLOY_TAG: name of of the tag you want to deploy for deploy image. eg: "latest" or "v3.0.1" or "f123asdf1". Defaults to latest +# WORKER_TAG: name of of the tag you want to deploy for deploy image. eg: "latest" or "v3.0.1" or "f123asdf1". Defaults to DEPLOY_TAG +# HELM_EXTRA_ARGS: any additional arguments you'd like passed to helm upgrade directly. can be blank. + +if [ -z "$1" ] || [ -z "$2" ] +then + echo './bin/deploy RELEASE_NAME NAMESPACE' + exit 1 +fi +release_name="${1//_/-}" +namespace="${2//_/-}" + +CHART_VERSION="${CHART_VERSION:-2.0.0}" + +DEPLOY_IMAGE="${DEPLOY_IMAGE:-ghcr.io/samvera/hyku}" +WORKER_IMAGE="${WORKER_IMAGE:-ghcr.io/samvera/hyku/worker}" +DEPLOY_TAG="${DEPLOY_TAG:-latest}" +WORKER_TAG="${WORKER_TAG:-$DEPLOY_TAG}" +echo $DEPLOY_TAG + +helm pull --untar oci://ghcr.io/samvera/charts/hyrax --version $CHART_VERSION +helm repo update + +helm upgrade \ + --install \ + --atomic \ + --timeout 15m0s \ + --set image.repository="$DEPLOY_IMAGE" \ + --set image.tag="$DEPLOY_TAG" \ + --set worker.image.repository="$WORKER_IMAGE" \ + --set worker.image.tag="$DEPLOY_TAG" \ + $HELM_EXTRA_ARGS \ + --namespace="$namespace" \ + --create-namespace \ + "$release_name" \ + hyrax diff --git a/docker-compose.yml b/docker-compose.yml index 89ee31e..9a2f2c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,12 +36,34 @@ services: file: hyrax-webapp/docker-compose.yml service: db + base: + extends: + file: hyrax-webapp/docker-compose.yml + service: base + image: ghcr.io/samvera-labs/hyku_knapsack/base:${TAG:-latest} + build: + context: hyrax-webapp + target: hyku-base + cache_from: + - ghcr.io/samvera-labs/hyku_knapsack/base:latest + args: + BUILDKIT_INLINE_CACHE: 1 + web: extends: file: hyrax-webapp/docker-compose.yml service: web + build: + context: hyrax-webapp + target: hyku-web + cache_from: + - ghcr.io/samvera-labs/hyku_knapsack/base:latest + - ghcr.io/samvera-labs/hyku_knapsack:latest + args: + BUILDKIT_INLINE_CACHE: 1 + image: ghcr.io/samvera-labs/hyku_knapsack:${TAG:-latest} # command left commented for situations where the Gemfile.lock needs to be updated before the app starts - command: bash -l -c "bundle && ./bin/web" + # command: bash -l -c "bundle && ./bin/web" environment: # This line is what makes the knapsack include use the local code instead of the remote gem - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera @@ -58,6 +80,16 @@ services: extends: file: hyrax-webapp/docker-compose.yml service: worker + build: + context: hyrax-webapp + target: hyku-worker + cache_from: + - ghcr.io/samvera-labs/hyku_knapsack/base:latest + - ghcr.io/samvera-labs/hyku_knapsack:latest + - ghcr.io/samvera-labs/hyku_knapsack/worker:latest + args: + BUILDKIT_INLINE_CACHE: 1 + image: ghcr.io/samvera-labs/hyku_knapsack/worker:${TAG:-latest} volumes: - node_modules:/app/samvera/hyrax-webapp/node_modules:cached - uploads:/app/samvera/hyrax-webapp/public/uploads:cached @@ -69,11 +101,29 @@ services: extends: file: hyrax-webapp/docker-compose.yml service: check_volumes + build: + context: hyrax-webapp + target: hyku-web + cache_from: + - ghcr.io/samvera-labs/hyku_knapsack/base:latest + - ghcr.io/samvera-labs/hyku_knapsack:latest + args: + BUILDKIT_INLINE_CACHE: 1 + image: ghcr.io/samvera-labs/hyku_knapsack:${TAG:-latest} initialize_app: extends: file: hyrax-webapp/docker-compose.yml service: initialize_app + build: + context: hyrax-webapp + target: hyku-web + cache_from: + - ghcr.io/samvera-labs/hyku_knapsack/base:latest + - ghcr.io/samvera-labs/hyku_knapsack:latest + args: + BUILDKIT_INLINE_CACHE: 1 + image: ghcr.io/samvera-labs/hyku_knapsack:${TAG:-latest} # command left commented for situations where the Gemfile.lock needs to be updated before the app starts command: - > From 3d7948efd5be2d7db4adb076c82a1ea3c2ce40f7 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 15:26:50 -0700 Subject: [PATCH 35/50] env vars everywhere --- docker-compose.yml | 14 ++- ops/staging-deploy.tmpl.yaml | 233 +++++++++++++++++++++++++++++++++++ 2 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 ops/staging-deploy.tmpl.yaml diff --git a/docker-compose.yml b/docker-compose.yml index 9a2f2c6..8d9906c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,6 +67,7 @@ services: environment: # This line is what makes the knapsack include use the local code instead of the remote gem - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera + - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true - VIRTUAL_PORT=3000 - VIRTUAL_HOST=.hyku.test volumes: @@ -90,6 +91,10 @@ services: args: BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/samvera-labs/hyku_knapsack/worker:${TAG:-latest} + environment: + # This line is what makes the knapsack include use the local code instead of the remote gem + - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera + - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true volumes: - node_modules:/app/samvera/hyrax-webapp/node_modules:cached - uploads:/app/samvera/hyrax-webapp/public/uploads:cached @@ -110,6 +115,10 @@ services: args: BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/samvera-labs/hyku_knapsack:${TAG:-latest} + environment: + # This line is what makes the knapsack include use the local code instead of the remote gem + - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera + - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true initialize_app: extends: @@ -124,10 +133,13 @@ services: args: BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/samvera-labs/hyku_knapsack:${TAG:-latest} + environment: + # This line is what makes the knapsack include use the local code instead of the remote gem + - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera + - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true # command left commented for situations where the Gemfile.lock needs to be updated before the app starts command: - > - bundle && solrcloud-upload-configset.sh /app/samvera/hyrax-webapp/solr/conf && solrcloud-assign-configset.sh && SOLR_COLLECTION_NAME=hydra-test solrcloud-assign-configset.sh && diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml new file mode 100644 index 0000000..3052e38 --- /dev/null +++ b/ops/staging-deploy.tmpl.yaml @@ -0,0 +1,233 @@ +replicaCount: 2 + +livenessProbe: + enabled: false +readinessProbe: + enabled: false + +brandingVolume: + storageClass: aws-efs +derivativesVolume: + storageClass: aws-efs +uploadsVolume: + storageClass: aws-efs + size: 200Gi + +imagePullSecrets: + - name: github + +extraVolumeMounts: &volMounts + - name: uploads + mountPath: /app/samvera/hyrax-webapp/tmp/imports + subPath: imports + - name: uploads + mountPath: /app/samvera/hyrax-webapp/tmp/exports + subPath: exports + - name: uploads + mountPath: /app/samvera/hyrax-webapp/public/system + subPath: public-system + - name: uploads + mountPath: /app/samvera/hyrax-webapp/public/uploads + subPath: public-uploads + - name: uploads + mountPath: /app/samvera/hyrax-webapp/tmp/network_files + subPath: network-files + +ingress: + enabled: true + hosts: + - host: REPLACE_ME + paths: + - path: / + - host: "*.REPLACE_ME" + paths: + - path: / + annotations: { + kubernetes.io/ingress.class: "nginx", + nginx.ingress.kubernetes.io/proxy-body-size: "0", + cert-manager.io/cluster-issuer: letsencrypt-production-dns + } + tls: + - hosts: + - REPLACE_ME + - "*.REPLACE_ME" + secretName: staging-tls + +extraEnvVars: &envVars + - name: BUNDLE_LOCAL__HYKU_KNAPSACK + value: /app/samvera + - name: BUNDLE_DISABLE_LOCAL_BRANCH_CHECK + value: "true" + - name: CONFDIR + value: "/app/samvera/hyrax-webapp/solr/conf" + - name: CLIENT_ADMIN_USER_EMAIL + value: $CLIENT_ADMIN_USER_EMAIL + - name: CLIENT_ADMIN_USER_PASSWORD + value: $CLIENT_ADMIN_USER_PASSWORD + - name: DB_ADAPTER + value: postgresql + - name: DB_HOST + value: pg-postgresql.staging-postgres.svc.cluster.local + - name: DB_NAME + value: hyku_staging + - name: DB_USER + value: postgres + - name: FCREPO_BASE_PATH + value: /hykustaging + - name: FCREPO_HOST + value: fcrepo.staging-fcrepo.svc.cluster.local + - name: FCREPO_PORT + value: "8080" + - name: FCREPO_REST_PATH + value: rest + - name: GOOGLE_ANALYTICS_ID + value: $GOOGLE_ANALYTICS_ID + - name: GOOGLE_OAUTH_APP_NAME + value: hyku_staging + - name: GOOGLE_OAUTH_APP_VERSION + value: '1.0' + - name: GOOGLE_OAUTH_PRIVATE_KEY_SECRET + value: $GOOGLE_OAUTH_PRIVATE_KEY_SECRET + - name: GOOGLE_OAUTH_PRIVATE_KEY_PATH + value: prod-cred.p12 + - name: GOOGLE_OAUTH_PRIVATE_KEY_VALUE + value: $GOOGLE_OAUTH_PRIVATE_KEY_VALUE + - name: GOOGLE_OAUTH_CLIENT_EMAIL + value: hyku-demo@REPLACE_ME + - name: INITIAL_ADMIN_EMAIL + value: admin@example.com + - name: INITIAL_ADMIN_PASSWORD + value: testing123 + - name: IN_DOCKER + value: "true" + - name: LD_LIBRARY_PATH + value: /app/fits/tools/mediainfo/linux + - name: PASSENGER_APP_ENV + value: production + - name: RAILS_CACHE_STORE_URL + value: redis://:$REDIS_PASSWORD@staging-redis-master:6379/staging + - name: RAILS_ENV + value: production + - name: RAILS_LOG_TO_STDOUT + value: "true" + - name: RAILS_MAX_THREADS + value: "5" + - name: RAILS_SERVE_STATIC_FILES + value: "true" + - name: REDIS_HOST + value: staging-redis-master + - name: REDIS_URL + value: redis://:$REDIS_PASSWORD@staging-redis-master:6379/staging + - name: HYRAX_ACTIVE_JOB_QUEUE + value: sidekiq + - name: HYRAX_ANALYTICS + value: "true" + - name: HYKU_BULKRAX_ENABLED + value: "true" + - name: HYKU_CONTACT_EMAIL + value: REPLACE_ME + - name: HYKU_FILE_ACL + value: "false" + - name: HYRAX_FITS_PATH + value: /app/fits/fits.sh + - name: HYKU_ADMIN_HOST + value: RPLACEME + - name: HYKU_ADMIN_ONLY_TENANT_CREATION + value: "false" + - name: HYKU_ALLOW_SIGNUP + value: "false" + - name: HYKU_DEFAULT_HOST + value: "%{tenant}.REPLACE_ME" + - name: HYKU_MULTITENANT + value: "true" + - name: HYKU_ROOT_HOST + value: REPLACE_ME + - name: NEGATIVE_CAPTCHA_SECRET + value: $NEGATIVE_CAPTCHA_SECRET + - name: SMTP_ENABLED + value: "true" + - name: SMTP_USER_NAME + value: $SMTP_USER_NAME + - name: SMTP_PASSWORD + value: $SMTP_PASSWORD + - name: SMTP_ADDRESS + value: smtp.mailtrap.io + - name: SMTP_DOMAIN + value: smtp.mailtrap.io + - name: SMTP_PORT + value: "2525" + - name: SMTP_TYPE + value: cram_md5 + - name: SOLR_ADMIN_USER + value: admin + - name: SOLR_ADMIN_PASSWORD + value: $SOLR_ADMIN_PASSWORD + - name: SOLR_COLLECTION_NAME + value: hyku-staging + - name: SOLR_CONFIGSET_NAME + value: hyku-staging + - name: SOLR_HOST + value: solr.staging-solr + - name: SOLR_PORT + value: "8983" + - name: SOLR_URL + value: http://admin:$SOLR_ADMIN_PASSWORD@solr.staging-solr:8983/solr/ + - name: SENTRY_DSN + value: $SENTRY_DSN + - name: SENTRY_ENVIRONMENT + value: $SENTRY_ENVIRONMENT + - name: TEST_USER_EMAIL + value: user@example.com + - name: TEST_USER_PASSWORD + value: testing123 + +worker: + replicaCount: 1 + extraVolumeMounts: *volMounts + extraEnvVars: *envVars + podSecurityContext: + runAsUser: 1001 + runAsGroup: 101 + fsGroup: 101 + fsGroupChangePolicy: "OnRootMismatch" +podSecurityContext: + runAsUser: 1001 + runAsGroup: 101 + fsGroup: 101 + fsGroupChangePolicy: "OnRootMismatch" + +embargoRelease: + enabled: false +leaseRelease: + enabled: false + +fcrepo: + enabled: false +postgresql: + enabled: false +redis: + cluster: + enabled: false + password: $REDIS_PASSWORD +solr: + enabled: false + +externalFcrepoHost: fcrepo.staging-fcrepo.svc.cluster.local + +externalPostgresql: + host: pg-postgresql.staging-postgres.svc.cluster.local + username: postgres + password: $POSTGRES_PASSWORD + +externalSolrHost: solr.staging-solr.svc.cluster.local +externalSolrUser: admin +externalSolrCollection: "hyku-staging" +externalSolrPassword: $SOLR_ADMIN_PASSWORD + +global: + hyraxName: hyku-staging-hyrax + +nginx: + enabled: false + service: + port: 80 From 36fc64f0a5a0304ba67efa06bce932c771b69ee6 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 15:32:00 -0700 Subject: [PATCH 36/50] env var --- hyrax-webapp | 2 +- ops/production-deploy.tmpl.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index 97757eb..8301c89 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 97757ebe07ab5e7f76c8876c359d6ceabf288cc2 +Subproject commit 8301c8961bf01ed582e6a1d7dadb02dba1387626 diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index 2151a75..e757085 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -61,6 +61,10 @@ ingress: # add back *.hykuup.com and repo.samvera.org extraEnvVars: &envVars + - name: BUNDLE_LOCAL__HYKU_KNAPSACK + value: /app/samvera + - name: BUNDLE_DISABLE_LOCAL_BRANCH_CHECK + value: "true" - name: CONFDIR value: "/app/samvera/hyrax-webapp/solr/conf" - name: DB_ADAPTER From 50d3f21830b601d1d2dfa8cb7797a0618eefae85 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 16:55:37 -0700 Subject: [PATCH 37/50] was never gonna work --- Dockerfile | 15 +++++++++++++++ docker-compose.yml | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..66f5c06 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM ghcr.io/samvera/hyku/base:latest as hyku-web +ARG APP_PATH +COPY --chown=1001:101 $APP_PATH/Gemfile* /app/samvera/hyrax-webapp/ +RUN git config --global --add safe.directory /app/samvera && \ + bundle install --jobs "$(nproc)" + +COPY --chown=1001:101 $APP_PATH/bin/db-migrate-seed.sh /app/samvera/ +# This is specifically NOT $APP_PATH but the parent directory +COPY --chown=1001:101 . /app/samvera + +RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DB_URL='postgresql://fake' bundle exec rake assets:precompile && yarn install +CMD ./bin/web + +FROM hyku-web as hyku-worker +CMD ./bin/worker diff --git a/docker-compose.yml b/docker-compose.yml index 118aa37..9d295be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,7 +54,7 @@ services: file: hyrax-webapp/docker-compose.yml service: web build: - context: hyrax-webapp + context: . target: hyku-web cache_from: - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest @@ -134,7 +134,7 @@ services: BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} environment: - # This line is what makes the knapsack include use the local code instead of the remote gem + #ops/production-deploy.tmpl.yaml This line is what makes the knapsack include use the local code instead of the remote gem - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true # command left commented for situations where the Gemfile.lock needs to be updated before the app starts From 60779966e29a55804cd6b9c3f485e83041891571 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 17:34:41 -0700 Subject: [PATCH 38/50] wtf --- docker-compose.yml | 94 +++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 68 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9d295be..85e408a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,26 @@ version: '3.8' +x-app: &app + build: + context: . + target: hyku-web + cache_from: + - ghcr.io/samvera/hyku/base:latest + - ghcr.io/scientist-softserv/hykuup_knapsack:latest + args: + BUILDKIT_INLINE_CACHE: 1 + APP_PATH: ./hyrax-webapp + image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} + environment: + # This line is what makes the knapsack include use the local code instead of the remote gem + - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera + - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true + volumes: + - node_modules:/app/samvera/hyrax-webapp/node_modules:cached + - uploads:/app/samvera/hyrax-webapp/public/uploads:cached + - assets:/app/samvera/hyrax-webapp/public/assets:cached + - cache:/app/samvera/hyrax-webapp/tmp/cache:cached + - .:/app/samvera + volumes: assets: @@ -36,32 +58,11 @@ services: file: hyrax-webapp/docker-compose.yml service: db - base: - extends: - file: hyrax-webapp/docker-compose.yml - service: base - image: ghcr.io/scientist-softserv/hykuup_knapsack/base:${TAG:-latest} - build: - context: hyrax-webapp - target: hyku-base - cache_from: - - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - args: - BUILDKIT_INLINE_CACHE: 1 - web: + <<: *app extends: file: hyrax-webapp/docker-compose.yml service: web - build: - context: . - target: hyku-web - cache_from: - - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - - ghcr.io/scientist-softserv/hykuup_knapsack:latest - args: - BUILDKIT_INLINE_CACHE: 1 - image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} # command left commented for situations where the Gemfile.lock needs to be updated before the app starts # command: bash -l -c "bundle && ./bin/web" environment: @@ -70,31 +71,13 @@ services: - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true - VIRTUAL_PORT=3000 - VIRTUAL_HOST=.hyku.test - volumes: - - node_modules:/app/samvera/hyrax-webapp/node_modules:cached - - uploads:/app/samvera/hyrax-webapp/public/uploads:cached - - assets:/app/samvera/hyrax-webapp/public/assets:cached - - cache:/app/samvera/hyrax-webapp/tmp/cache:cached - - .:/app/samvera worker: + <<: *app extends: file: hyrax-webapp/docker-compose.yml service: worker - build: - context: hyrax-webapp - target: hyku-worker - cache_from: - - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - - ghcr.io/scientist-softserv/hykuup_knapsack:latest - - ghcr.io/scientist-softserv/hykuup_knapsack/worker:latest - args: - BUILDKIT_INLINE_CACHE: 1 image: ghcr.io/scientist-softserv/hykuup_knapsack/worker:${TAG:-latest} - environment: - # This line is what makes the knapsack include use the local code instead of the remote gem - - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera - - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true volumes: - node_modules:/app/samvera/hyrax-webapp/node_modules:cached - uploads:/app/samvera/hyrax-webapp/public/uploads:cached @@ -103,41 +86,16 @@ services: - .:/app/samvera check_volumes: + <<: *app extends: file: hyrax-webapp/docker-compose.yml service: check_volumes - build: - context: hyrax-webapp - target: hyku-web - cache_from: - - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - - ghcr.io/scientist-softserv/hykuup_knapsack:latest - args: - BUILDKIT_INLINE_CACHE: 1 - image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} - environment: - # This line is what makes the knapsack include use the local code instead of the remote gem - - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera - - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true initialize_app: + <<: *app extends: file: hyrax-webapp/docker-compose.yml service: initialize_app - build: - context: hyrax-webapp - target: hyku-web - cache_from: - - ghcr.io/scientist-softserv/hykuup_knapsack/base:latest - - ghcr.io/scientist-softserv/hykuup_knapsack:latest - args: - BUILDKIT_INLINE_CACHE: 1 - image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} - environment: - #ops/production-deploy.tmpl.yaml This line is what makes the knapsack include use the local code instead of the remote gem - - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera - - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true - # command left commented for situations where the Gemfile.lock needs to be updated before the app starts command: - > solrcloud-upload-configset.sh /app/samvera/hyrax-webapp/solr/conf && From 74eebc253a39acce0f11f9db4a5cc4e12e12b0aa Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 17:45:59 -0700 Subject: [PATCH 39/50] build optimization --- Dockerfile | 8 ++++---- docker-compose.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66f5c06..1095de7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM ghcr.io/samvera/hyku/base:latest as hyku-web -ARG APP_PATH -COPY --chown=1001:101 $APP_PATH/Gemfile* /app/samvera/hyrax-webapp/ +ARG HYKU_PATH +COPY --chown=1001:101 $HYKU_PATH/Gemfile* /app/samvera/hyrax-webapp/ RUN git config --global --add safe.directory /app/samvera && \ bundle install --jobs "$(nproc)" -COPY --chown=1001:101 $APP_PATH/bin/db-migrate-seed.sh /app/samvera/ -# This is specifically NOT $APP_PATH but the parent directory +COPY --chown=1001:101 $HYKU_PATH/bin/db-migrate-seed.sh /app/samvera/ +# This is specifically NOT $HYKU_PATH but the parent directory COPY --chown=1001:101 . /app/samvera RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DB_URL='postgresql://fake' bundle exec rake assets:precompile && yarn install diff --git a/docker-compose.yml b/docker-compose.yml index 85e408a..09353c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ x-app: &app - ghcr.io/scientist-softserv/hykuup_knapsack:latest args: BUILDKIT_INLINE_CACHE: 1 - APP_PATH: ./hyrax-webapp + HYKU_PATH: ./hyrax-webapp image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} environment: # This line is what makes the knapsack include use the local code instead of the remote gem From c3fd69d73569c261ff204307f62de7befc1e5d12 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 17:49:49 -0700 Subject: [PATCH 40/50] Revert "build optimization" This reverts commit 74eebc253a39acce0f11f9db4a5cc4e12e12b0aa. --- Dockerfile | 8 ++++---- docker-compose.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1095de7..66f5c06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM ghcr.io/samvera/hyku/base:latest as hyku-web -ARG HYKU_PATH -COPY --chown=1001:101 $HYKU_PATH/Gemfile* /app/samvera/hyrax-webapp/ +ARG APP_PATH +COPY --chown=1001:101 $APP_PATH/Gemfile* /app/samvera/hyrax-webapp/ RUN git config --global --add safe.directory /app/samvera && \ bundle install --jobs "$(nproc)" -COPY --chown=1001:101 $HYKU_PATH/bin/db-migrate-seed.sh /app/samvera/ -# This is specifically NOT $HYKU_PATH but the parent directory +COPY --chown=1001:101 $APP_PATH/bin/db-migrate-seed.sh /app/samvera/ +# This is specifically NOT $APP_PATH but the parent directory COPY --chown=1001:101 . /app/samvera RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DB_URL='postgresql://fake' bundle exec rake assets:precompile && yarn install diff --git a/docker-compose.yml b/docker-compose.yml index 09353c8..85e408a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ x-app: &app - ghcr.io/scientist-softserv/hykuup_knapsack:latest args: BUILDKIT_INLINE_CACHE: 1 - HYKU_PATH: ./hyrax-webapp + APP_PATH: ./hyrax-webapp image: ghcr.io/scientist-softserv/hykuup_knapsack:${TAG:-latest} environment: # This line is what makes the knapsack include use the local code instead of the remote gem From 29ef78be68c485386e6f2c06b6e79295c4723775 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Thu, 20 Jul 2023 23:09:58 -0700 Subject: [PATCH 41/50] git --- .dockerignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 45c1f98..eb41796 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,9 +16,7 @@ .coveralls.yml .ebextensions .fcrepo_wrapper -.git .github -.gitignore .hound.yml .idea .internal_test_app/* From 678dc46916844be86718027da487ab3d8b879339 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 11:37:25 -0700 Subject: [PATCH 42/50] build debugging --- .dockerignore | 5 ++--- .github/workflows/build-base.yaml | 18 ------------------ .github/workflows/build-test-lint.yaml | 2 +- .gitignore | 1 + docker-compose.yml | 1 - hyrax-webapp | 2 +- 6 files changed, 5 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/build-base.yaml diff --git a/.dockerignore b/.dockerignore index eb41796..5e4ec4e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,7 +16,6 @@ .coveralls.yml .ebextensions .fcrepo_wrapper -.github .hound.yml .idea .internal_test_app/* @@ -26,6 +25,6 @@ node_modules/* solr/solr/* fcrpo/* pg/* -Dockerfile* fits.log -ImageMagick* \ No newline at end of file +ImageMagick* +.DS_Store diff --git a/.github/workflows/build-base.yaml b/.github/workflows/build-base.yaml deleted file mode 100644 index b8b16bd..0000000 --- a/.github/workflows/build-base.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Build Base" -run-name: Build Base of ${{ github.ref_name }} by @${{ github.actor }} -on: - workflow_dispatch: - inputs: - debug_enabled: - type: boolean - description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' - required: false - default: false - -jobs: - build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local - secrets: inherit - with: - platforms: "linux/amd64" - baseTarget: hyku-base diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 599b9b4..fcf10f7 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -13,7 +13,7 @@ on: type: boolean description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' required: false - default: false + default: true jobs: build: diff --git a/.gitignore b/.gitignore index cdde4a1..7121866 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ scratch.md *~undo-tree~ .env.* +.DS_Store diff --git a/docker-compose.yml b/docker-compose.yml index 85e408a..e96a83c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,6 @@ x-app: &app - cache:/app/samvera/hyrax-webapp/tmp/cache:cached - .:/app/samvera - volumes: assets: cache: diff --git a/hyrax-webapp b/hyrax-webapp index 8301c89..e4b097e 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 8301c8961bf01ed582e6a1d7dadb02dba1387626 +Subproject commit e4b097e07c9078692471da4f8531afa858a8ba26 From 6309808f081140d309c444af95252cf1e1583484 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 11:38:53 -0700 Subject: [PATCH 43/50] build debugging --- .github/workflows/build-test-lint.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index fcf10f7..113854f 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -13,7 +13,7 @@ on: type: boolean description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' required: false - default: true + default: false jobs: build: @@ -23,6 +23,7 @@ jobs: platforms: 'linux/amd64' webTarget: hyku-web workerTarget: hyku-worker + debug_enabled: true test: needs: build @@ -38,3 +39,4 @@ jobs: with: webTarget: hyku-web workerTarget: hyku-worker + debug_enabled: true From 7f88a0274345ab928cdc26b625a645e0f32b65eb Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 11:40:45 -0700 Subject: [PATCH 44/50] build debugging --- .github/workflows/build-test-lint.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 113854f..599b9b4 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -23,7 +23,6 @@ jobs: platforms: 'linux/amd64' webTarget: hyku-web workerTarget: hyku-worker - debug_enabled: true test: needs: build @@ -39,4 +38,3 @@ jobs: with: webTarget: hyku-web workerTarget: hyku-worker - debug_enabled: true From dd644a25100bc485bcfada672e9e15c0126acc14 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 12:43:12 -0700 Subject: [PATCH 45/50] database config --- docker-compose.yml | 4 ++++ ops/production-deploy.tmpl.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e96a83c..21aee0d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,6 +57,10 @@ services: file: hyrax-webapp/docker-compose.yml service: db + base: + extends: hyrax-webapp/docker-compose.yml + service: base + web: <<: *app extends: diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index e757085..aec8ce2 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -74,7 +74,7 @@ extraEnvVars: &envVars - name: DB_PREPARED_STATEMENTS value: "false" - name: DB_HOST - value: acid-postgres-cluster-delta-pooler.postgres.svc.cluster.local + value: acid-postgres-cluster-delta.postgres.svc.cluster.local - name: DB_NAME value: hykuup_production - name: DB_PASSWORD @@ -261,7 +261,7 @@ solr: externalFcrepoHost: fcrepo.fcrepo.svc.cluster.local externalPostgresql: - host: acid-postgres-cluster-delta-pooler.postgres.svc.cluster.local + host: acid-postgres-cluster-delta.postgres.svc.cluster.local username: hykuup_production password: $DB_PASSWORD database: hykuup_production From 623255b7323a7e501e7a4fccc0a212b3235b67a6 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 15:42:08 -0700 Subject: [PATCH 46/50] fix docker compose --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 21aee0d..e944082 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,8 +58,9 @@ services: service: db base: - extends: hyrax-webapp/docker-compose.yml - service: base + extends: + file: hyrax-webapp/docker-compose.yml + service: web web: <<: *app From a2bb0ebcaa1eaa877b0c9264091f44107cbff1af Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 15:47:49 -0700 Subject: [PATCH 47/50] nonsense change to force build --- bin/helm_deploy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/helm_deploy b/bin/helm_deploy index a43cfe8..4d2fa22 100755 --- a/bin/helm_deploy +++ b/bin/helm_deploy @@ -18,14 +18,13 @@ fi release_name="${1//_/-}" namespace="${2//_/-}" -CHART_VERSION="${CHART_VERSION:-2.0.0}" - DEPLOY_IMAGE="${DEPLOY_IMAGE:-ghcr.io/samvera/hyku}" WORKER_IMAGE="${WORKER_IMAGE:-ghcr.io/samvera/hyku/worker}" DEPLOY_TAG="${DEPLOY_TAG:-latest}" WORKER_TAG="${WORKER_TAG:-$DEPLOY_TAG}" echo $DEPLOY_TAG +CHART_VERSION="${CHART_VERSION:-2.0.0}" helm pull --untar oci://ghcr.io/samvera/charts/hyrax --version $CHART_VERSION helm repo update From 7d524bad51f1473727ae97975347285281383cee Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 16:02:10 -0700 Subject: [PATCH 48/50] fix checkout and pull --- bin/checkout_all.sh | 2 +- docker-compose.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/checkout_all.sh b/bin/checkout_all.sh index 7875ddb..cbf4249 100755 --- a/bin/checkout_all.sh +++ b/bin/checkout_all.sh @@ -1,7 +1,7 @@ #!/bin/bash # Save the current branch name -current_branch=$(git rev-parse --abbrev-ref HEAD) +current_branch=$(git rev-parse HEAD) # Fetch any updates from the origin if $(git rev-parse --is-shallow-repository); then diff --git a/docker-compose.yml b/docker-compose.yml index e944082..ff505b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,6 +61,7 @@ services: extends: file: hyrax-webapp/docker-compose.yml service: web + image: ghcr.io/samvera/hyku/base:${TAG:-latest} web: <<: *app From 6ed1f0a0f7b6e4b77317bb8bff0398833970df83 Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Fri, 21 Jul 2023 16:53:09 -0700 Subject: [PATCH 49/50] use rubocop fixed version --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index e4b097e..4b4e20c 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit e4b097e07c9078692471da4f8531afa858a8ba26 +Subproject commit 4b4e20c74e174c76052ef8e2c34fdf4e32ac5e81 From a2096f45f3dd964b84a3dc0e98af1f2d837c9c45 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Wed, 2 Aug 2023 17:14:29 -0700 Subject: [PATCH 50/50] Updates the workflows with the updated version after cutting a new release --- .github/workflows/build-solr.yaml | 2 +- .github/workflows/build-test-lint.yaml | 6 +++--- .github/workflows/deploy.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml index ea32846..ba0e62b 100644 --- a/.github/workflows/build-solr.yaml +++ b/.github/workflows/build-solr.yaml @@ -11,7 +11,7 @@ on: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.15 secrets: inherit with: platforms: "linux/amd64" diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 599b9b4..c00fa92 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -17,7 +17,7 @@ on: jobs: build: - uses: scientist-softserv/actions/.github/workflows/build.yaml@make_actions_more_like_local + uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.15 secrets: inherit with: platforms: 'linux/amd64' @@ -26,7 +26,7 @@ jobs: test: needs: build - uses: scientist-softserv/actions/.github/workflows/test.yaml@make_actions_more_like_local + uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.15 with: confdir: '/app/samvera/hyrax-webapp/solr/conf' webTarget: hyku-web @@ -34,7 +34,7 @@ jobs: lint: needs: build - uses: scientist-softserv/actions/.github/workflows/lint.yaml@make_actions_more_like_local + uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.15 with: webTarget: hyku-web workerTarget: hyku-worker diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 127fb1e..8aceada 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -19,5 +19,5 @@ on: jobs: deploy: - uses: scientist-softserv/actions/.github/workflows/deploy.yaml@v0.0.14 + uses: scientist-softserv/actions/.github/workflows/deploy.yaml@v0.0.15 secrets: inherit