mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 21:24:16 +08:00
Merge branch 'master' into release_v0.17.1
This commit is contained in:
commit
d4d38e1b5e
5 changed files with 24 additions and 21 deletions
20
.github/workflows/publish-docker.yml
vendored
20
.github/workflows/publish-docker.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
-
|
||||
name: Set tag
|
||||
run: |
|
||||
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
||||
|
@ -24,16 +24,16 @@ jobs:
|
|||
TAG="${{ github.ref_name }}"
|
||||
fi
|
||||
echo "TAG=${TAG}" >> $GITHUB_ENV
|
||||
-
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
@ -54,7 +54,7 @@ jobs:
|
|||
docker-ee:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
-
|
||||
name: Set tag
|
||||
run: |
|
||||
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
||||
|
@ -65,13 +65,13 @@ jobs:
|
|||
TAG="${{ github.ref_name }}"
|
||||
fi
|
||||
echo "TAG=${TAG}" >> $GITHUB_ENV
|
||||
-
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
|
@ -85,7 +85,7 @@ jobs:
|
|||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
||||
platforms: linux/amd64, linux/arm64
|
||||
push: true
|
||||
tags: ${{ github.repository }}:${{ env.TAG }}-ee
|
||||
build-args: |
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
3. (optional) Prepare DNS - Set a wildcard subdomain in your DNS for Netmaker, e.g. *.netmaker.example.com
|
||||
4. Run the script:
|
||||
|
||||
`sudo wget -qO /root/nm-quick-interactive.sh https://raw.githubusercontent.com/gravitl/netmaker/test_v0.17.0_compose/scripts/nm-quick-interactive.sh && sudo chmod +x /root/nm-quick-interactive.sh && sudo /root/nm-quick-interactive.sh`
|
||||
`sudo wget -qO /root/nm-quick-interactive.sh https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/nm-quick-interactive.sh && sudo chmod +x /root/nm-quick-interactive.sh && sudo /root/nm-quick-interactive.sh`
|
||||
|
||||
This script gives you the option to deploy the Community or Enterprise version of Netmaker. If deploying Enterprise, you get a free account with a 50 node limit by default. It also gives you the option to use your own domain (recommended) or an auto-generated domain.
|
||||
|
||||
|
|
|
@ -86,13 +86,10 @@ services:
|
|||
- /root/wait.sh:/mosquitto/config/wait.sh
|
||||
- mosquitto_data:/mosquitto/data
|
||||
- mosquitto_logs:/mosquitto/log
|
||||
ports:
|
||||
- "1883:1883"
|
||||
- "8883:8883"
|
||||
volumes:
|
||||
caddy_data: {}
|
||||
caddy_conf: {}
|
||||
sqldata: {}
|
||||
dnsconfig: {}
|
||||
mosquitto_data: {}
|
||||
mosquitto_logs: {}
|
||||
mosquitto_logs: {}
|
||||
|
|
|
@ -6,7 +6,7 @@ COPY . .
|
|||
|
||||
ENV GO111MODULE=auto
|
||||
|
||||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 /usr/local/go/bin/go build -ldflags="-w -s" -o netclient-app netclient/main.go
|
||||
RUN GOOS=linux CGO_ENABLED=0 /usr/local/go/bin/go build -ldflags="-w -s" -o netclient-app netclient/main.go
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
|
|
|
@ -351,7 +351,7 @@ done
|
|||
|
||||
setup_mesh() {( set -e
|
||||
|
||||
wait_seconds 5
|
||||
wait_seconds 15
|
||||
|
||||
echo "Creating netmaker network (10.101.0.0/16)"
|
||||
|
||||
|
@ -371,23 +371,29 @@ echo "Configuring netmaker server as ingress gateway"
|
|||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
echo " waiting for server node to become available"
|
||||
wait_seconds 5
|
||||
wait_seconds 10
|
||||
curlresponse=$(curl -s -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/netmaker)
|
||||
SERVER_ID=$(jq -r '.[0].id' <<< ${curlresponse})
|
||||
if [[ "$i" == 6 && -z "$SERVER_ID" ]]; then
|
||||
echo " Server ID: $SERVER_ID"
|
||||
if [ $SERVER_ID == "null" ]; then
|
||||
SERVER_ID=""
|
||||
fi
|
||||
if [[ "$i" -ge "6" && -z "$SERVER_ID" ]]; then
|
||||
echo " Netmaker is having issues configuring itself, please investigate (docker logs netmaker)"
|
||||
echo " Exiting..."
|
||||
exit 1
|
||||
elif [ -z "$SERVER_ID" ]; then
|
||||
echo " server node not yet configured, retrying..."
|
||||
else
|
||||
elif [[ ! -z "$SERVER_ID" ]]; then
|
||||
echo " server node is now availble, continuing"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
curl -o /dev/null -s -X POST -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/netmaker/$SERVER_ID/createingress
|
||||
|
||||
if [[ ! -z "$SERVER_ID" ]]; then
|
||||
curl -o /dev/null -s -X POST -H "Authorization: Bearer $MASTER_KEY" -H 'Content-Type: application/json' https://api.${NETMAKER_BASE_DOMAIN}/api/nodes/netmaker/$SERVER_ID/createingress
|
||||
fi
|
||||
)}
|
||||
|
||||
set +e
|
||||
|
|
Loading…
Add table
Reference in a new issue