-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR makes the following changes: - Adds `--dev` option to k8s-env command - This flag when enabled will add the entire `teraslice` repo as a volume to allow for fast build changes when running in kubernetes. - Adds dev compatibility to k8s master backend - Fixes asset-storage setting in k8s-env - This resolves a bug where launching k8s-env with `asset-storage` set to `s3` would not work correctly
- Loading branch information
Showing
15 changed files
with
346 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# NODE_VERSION is set by default in the config.ts, the following value will only | ||
# be used if you build images by default with docker build | ||
ARG NODE_VERSION=18.19.1 | ||
FROM terascope/node-base:${NODE_VERSION} | ||
|
||
ENV NODE_ENV production | ||
|
||
ENV YARN_SETUP_ARGS "--prod=false --silent --frozen-lockfile" | ||
|
||
# Check to see if distutils is installed because python 3.12 removed it | ||
RUN python3 -c "import distutils" || (apk update && apk add py3-setuptools) | ||
|
||
EXPOSE 5678 | ||
|
||
# set up the volumes | ||
VOLUME /app/config /app/logs /app/assets | ||
ENV TERAFOUNDATION_CONFIG /app/config/teraslice.yaml | ||
|
||
CMD ["yarn", "start:nodemon"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# | ||
# This config file is used in the case that "--dev" is enabled in k8s-env | ||
# which will mount the host machines teraslice repo to the k8s resources | ||
# | ||
kind: Cluster | ||
name: k8s-env | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
extraPortMappings: | ||
- containerPort: 30200 # Map internal elasticsearch service to host port | ||
hostPort: 9200 | ||
- containerPort: 30678 # Map internal teraslice service to host port | ||
hostPort: 5678 | ||
- containerPort: 30092 # Map internal kafka service to host port | ||
hostPort: 9092 | ||
- containerPort: 30900 # Map internal minio service to host port | ||
hostPort: 9000 | ||
extraMounts: | ||
- hostPath: ./e2e/autoload | ||
containerPath: /autoload | ||
### All extra mounts that the Dockerfile.dev image needs to run teraslice | ||
- hostPath: ./packages | ||
containerPath: /packages | ||
- hostPath: ./scripts | ||
containerPath: /scripts | ||
- hostPath: ./types | ||
containerPath: /types | ||
- hostPath: ./.yarn | ||
containerPath: /.yarn | ||
- hostPath: ./.yarnclean.ci | ||
containerPath: /.yarnclean.ci | ||
- hostPath: ./package.json | ||
containerPath: /package.json | ||
- hostPath: ./yarn.lock | ||
containerPath: /yarn.lock | ||
- hostPath: ./tsconfig.json | ||
containerPath: /tsconfig.json | ||
- hostPath: ./.yarnrc | ||
containerPath: /.yarnrc | ||
- hostPath: ./service.js | ||
containerPath: /service.js | ||
- hostPath: ./node_modules | ||
containerPath: /node_modules | ||
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.