mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 05:04:27 +08:00
fixing quickstart compose
This commit is contained in:
parent
86d3869baa
commit
cf49112109
3 changed files with 38 additions and 22 deletions
|
@ -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:
|
||||
|
|
|
@ -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/<your base domain>/g' docker-compose.quickstart.yml``
|
||||
|
||||
``sed -i 's/SERVER_PUBLIC_IP/<your server ip>/g' docker-compose.quickstart.yml``
|
||||
|
||||
Generate a unique master key and insert it:
|
||||
|
||||
``tr -dc A-Za-z0-9 </dev/urandom | head -c 30 ; echo ''``
|
||||
|
||||
``sed -i 's/REPLACE_MASTER_KEY/<your generated key>/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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue