Skip to content

Commit

Permalink
Merge pull request #3189 from gravitl/release-v0.26.0
Browse files Browse the repository at this point in the history
v0.26.0
  • Loading branch information
abhishek9686 authored Nov 8, 2024
2 parents 387087c + 276998b commit c245c78
Show file tree
Hide file tree
Showing 91 changed files with 3,529 additions and 1,197 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ body:
label: Version
description: What version are you running?
options:
- v0.26.0
- v0.25.0
- v0.24.3
- v0.24.2
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/docker-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
description: 'Docker tag to use (default: latest)'
required: false
default: 'latest'
push:
branches:
- 'develop'

jobs:
go-builder:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: echo "timestamp=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update documentation ${{ steps.timestamp.outputs.timestamp }}"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Build
run: |
env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build main.go
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Build
run: |
cd cli
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: run tests
run: |
go vet ./...
Expand All @@ -66,9 +66,9 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: run static checks
run: |
sudo apt update
go install honnef.co/go/tools/cmd/staticcheck@v0.4.7
go install honnef.co/go/tools/cmd/staticcheck@latest
{ ~/go/bin/staticcheck -tags=ee ./... ; }
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#first stage - builder
FROM gravitl/go-builder AS builder
FROM gravitl/go-builder:1.23.0 AS builder
ARG tags
WORKDIR /app
COPY . .

RUN GOOS=linux CGO_ENABLED=1 go build -ldflags="-s -w " -tags ${tags} .
# RUN go build -tags=ee . -o netmaker main.go
FROM alpine:3.20.2
FROM alpine:3.20.3

# add a c lib
# set the working directory
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-quick
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#first stage - builder
FROM alpine:3.20.2
FROM alpine:3.20.3
ARG version
WORKDIR /app
COPY ./netmaker /root/netmaker
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<p align="center">
<a href="https://github.com/gravitl/netmaker/releases">
<img src="https://img.shields.io/badge/Version-0.25.0-informational?style=flat-square" />
<img src="https://img.shields.io/badge/Version-0.26.0-informational?style=flat-square" />
</a>
<a href="https://hub.docker.com/r/gravitl/netmaker/tags">
<img src="https://img.shields.io/docker/pulls/gravitl/netmaker?label=downloads" />
Expand Down Expand Up @@ -51,18 +51,20 @@

If you're looking for a managed service, you can get started with just few clicks, visit [netmaker.io](https://account.netmaker.io) to create your netmaker server.

# Self-Hosted Quick Start
# Self-Hosted Open Source Quick Start

These are the instructions for deploying a Netmaker server on your own cloud VM as quickly as possible. For more detailed instructions, visit the [Install Docs](https://docs.netmaker.io/docs/server-installation/quick-install#quick-install-script).

1. Get a cloud VM with Ubuntu 22.04 and a public IP.
2. Open ports 443, 80, 3479, 8089 and 51821-51830/udp on the VM firewall and in cloud security settings.
3. (recommended) Prepare DNS - Set a wildcard subdomain in your DNS settings for Netmaker, e.g. *.netmaker.example.com, which points to your VM's public IP.
4. Run the script:
4. Run the script to setup open source version of Netmaker:

`sudo wget -qO /root/nm-quick.sh https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/nm-quick.sh && sudo chmod +x /root/nm-quick.sh && sudo /root/nm-quick.sh`

**<pre>To Install Self-Hosted PRO Version - https://docs.netmaker.io/docs/server-installation/netmaker-professional-setup</pre>**

`sudo wget -qO /root/nm-quick.sh https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/nm-quick.sh && sudo chmod +x /root/nm-quick.sh && sudo /root/nm-quick.sh`

This script by default installs PRO version with 14-day trial, check out these instructions for post trial period https://docs.netmaker.io/docs/server-installation/quick-install#after-the-trial-period-ends. It also gives you the option to use your own domain (recommended) or an auto-generated domain.

<p float="left" align="middle">
<img src="https://raw.githubusercontent.com/gravitl/netmaker-docs/master/images/netmaker-github/readme.gif" />
Expand Down
12 changes: 10 additions & 2 deletions auth/host_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func SessionHandler(conn *websocket.Conn) {
if err = conn.WriteMessage(messageType, reponseData); err != nil {
logger.Log(0, "error during message writing:", err.Error())
}
go CheckNetRegAndHostUpdate(netsToAdd[:], &result.Host, uuid.Nil)
go CheckNetRegAndHostUpdate(netsToAdd[:], &result.Host, uuid.Nil, []models.TagID{})
case <-timeout: // the read from req.answerCh has timed out
logger.Log(0, "timeout signal recv,exiting oauth socket conn")
break
Expand All @@ -236,7 +236,7 @@ func SessionHandler(conn *websocket.Conn) {
}

// CheckNetRegAndHostUpdate - run through networks and send a host update
func CheckNetRegAndHostUpdate(networks []string, h *models.Host, relayNodeId uuid.UUID) {
func CheckNetRegAndHostUpdate(networks []string, h *models.Host, relayNodeId uuid.UUID, tags []models.TagID) {
// publish host update through MQ
for i := range networks {
network := networks[i]
Expand All @@ -246,6 +246,14 @@ func CheckNetRegAndHostUpdate(networks []string, h *models.Host, relayNodeId uui
logger.Log(0, "failed to add host to network:", h.ID.String(), h.Name, network, err.Error())
continue
}
if len(tags) > 0 {
newNode.Tags = make(map[models.TagID]struct{})
for _, tagI := range tags {
newNode.Tags[tagI] = struct{}{}
}
logic.UpsertNode(newNode)
}

if relayNodeId != uuid.Nil && !newNode.IsRelayed {
// check if relay node exists and acting as relay
relaynode, err := logic.GetNodeByID(relayNodeId.String())
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/user/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var userGroupCreateCmd = &cobra.Command{
Short: "create user group",
Long: `create user group`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("CLI doesn't support creation of groups currently. Visit the dashboard to create one or refer to our api documentation https://docs.v2.netmaker.io/reference")
fmt.Println("CLI doesn't support creation of groups currently. Visit the dashboard to create one or refer to our api documentation https://docs.netmaker.io/api")
},
}

Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/user/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var userRoleCreateCmd = &cobra.Command{
Short: "create user role",
Long: `create user role`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("CLI doesn't support creation of roles currently. Visit the dashboard to create one or refer to our api documentation https://docs.v2.netmaker.io/reference")
fmt.Println("CLI doesn't support creation of roles currently. Visit the dashboard to create one or refer to our api documentation https://docs.netmaker.io/api")
},
}

Expand Down
2 changes: 1 addition & 1 deletion compose/docker-compose.netclient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.4"
services:
netclient:
container_name: netclient
image: 'gravitl/netclient:v0.25.0'
image: 'gravitl/netclient:v0.26.0'
hostname: netmaker-1
network_mode: host
restart: on-failure
Expand Down
2 changes: 1 addition & 1 deletion compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
restart: always

caddy:
image: caddy:2.6.2
image: caddy:2.8.4
container_name: caddy
env_file: ./netmaker.env
restart: unless-stopped
Expand Down
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ type ServerConfig struct {
SmtpHost string `json:"smtp_host"`
SmtpPort int `json:"smtp_port"`
MetricInterval string `yaml:"metric_interval"`
ManageDNS bool `yaml:"manage_dns"`
DefaultDomain string `yaml:"default_domain"`
}

// SQLConfig - Generic SQL Config
Expand Down
Loading

0 comments on commit c245c78

Please sign in to comment.