Skip to content

Commit

Permalink
Merge pull request #300 from interTwin-eu/main
Browse files Browse the repository at this point in the history
v0.3.1
  • Loading branch information
dciangot authored Oct 5, 2024
2 parents ab9ba24 + eaf1c0b commit 3218a60
Show file tree
Hide file tree
Showing 115 changed files with 3,477 additions and 2,182 deletions.
Binary file modified .DS_Store
Binary file not shown.
50 changes: 50 additions & 0 deletions .github/workflows/build_docusaurus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Update Docusaurus

on:
push:
branches:
- main
tags-ignore:
- "*"
workflow_call:

jobs:
update-doc:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Remove existing openapi.json
run: rm ./docs/openapi/openapi.json

- name: Download openapi.json
uses: robinraju/release-downloader@v1
with:
latest: true
preRelease: false
fileName: 'openAPISpec'
out-file-path: 'docs/openapi'

- name: Rename openAPISpec to openapi.json
run: mv ./docs/openapi/openAPISpec ./docs/openapi/openapi.json

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22' # Ensure this matches the Node.js version required by Docusaurus

- name: Install dependencies
working-directory: ./docs # Change to the directory where package.json is located
run: npm install

- name: Build Docusaurus site
working-directory: ./docs # Change to the directory where package.json is located
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build # Ensure this matches the build output directory of Docusaurus#
6 changes: 3 additions & 3 deletions .github/workflows/build_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/interlink/virtual-kubelet-inttw:latest
file: ./docker/Dockerfile.vk
platforms: linux/amd64, linux/arm64
build-args:
- VERSION=${{ env.RELEASE_VERSION }}
build-args: |
VERSION=${{ env.RELEASE_VERSION }}
- name: Build container base image interlink
uses: docker/build-push-action@v5
with:
Expand All @@ -52,7 +52,7 @@ jobs:
file: ./docker/Dockerfile.interlink
platforms: linux/amd64, linux/arm64

virtual-kubelet-refrest-token:
virtual-kubelet-refresh-token:
runs-on: ubuntu-latest
#env:
# DOCKER_TARGET_PLATFORM: linux/arm64
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/build_openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Update OpenAPI

on:
push:
tags:
- '*'

jobs:
update-openapi:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # specify the Python version you need

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r example/requirements.txt # if you have a requirements file
- name: Run script to generate OpenAPI JSON
run: python example/create_openapi.py

- name: Upload json to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./docs/openapi/openapi.json
asset_name: openAPISpec
tag: ${{ github.ref }}
overwrite: true
body: "OpenAPI spec for plugin REST"

Trigger-Docusaurus-Update:
uses: ./.github/workflows/build_docusaurus.yaml
13 changes: 3 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
#password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GH_CR_TOKEN }}
- name: Get Repo Owner
id: get_repo_owner
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
- name: Integration Test
uses: dagger/dagger-for-github@v5
uses: dagger/dagger-for-github@v6
with:
workdir: ci
verb: call
args: -s build-images --source-folder ../ --virtual-kubelet-ref ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/interlink/virtual-kubelet-inttw:$GITHUB_SHA --interlink-ref ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/interlink/interlink:$GITHUB_SHA new-interlink --manifests $PWD/manifests load-plugin test stdout
args: -s --name slurm-test build-images new-interlink test stdout
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
#dagger-flags: -d
version: "0.13.0"
43 changes: 0 additions & 43 deletions .github/workflows/pages.yaml

This file was deleted.

