Closed bmullan closed 3 years ago
I think this question is related to the repo's netmaker-server.sh file
reference: https://github.com/gravitl/netmaker/issues/124
@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
Apologies, please refer to #124. But again, you can have multiple config files, and the docs should probably read something like this:
"If any settings are incorrect such as host or mongo credentials, change them under /etc/netmaker/config/environments/< your env >.yaml (by default this will be dev.yaml), and then run sudo systemctl restart netmaker
thanks...
source:
https://github.com/gravitl/netmaker/blob/master/docs/USAGE.md
In Non-Docker Installation
it says
under Server Setup
On my install in Non-Docker mode I do not have a file named ENV.yaml
but I do have one named dev.yaml: ??
Which do I need to use? If ENV.yaml really is supposed to have been created... I will have to figure out why it wasn't.
Brian