From cf49112109aa3e771c283d7eda04a14765b9a1d9 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Wed, 28 Jul 2021 18:13:37 +0000 Subject: [PATCH] fixing quickstart compose --- compose/docker-compose.quickstart.yml | 16 ++++++++++++-- docs/quick-start.rst | 32 +++++++++++++++------------ nginx/netmaker-nginx-template.conf | 12 +++++----- 3 files changed, 38 insertions(+), 22 deletions(-) diff --git a/compose/docker-compose.quickstart.yml b/compose/docker-compose.quickstart.yml index 4489c68b..23d3fa69 100644 --- a/compose/docker-compose.quickstart.yml +++ b/compose/docker-compose.quickstart.yml @@ -31,12 +31,24 @@ services: restart: always network_mode: host environment: - SERVER_HOST: "HOST_IP" + SERVER_HOST: "SERVER_PUBLIC_IP" + SERVER_API_CONN_STRING: "api.NETMAKER_BASE_DOMAIN:443" + SERVER_GRPC_CONN_STRING: "grpc.NETMAKER_BASE_DOMAIN:1443" + COREDNS_ADDR: "159.89.81.223" + GRPC_SSL: "on" + SERVER_HTTP_HOST: "api.NETMAKER_BASE_DOMAIN" + SERVER_GRPC_HOST: "grpc.NETMAKER_BASE_DOMAIN" + API_PORT: "8081" + GRPC_PORT: "50051" + CLIENT_MODE: "on" + MASTER_KEY: "REPLACE_MASTER_KEY" + SERVER_GRPC_WIREGUARD: "off" + CORS_ALLOWED_ORIGIN: "*" netmaker-ui: container_name: netmaker-ui depends_on: - netmaker - image: gravitl/netmaker-ui:v0.5 + image: gravitl/netmaker-ui:v0.7 links: - "netmaker:api" ports: diff --git a/docs/quick-start.rst b/docs/quick-start.rst index c19636ca..1f3aa080 100644 --- a/docs/quick-start.rst +++ b/docs/quick-start.rst @@ -113,6 +113,18 @@ Make sure firewall settings are appropriate for Netmaker. You need ports 53 and - allow 1443/tcp from all - allow 53/udp from all +Prepare for DNS +---------------------------------------------------------------- + +On Ubuntu 20.04, by default there is a service consuming port 53 related to DNS resolution. We need port 53 open in order to run our own DNS server. The below steps will disable systemd-resolved, and insert a generic DNS nameserver for local resolution. + +1. ``sudo systemctl stop systemd-resolved`` +2. ``sudo systemctl disable systemd-resolved`` +3. ``sudo vim /etc/systemd/resolved.conf`` + * uncomment DNS and add 8.8.8.8 or whatever reachable nameserver is your preference + * uncomment DNSStubListener and set to "no" +4. ``sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf`` + Prepare Nginx ----------------- @@ -135,36 +147,28 @@ Insert your domain in the configuration file and add to nginx: ``systemctl restart nginx`` -[NOTE: May not be necessary. Test with 5353] Prepare for DNS ----------------------------------------------------------------- - -On Ubuntu 20.04, by default there is a service consuming port 53 related to DNS resolution. We need port 53 open in order to run our own DNS server. The below steps will disable systemd-resolved, and insert a generic DNS nameserver for local resolution. - -1. ``systemctl stop systemd-resolved`` -2. ``systemctl disable systemd-resolved`` -3. ``vim /etc/systemd/resolved.conf`` - * uncomment DNS and add 8.8.8.8 or whatever reachable nameserver is your preference - * uncomment DNSStubListener and set to "no" -4. ``ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf`` - Install Netmaker ================= Prepare Templates ------------------ -wget netmaker template +``wget https://raw.githubusercontent.com/gravitl/netmaker/develop/compose/docker-compose.quickstart.yml`` ``sed -i 's/NETMAKER_BASE_DOMAIN//g' docker-compose.quickstart.yml`` + ``sed -i 's/SERVER_PUBLIC_IP//g' docker-compose.quickstart.yml`` Generate a unique master key and insert it: + ``tr -dc A-Za-z0-9 /g' docker-compose.quickstart.yml`` Start Netmaker ---------------- - docker-compose -f docker-compose.quickstart.yml up -d + +``sudo docker-compose -f docker-compose.quickstart.yml up -d`` =========== Quick Start diff --git a/nginx/netmaker-nginx-template.conf b/nginx/netmaker-nginx-template.conf index cef1e5bd..3c1b25f2 100644 --- a/nginx/netmaker-nginx-template.conf +++ b/nginx/netmaker-nginx-template.conf @@ -4,8 +4,8 @@ server { server_name dashboard.NETMAKER_BASE_DOMAIN; ssl_certificate /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/privkey.pem; - include /etc/letsencrypt/options-ssl-nginx.conf; - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + #include /etc/letsencrypt/options-ssl-nginx.conf; + #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; location / { proxy_pass http://127.0.0.1:8082; } @@ -16,8 +16,8 @@ server { server_name api.NETMAKER_BASE_DOMAIN; ssl_certificate /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/privkey.pem; - include /etc/letsencrypt/options-ssl-nginx.conf; - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + #include /etc/letsencrypt/options-ssl-nginx.conf; + #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; location / { proxy_pass http://127.0.0.1:8081; @@ -30,8 +30,8 @@ server { server_name grpc.NETMAKER_BASE_DOMAIN ssl_certificate /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/privkey.pem; - include /etc/letsencrypt/options-ssl-nginx.conf; - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + #include /etc/letsencrypt/options-ssl-nginx.conf; + #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # Forces the header to be the one that is visible from the outside proxy_set_header Host api.NETMAKER_BASE_DOMAIN; # Please change to your URL