-
Notifications
You must be signed in to change notification settings - Fork 1
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
v0.1 in rust #6
base: main
Are you sure you want to change the base?
v0.1 in rust #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@escanda looks like we have the beginnings of a v0.1. I would like two things.
- Address all the comments in my review.
- Move to an Ubuntu based approach. Change any Fedora based comments to Ubuntu based ones.
- Let's reduce this branch to 3 commits. One for the main code, one for the docker files and docker-compose. And one for documentation (update the README).
8d7cc97
to
17e6e84
Compare
17e6e84
to
5b2fd44
Compare
6319aa9
to
e92f637
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@escanda a few more updates. Getting closer. I should have some time tomorrow to meet.
Dockerfile
Outdated
@@ -0,0 +1,13 @@ | |||
FROM rust:1.65.0 | |||
RUN apt-get update && \ | |||
apt-get install -y g++ cmake llvm-dev clang libclang-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: @escanda I prefer one package per line. Much cleaner to update that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if best, we may create too many intermediate docker images if we do it by package, each upper case command creates an intermediate image, shall we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@escanda i mean one run statement but put each package on its own line.
@@ -1 +1,5 @@ | |||
*~ | |||
/target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit message for this is way to short. Use something like this:
iowatcher-ng: Initial rust-based exporter.
Commit the initial files associated with a rust-based Prometheus exporter for iowatcher-ng. This includes the cargo manifesto and the source code for an initial version.
COPY . . | ||
RUN cargo install --path . | ||
|
||
FROM ubuntu:22.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need both FROM? Can we not do this from Ubuntu 22.04?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rust image to build is based in debian so no dynamic libs issues transferring then the image to ubuntu. It even helps the build be smaller. Beside rust execs are static by default. What shall we do? :)
|
||
volumes: | ||
prometheus_data: {} | ||
grafana-data: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is one a hyphen and one an underscore. Be consistent please.
prometheus.yml
Outdated
static_configs: | ||
- targets: ["node-exporter:9100"] | ||
|
||
- job_name: "blkio-exporter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use blkio? Use iowatcher-ng-exporter please.
@@ -0,0 +1,13 @@ | |||
FROM rust:1.65.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again the commit message is way to short. Use something like:
docker: Add Dockerfile and docker-compose for project.
The iowatcher-ng exporter runs best inside a docker container so we add a Dockerfile and docker-compose to assist in deployment.
docs/index.adoc
Outdated
@@ -0,0 +1,16 @@ | |||
= iowatcher-ng documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For commit message this is not a workflow so do something like
docs: Add documentation
etc.
But to be honest I prefer markdown as it does not need a compile step so let's switch to that.
@escanda node that the build step seems to be failing in the workflow? |
@escanda I think you also want to add a .dockerignore file to ignore the large target folder which may exist. It is not needed in the docker context. |
Can we make the container names consistent? |
Please use port 9975 for iowatcher-ng-exporter as I have reserved this port for this exporter. See here for details. |
So things seem to be sort of working in the docker-compose. I can see the Prometheus server and the targets all seem to be up. I can see node-exporter on 9100 but I cannot see the iowatcher metrics on 9000 or 9001? |
Oh and I see the iowatcher contain died:
|
When running docker-compose up
|
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
5353261 | RSA Private Key | 2309eb5 | certs/ca.key | View secret |
5353262 | RSA Private Key | 2309eb5 | certs/client1.key | View secret |
5353263 | RSA Private Key | 2309eb5 | certs/localhost.key | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
I open this PR for review. In a Fedora 37 Workstation shell you can do from the project's root:
sudo dnf -y install podman-compose && podman-compose up
. We have some work to do yet but I open the issue in case you find something shaky we might need to change.