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

Add makefile to vagrant to install collection, receiver-mock, grafana and supports avalanche #815

Merged
merged 12 commits into from Aug 20, 2020

Conversation

sumo-drosiek
Copy link
Contributor

@sumo-drosiek sumo-drosiek commented Aug 3, 2020

Description

Add makefile to vagrant to install collection, receiver-mock, grafana and supports avalanche

Testing performed
  • ci/build.sh
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

@sumo-drosiek sumo-drosiek changed the title [WIP] Add makefile to vagrant Add makefile to vagrant to install collection, receiver-mock, grafana and supports avalanche Aug 6, 2020
@sumo-drosiek sumo-drosiek requested review from perk-sumo, a team, frankreno and pmalek-sumo and removed request for a team August 6, 2020 12:02
- avalanche
endpoints:
- port: "http-avalanche" # Same as service's port name
interval: 30s
Copy link
Contributor

Choose a reason for hiding this comment

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

Same elsewhere: don't we want new line characters at the end of the file?

access_id = dummy
access_key = dummy
name = collection
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity why do we need this construct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted this Makefile to be executable, so need to get absolute path of the file and later abs path of the repository. I will add comments to clarify that

Comment on lines 32 to 35
List of other useful commands in the Makefile:
- expose-prometheus - exposes prometheus on port 9090 of virtual machine
- expose-grafana - exposes grafana on port 8080 of virtual machine
- apply-avalanche - run one pod deployment of avalanche (metrics generator)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: don't we want to format the targets as code with backticks?

Copy link
Contributor

@pmalek-sumo pmalek-sumo left a comment

Choose a reason for hiding this comment

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

Minor stuff. Overall this looks good to me.

vagrant/Makefile Outdated
Comment on lines 24 to 32
patch-context \
remove-tmp \
apply-namespace \
apply-receiver-mock \
create-secrets \
grafana-dashboards \
helm-dependencies \
helm-upgrade \
apply-service-monitors
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a Makefile we need tabs but why mix it with spaces here instead of just using 2 tabs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indentation in the terminal looks better with two spaces instead of eight. I tried to omit tabs but it's not possible 😞
@perk-sumo thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd go with tabs to make it consistent across whole Makefile file.

vagrant/Makefile Outdated
Comment on lines 49 to 57
--namespace "${namespace}" \
--install \
--set sumologic.accessId="${access_id}" \
--set sumologic.accessKey="${access_key}" \
--set prometheus-operator.prometheus.prometheusSpec.externalLabels.cluster="${cluster}" \
--set sumologic.clusterName="${cluster}" \
--set sumologic.endpoint="${endpoint}" \
--set prometheus-operator.grafana.enabled=true \
-f "${root_dir}vagrant/values.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto here with tabs/spaces and in a couple of other places

Copy link
Contributor

Choose a reason for hiding this comment

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

I think those should be in external scripts at some point. No need to do it now.

vagrant/k8s/avalanche.yaml Outdated Show resolved Hide resolved
vagrant/k8s/service-monitors.yaml Outdated Show resolved Hide resolved
vagrant/values.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@perk-sumo perk-sumo left a comment

Choose a reason for hiding this comment

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

Thanks for preparing this, it's a good start!
I bet this will evolve in time so even if I have some comments I think it's good to go :)

vagrant/README.md Outdated Show resolved Hide resolved
spec:
containers:
- name: avalanche
image: quay.io/freshtracks.io/avalanche:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather specify working version in here to omit any surprises.

spec:
containers:
- name: generator
image: localhost:32000/sumologic/kubernetes-tools:local
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume local registry works by default and the image is there?

Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't it be sumologic/kubernetes-tools:master?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this file shouldn't be here 🤷

Copy link
Contributor

@pmalek-sumo pmalek-sumo left a comment

Choose a reason for hiding this comment

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

What about the yaml comments guideline as discussed in #836 ?
Do we want to use this approach in other yaml files as well?

vagrant/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@frankreno frankreno left a comment

Choose a reason for hiding this comment

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

LGTM

@sumo-drosiek
Copy link
Contributor Author

sumo-drosiek commented Aug 20, 2020

@pmalek-sumo

Do we want to use this approach in other yaml files as well?

I suppose those files are not going to be modified by the customer, so there is no need for that

@sumo-drosiek sumo-drosiek force-pushed the drosiek-vagrant-receiver-mock branch 2 times, most recently from 0caa020 to f2c4b69 Compare August 20, 2020 06:04
@sumo-drosiek sumo-drosiek force-pushed the drosiek-vagrant-receiver-mock branch 4 times, most recently from 0b9fd87 to 142f139 Compare August 20, 2020 06:39
@sumo-drosiek sumo-drosiek merged commit c144e66 into master Aug 20, 2020
@sumo-drosiek sumo-drosiek deleted the drosiek-vagrant-receiver-mock branch August 20, 2020 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants