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

Network devices backend #908

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
db67f0f
network devices crud
t-aleksander Dec 17, 2024
020a7ef
sqlx prepare
t-aleksander Dec 17, 2024
ffdfd6d
add network devices stats to overview endpoint
t-aleksander Dec 17, 2024
7ef5f24
development up
filipslezaklab Dec 17, 2024
4452ac0
Merge branch 'network-devices' into network-devices-ui
filipslezaklab Dec 17, 2024
e75b461
add ip endpoints
t-aleksander Dec 18, 2024
966cff4
fix compilation
t-aleksander Dec 18, 2024
c614069
Merge branch 'network-devices' into network-devices-ui
filipslezaklab Dec 18, 2024
c5b748f
Merge branch 'dev' into network-devices
t-aleksander Dec 18, 2024
a4c9115
return split ip addresses
t-aleksander Dec 18, 2024
d42c1b5
refactor standalone device modal into one shared form wip
filipslezaklab Dec 18, 2024
2c8b866
Merge branch 'network-devices' into network-devices-ui
filipslezaklab Dec 18, 2024
2e3a10a
modify availability check response
t-aleksander Dec 19, 2024
f140636
up wip
filipslezaklab Dec 19, 2024
2ffd816
change logging
t-aleksander Dec 19, 2024
e0ca28d
Merge branch 'network-devices' into network-devices-ui
filipslezaklab Dec 19, 2024
62a30ad
sqlx prepare
t-aleksander Dec 19, 2024
d32d414
devices list and manual device add with api finished
filipslezaklab Dec 19, 2024
e1d403f
Merge remote-tracking branch 'origin/network-devices-ui' into network…
t-aleksander Dec 19, 2024
6110820
network device enrollment
t-aleksander Dec 19, 2024
7f0cc3f
build image
t-aleksander Dec 19, 2024
f9306d6
update api types in network overview
filipslezaklab Dec 19, 2024
bffb2b5
Merge branch 'network-devices' into network-devices-ui
filipslezaklab Dec 19, 2024
5d10592
update overview expandable labels
filipslezaklab Dec 19, 2024
c2a4278
scripted cli path for standalone device creation
filipslezaklab Dec 20, 2024
1d56ae3
make a new token for already added network device
t-aleksander Dec 20, 2024
301114f
Merge remote-tracking branch 'origin/network-devices-ui' into network…
t-aleksander Dec 20, 2024
153a82a
change endpoint
t-aleksander Dec 20, 2024
f117f68
allow generating a token for already configured devices
t-aleksander Dec 20, 2024
465de9e
return valid flag
t-aleksander Dec 20, 2024
95dc81a
network device config
t-aleksander Dec 20, 2024
c7eab4f
fix disappearing network devices
t-aleksander Dec 20, 2024
36dfa47
don't require a public key or location_id
t-aleksander Dec 20, 2024
7a9fb14
delete network devices when deleting a network
t-aleksander Dec 20, 2024
2bd11bb
Create query-7a0f3ee3d0be29319693b7ab8a6c247b5b4d9e5c836b90a601531edd…
t-aleksander Dec 20, 2024
7fbb146
fix ip validation
t-aleksander Dec 20, 2024
5e6514c
tests fix, cleanup
t-aleksander Dec 22, 2024
5c7b870
fix tests 2
t-aleksander Dec 22, 2024
c19aaf4
added tests
t-aleksander Dec 22, 2024
2244772
suggestions
t-aleksander Dec 23, 2024
040f9a8
don't use broadcast, use last address instead
t-aleksander Dec 23, 2024
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
69 changes: 35 additions & 34 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ jobs:
- ${{ matrix.runner }}
strategy:
matrix:
cpu: [arm64, amd64, arm/v7]
# cpu: [arm64, amd64, arm/v7]
cpu: [amd64]
include:
- cpu: arm64
runner: ARM64
tag: arm64
# - cpu: arm64
# runner: ARM64
# tag: arm64
- cpu: amd64
runner: X64
tag: amd64
- cpu: arm/v7
runner: ARM
tag: armv7
# - cpu: arm/v7
# runner: ARM
# tag: armv7
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -62,30 +63,30 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

docker-manifest:
runs-on: [self-hosted, Linux]
needs: [build-docker]
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_REPO }}
flavor: ${{ inputs.flavor }}
tags: ${{ inputs.tags }}
- name: Login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifests
run: |
tags='${{ env.GHCR_REPO }}:${{ github.sha }} ${{ steps.meta.outputs.tags }}'
for tag in ${tags}
do
docker manifest rm ${tag} || true
docker manifest create ${tag} ${{ env.GHCR_REPO }}:${{ github.sha }}-amd64 ${{ env.GHCR_REPO }}:${{ github.sha }}-arm64 ${{ env.GHCR_REPO }}:${{ github.sha }}-armv7
docker manifest push ${tag}
done
# docker-manifest:
# runs-on: [self-hosted, Linux]
# needs: [build-docker]
# steps:
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: |
# ${{ env.GHCR_REPO }}
# flavor: ${{ inputs.flavor }}
# tags: ${{ inputs.tags }}
# - name: Login to GitHub container registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Create and push manifests
# run: |
# tags='${{ env.GHCR_REPO }}:${{ github.sha }} ${{ steps.meta.outputs.tags }}'
# for tag in ${tags}
# do
# docker manifest rm ${tag} || true
# docker manifest create ${tag} ${{ env.GHCR_REPO }}:${{ github.sha }}-amd64 ${{ env.GHCR_REPO }}:${{ github.sha }}-arm64 ${{ env.GHCR_REPO }}:${{ github.sha }}-armv7
# docker manifest push ${tag}
# done
14 changes: 7 additions & 7 deletions .github/workflows/current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build current image
on:
push:
branches:
- main
- dev
# - main
# - dev
- network-devices
paths-ignore:
- "*.md"
- "LICENSE"
Expand All @@ -17,11 +18,10 @@ jobs:
uses: ./.github/workflows/build-docker.yml
with:
tags: |
type=raw,value=current
type=ref,event=branch
type=sha

trigger-e2e:
needs: build-current
uses: ./.github/workflows/e2e.yml
secrets: inherit
# trigger-e2e:
# needs: build-current
# uses: ./.github/workflows/e2e.yml
# secrets: inherit

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading