carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 200 forks source link

trying to make it work from a macosx -failed #33

Closed mihai-satmarean closed 4 years ago

mihai-satmarean commented 4 years ago

Hi, the stack looks great, I've been following a tutorial here https://kauri.io/deploy-prometheus-and-grafana-to-monitor-a-kube/186a71b189864b9ebc4ef7c8a9f0a6b5/a

however, I am not able to deploy this using macosx catalina and brew installed go

after installing go using brew I set the PATH


brew install go
export PATH=$PATH:/usr/local/Cellar/go/1.14.2_1/bin/

make vendor finishes, but make deploy gives me this error

make
rm -rf manifests
./scripts/build.sh main.jsonnet /usr/local/Cellar/go/1.14.2_1//bin/jsonnet
using jsonnet from arg
+ set -o pipefail
+ rm -rf manifests
+ mkdir manifests
+ /usr/local/Cellar/go/1.14.2_1//bin/jsonnet -J vendor -m manifests main.jsonnet
+ xargs '-I{}' sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- '{}'
RUNTIME ERROR: vars.jsonnet:1:1-10 Unknown variable: master_ip
    main.jsonnet:2:14-35    thunk <vars> from <$>
    main.jsonnet:11:60-64

    utils.libsonnet:21:9-13 thunk from <function <anonymous>>
    utils.libsonnet:17:26-29    thunk from <function <aux>>
    utils.libsonnet:17:15-30    function <aux>
    utils.libsonnet:21:5-21 function <anonymous>
    main.jsonnet:11:14-92   thunk <kp> from <$>
    main.jsonnet:21:81-83
    <std>:1278:24-25    thunk from <function <anonymous>>
    <std>:1278:5-33 function <anonymous>
    main.jsonnet:21:64-99   $

    During evaluation

make: *** [manifests] Error 1

as I am a go noob, any help would be appreciated

Cheers!

carlosedp commented 4 years ago

Have you modified anything on vars.jsonnet? I just checked-out a fresh tree and it built correctly. The master_ip variable is only used if k3s is enabled. I also generated with it as true and worked normally.

mihai-satmarean commented 4 years ago

Hi, thanks for the answer, sorry for the omission, yes, I had changed the vars to read:

  k3s: {
    enabled: true,
    master_ip: ['192.168.0.18'],
  },

  // Domain suffix for the ingresses
  suffixDomain: '192.168.0.18.nip.io',
.
.
.
  // Setting these to false, defaults to emptyDirs
  enablePersistence: {
    prometheus: true,
    grafana: true,
  },

and using k3s. I can give you more infos if needed. Cheers

carlosedp commented 4 years ago

Sorry but I just did a fresh checkout of the repo, changed the exact same parameters and make generated the files correctly.

Could you try the same?

mihai-satmarean commented 4 years ago

that worked. thank you!