Merge pull request #113 from gravitl/hotfix_v0.2_install

Hotfix v0.2 install
This commit is contained in:
Alex 2021-04-20 09:03:22 -04:00 committed by GitHub
commit 6867e30ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 48 deletions

View file

@ -1,5 +1,3 @@
<p align="center">
<img src="netmaker.png"><break/>
</p>
@ -52,20 +50,28 @@ In future releases, we have plans to support other platforms such as Windows and
#### Prereqs:
1. A server with an IP reachable by your computers (a small ec2 instance or droplet would do just fine).
2. Linux installed on the above server (we use Ubuntu, but anything that runs Docker should work).
3. Install Docker (can run without Docker as well, but is not preferred. If this is a requirement, view the Advanced Usage docs).
3. Install Docker if running in Docker Mode (see below).
#### Launch Netmaker:
Netmaker v0.2 introduces the server as a 'client'. This means the server can add itself into networks if you would like. To do so, Netmaker requires privileged access where it is running, and needs to modify the host filesystem. To run in this mode, we are not currently using Docker.
**If you would like to run with "client mode", you can use the following script to deploy:**
`sudo curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.2/netmaker-install-clientmode.sh | sudo SERVER_DOMAIN=3.231.219.63 sh -`
**If you would like to run without "client mode", and manually add/remove the server from networks:**
1. Clone this repo or just copy contents of "docker-compose.yml" to your Netmaker server (from prereqs).
2. In docker-compose.yml, change BACKEND_URL to the public IP ofthat machine.
2. In docker-compose.yml, change BACKEND_URL to the public IP of your server.
3. Run `sudo docker-compose up`
4. Navigate to your server's IP in the browser and you should see the Netmaker UI asking to create a new admin user.
5. Create a new admin user
6. . Click "Create Network" and fill out the details
7. You are now ready to begin using Netmaker. Create a key or enable manual node sign up so that your nodes can connect.
6. You are now ready to begin using Netmaker. There should be a default network you can use or you can create your own. Then, Create a key or enable manual node sign up so that your nodes can connect.
#### On your machines :
Run the following: `curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.1/netclient-install.sh | SERVER_URL=<your server ip>:50051 NET_NAME=<your network name> KEY=<your access key> sh -`
A command will be displayed when you generate a token for signing up nodes. Run it on each machine you would like to connect.
`curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.2/netclient-install.sh | KEY=<your access key> sh -`
(Note: Key can be left out if manual node signup is enabled)
#### LICENSE
@ -76,4 +82,3 @@ Netmaker's source code and all artifacts in this repository are freely available
Email: info@gravitl.com
Discord: https://discord.gg/zRb9Vfhk8A

View file

@ -6,19 +6,19 @@ This guide covers advanced usage of Netmaker. If you are just looking to get sta
Netmaker settings can be set via Environment Variables or Config file. There are also a couple of runtime arguments that can optionally be set.
### Environment Variables
**APP_ENV**: default=dev. Determines which environment file to use. Will look under config/environments/APP_ENV.yaml. For instance, you can have different environments for dev, test, and prod, and store different settinggs accordingly.
**GRPC_PORT**: default=50051. The port for GRPC (node/client) communications
**API_PORT**: default=8081. The port for API and UI communications
**MASTER_KEY**: default=secretkey. The skeleton key used for authenticating with server as administrator.
MongoDB Connection Env Vars:
**MONGO_USER**:default=admin
**MONGO_HOST**:default=password
**MONGO_PASS**:default=localhost
**MONGO_PORTS**:default=27017
**MONGO_OPTS**:default=/?authSource=admin
**BACKEND_URL**: default=nil. The address of the server. Used for setting token values for client/nodes. If not set, will run a command to retrieve the server URL.
**APP_ENV**: default=dev. Determines which environment file to use. Will look under config/environments/APP_ENV.yaml. For instance, you can have different environments for dev, test, and prod, and store different settinggs accordingly.
**GRPC_PORT**: default=50051. The port for GRPC (node/client) communications
**API_PORT**: default=8081. The port for API and UI communications
**MASTER_KEY**: default=secretkey. The skeleton key used for authenticating with server as administrator.
MongoDB Connection Env Vars:
**MONGO_USER**:default=admin
**MONGO_HOST**:default=password
**MONGO_PASS**:default=localhost
**MONGO_PORTS**:default=27017
**MONGO_OPTS**:default=/?authSource=admin
**BACKEND_URL**: default=nil. The address of the server. Used for setting token values for client/nodes. If not set, will run a command to retrieve the server URL.
### Config File
Stored as config/environments/*.yaml. Default used is dev.yaml
@ -49,33 +49,31 @@ Stored as config/environments/*.yaml. Default used is dev.yaml
## Client Config
Client config files are stored under /etc/netclient per network as /etc/netclient/netconfig-< network name >
**server:**
address: The address:port of the server
accesskey: The acceess key used to sign up with the server
**node:**
name: a displayname for the node, e.g. "mycomputer"
interface:
network: default
password: $2a$05$HqVV85kuDF5R3DS.sK5hSuYiaYFaszhGXHYy8mpIOhV7TesWOlKWG
macaddress: 12:cc:6f:f4:cb:a1
localaddress: 10.10.10.2
wgaddress: 10.10.10.2
roamingoff: false
islocal: false
allowedips: ""
localrange: ""
postup: iptables -A FORWARD -i nm-default -j ACCEPT; iptables -t nat -A POSTROUTING
-o nm-home -j MASQUERADE
postdown: iptables -D FORWARD -i nm-default -j ACCEPT; iptables -t nat -D POSTROUTING
-o nm-home -j MASQUERADE
port: 51821
keepalive: 20
publickey: WoXfPcBLGwbEVNnxOmS1dnMR+pzvoL5sg+6KuSjEN0M=
privatekey: ""
endpoint: 66.169.21.167
postchanges: "false"
network: ""
Client config files are stored under /etc/netclient per network as /etc/netclient/netconfig-< network name >
**server:**
address: The address:port of the server
accesskey: The acceess key used to sign up with the server
**node:**
name: a displayname for the node, e.g. "mycomputer"
interface: the network interface name, by default something like "nm-"
network: the netmaker network being attached to
password: the node's hashed password. Can be changed by putting a value in here and setting "postchanges" to "true"
macaddress: the mac address of the node
localaddress: the local network address
wgaddress: the wireguard private address
roamingoff: flag to update the IP address automatically based on network changes
islocal: whether or not this is a local or public network
allowedips: the allowedips addresses that other nodes will recieve
localrange: the local address range if it's a local network
postup: post up rules for gateway nodes
postdown: post down rules for gateway nodes
port: the wiregard port
keepalive: the default keepalive value between this and all other nodes
publickey: the public key other nodes will use to access this node
privatekey: the private key of the nodes (this field does nothing)
endpoint: the reachable endpoint of the node for routing, either local or public.
postchanges: either "true" or "false" (with quotes). If true, will post any changes you make to the remote server.
## Non-Docker Installation