Closed HeySteets closed 1 year ago
yup installation is broken for me too: Creating caddy ... error Creating netmaker ...
ERROR: for caddy Cannot start service caddy: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/root/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /root/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified Creating netmaker ... done Creating coredns ... done Creating netmaker-ui ... done Creating mq ... done
ERROR: for caddy Cannot start service caddy: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/root/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /root/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.
quick version upgrades of netmaker are welcome, but breaking changes on sometime, I do a version upgrade like this makes the program feel too unstable to me.
these are I worked on while installing v0.17.0 this time. Hope this helps.
cd ~
mkdir netmaker && cd netmaker
mkdir data
curl -OL https://raw.githubusercontent.com/gravitl/netmaker/v0.17.0/compose/docker-compose.yml
curl -OL https://raw.githubusercontent.com/gravitl/netmaker/v0.17.0/docker/Caddyfile
curl -OL https://raw.githubusercontent.com/gravitl/netmaker/v0.17.0/docker/mosquitto.conf
curl -OL https://raw.githubusercontent.com/gravitl/netmaker/v0.17.0/docker/wait.sh
after, i modified Caddyfile
and docker-compose
.
For Caddyfile, follow the instructions at https://netmaker.readthedocs.io/en/v0.12.0/quick-start.html#prepare-caddy
.
below is my docker-compose.
version: "3.4"
services:
netmaker:
container_name: netmaker
image: gravitl/netmaker:v0.17.0
cap_add:
- NET_ADMIN
- NET_RAW
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.all.forwarding=1
restart: always
volumes: # for data backup easily, volume is specified as a relative path.
- ./data/dnsconfig:/root/config/dnsconfig
- ./data/sqldata:/root/data
- ./data/mosquitto_data:/etc/netmaker
environment:
SERVER_NAME: ${BROKER_URL} # i prefer using dotenv.
SERVER_HOST: ${SERVER_PUBLIC_IP}
SERVER_API_CONN_STRING: "${API_URL}:443"
COREDNS_ADDR: ${SERVER_PUBLIC_IP}
DNS_MODE: "on"
SERVER_HTTP_HOST: "${API_URL}"
API_PORT: "8081"
CLIENT_MODE: "on"
MASTER_KEY: ${MASTER_KEY}
CORS_ALLOWED_ORIGIN: "*"
DISPLAY_KEYS: "on"
DATABASE: "sqlite"
NODE_ID: ${NODE_ID}
MQ_HOST: "mq"
MQ_PORT: "443"
MQ_SERVER_PORT: "1883"
HOST_NETWORK: "off"
VERBOSITY: "1"
MANAGE_IPTABLES: "on"
PORT_FORWARD_SERVICES: "dns"
MQ_ADMIN_PASSWORD: ${MQ_ADMIN_PASSWORD}
TELEMETRY: "off"
ports:
- "51821-51830:51821-51830/udp"
netmaker-ui:
container_name: netmaker-ui
image: gravitl/netmaker-ui:v0.17.0
depends_on:
- netmaker
links:
- "netmaker:api"
restart: always
environment:
BACKEND_URL: "https://${API_URL}"
caddy:
image: caddy:2.6.2
container_name: caddy
restart: unless-stopped
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile # Caddyfile path is fixed /root/ in default docker-compose.
- ./data/caddy_data:/data
- ./data/caddy_conf:/config
ports:
- "80:80"
- "443:443"
coredns:
container_name: coredns
image: coredns/coredns
command: -conf /root/dnsconfig/Corefile
depends_on:
- netmaker
restart: always
volumes:
- ./data/dnsconfig:/root/dnsconfig
mq:
container_name: mq
image: eclipse-mosquitto:2.0.15-openssl
depends_on:
- netmaker
restart: unless-stopped
command: ["/mosquitto/config/wait.sh"]
environment:
NETMAKER_SERVER_HOST: "https://${API_URL}"
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf # mosquitto.conf too.
- ./wait.sh:/mosquitto/config/wait.sh # wait.sh too.
- ./data/mosquitto_data:/mosquitto/data
- ./data/mosquitto_logs:/mosquitto/log
ports:
- "1883:1883"
- "8883:8883"
after, I created the .env file.
SERVER_PUBLIC_IP=
NODE_ID=
BROKER_URL=
API_URL=
MASTER_KEY=
MQ_ADMIN_PASSWORD=
after configuration, the inside of the folder is to be like this.
ubuntu@host:~/netmaker$ ls
Caddyfile data docker-compose.yaml mosquitto.conf wait.sh
docker-compose up -d
after running docker-compose, data directory will look like this.
ubuntu@host:~/netmaker/data$ ls
caddy_conf caddy_data dnsconfig mosquitto_data mosquitto_logs sqldata
v0.17.0 feels unstable.
If you don't really need the latest features, install v0.16.3.
I've already uploaded the version, but I'm a bit regretful.
Docs are now upgraded.
Contact Details
No response
What happened?
With the new Caddy-based release, the quick-Install documentation for Netmaker on readthedocs.io is now out-of-date, as it fails to mention acquiring the Caddyfile and the necessary modifications to make to it. Following the instructions verbatim results in the dashboard URL displaying the default Caddy webpage.
A proper installation can still be completed by reverse-engineering the necessary steps from the 5-minute install script, but the "recommended" method of setup in the docs doesn't appear to be working.
Version
v0.17.0
What OS are you using?
Linux
Relevant log output
No response
Contributing guidelines