diff --git a/Meadowlark-js/backends/meadowlark-elasticsearch-backend/package.json b/Meadowlark-js/backends/meadowlark-elasticsearch-backend/package.json index 36c3a79a..9dc00e9d 100644 --- a/Meadowlark-js/backends/meadowlark-elasticsearch-backend/package.json +++ b/Meadowlark-js/backends/meadowlark-elasticsearch-backend/package.json @@ -1,7 +1,7 @@ { "name": "@edfi/meadowlark-elasticsearch-backend", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark backend plugin for elasticsearch", "license": "Apache-2.0", "publishConfig": { @@ -19,8 +19,8 @@ "build:copy-non-ts": "copyfiles -u 1 -e \"**/*.ts\" \"src/**/*\" dist --verbose" }, "dependencies": { - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@elastic/elasticsearch": "^8.10.0", "@elastic/transport": "^8.3.4" }, diff --git a/Meadowlark-js/backends/meadowlark-mongodb-backend/package.json b/Meadowlark-js/backends/meadowlark-mongodb-backend/package.json index 31b12a89..31d833a1 100644 --- a/Meadowlark-js/backends/meadowlark-mongodb-backend/package.json +++ b/Meadowlark-js/backends/meadowlark-mongodb-backend/package.json @@ -1,7 +1,7 @@ { "name": "@edfi/meadowlark-mongodb-backend", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark backend plugin for MongoDB", "license": "Apache-2.0", "publishConfig": { @@ -19,9 +19,9 @@ "build:copy-non-ts": "copyfiles -u 1 -e \"**/*.ts\" \"src/**/*\" dist --verbose" }, "dependencies": { - "@edfi/meadowlark-authz-server": "0.4.1-pre.9", - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-authz-server": "0.4.1-pre.10", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "async-retry": "^1.3.3", "mongodb": "^5.9.2", "ramda": "0.29.1" diff --git a/Meadowlark-js/backends/meadowlark-opensearch-backend/package.json b/Meadowlark-js/backends/meadowlark-opensearch-backend/package.json index ef29a812..d7ccc0a9 100644 --- a/Meadowlark-js/backends/meadowlark-opensearch-backend/package.json +++ b/Meadowlark-js/backends/meadowlark-opensearch-backend/package.json @@ -1,7 +1,7 @@ { "name": "@edfi/meadowlark-opensearch-backend", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark backend plugin for OpenSearch", "license": "Apache-2.0", "publishConfig": { @@ -19,8 +19,8 @@ "build:copy-non-ts": "copyfiles -u 1 -e \"**/*.ts\" \"src/**/*\" dist --verbose" }, "dependencies": { - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@opensearch-project/opensearch": "^2.4.0" }, "devDependencies": { diff --git a/Meadowlark-js/backends/meadowlark-postgresql-backend/package.json b/Meadowlark-js/backends/meadowlark-postgresql-backend/package.json index 645cf710..5a87572e 100644 --- a/Meadowlark-js/backends/meadowlark-postgresql-backend/package.json +++ b/Meadowlark-js/backends/meadowlark-postgresql-backend/package.json @@ -1,7 +1,7 @@ { "name": "@edfi/meadowlark-postgresql-backend", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark backend plugin for PostgreSQL", "license": "Apache-2.0", "publishConfig": { @@ -19,9 +19,9 @@ "build:copy-non-ts": "copyfiles -u 1 -e \"**/*.ts\" \"src/**/*\" dist --verbose" }, "dependencies": { - "@edfi/meadowlark-authz-server": "0.4.1-pre.9", - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-authz-server": "0.4.1-pre.10", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "pg": "^8.11.3", "pg-format": "^1.0.4", "ramda": "0.29.1" diff --git a/Meadowlark-js/lerna.json b/Meadowlark-js/lerna.json index dbe07961..77b71579 100644 --- a/Meadowlark-js/lerna.json +++ b/Meadowlark-js/lerna.json @@ -1,5 +1,5 @@ { "lerna": "8.0.2", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "npmClient": "npm" } diff --git a/Meadowlark-js/package-lock.json b/Meadowlark-js/package-lock.json index 63ed3041..3e680f99 100644 --- a/Meadowlark-js/package-lock.json +++ b/Meadowlark-js/package-lock.json @@ -54,11 +54,11 @@ }, "backends/meadowlark-elasticsearch-backend": { "name": "@edfi/meadowlark-elasticsearch-backend", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@elastic/elasticsearch": "^8.10.0", "@elastic/transport": "^8.3.4" }, @@ -72,12 +72,12 @@ }, "backends/meadowlark-mongodb-backend": { "name": "@edfi/meadowlark-mongodb-backend", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { - "@edfi/meadowlark-authz-server": "0.4.1-pre.9", - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-authz-server": "0.4.1-pre.10", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "async-retry": "^1.3.3", "mongodb": "^5.9.2", "ramda": "0.29.1" @@ -90,11 +90,11 @@ }, "backends/meadowlark-opensearch-backend": { "name": "@edfi/meadowlark-opensearch-backend", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@opensearch-project/opensearch": "^2.4.0" }, "devDependencies": { @@ -107,12 +107,12 @@ }, "backends/meadowlark-postgresql-backend": { "name": "@edfi/meadowlark-postgresql-backend", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { - "@edfi/meadowlark-authz-server": "0.4.1-pre.9", - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-authz-server": "0.4.1-pre.10", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "pg": "^8.11.3", "pg-format": "^1.0.4", "ramda": "0.29.1" @@ -2308,9 +2308,9 @@ "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", + "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -3501,6 +3501,15 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@sigstore/core": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-0.2.0.tgz", + "integrity": "sha512-THobAPPZR9pDH2CAvDLpkrYedt7BlZnsyxDe+Isq4ZmGfPy5juOFZq487vCU2EgKD7aHSiTfE/i7sN7aEdzQnA==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/@sigstore/protobuf-specs": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", @@ -3720,6 +3729,32 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@sigstore/verify": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-0.1.0.tgz", + "integrity": "sha512-2UzMNYAa/uaz11NhvgRnIQf4gpLTJ59bhb8ESXaoSS5sxedfS+eLak8bsdMc+qpNQfITUTFoSKFx5h8umlRRiA==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.1.1", + "@sigstore/core": "^0.2.0", + "@sigstore/protobuf-specs": "^0.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/verify/node_modules/@sigstore/bundle": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.1.1.tgz", + "integrity": "sha512-v3/iS+1nufZdKQ5iAlQKcCsoh0jffQyABvYIxKsZQFWc4ubuGjwZklFHpDgV6O6T7vvV78SW5NHI91HFKEcxKg==", + "dev": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "dev": true, @@ -13388,9 +13423,9 @@ } }, "node_modules/pacote/node_modules/@sigstore/bundle": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.1.0.tgz", - "integrity": "sha512-89uOo6yh/oxaU8AeOUnVrTdVMcGk9Q1hJa7Hkvalc6G3Z3CupWk4Xe9djSgJm9fMkH69s0P0cVHUoKSOemLdng==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.1.1.tgz", + "integrity": "sha512-v3/iS+1nufZdKQ5iAlQKcCsoh0jffQyABvYIxKsZQFWc4ubuGjwZklFHpDgV6O6T7vvV78SW5NHI91HFKEcxKg==", "dev": true, "dependencies": { "@sigstore/protobuf-specs": "^0.2.1" @@ -13400,12 +13435,13 @@ } }, "node_modules/pacote/node_modules/@sigstore/sign": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.2.0.tgz", - "integrity": "sha512-AAbmnEHDQv6CSfrWA5wXslGtzLPtAtHZleKOgxdQYvx/s76Fk6T6ZVt7w2IGV9j1UrFeBocTTQxaXG2oRrDhYA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.2.1.tgz", + "integrity": "sha512-U5sKQEj+faE1MsnLou1f4DQQHeFZay+V9s9768lw48J4pKykPj34rWyI1lsMOGJ3Mae47Ye6q3HAJvgXO21rkQ==", "dev": true, "dependencies": { - "@sigstore/bundle": "^2.1.0", + "@sigstore/bundle": "^2.1.1", + "@sigstore/core": "^0.2.0", "@sigstore/protobuf-specs": "^0.2.1", "make-fetch-happen": "^13.0.0" }, @@ -13414,13 +13450,13 @@ } }, "node_modules/pacote/node_modules/@sigstore/tuf": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.2.0.tgz", - "integrity": "sha512-KKATZ5orWfqd9ZG6MN8PtCIx4eevWSuGRKQvofnWXRpyMyUEpmrzg5M5BrCpjM+NfZ0RbNGOh5tCz/P2uoRqOA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.0.tgz", + "integrity": "sha512-S98jo9cpJwO1mtQ+2zY7bOdcYyfVYCUaofCG6wWRzk3pxKHVAkSfshkfecto2+LKsx7Ovtqbgb2LS8zTRhxJ9Q==", "dev": true, "dependencies": { "@sigstore/protobuf-specs": "^0.2.1", - "tuf-js": "^2.1.0" + "tuf-js": "^2.2.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -13621,15 +13657,17 @@ } }, "node_modules/pacote/node_modules/sigstore": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.1.0.tgz", - "integrity": "sha512-kPIj+ZLkyI3QaM0qX8V/nSsweYND3W448pwkDgS6CQ74MfhEkIR8ToK5Iyx46KJYRjseVcD3Rp9zAmUAj6ZjPw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.2.0.tgz", + "integrity": "sha512-fcU9clHwEss2/M/11FFM8Jwc4PjBgbhXoNskoK5guoK0qGQBSeUbQZRJ+B2fDFIvhyf0gqCaPrel9mszbhAxug==", "dev": true, "dependencies": { - "@sigstore/bundle": "^2.1.0", + "@sigstore/bundle": "^2.1.1", + "@sigstore/core": "^0.2.0", "@sigstore/protobuf-specs": "^0.2.1", - "@sigstore/sign": "^2.1.0", - "@sigstore/tuf": "^2.1.0" + "@sigstore/sign": "^2.2.1", + "@sigstore/tuf": "^2.3.0", + "@sigstore/verify": "^0.1.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -13648,9 +13686,9 @@ } }, "node_modules/pacote/node_modules/tuf-js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.1.0.tgz", - "integrity": "sha512-eD7YPPjVlMzdggrOeE8zwoegUaG/rt6Bt3jwoQPunRiNVzgcCE009UDFJKJjG+Gk9wFu6W/Vi+P5d/5QpdD9jA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.0.tgz", + "integrity": "sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg==", "dev": true, "dependencies": { "@tufjs/models": "2.0.0", @@ -16061,9 +16099,10 @@ } }, "node_modules/tar-fs/node_modules/tar-stream": { - "version": "3.1.6", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", "dev": true, - "license": "MIT", "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", @@ -17506,11 +17545,11 @@ }, "packages/meadowlark-authz-server": { "name": "@edfi/meadowlark-authz-server", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { "@apideck/better-ajv-errors": "^0.3.6", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "ajv": "^8.12.0", "didyoumean2": "^6.0.1", "dotenv": "^16.3.1", @@ -17560,11 +17599,11 @@ }, "packages/meadowlark-core": { "name": "@edfi/meadowlark-core", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { "@apideck/better-ajv-errors": "^0.3.6", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@isaacs/ttlcache": "^1.4.1", "ajv": "^8.12.0", "ajv-formats": "^2.1.1", @@ -17642,7 +17681,7 @@ }, "packages/meadowlark-utilities": { "name": "@edfi/meadowlark-utilities", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { "pino": "^8.15.7", @@ -17689,12 +17728,12 @@ }, "services/meadowlark-fastify": { "name": "@edfi/meadowlark-fastify", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "dependencies": { - "@edfi/meadowlark-authz-server": "0.4.1-pre.9", - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-authz-server": "0.4.1-pre.10", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@fastify/rate-limit": "^6.0.1", "dotenv": "^16.3.1", "fastify": "^3.29.5" @@ -17707,10 +17746,10 @@ }, "tests/e2e": { "name": "@edfi/meadowlark-e2e-tests", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "license": "Apache-2.0", "devDependencies": { - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@testcontainers/mongodb": "^10.3.1", "@testcontainers/postgresql": "^10.3.1", "@types/chance": "^1.1.6", diff --git a/Meadowlark-js/packages/meadowlark-authz-server/package.json b/Meadowlark-js/packages/meadowlark-authz-server/package.json index fd7d0dad..873bee68 100644 --- a/Meadowlark-js/packages/meadowlark-authz-server/package.json +++ b/Meadowlark-js/packages/meadowlark-authz-server/package.json @@ -1,7 +1,7 @@ { "name": "@edfi/meadowlark-authz-server", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark authorization server", "license": "Apache-2.0", "publishConfig": { @@ -14,7 +14,7 @@ ], "dependencies": { "@apideck/better-ajv-errors": "^0.3.6", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "ajv": "^8.12.0", "didyoumean2": "^6.0.1", "dotenv": "^16.3.1", diff --git a/Meadowlark-js/packages/meadowlark-core/package.json b/Meadowlark-js/packages/meadowlark-core/package.json index 41fe83ec..8150b87b 100644 --- a/Meadowlark-js/packages/meadowlark-core/package.json +++ b/Meadowlark-js/packages/meadowlark-core/package.json @@ -1,7 +1,7 @@ { "name": "@edfi/meadowlark-core", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark core functionality", "license": "Apache-2.0", "publishConfig": { @@ -14,7 +14,7 @@ ], "dependencies": { "@apideck/better-ajv-errors": "^0.3.6", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@isaacs/ttlcache": "^1.4.1", "ajv": "^8.12.0", "ajv-formats": "^2.1.1", diff --git a/Meadowlark-js/packages/meadowlark-utilities/package.json b/Meadowlark-js/packages/meadowlark-utilities/package.json index 51190e3c..16ed9236 100644 --- a/Meadowlark-js/packages/meadowlark-utilities/package.json +++ b/Meadowlark-js/packages/meadowlark-utilities/package.json @@ -1,7 +1,7 @@ { "name": "@edfi/meadowlark-utilities", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark shared utilities", "license": "Apache-2.0", "publishConfig": { diff --git a/Meadowlark-js/services/meadowlark-fastify/package.json b/Meadowlark-js/services/meadowlark-fastify/package.json index 6bbf6c9f..98c3d65f 100644 --- a/Meadowlark-js/services/meadowlark-fastify/package.json +++ b/Meadowlark-js/services/meadowlark-fastify/package.json @@ -1,6 +1,6 @@ { "name": "@edfi/meadowlark-fastify", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark service using Fastify", "license": "Apache-2.0", "publishConfig": { @@ -12,9 +12,9 @@ "/package.json" ], "dependencies": { - "@edfi/meadowlark-authz-server": "0.4.1-pre.9", - "@edfi/meadowlark-core": "0.4.1-pre.9", - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-authz-server": "0.4.1-pre.10", + "@edfi/meadowlark-core": "0.4.1-pre.10", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@fastify/rate-limit": "^6.0.1", "dotenv": "^16.3.1", "fastify": "^3.29.5" diff --git a/Meadowlark-js/services/meadowlark-fastify/readme.md b/Meadowlark-js/services/meadowlark-fastify/readme.md index d42621e6..69c6923f 100644 --- a/Meadowlark-js/services/meadowlark-fastify/readme.md +++ b/Meadowlark-js/services/meadowlark-fastify/readme.md @@ -1,38 +1,58 @@ # Fastify for Meadowlark -Fastify is fast, low-overhead web framework for node-js. Fastify provides a local API layer for project Meadowlark. +Fastify is fast, low-overhead web framework for node-js. Fastify provides a +local API layer for project Meadowlark. Instructions for running a local "developer" environment: -1. Make a copy of [.env.example](.env.example) found in - `/meadowlark-fastify` folder and rename the new file to `.env`, this will provide the environment +1. Make a copy of [.env.example](.env.example) found in `/meadowlark-fastify` + folder and rename the new file to `.env`, this will provide the environment variables that Meadowlark requires to run -1. Review the `.env` file and update any important settings. Pay attention, in particular to: - * `DOCUMENT_STORE_PLUGIN` - The backend document store that Meadowlark will use +1. Review the `.env` file and update any important settings. Pay attention, in + particular to: + * `DOCUMENT_STORE_PLUGIN` - The backend document store that Meadowlark will + use * If using MongoDB set the value to `@edfi/meadowlark-mongodb-backend` * Update `MONGO_URI` to the location of your Mongo Instance - * If running MongoDB via the local [docker compose configuration](../../docker-compose.yml), - the default value for `MONGO_URI` is + * If running MongoDB via the local [docker compose + configuration](../../docker-compose.yml), the default value for + `MONGO_URI` is `mongodb://mongo:abcdefgh1!@mongo1:27017,mongo2:27018,mongo3:27019/?replicaSet=rs0` - * If using PostgreSQL set the value to `@edfi/meadowlark-postgresql-backend` + * If using PostgreSQL set the value to + `@edfi/meadowlark-postgresql-backend` * Update `POSTGRES_USERNAME` and `POSTGRES_PASSWORD` - * If your PostgreSQL instance is not running on the default port (5432), you can set `POSTGRES_PORT` to - the port PostgreSQL is using - * `QUERY_HANDLER_PLUGIN` and `LISTENER1_PLUGIN` - The query handler and listener that Meadowlark will use. - * If using OpenSearch set the value to `@edfi/meadowlark-opensearch-backend` - * Set the `OPENSEARCH_ENDPOINT`, `OPENSEARCH_USERNAME` and `OPENSEARCH_PASSWORD` - * If using ElasticSearch set the value to `@edfi/meadowlark-elasticsearch-backend` + * If your PostgreSQL instance is not running on the default port (5432), + you can set `POSTGRES_PORT` to the port PostgreSQL is using + * `QUERY_HANDLER_PLUGIN` and `LISTENER1_PLUGIN` - The query handler and + listener that Meadowlark will use. + * If using OpenSearch set the value to + `@edfi/meadowlark-opensearch-backend` + * Set the `OPENSEARCH_ENDPOINT`, `OPENSEARCH_USERNAME` and + `OPENSEARCH_PASSWORD` + * If using ElasticSearch set the value to + `@edfi/meadowlark-elasticsearch-backend` * Set the `ELASTICSEARCH_ENDPOINT` * `AUTHORIZATION_STORE_PLUGIN` This is the plugin for the authorization store * If using MongoDB set the value to `@edfi/meadowlark-mongodb-backend` - * If using PostgreSQL set the value to `@edfi/meadowlark-postgresql-backend` - * `OAUTH_SIGNING_KEY` - The `OAUTH_SIGNING_KEY` may need quotation marks around the value, unlike other keys. - * Logging configuration, as this can affect performance. For better performance, avoid `debug` and `info` levels for `LOG_LEVEL`, and set `LOG_PRETTY_PRINT` to false. Rather than log to console, use `LOG_TO_FILE` set to true and set the log file directory with `LOG_FILE_LOCATION`. -1. If you have already built the Meadowlark-js project, you can skip to step 4, otherwise: + * If using PostgreSQL set the value to + `@edfi/meadowlark-postgresql-backend` + * `OAUTH_SIGNING_KEY` - The `OAUTH_SIGNING_KEY` may need quotation marks + around the value, unlike other keys. + * Logging configuration, as this can affect performance. For better + performance, avoid `debug` and `info` levels for `LOG_LEVEL`, and set + `LOG_PRETTY_PRINT` to false. Rather than log to console, use `LOG_TO_FILE` + set to true and set the log file directory with `LOG_FILE_LOCATION`. +1. If you have already built the Meadowlark-js project, you can skip to step 4, + otherwise: * Open a command prompt and navigate to the `/Meadowlark-js` folder * Run `npm install` * Run `npm run build` -1. Open a command prompt and navigate to the `/Meadowlark-js/services/meadowlark-fastify` folder +1. Open a command prompt and navigate to the + `/Meadowlark-js/services/meadowlark-fastify` folder 1. Run `npm run start:local` to start the Fastify service - * In another terminal, you can test connectivity with `curl http://localhost:3000/local/` - * Also you can use the .http files that use the Visual Studio Code [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension, from the [`test` directory](../../tests/http/). You can try with the [33b test](../../tests/http/local.33b.http) + * In another terminal, you can test connectivity with `curl + http://localhost:3000/local/` + * Also you can use the .http files that use the Visual Studio Code [REST + Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) + extension, from the [`test` directory](../../tests/http/). You can try with + the [33b test](../../tests/http/local.33b.http) diff --git a/Meadowlark-js/tests/e2e/package.json b/Meadowlark-js/tests/e2e/package.json index 95b5a2fa..442281e4 100644 --- a/Meadowlark-js/tests/e2e/package.json +++ b/Meadowlark-js/tests/e2e/package.json @@ -1,13 +1,13 @@ { "name": "@edfi/meadowlark-e2e-tests", "main": "dist/index.js", - "version": "0.4.1-pre.9", + "version": "0.4.1-pre.10", "description": "Meadowlark Ed-Fi API end to end tests", "license": "Apache-2.0", "private": true, "files": [], "devDependencies": { - "@edfi/meadowlark-utilities": "0.4.1-pre.9", + "@edfi/meadowlark-utilities": "0.4.1-pre.10", "@testcontainers/mongodb": "^10.3.1", "@testcontainers/postgresql": "^10.3.1", "@types/chance": "^1.1.6", diff --git a/k8s/README.md b/k8s/README.md index e0ffb103..aa19ff83 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -26,8 +26,8 @@ This container has the type LoadBalancer, meaning that this is the entry point for the load balancer provider. To test this in the local environment, we need to open *tunnel* between the -local network and the Kubernetes cluster. To do so, run `minikube service -meadowlark-api --url`. +local network and the Kubernetes cluster. To do so, run +`minikube service meadowlark-api --url`. Copy the URL and connect to Meadowlark. diff --git a/terraform.tfstate b/terraform.tfstate new file mode 100644 index 00000000..76c042a3 --- /dev/null +++ b/terraform.tfstate @@ -0,0 +1,9 @@ +{ + "version": 4, + "terraform_version": "1.6.2", + "serial": 1, + "lineage": "6ee26d44-d1f3-e3c8-96ed-e52cd4fd92ba", + "outputs": {}, + "resources": [], + "check_results": null +} diff --git a/terraform/.gitignore b/terraform/.gitignore new file mode 100644 index 00000000..6304eb3c --- /dev/null +++ b/terraform/.gitignore @@ -0,0 +1,34 @@ +# Local .terraform directories +**/.terraform/* + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log +crash.*.log + +# Exclude all .tfvars files, which are likely to contain sensitive data, such as +# password, private keys, and other secrets. These should not be part of version +# control as they are data points which are potentially sensitive and subject +# to change depending on the environment. +*.tfvars +*.tfvars.json + +# Ignore override files as they are usually used to override resources locally and so +# are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Include override files you do wish to add to version control using negated pattern +# !example_override.tf + +# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan +# example: *tfplan* + +# Ignore CLI configuration files +.terraformrc +terraform.rc diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl new file mode 100644 index 00000000..81202f98 --- /dev/null +++ b/terraform/.terraform.lock.hcl @@ -0,0 +1,22 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/kubernetes" { + version = "2.25.2" + constraints = "2.25.2" + hashes = [ + "h1:vrpxWZfnmJ7t9gDff1/z4h+UhewGBpDB52EIwhygn6A=", + "zh:044788ac936e0e8ece8f78a2e4e366ecd435ea8235388eaf2cbc8e7975d9d970", + "zh:24f5ff01df91f51f00ee7ff39430adeb63bb2ca4ea0042e68f06d6b65808c02f", + "zh:49984aa0aa1faa8c4f01e8faa039322f1e6fdaeab0b7e32f5c6e96edfde36a38", + "zh:4eeceaff56bac9fc782e7e33f157fa2c7e9a47b2c3c3d12da2642c312ace73f6", + "zh:4f49b6419345960d5af475e0200c243af4c9c140b0ee64799fe1fc9b023c49ea", + "zh:7958414d516867a2263a978792a24843f80023fb233cf051ff4095adc9803d85", + "zh:c633a755fc95e9ff0cd73656f052947afd85883a0987dde5198113aa48474156", + "zh:cbfe958d119795004ce1e8001449d01c056fa2a062b51d07843d98be216337d7", + "zh:cfb85392e18768578d4c943438897083895719be678227fd90efbe3500702a56", + "zh:d705a661ed5da425dd236a48645bec39fe78a67d2e70e8460b720417cbf260ac", + "zh:ddd7a01263da3793df4f3b5af65f166307eed5acf525e51e058cda59009cc856", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + ] +} diff --git a/terraform/README.md b/terraform/README.md new file mode 100644 index 00000000..96031208 --- /dev/null +++ b/terraform/README.md @@ -0,0 +1,47 @@ +# Terraform Deployment for Meadowlark + +This is a list of files to do an IaC (Infrastructure as Code) deployment of +Meadowlark into a Kubernetes Cluster using Terraform. + +> [!WARNING] +> This is an exploratory solution, and is not ready for a production +> deployment. It can be used as a foundation to do so. + +## Local Deployment + +For local development, you need to use +[minikube](https://minikube.sigs.k8s.io/docs/start/). + +* After installing, run `minikube start` to setup minikube in your local + environment. +* Set the terminal in the */terraform* folder. +* Create a `terraform.tfvars` based on the `terraform.tfvars.example` file. +* Run `terraform init` to initialize the terraform environment. +* Run `terraform plan` to create an execution plan, the result should show a +message similar to: **Plan: 8 to add, 0 to change, 0 to destroy.** +* Run `terraform apply -auto-approve` to run the execution plan without prompt + for confirmation. + +> [!CAUTION] +> After executing the *apply* command, the execution does not end. +> This is an error with the current version but does not affect the +> creation of the cluster. +> Once all pods are in status **Running**, the execution of the apply +> can be terminated and the steps can be continued. + +To test this in the local environment, we need to open *tunnel* between the +local network and the Kubernetes cluster. To do so, run `minikube service +meadowlark-api --url --namespace meadowlark`. + +### Troubleshoot + +If the deployment does not finish after running `terraform apply`, open a new +terminal and run: + +* Run `kubectl get all -n meadowlark` and verify the status of the pod. +* Copy the id of the pod and get the logs by running `kubectl logs POD_ID + --all-containers --namespace meadowlark` + +### Finish + +When done, finish by running `terraform destroy` and confirming the changes. diff --git a/terraform/main.tf b/terraform/main.tf new file mode 100644 index 00000000..bd20968d --- /dev/null +++ b/terraform/main.tf @@ -0,0 +1,5 @@ +resource "kubernetes_namespace" "meadowlark" { + metadata { + name = "meadowlark" + } +} diff --git a/terraform/meadowlark-api.tf b/terraform/meadowlark-api.tf new file mode 100644 index 00000000..e1a1dd66 --- /dev/null +++ b/terraform/meadowlark-api.tf @@ -0,0 +1,212 @@ +resource "kubernetes_deployment" "meadowlark-api" { + metadata { + name = "meadowlark-api" + namespace = kubernetes_namespace.meadowlark.metadata.0.name + } + spec { + replicas = 1 + selector { + match_labels = { + app = "meadowlark-api" + } + } + template { + metadata { + labels = { + app = "meadowlark-api" + } + } + spec { + container { + image = "edfialliance/meadowlark-ed-fi-api" + name = "meadowlark-api-ml" + + port { + container_port = 80 + } + + env { + name = "OWN_OAUTH_CLIENT_ID_FOR_CLIENT_AUTH" + value = var.oauth-key + } + + env { + name = "OWN_OAUTH_CLIENT_SECRET_FOR_CLIENT_AUTH" + value = var.oauth-secret + } + + env { + name = "ALLOW_OVERPOSTING" + value = "false" + } + + env { + name = "ALLOW_TYPE_COERCION" + value = "true" + } + + env { + name = "ALLOW__EXT_PROPERTY" + value = "true" + } + + env { + name = "AUTHORIZATION_STORE_PLUGIN" + value = var.auth-plugin + } + + env { + name = "DOCUMENT_STORE_PLUGIN" + value = var.document-store-plugin + } + + env { + name = "LISTENER1_PLUGIN" + value = var.listener-plugin + } + + env { + name = "QUERY_HANDLER_PLUGIN" + value = var.query-handler-plugin + } + + env { + name = "BEGIN_ALLOWED_SCHOOL_YEAR" + value = "2022" + } + + env { + name = "END_ALLOWED_SCHOOL_YEAR" + value = "2034" + } + + env { + name = "FASTIFY_NUM_THREADS" + value = "10" + } + + env { + name = "FASTIFY_PORT" + value = "3000" + } + + env { + name = "FASTIFY_RATE_LIMIT" + value = "false" + } + + env { + name = "LOG_LEVEL" + value = "info" + } + + env { + name = "LOG_PRETTY_PRINT" + value = "true" + } + + env { + name = "LOG_TO_FILE" + value = "true" + } + + env { + name = "MEADOWLARK_STAGE" + value = "local" + } + + env { + name = "OAUTH_HARD_CODED_CREDENTIALS_ENABLEDs" + value = "true" + } + + env { + name = "OAUTH_SERVER_ENDPOINT_FOR_OWN_TOKEN_REQUEST" + value = "http://localhost:3000/local/oauth/token" + } + + env { + name = "OAUTH_SERVER_ENDPOINT_FOR_TOKEN_VERIFICATION" + value = "http://localhost:3000/local/oauth/verify" + } + + env { + name = "OAUTH_SIGNING_KEY" + value = var.signing-key + } + + env { + name = "OPENSEARCH_ENDPOINT" + value = var.opensearch-endpoint + } + + env { + name = "OPENSEARCH_USERNAME" + value = var.opensearch-user + } + + env { + name = "OPENSEARCH_PASSWORD" + value = var.opensearch-password + } + + env { + name = "OWN_OAUTH_CLIENT_ID_FOR_CLIENT_AUTH" + value = var.oauth-key + } + + env { + name = "OWN_OAUTH_CLIENT_ID_FOR_CLIENT_AUTH" + value = var.oauth-secret + } + + env { + name = "OWN_OAUTH_CLIENT_ID_FOR_CLIENT_AUTH" + value = var.oauth-secret + } + + env { + name = "POSTGRES_USER" + value = var.postgres-user + } + + env { + name = "POSTGRES_PASSWORD" + value = var.postgres-password + } + + env { + name = "POSTGRES_HOST" + value = var.postgres-host + } + + env { + name = "MEADOWLARK_DATABASE_NAME" + value = var.postgres-dbname + } + + env { + name = "POSTGRES_PORT" + value = var.postgres-port + } + } + } + } + } +} + +resource "kubernetes_service" "meadowlark-api" { + metadata { + name = "meadowlark-api" + namespace = kubernetes_namespace.meadowlark.metadata.0.name + } + spec { + selector = { + app = kubernetes_deployment.meadowlark-api.spec.0.template.0.metadata.0.labels.app + } + type = "LoadBalancer" + port { + port = 3000 + } + } +} diff --git a/terraform/opensearch.tf b/terraform/opensearch.tf new file mode 100644 index 00000000..5d6b9eac --- /dev/null +++ b/terraform/opensearch.tf @@ -0,0 +1,60 @@ +resource "kubernetes_deployment" "opensearch" { + metadata { + name = "opensearch" + namespace = kubernetes_namespace.meadowlark.metadata.0.name + } + spec { + replicas = 1 + selector { + match_labels = { + app = "opensearch" + } + } + template { + metadata { + labels = { + app = "opensearch" + } + } + spec { + container { + image = "opensearchproject/opensearch:2.7.0@sha256:55f1f67e7d3645aa838b63a589bce5645154ba275814e52d4638d371ca0f8cb5" + name = "opensearch-node1" + port { + container_port = 9200 + } + + env { + name = "OPENSEARCH_ENDPOINT" + value = var.opensearch-endpoint + } + + env { + name = "OPENSEARCH_USERNAME" + value = var.opensearch-user + } + + env { + name = "OPENSEARCH_PASSWORD" + value = var.opensearch-password + } + } + } + } + } +} + +resource "kubernetes_service" "opensearch" { + metadata { + name = "opensearch" + namespace = kubernetes_namespace.meadowlark.metadata.0.name + } + spec { + selector = { + app = kubernetes_deployment.opensearch.spec.0.template.0.metadata.0.labels.app + } + port { + port = 9200 + } + } +} diff --git a/terraform/postgres.tf b/terraform/postgres.tf new file mode 100644 index 00000000..07a526b1 --- /dev/null +++ b/terraform/postgres.tf @@ -0,0 +1,70 @@ +resource "kubernetes_deployment" "postgres" { + metadata { + name = "postgres" + namespace = kubernetes_namespace.meadowlark.metadata.0.name + } + spec { + replicas = 1 + selector { + match_labels = { + app = "postgres" + } + } + template { + metadata { + labels = { + app = "postgres" + } + } + spec { + container { + image = "postgres:14.3-alpine@sha256:84c6ea4333ae18f25ea0fb18bb142156f2a2e545e0a779d93bbf08079e56bdaf" + name = "postgres-ml" + port { + container_port = 80 + } + + env { + name = "POSTGRES_USER" + value = var.postgres-user + } + + env { + name = "POSTGRES_PASSWORD" + value = var.postgres-password + } + + env { + name = "POSTGRES_HOST" + value = var.postgres-host + } + + env { + name = "MEADOWLARK_DATABASE_NAME" + value = var.postgres-dbname + } + + env { + name = "POSTGRES_PORT" + value = var.postgres-port + } + } + } + } + } +} + +resource "kubernetes_service" "postgres" { + metadata { + name = "postgres" + namespace = kubernetes_namespace.meadowlark.metadata.0.name + } + spec { + selector = { + app = kubernetes_deployment.postgres.spec.0.template.0.metadata.0.labels.app + } + port { + port = var.postgres-port + } + } +} diff --git a/terraform/provider.tf b/terraform/provider.tf new file mode 100644 index 00000000..4e58d0c0 --- /dev/null +++ b/terraform/provider.tf @@ -0,0 +1,13 @@ +terraform { + required_providers { + kubernetes = { + source = "hashicorp/kubernetes" + version = "2.25.2" + } + } +} + +provider "kubernetes" { + config_path = "~/.kube/config" + config_context = "minikube" +} diff --git a/terraform/terraform.tfvars.example b/terraform/terraform.tfvars.example new file mode 100644 index 00000000..912d9ead --- /dev/null +++ b/terraform/terraform.tfvars.example @@ -0,0 +1,2 @@ +signing-key = "" +postgres-pass = "" diff --git a/terraform/variables.tf b/terraform/variables.tf new file mode 100644 index 00000000..f6ec5a07 --- /dev/null +++ b/terraform/variables.tf @@ -0,0 +1,108 @@ +variable "postgres-user" { + description = "PostgreSQL user" + type = string + default = "postgres" +} + +variable "postgres-password" { + description = "PostgreSQL Password" + type = string + default = "abcdefgh1!" +} + +variable "postgres-host" { + description = "PostgreSQL user" + type = string + default = "postgres-service" +} + +variable "postgres-port" { + description = "PostgreSQL Port" + type = number + default = 5432 +} + +variable "postgres-dbname" { + description = "PostgreSQL Database Name" + type = string + default = "postgres" +} + +variable "opensearch-user" { + description = "OpenSearch user" + type = string + default = "admin" +} + +variable "opensearch-password" { + description = "OpenSearch password" + type = string + default = "admin" +} + +variable "opensearch-endpoint" { + description = "OpenSearch Endpoint" + type = string + default = "http://opensearch-service:9200" +} + +variable "oauth-key" { + description = "Oauth Key" + type = string + default = "meadowlark_verify-only_key_1" +} + +variable "oauth-secret" { + description = "Oauth Secret" + type = string + default = "meadowlark_verify-only_secret_1" +} + +variable "auth-plugin" { + description = "Authorization Plugin" + type = string + default = "@edfi/meadowlark-postgresql-backend" + + validation { + condition = contains(["@edfi/meadowlark-postgresql-backend", "@edfi/meadowlark-mongodb-backend"], var.auth-plugin) + error_message = "Must be postgresql or mongodb" + } +} + +variable "document-store-plugin" { + description = "Document Store Plugin" + type = string + default = "@edfi/meadowlark-postgresql-backend" + + validation { + condition = contains(["@edfi/meadowlark-postgresql-backend", "@edfi/meadowlark-mongodb-backend"], var.document-store-plugin) + error_message = "Must be postgresql or mongodb" + } +} + +variable "listener-plugin" { + description = "Listener Plugin" + type = string + default = "@edfi/meadowlark-opensearch-backend" + + validation { + condition = contains(["@edfi/meadowlark-opensearch-backend", "@edfi/meadowlark-elasticsearch-backend"], var.listener-plugin) + error_message = "Must be opensearch or elasticsearch" + } +} + +variable "query-handler-plugin" { + description = "Query Handler Plugin" + type = string + default = "@edfi/meadowlark-opensearch-backend" + + validation { + condition = contains(["@edfi/meadowlark-opensearch-backend", "@edfi/meadowlark-elasticsearch-backend"], var.query-handler-plugin) + error_message = "Must be opensearch or elasticsearch" + } +} + +variable "signing-key" { + description = "OAuth Signing Key" + type = string +}