Giter Site home page Giter Site logo

Comments (4)

bmullan avatar bmullan commented on May 18, 2024

@afeiszli

I think I found *part of the problem why I have a dev.yaml and no ENV.yaml.
But in addition it seems like the user: and pass: below overwrite what
I passed as my "user" and "pass" when I installed?

In the Netmaker repo:

https://raw.githubusercontent.com/gravitl/netmaker/v0.2/netmaker-server.sh

#!/bin/sh
set -e

mkdir -p /etc/netmaker/config/environments
wget -O /etc/netmaker/netmaker https://github.com/gravitl/netmaker/releases/download/latest/netmaker
chmod +x /etc/netmaker/netmaker

cat >/etc/netmaker/config/environments/dev.yaml<<EOL
server:
host:
apiport: "8081"
grpcport: "50051"
masterkey: "secretkey"
allowedorigin: "*"
restbackend: true
agentbackend: true
defaultnetname: "default"
defaultnetrange: "10.10.10.0/24"
createdefault: true
mongoconn:
user: "mongoadmin"
pass: "mongopass"
host: "localhost"
port: "27017"
opts: '/?authSource=admin'
EOL

cat >/etc/systemd/system/netmaker.service<<EOL
[Unit]
Description=Netmaker Server
After=network.target

[Service]
Type=simple
Restart=on-failure

WorkingDirectory=/etc/netmaker
ExecStart=/etc/netmaker/netmaker

[Install]
WantedBy=multi-user.target
EOL
systemctl daemon-reload
systemctl start netmaker.service

from netmaker.

afeiszli avatar afeiszli commented on May 18, 2024

Hi Brian, yes this is another mis-clarification in docs. It specifies "ENV.yaml" as a placeholder for whatever you're calling your env file. It could be dev.yaml or prod.yaml or something else. On startup, netmaker will look for an environment variable $APP_ENV.

If that value is not found, it will use "dev" by default and choose the dev.yaml file.

Based on your output, this does appear to be an authentication issue with mongo so the problem is likely the mongo user:pass.

from netmaker.

bmullan avatar bmullan commented on May 18, 2024

@afeiszli
re your comment

Based on your output, this does appear to be an authentication issue with mongo so the problem is likely the mongo user:pass.

You may have missed this in my previous post:

But in addition it seems like the user: and pass: below overwrite what
I passed as my "user" and "pass" when I installed?

In my command I was specifying both "user=admin" and "pass=admin"

but I found those were ignored/overwritten by the above script and was setting user=mongoadmin and pass=mongopass

I'm not sure why my user: and pass: were overwritten

from netmaker.

afeiszli avatar afeiszli commented on May 18, 2024

Were user/pass overwritten on the server (config for connecting with mongo), or on mongo itself There's nothing written in Netmaker that can write a user/pass to mongodb.

from netmaker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.