Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal local mode #148

Merged
merged 6 commits into from Mar 29, 2024
Merged

Minimal local mode #148

merged 6 commits into from Mar 29, 2024

Conversation

MikeShi42
Copy link
Contributor

Not ready for prime time yet, but does accomplish the basics of #7

A few things to iron out:

  1. Clean up UI (remove log out, log patterns, etc.)
  2. Tag and push image to ghcr
  3. Document how to use this image
  4. Allow user customization of ports
  5. See if we can trim image size down a bit (it's ~2GB right now)
  6. See if we can trim down memory usage (it's a bit under 1GB right now), I suspect ~half is from CH.

Copy link

changeset-bot bot commented Dec 9, 2023

⚠️ No Changeset found

Latest commit: 297907e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

RUN apk add --allow-untrusted otelcol-contrib_0.90.1_linux_arm64.apk

# == Install Node Deps ==
RUN apk add nodejs npm yarn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to use nvm use to lock node version


# == Install Vector Deps ==
RUN apk add curl
RUN curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev | bash -s -- -y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also want to specify vector version (

curl -sSfL --proto '=https' --tlsv1.2 https://packages.timber.io/vector/0.34.0/vector-0.34.0-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C vector --strip-components=2
)

RUN apk add mongodb yaml-cpp=0.6.2-r2

# == Install Redis ==
RUN apk add redis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version ?

--build-context ingestor=./docker/ingestor \
--build-context local=./docker/local \
--build-context api=./packages/api \
--build-context app=docker-image://ghcr.io/hyperdxio/hyperdx:1.3.0-app \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional ? (app context)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes so we can avoid adding a builder step in the already tiring docker file 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I think we probably want to read the version from .env (to pull the latest)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's true - now that i typed it out, i'll probably need to add the builder step here anyways in this dockerfile since we'll need to have a specific bundle for local mode for a few small changes. so for now this is really just a placeholder.

@@ -27,6 +27,7 @@
"jsonwebtoken": "^9.0.0",
"lodash": "^4.17.21",
"minimist": "^1.2.7",
"mongodb": "^6.3.0",
Copy link
Contributor

@wrn14897 wrn14897 Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is supposed to be dev dep ? (for migration script)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually a peer dep of connect-mongo, not sure why it was working before: https://github.com/jdesboeufs/connect-mongo/blob/master/package.json#L61

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from mongoose 🤷‍♂️ . also the peer seems to be ^4.1.0. anyway as long as it doesn't introduce deps issue

wrn14897
wrn14897 previously approved these changes Dec 20, 2023
Copy link
Contributor

@wrn14897 wrn14897 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! Just double check the dev dependency

@MikeShi42 MikeShi42 removed the request for review from jaggederest March 28, 2024 06:38

# == Clickhouse/Base Image ==

FROM clickhouse/clickhouse-server:23.11.1-alpine AS clickhouse_base
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to align the ch version with the prebuilt and dev envs (v23.8.8)


# == Install Vector Deps ==
RUN apk add curl
RUN curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev | bash -s -- -y
RUN mkdir -p vector
RUN curl -sSfL --proto '=https' --tlsv1.2 https://packages.timber.io/vector/0.34.0/vector-0.34.0-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C vector --strip-components=2 && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v0.35.0

@kodiakhq kodiakhq bot merged commit 9e4b6b4 into main Mar 29, 2024
4 checks passed
@kodiakhq kodiakhq bot deleted the mikeshi/local-mode-v0 branch March 29, 2024 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants