Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: nm-quick script tackling arm TODO support #2488

Merged
merged 23 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
75c27f6
domain flag for auto installs
mattkasun Jun 22, 2023
d6695b1
Merge pull request #2415 from gravitl/NET-374a
afeiszli Jun 22, 2023
4903f2e
use static servers with custom domain (#2421)
mattkasun Jun 26, 2023
c6ca393
Merge branch 'master' into release-v0.20.3
theguy951357 Jul 3, 2023
f9405f7
Merge pull request #2435 from gravitl/release-v0.20.3
afeiszli Jul 3, 2023
287c9f4
send delete peer update always
abhishek9686 Jul 10, 2023
3f11ddd
fix add/remove host api calls
abhishek9686 Jul 10, 2023
504ce7f
keep mq updates in a single go func
abhishek9686 Jul 10, 2023
81ca3b8
move branch test logic to devops (#2443)
mattkasun Jul 11, 2023
fc3261c
handle IOT OS
abhishek9686 Jul 11, 2023
8010a39
Merge pull request #2449 from gravitl/NET-427
afeiszli Jul 11, 2023
f6245dd
Merge pull request #2450 from gravitl/release-v0.20.3
abhishek9686 Jul 13, 2023
ac4a498
Merge pull request #2457 from gravitl/release-v0.20.4
abhishek9686 Jul 19, 2023
2b48dea
save server name to env (#2460)
mattkasun Jul 24, 2023
46cddad
ensure branch test servers available after test runs (#2467)
mattkasun Jul 26, 2023
002ac80
use correct method to delete droplets (#2468)
mattkasun Jul 27, 2023
79c98f0
quick fix for the launcher
bornav Jul 30, 2023
16d5b58
Merge pull request #2484 from gravitl/release-v0.20.5
abhishek9686 Aug 1, 2023
0eb3e71
Merge branch 'gravitl:master' into master
bornav Aug 1, 2023
e29c26d
removed exit when triggering not supported exit and removed the TODO …
bornav Aug 1, 2023
66a620b
Merge branch 'develop' into feature_nm-quick_arm64_support
bornav Aug 1, 2023
9ff2dad
Merge branch 'develop' into feature_nm-quick_arm64_support
abhishek9686 Aug 2, 2023
6d7a1fc
Merge branch 'develop' into feature_nm-quick_arm64_support
bornav Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/deletedroplets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ jobs:
if_no_artifact_found: warn
- name: get server name
run: |
echo "SERVER=$(cat ./server/server) >> $GITHUB_ENV"
echo "SERVER=$(cat ./server/server)" >> $GITHUB_ENV
- name: get PR
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "pull_request=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-Github-Api-Version: 2022-11-28' \
/repos/${{ github.repository}}/actions/runs/${{ github.event.workflow_run.id }} | jq .pull_requests[0].number)" >> $GITHUB_ENV
- name: discord success message
uses: appleboy/discord-action@master
with:
Expand All @@ -32,14 +38,15 @@ jobs:
if: success() || failure()
run: |
sleep 15m
curl -X GET \
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/droplets?tag_name=$TAG"
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
TAG: ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
- name: mark server as available
if: success() || failure()
uses: appleboy/ssh-action@master
with:
host: server.${{ env.SERVER }}.clustercat.com
Expand All @@ -59,7 +66,13 @@ jobs:
if_no_artifact_found: warn
- name: get server name
run: |
echo "SERVER=$(cat ./server/server) >> $GITHUB_ENV"
echo "SERVER=$(cat ./server/server)" >> $GITHUB_ENV
- name: get PR
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "pull_request=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-Github-Api-Version: 2022-11-28' \
/repos/${{ github.repository}}/actions/runs/${{ github.event.workflow_run.id }} | jq .pull_requests[0].number)" >> $GITHUB_ENV
- name: discord failure message
uses: appleboy/discord-action@master
with:
Expand All @@ -82,14 +95,15 @@ jobs:
if: success() || failure()
run: |
sleep 3h
curl -X GET \
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/droplets?tag_name=$TAG"
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
TAG: ${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
- name: mark server as available
if: success() || failure()
uses: appleboy/ssh-action@master
with:
host: server.${{ env.SERVER }}.clustercat.com
Expand Down
17 changes: 12 additions & 5 deletions scripts/nm-quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ setup_netclient() {
netclient uninstall
set -e

# TODO arm support
wget -qO netclient https://github.com/gravitl/netclient/releases/download/$LATEST/netclient-linux-amd64
wget -qO netclient https://github.com/gravitl/netclient/releases/download/$LATEST/netclient-linux-$ARCH
chmod +x netclient
./netclient install
echo "Register token: $TOKEN"
Expand Down Expand Up @@ -227,8 +226,7 @@ configure_netclient() {
# setup_nmctl - pulls nmctl and makes it executable
setup_nmctl() {

# TODO arm support
local URL="https://github.com/gravitl/netmaker/releases/download/$LATEST/nmctl-linux-amd64"
local URL="https://github.com/gravitl/netmaker/releases/download/$LATEST/nmctl-linux-$ARCH"
echo "Downloading nmctl..."
wget -qO /usr/bin/nmctl "$URL"

Expand Down Expand Up @@ -430,7 +428,16 @@ install_dependencies() {
# ask the user to install manually and continue when ready
exit 1
fi

# TODO add other supported architectures
ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then
ARCH=amd64
elif [ "$ARCH" = "aarch64" ]; then
ARCH=arm64
else
echo "Unsupported architechure"
# exit 1
fi
set -- $dependencies

${update_cmd}
Expand Down
Loading