Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
dciangot authored Mar 26, 2024
2 parents 7d7215c + c2739b8 commit 42f8a31
Show file tree
Hide file tree
Showing 4,514 changed files with 6,930 additions and 1,309,791 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
10 changes: 5 additions & 5 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
#cache: yarn

- name: Install dependencies
run: cd docs-new && yarn install --frozen-lockfile
run: cd docs && yarn install --frozen-lockfile
- name: Build website
run: cd docs-new && yarn build
run: cd docs && yarn build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
Expand All @@ -33,11 +33,11 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs-new/build
publish_dir: ./docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
user_email: 41898282+github-actions[bot]@users.noreply.github.com
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
vendor
dist/*
__pycache__/*
vendor/*
bin
build.sh
sidecars/slurm/.*
Expand All @@ -17,3 +21,7 @@ serviceaccount.yaml
kustomizations_tmp
ca.*
condor*
test-deployment.yaml
test-pod.yaml
examples/interlink-slurm/vk/*
examples/sidecar/templates/python/__pycache__/*
18 changes: 16 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ builds:
- amd64
- ppc64le
main: ./cmd/interlink
- id: "interlink-install"
binary: interlink-install
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- arm64
- amd64
- ppc64le
main: ./cmd/installer
- id: "interlink-sidecar-docker"
binary: interlink-sidecar-docker
env:
Expand All @@ -54,12 +66,14 @@ builds:
main: ./cmd/sidecars/slurm
archives:
- name_template: >-
{{ .ProjectName }}_
{{ .Binary }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "linux" }}Linux
{{- else if eq .Arch "darwin" }}MacOS
{{- else }}{{ .Arch }}{{ end }}
format: binary
checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -68,7 +82,7 @@ changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^docs_new:'
- '^test:'

# modelines, feel free to remove those if you don't want/use them:
Expand Down
3 changes: 1 addition & 2 deletions .idea/interLink.iml

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

22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
all: interlink vk sidecars
all: interlink vk sidecars installer

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

vk:
go build -o bin/vk
CGO_ENABLED=0 OOS=linux go build -o bin/vk

sidecars:
GOOS=linux GOARCH=amd64 go build -o bin/docker-sd cmd/sidecars/docker/main.go
GOOS=linux GOARCH=amd64 go build -o bin/slurm-sd cmd/sidecars/slurm/main.go
CGO_ENABLED=0 GOOS=linux go build -o bin/docker-sd cmd/sidecars/docker/main.go
CGO_ENABLED=0 GOOS=linux go build -o bin/slurm-sd cmd/sidecars/slurm/main.go

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

clean:
rm -rf ./bin

all_ppc64le:
GOOS=linux GOARCH=ppc64le go build -o bin/interlink cmd/interlink/main.go
GOOS=linux GOARCH=ppc64le go build -o bin/vk
GOOS=linux GOARCH=ppc64le go build -o bin/docker-sd cmd/sidecars/docker/main.go
GOOS=linux GOARCH=ppc64le go build -o bin/slurm-sd cmd/sidecars/slurm/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o bin/interlink cmd/interlink/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o bin/vk
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o bin/docker-sd cmd/sidecars/docker/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o bin/slurm-sd cmd/sidecars/slurm/main.go

start_interlink_slurm:
./bin/interlink &> ./logs/interlink.log &
Expand All @@ -26,3 +29,4 @@ start_interlink_slurm:
start_interlink_docker:
./bin/interlink &> ./logs/interlink.log &
./bin/docker-sd &> ./logs/docker-sd.log &

20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
![Interlink logo](./docs/imgs/interlink_logo.png)
![Interlink logo](./docs/static/img/interlink_logo.png)

## :information_source: Overview

### Watch for a quick tour
[![Introducing interLink](./docs/imgs/Phenomenal_20231211_063311_0000.png)](https://youtu.be/-djIQGPvYdI?si=eq_qXylYH_KczFeQ)


### Introduction
InterLink aims to provide an abstraction for the execution of a Kubernetes pod on any remote resource capable of managing a Container execution lifecycle.
We target to facilitate the development of provider specific plugins, so the resource providers can leverage the power of virtual kubelet without a black belt in kubernetes internals.

The project consists of two main components:

- __A Kubernetes Virtual Node:__ based on the [VirtualKubelet](https://virtual-kubelet.io/) technology. Translating request for a kubernetes pod execution into a remote call to the interLink API server.
- __The interLink API server:__ a modular and pluggable REST server where you can create your own Container manager plugin (called sidecars), or use the existing ones: remote docker execution on a remote host, singularity Container on a remote SLURM batch system.

The project got inspired by the [KNoC](https://github.com/CARV-ICS-FORTH/knoc) project, enhancing that with the implemention a generic API layer b/w the virtual kubelet component and the provider logic for the container lifecycle management.

![drawing](docs/imgs/InterLink.svg)


## :fast_forward: Quick Start

Give it a stab at interLink [website](https://dciangot.github.io/interLink/). You will deploy on your laptop a fully emulated instance of a kubernetes cluster able to offload the execution of a pod to a SLURM cluster

## GitHub repository management rules
The project got inspired by the [KNoC](https://github.com/CARV-ICS-FORTH/knoc) and [Liqo](https://github.com/liqotech/liqo/tree/master) projects, enhancing that with the implemention a generic API layer b/w the virtual kubelet component and the provider logic for the container lifecycle management.

All changes should go through Pull Requests.
For usage and development guides please refer to [our website](https://intertwin-eu.github.io/interLink/)

1 change: 1 addition & 0 deletions Systemd Units/.envs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INTERLINKCONFIGPATH=/etc/interlink/configs/InterLinkConfig.yaml
20 changes: 20 additions & 0 deletions Systemd Units/.envs_oauth
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
OAUTH2_PROXY_CLIENT_ID= #CLIENT_ID
OAUTH2_PROXY_CLIENT_SECRET= #CLIENT_SECRET
OAUTH2_PROXY_HTTP_ADDRESS=0.0.0.0:8080
OAUTH2_PROXY_OIDC_ISSUER_URL=https://dodas-iam.cloud.cnaf.infn.it/
OAUTH2_PROXY_PASS_AUTHORIZATION_HEADER=true
OAUTH2_PROXY_PROVIDER=oidc
OAUTH2_PROXY_REDIRECT_URL=http://localhost:8081
OAUTH2_PROXY_OIDC_EXTRA_AUDIENCE=intertw-vk
OAUTH2_PROXY_UPSTREAM=http://0.0.0.0:30444
OAUTH2_PROXY_ALLOWED_GROUP=intw
OAUTH2_PROXY_VALIDATE_URL=https://dodas-iam.cloud.cnaf.infn.it/token
OAUTH2_PROXY_OIDC_GROUP_CLAIMS=groups
OAUTH2_PROXY_EMAIL_DOMAINS=*
OAUTH2_PROXY_COOKIE_SECRET=2ISpxtx19fm7kJlhbgC4qnkuTlkGrshY82L3nfCSKy4==
OAUTH2_PROXY_SKIP_AUTH_ROUTE="*='*'"
OAUTH2_PROXY_FORCE_HTTPS=true
OAUTH2_PROXY_HTTPS_ADDRESS=0.0.0.0:30443
OAUTH2_PROXY_TLS_FILE_CERT= #CERT_FILE
OAUTH2_PROXY_TLS_KEY_FILE= #KEY_FILE
OAUTH2_PROXY_SKIP_JWT_BEARER_TOKENS=true
26 changes: 26 additions & 0 deletions Systemd Units/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
These are handful Systemd Units needed to automatically start InterLink and Sidecars at system startup

Just edit the .envs and .envs-oauth files with the ENVS you want to use within the InterLink API, your Sidecar and your Oauth2 Proxy; after that ```cd Systemd\ Units``` and
```bash
./install-script.sh install slurm
```

The install comand will proceed to build binaries from scratch and to move them and configs to /etc/interlink. Also the Systemd Units will be copied to /etc/systemd/system.

After that, you can run both interlink and the sidecar by running

```bash
./install-script.sh start slurm
```

and you will be able to monitor your service directly from systemctl by

```systemctl status interlink.service``` or ```systemctl status slurm-sidecar.service```

If you want to automatically start these service on startup, just use the enable argument:

```bash
./install-script.sh enable slurm
```

N.B.: you will need for user to have sudo access!
13 changes: 13 additions & 0 deletions Systemd Units/docker-sidecar.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=This Unit is needed to automatically start the Virtual Kubelet at system startup
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/etc/interlink/bin
ExecStart=/etc/interlink/bin/docker-sd
EnvironmentFile=/etc/interlink/.envs

[Install]
WantedBy=multi-user.target
Loading

0 comments on commit 42f8a31

Please sign in to comment.