21 changes: 18 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ builds:
- arm64
- amd64
main: ./cmd/virtual-kubelet
- id: "interlink"
- id: "interlink-api"
binary: interlink
hooks:
pre: bash -c "KUBELET_VERSION={{.Version}} ./cmd/virtual-kubelet/set-version.sh"
env:
- CGO_ENABLED=0
goos:
Expand All @@ -29,8 +31,9 @@ builds:
- arm64
- amd64
- ppc64le
- id: "interlink-install"
binary: interlink-install
main: ./cmd/interlink
- id: "installer"
binary: interlink-installer
env:
- CGO_ENABLED=0
goos:
Expand All @@ -41,6 +44,18 @@ builds:
- amd64
- ppc64le
main: ./cmd/installer
- id: "ssh-tunnel"
binary: ssh-tunnel
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- arm64
- amd64
- ppc64le
main: ./cmd/ssh-tunnel
archives:
- name_template: >-
{{ .Binary }}_
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ you submit the pull request). We have a 3 steps process for contributions.
understanding and appreciating your pull request, please use the template to
explain _why_ you are making this contribution, rather than just _what_ the
contribution entails.
2. **Run E2E tests with success**. You can follow the steps described [here](https://intertwin-eu.github.io/interLink/docs/Developers)

### Code Review Process

Expand All @@ -44,7 +45,7 @@ follows:

1. A maintainer will review your code and merge it if no changes are necessary.
Your change will be merged into the repository's `main` branch.
1. If a maintainer has feedback or questions on your changes then they will set
2. If a maintainer has feedback or questions on your changes then they will set
`request changes` in the review and provide an explanation.

## Using git
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
all: interlink vk installer
all: interlink vk installer ssh-tunnel

interlink:
CGO_ENABLED=0 OOS=linux go build -o bin/interlink
CGO_ENABLED=0 OOS=linux go build -o bin/interlink cmd/interlink/main.go

vk:
CGO_ENABLED=0 OOS=linux go build -o bin/vk cmd/virtual-kubelet/main.go

installer:
CGO_ENABLED=0 OOS=linux go build -o bin/installer cmd/installer/main.go

ssh-tunnel:
CGO_ENABLED=0 OOS=linux go build -o bin/ssh-tunnel cmd/ssh-tunnel/main.go

clean:
rm -rf ./bin

dagger_registry_delete:
docker rm -fv registry || true

test:
dagger_registry_delete
docker run -d --rm --name registry -p 5432:5000 registry
cd ci
dagger go run go main.go k8s.go
cd -
dagger call -m ./ci \
--name my-tests \
build-images \
new-interlink \
test stdout

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
![GitHub License](https://img.shields.io/github/license/intertwin-eu/interlink)
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/intertwin-eu/interlink/total)
![GitHub Repo stars](https://img.shields.io/github/stars/intertwin-eu/interlink)

![GitHub Release](https://img.shields.io/github/v/release/intertwin-eu/interlink)
![Tested with Dagger](https://img.shields.io/badge/tested_with_dagger-v0.13.3-green)

![Home Page](https://img.shields.io/badge/home_page-orange?link=https%3A%2F%2Fintertwin-eu.github.io%2Ft%2FinterLink%2F)
![Slack server](https://img.shields.io/badge/slack_server-8A2BE2?link=https%3A%2F%2Fjoin.slack.com%2Ft%2Fintertwin%2Fshared_invite%2Fzt-2cs67h9wz-2DFQ6EiSQGS1vlbbbJHctA)

![Interlink logo](./docs/static/img/interlink_logo.png)

## :information_source: Overview
Expand Down
8 changes: 7 additions & 1 deletion ci/dagger.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "interlink",
"sdk": "go",
"dependencies": [
{
"name": "k3s",
"source": "github.com/marcosnils/daggerverse/k3s@ce8fe35d309bdb29f9983f7d90ea518e724534fe"
}
],
"source": ".",
"engineVersion": "v0.11.4"
"engineVersion": "v0.13.0"
}
52 changes: 32 additions & 20 deletions ci/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,46 @@ module dagger/interlink
go 1.22.2

require (
github.com/99designs/gqlgen v0.17.44
github.com/99designs/gqlgen v0.17.49
github.com/Khan/genqlient v0.7.0
github.com/vektah/gqlparser/v2 v2.5.11
go.opentelemetry.io/otel v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0
go.opentelemetry.io/otel/sdk v1.24.0
go.opentelemetry.io/otel/trace v1.24.0
github.com/vektah/gqlparser/v2 v2.5.16
go.opentelemetry.io/otel v1.27.0
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0
go.opentelemetry.io/otel/log v0.3.0
go.opentelemetry.io/otel/sdk v1.27.0
go.opentelemetry.io/otel/sdk/log v0.3.0
go.opentelemetry.io/otel/trace v1.27.0
go.opentelemetry.io/proto/otlp v1.3.1
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/sync v0.7.0
google.golang.org/grpc v1.63.2
google.golang.org/grpc v1.64.0
)

require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/sosodev/duration v1.2.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // indirect
google.golang.org/protobuf v1.33.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/sosodev/duration v1.3.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
google.golang.org/protobuf v1.34.1 // indirect
)

replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88

replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0

replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0

replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0
Loading

0 comments on commit 3218a60

Please sign in to comment.