diff --git a/.github/workflows/example-caddy2.7-go1.21-stable.yaml b/.github/workflows/example-caddy2.7-go1.21-stable.yaml index 8b7f839f..ba067587 100644 --- a/.github/workflows/example-caddy2.7-go1.21-stable.yaml +++ b/.github/workflows/example-caddy2.7-go1.21-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-caddy2.7-go1.21-staging.yaml b/.github/workflows/example-caddy2.7-go1.21-staging.yaml index d9fb6724..ba555cb5 100644 --- a/.github/workflows/example-caddy2.7-go1.21-staging.yaml +++ b/.github/workflows/example-caddy2.7-go1.21-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-dragonflydb-stable.yaml b/.github/workflows/example-dragonflydb-stable.yaml index c8bde9c7..505e38df 100644 --- a/.github/workflows/example-dragonflydb-stable.yaml +++ b/.github/workflows/example-dragonflydb-stable.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: - branches: [ mariaciobanoiu8/dragonflydb ] + branches: [ main ] paths: - '.github/workflows/example-dragonflydb-stable.yaml' - 'dragonflydb/**' @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -52,7 +55,7 @@ jobs: kraft cloud deploy \ --no-start \ --name dragonflydb-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ + --runtime index.unikraft.io/official-testing/base-compat:latest \ --subdomain dragonflydb-${GITHUB_RUN_ID} \ -p 443:6379 \ -M 512 \ diff --git a/.github/workflows/example-dragonflydb-staging.yaml b/.github/workflows/example-dragonflydb-staging.yaml index 1675d0f9..90e2bffb 100644 --- a/.github/workflows/example-dragonflydb-staging.yaml +++ b/.github/workflows/example-dragonflydb-staging.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: - branches: [ mariaciobanoiu8/dragonflydb ] + branches: [ main ] paths: - '.github/workflows/example-dragonflydb-staging.yaml' - 'dragonflydb/**' @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-duckdb-go-stable.yaml b/.github/workflows/example-duckdb-go1.21-stable.yaml similarity index 58% rename from .github/workflows/example-duckdb-go-stable.yaml rename to .github/workflows/example-duckdb-go1.21-stable.yaml index 6a726d62..8475120a 100644 --- a/.github/workflows/example-duckdb-go-stable.yaml +++ b/.github/workflows/example-duckdb-go1.21-stable.yaml @@ -1,26 +1,29 @@ -name: examples/duckdb-go (stable) +name: examples/duckdb-go1.21 (stable) on: workflow_dispatch: push: - branches: [ mariaciobanoiu8/duckdb-go ] + branches: [ main ] paths: - - '.github/workflows/example-duckdb-go-stable.yaml' - - 'duckdb-go/**' - - '!duckdb-go/README.md' + - '.github/workflows/example-duckdb-go1.21-stable.yaml' + - 'duckdb-go1.21/**' + - '!duckdb-go1.21/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-duckdb-go-stable.yaml' - - 'duckdb-go/**' - - '!duckdb-go/README.md' + - '.github/workflows/example-duckdb-go1.21-stable.yaml' + - 'duckdb-go1.21/**' + - '!duckdb-go1.21/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd duckdb-go; + cd duckdb-go1.21; kraft cloud deploy \ --no-start \ - --name duckdb-go-${GITHUB_RUN_ID} \ + --name duckdb-go121-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain duckdb-go-${GITHUB_RUN_ID} \ + --subdomain duckdb-go121-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 256 \ .; # wait for the instance to start - kraft cloud vm start -w 5s duckdb-go-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s duckdb-go121-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://duckdb-go-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://duckdb-go121-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop duckdb-go-${GITHUB_RUN_ID} || true; - kraft cloud vm logs duckdb-go-${GITHUB_RUN_ID} || true; - kraft cloud vm rm duckdb-go-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/duckdb-go-${GITHUB_RUN_ID} || true; + kraft cloud vm stop duckdb-go121-${GITHUB_RUN_ID} || true; + kraft cloud vm logs duckdb-go121-${GITHUB_RUN_ID} || true; + kraft cloud vm rm duckdb-go121-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/duckdb-go121-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-duckdb-go-staging.yaml b/.github/workflows/example-duckdb-go1.21-staging.yaml similarity index 58% rename from .github/workflows/example-duckdb-go-staging.yaml rename to .github/workflows/example-duckdb-go1.21-staging.yaml index 945f4a49..ce00c29a 100644 --- a/.github/workflows/example-duckdb-go-staging.yaml +++ b/.github/workflows/example-duckdb-go1.21-staging.yaml @@ -1,26 +1,29 @@ -name: examples/duckdb-go (staging) +name: examples/duckdb-go1.21 (staging) on: workflow_dispatch: push: - branches: [ mariaciobanoiu8/duckdb-go ] + branches: [ main ] paths: - - '.github/workflows/example-duckdb-go-staging.yaml' - - 'duckdb-go/**' - - '!duckdb-go/README.md' + - '.github/workflows/example-duckdb-go1.21-staging.yaml' + - 'duckdb-go1.21/**' + - '!duckdb-go1.21/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-duckdb-go-staging.yaml' - - 'duckdb-go/**' - - '!duckdb-go/README.md' + - '.github/workflows/example-duckdb-go1.21-staging.yaml' + - 'duckdb-go1.21/**' + - '!duckdb-go1.21/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd duckdb-go; + cd duckdb-go1.21; kraft cloud deploy \ --no-start \ - --name duckdb-go-${GITHUB_RUN_ID} \ + --name duckdb-go121-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain duckdb-go-${GITHUB_RUN_ID} \ + --subdomain duckdb-go121-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 256 \ .; # wait for the instance to start - kraft cloud vm start -w 5s duckdb-go-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s duckdb-go121-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://duckdb-go-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://duckdb-go121-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop duckdb-go-${GITHUB_RUN_ID} || true; - kraft cloud vm logs duckdb-go-${GITHUB_RUN_ID} || true; - kraft cloud vm rm duckdb-go-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/duckdb-go-${GITHUB_RUN_ID} || true; + kraft cloud vm stop duckdb-go121-${GITHUB_RUN_ID} || true; + kraft cloud vm logs duckdb-go121-${GITHUB_RUN_ID} || true; + kraft cloud vm rm duckdb-go121-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/duckdb-go121-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-grafana-stable.yaml b/.github/workflows/example-grafana-stable.yaml index be2341bd..8f30ef3f 100644 --- a/.github/workflows/example-grafana-stable.yaml +++ b/.github/workflows/example-grafana-stable.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: - branches: [ ada-dev1419/grafana ] + branches: [ main ] paths: - '.github/workflows/example-grafana-stable.yaml' - 'grafana/**' @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-grafana-staging.yaml b/.github/workflows/example-grafana-staging.yaml index f3e9d8d0..421cd423 100644 --- a/.github/workflows/example-grafana-staging.yaml +++ b/.github/workflows/example-grafana-staging.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: - branches: [ ada-dev1419/grafana ] + branches: [ main ] paths: - '.github/workflows/example-grafana-staging.yaml' - 'grafana/**' @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-http-dotnet8.0-stable.yaml b/.github/workflows/example-http-dotnet8.0-stable.yaml deleted file mode 100644 index 2a14d16f..00000000 --- a/.github/workflows/example-http-dotnet8.0-stable.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: examples/http-dotnet8.0 (stable) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet8.0-stable.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet8.0-stable.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe - cd http-dotnet8.0 - kraft cloud deploy \ - --no-start \ - --name http-dotnet8-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-dotnet8-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - . - kraft cloud vm start -w 5s http-dotnet8-${GITHUB_RUN_ID} - sleep 5 - curl -Lv --fail-with-body --max-time 10 https://http-dotnet8-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe - kraft cloud vm stop http-dotnet8-${GITHUB_RUN_ID} || true - kraft cloud vm logs http-dotnet8-${GITHUB_RUN_ID} || true - kraft cloud vm rm http-dotnet8-${GITHUB_RUN_ID} || true - kraft cloud img rm index.unikraft.io/test/http-dotnet8-${GITHUB_RUN_ID} || true diff --git a/.github/workflows/example-http-dotnet8.0-staging.yaml b/.github/workflows/example-http-dotnet8.0-staging.yaml deleted file mode 100644 index f5a03388..00000000 --- a/.github/workflows/example-http-dotnet8.0-staging.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: examples/http-dotnet8.0 (staging) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet8.0-staging.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet8.0-staging.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe - cd http-dotnet8.0 - kraft cloud deploy \ - --no-start \ - --name http-dotnet8-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-dotnet8-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - . - kraft cloud vm start -w 5s http-dotnet8-${GITHUB_RUN_ID} - sleep 5 - curl -Lv --fail-with-body --max-time 10 https://http-dotnet8-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe - kraft cloud vm stop http-dotnet8-${GITHUB_RUN_ID} || true - kraft cloud vm logs http-dotnet8-${GITHUB_RUN_ID} || true - kraft cloud vm rm http-dotnet8-${GITHUB_RUN_ID} || true - kraft cloud img rm index.unikraft.io/test/http-dotnet8-${GITHUB_RUN_ID} || true diff --git a/.github/workflows/example-http-dotnet80-stable.yaml b/.github/workflows/example-http-dotnet80-stable.yaml deleted file mode 100644 index 699fd168..00000000 --- a/.github/workflows/example-http-dotnet80-stable.yaml +++ /dev/null @@ -1,72 +0,0 @@ -name: examples/http-dotnet8.0 (stable) - -on: - workflow_dispatch: - - push: - branches: [ ada-dev1419/http-dotnet8.0 ] - paths: - - '.github/workflows/example-http-dotnet80-stable.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet80-stable.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - cd http-dotnet8.0; - kraft cloud deploy \ - --no-start \ - --name http-dotnet80-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-dotnet80-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - # wait for the instance to start - kraft cloud vm start -w 5s http-dotnet80-${GITHUB_RUN_ID}; - sleep 5; - curl -Lv --fail-with-body --max-time 10 https://http-dotnet80-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - kraft cloud vm stop http-dotnet80-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-dotnet80-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-dotnet80-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-dotnet80-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-dotnet80-staging.yaml b/.github/workflows/example-http-dotnet80-staging.yaml deleted file mode 100644 index 58966c62..00000000 --- a/.github/workflows/example-http-dotnet80-staging.yaml +++ /dev/null @@ -1,72 +0,0 @@ -name: examples/http-dotnet8.0 (staging) - -on: - workflow_dispatch: - - push: - branches: [ ada-dev1419/http-dotnet8.0 ] - paths: - - '.github/workflows/example-http-dotnet80-staging.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet80-staging.yaml' - - 'http-dotnet8.0/**' - - '!http-dotnet8.0/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - cd http-dotnet8.0; - kraft cloud deploy \ - --no-start \ - --name http-dotnet80-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-dotnet80-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - # wait for the instance to start - kraft cloud vm start -w 5s http-dotnet80-${GITHUB_RUN_ID}; - sleep 5; - curl -Lv --fail-with-body --max-time 10 https://http-dotnet80-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - kraft cloud vm stop http-dotnet80-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-dotnet80-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-dotnet80-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-dotnet80-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-elixir1.16-stable.yaml b/.github/workflows/example-http-elixir1.16-stable.yaml deleted file mode 100644 index bc5ddc8a..00000000 --- a/.github/workflows/example-http-elixir1.16-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-elixir1.16 (stable) - -on: - workflow_dispatch: - - push: - branches: [ mariaciobanoiu8/http-elixir1.16 ] - paths: - - '.github/workflows/example-http-elixir1.16-stable.yaml' - - 'http-elixir1.16/**' - - '!http-elixir1.16/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-elixir1.16-stable.yaml' - - 'http-elixir1.16/**' - - '!http-elixir1.16/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-elixir1.16; - - kraft cloud deploy \ - --no-start \ - --name http-elixir1.16-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-elixir1.16-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 1Gi \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-elixir1.16-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-elixir1.16-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-elixir1.16-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-elixir1.16-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-elixir1.16-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-elixir1.16-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-elixir1.16-staging.yaml b/.github/workflows/example-http-elixir1.16-staging.yaml deleted file mode 100644 index 62573061..00000000 --- a/.github/workflows/example-http-elixir1.16-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-elixir1.16 (staging) - -on: - workflow_dispatch: - - push: - branches: [ mariaciobanoiu8/http-elixir1.16 ] - paths: - - '.github/workflows/example-http-elixir1.16-staging.yaml' - - 'http-elixir1.16/**' - - '!http-elixir1.16/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-elixir1.16-staging.yaml' - - 'http-elixir1.16/**' - - '!http-elixir1.16/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-elixir1.16; - - kraft cloud deploy \ - --no-start \ - --name http-elixir1.16-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-elixir1.16-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 1Gi \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-elixir1.16-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-elixir1.16-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-elixir1.16-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-elixir1.16-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-elixir1.16-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-elixir1.16-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-elixir1.17-stable.yaml b/.github/workflows/example-http-elixir1.17-stable.yaml deleted file mode 100644 index aac49e79..00000000 --- a/.github/workflows/example-http-elixir1.17-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-elixir1.17 (stable) - -on: - workflow_dispatch: - - push: - branches: [main] - paths: - - '.github/workflows/example-http-elixir1.17-stable.yaml' - - 'http-elixir1.17/**' - - '!http-elixir1.17/README.md' - - pull_request: - types: [opened, synchronize, reopened] - branches: [main] - paths: - - '.github/workflows/example-http-elixir1.17-stable.yaml' - - 'http-elixir1.17/**' - - '!http-elixir1.17/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-elixir1.17; - - kraft cloud deploy \ - --no-start \ - --name http-elixir117-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-elixir117-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 1Gi \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-elixir117-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-elixir117-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-elixir117-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-elixir117-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-elixir117-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-elixir117-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-elixir1.17-staging.yaml b/.github/workflows/example-http-elixir1.17-staging.yaml deleted file mode 100644 index 3f620457..00000000 --- a/.github/workflows/example-http-elixir1.17-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-elixir1.17 (staging) - -on: - workflow_dispatch: - - push: - branches: [main] - paths: - - '.github/workflows/example-http-elixir1.17-staging.yaml' - - 'http-elixir1.17/**' - - '!http-elixir1.17/README.md' - - pull_request: - types: [opened, synchronize, reopened] - branches: [main] - paths: - - '.github/workflows/example-http-elixir1.17-staging.yaml' - - 'http-elixir1.17/**' - - '!http-elixir1.17/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-elixir1.17; - - kraft cloud deploy \ - --no-start \ - --name http-elixir117-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-elixir117-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 1Gi \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-elixir117-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-elixir117-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-elixir117-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-elixir117-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-elixir117-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-elixir117-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-erlang26.2-stable.yaml b/.github/workflows/example-http-erlang26.2-stable.yaml deleted file mode 100644 index fe253cbd..00000000 --- a/.github/workflows/example-http-erlang26.2-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-erlang26.2 (stable) - -on: - workflow_dispatch: - - push: - branches: [ mariaciobanoiu8/http-erlang26.2 ] - paths: - - '.github/workflows/example-http-erlang26.2-stable.yaml' - - 'http-erlang26.2/**' - - '!http-erlang26.2/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-erlang26.2-stable.yaml' - - 'http-erlang26.2/**' - - '!http-erlang26.2/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-erlang26.2; - - kraft cloud deploy \ - --no-start \ - --name http-erlang26.2-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-erlang26.2-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-erlang26.2-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-erlang26.2-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-erlang26.2-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-erlang26.2-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-erlang26.2-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-erlang26.2-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-erlang26.2-staging.yaml b/.github/workflows/example-http-erlang26.2-staging.yaml deleted file mode 100644 index bd18b04d..00000000 --- a/.github/workflows/example-http-erlang26.2-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-erlang26.2 (staging) - -on: - workflow_dispatch: - - push: - branches: [ mariaciobanoiu8/http-erlang26.2 ] - paths: - - '.github/workflows/example-http-erlang26.2-staging.yaml' - - 'http-erlang26.2/**' - - '!http-erlang26.2/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-erlang26.2-staging.yaml' - - 'http-erlang26.2/**' - - '!http-erlang26.2/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-erlang26.2; - - kraft cloud deploy \ - --no-start \ - --name http-erlang26.2-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-erlang26.2-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-erlang26.2-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-erlang26.2-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-erlang26.2-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-erlang26.2-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-erlang26.2-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-erlang26.2-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-java17-stable.yaml b/.github/workflows/example-http-java17-stable.yaml deleted file mode 100644 index bd515005..00000000 --- a/.github/workflows/example-http-java17-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-java17 (stable) - -on: - workflow_dispatch: - - push: - branches: [ mariaciobanoiu8/http-java17 ] - paths: - - '.github/workflows/example-http-java17-stable.yaml' - - 'http-java17/**' - - '!http-java17/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-java17-stable.yaml' - - 'http-java17/**' - - '!http-java17/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-java17; - - kraft cloud deploy \ - --no-start \ - --name http-java17-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-java17-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 1Gi \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-java17-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-java17-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-java17-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-java17-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-java17-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-java17-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-java17-staging.yaml b/.github/workflows/example-http-java17-staging.yaml deleted file mode 100644 index ae3731ae..00000000 --- a/.github/workflows/example-http-java17-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-java17 (staging) - -on: - workflow_dispatch: - - push: - branches: [ mariaciobanoiu8/http-java17 ] - paths: - - '.github/workflows/example-http-java17-staging.yaml' - - 'http-java17/**' - - '!http-java17/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-java17-staging.yaml' - - 'http-java17/**' - - '!http-java17/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-java17; - - kraft cloud deploy \ - --no-start \ - --name http-java17-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-java17-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 1Gi \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-java17-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-java17-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-java17-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-java17-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-java17-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-java17-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-node25-stable.yaml b/.github/workflows/example-http-node25-stable.yaml deleted file mode 100644 index e31292fe..00000000 --- a/.github/workflows/example-http-node25-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-node25 (stable) - -on: - workflow_dispatch: - - push: - branches: [main] - paths: - - '.github/workflows/example-http-node25-stable.yaml' - - 'http-node25/**' - - '!http-node25/README.md' - - pull_request: - types: [opened, synchronize, reopened] - branches: [main] - paths: - - '.github/workflows/example-http-node25-stable.yaml' - - 'http-node25/**' - - '!http-node25/README.md' - - schedule: - - cron: '15 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-node25; - - kraft cloud deploy \ - --no-start \ - --name http-node25-stable-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-node25-stable-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-node25-stable-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-node25-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-node25-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-node25-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-node25-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-node25-stable-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-node25-staging.yaml b/.github/workflows/example-http-node25-staging.yaml deleted file mode 100644 index d20a430a..00000000 --- a/.github/workflows/example-http-node25-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-node25 (staging) - -on: - workflow_dispatch: - - push: - branches: [main] - paths: - - '.github/workflows/example-http-node25-staging.yaml' - - 'http-node25/**' - - '!http-node25/README.md' - - pull_request: - types: [opened, synchronize, reopened] - branches: [main] - paths: - - '.github/workflows/example-http-node25-staging.yaml' - - 'http-node25/**' - - '!http-node25/README.md' - - schedule: - - cron: '15 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd http-node25; - - kraft cloud deploy \ - --no-start \ - --name http-node25-staging-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-node25-staging-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-node25-staging-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-node25-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-node25-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-node25-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-node25-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-node25-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-python3.12-flask3.0-stable.yaml b/.github/workflows/example-http-python3.12-flask3.0-stable.yaml deleted file mode 100644 index e130a315..00000000 --- a/.github/workflows/example-http-python3.12-flask3.0-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-python3.12-flask3.0 (stable) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-http-python3.12-flask3.0-stable.yaml' - - 'http-python3.12-flask3.0/**' - - '!http-python3.12-flask3.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-python3.12-flask3.0-stable.yaml' - - 'http-python3.12-flask3.0/**' - - '!http-python3.12-flask3.0/README.md' - - schedule: - - cron: '30 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd httpserver-python3.12-flask3.0; - - kraft cloud deploy \ - --no-start \ - --name http-python312-flask30-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-python312-flask30-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-python312-flask30-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-python312-flask30-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-python312-flask30-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-python312-flask30-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-python312-flask30-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-python312-flask30-${GITHUB_RUN_ID} || true; \ No newline at end of file diff --git a/.github/workflows/example-http-python3.12-flask3.0-staging.yaml b/.github/workflows/example-http-python3.12-flask3.0-staging.yaml deleted file mode 100644 index 17c9947d..00000000 --- a/.github/workflows/example-http-python3.12-flask3.0-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/http-python3.12-flask3.0 (staging) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-http-python3.12-flask3.0-staging.yaml' - - 'http-python3.12-flask3.0/**' - - '!http-python3.12-flask3.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-python3.12-flask3.0-staging.yaml' - - 'http-python3.12-flask3.0/**' - - '!http-python3.12-flask3.0/README.md' - - schedule: - - cron: '30 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd httpserver-python3.12-flask3.0; - - kraft cloud deploy \ - --no-start \ - --name http-python312-flask30-staging-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-python312-flask30-staging-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s http-python312-flask30-staging-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://http-python312-flask30-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop http-python312-flask30-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-python312-flask30-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-python312-flask30-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-python312-flask30-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml b/.github/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml index f62b7924..e557cac2 100644 --- a/.github/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml +++ b/.github/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml b/.github/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml index 0ba99893..ac2e0a69 100644 --- a/.github/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml +++ b/.github/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-bun-stable.yaml b/.github/workflows/example-httpserver-bun-stable.yaml similarity index 55% rename from .github/workflows/example-bun-stable.yaml rename to .github/workflows/example-httpserver-bun-stable.yaml index 91146d4a..907a3b99 100644 --- a/.github/workflows/example-bun-stable.yaml +++ b/.github/workflows/example-httpserver-bun-stable.yaml @@ -1,26 +1,29 @@ -name: examples/bun (stable) +name: examples/httpserver-bun (stable) on: workflow_dispatch: push: - branches: [ bun ] + branches: [ main ] paths: - - '.github/workflows/example-bun-stable.yaml' - - 'bun/**' - - '!bun/README.md' + - '.github/workflows/example-httpserver-bun-stable.yaml' + - 'httpserver-bun/**' + - '!httpserver-bun/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-bun-stable.yaml' - - 'bun/**' - - '!bun/README.md' + - '.github/workflows/example-httpserver-bun-stable.yaml' + - 'httpserver-bun/**' + - '!httpserver-bun/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd bun; + cd httpserver-bun; kraft cloud deploy \ --no-start \ - --name bun-${GITHUB_RUN_ID} \ + --name httpserver-bun-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain bun-${GITHUB_RUN_ID} \ + --subdomain httpserver-bun-${GITHUB_RUN_ID} \ -p 443:3000 \ -M 512 \ .; # wait for the instance to start - kraft cloud vm start -w 5s bun-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-bun-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://bun-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-bun-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop bun-${GITHUB_RUN_ID} || true; - kraft cloud vm logs bun-${GITHUB_RUN_ID} || true; - kraft cloud vm rm bun-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/bun-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-bun-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-bun-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-bun-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-bun-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-bun-staging.yaml b/.github/workflows/example-httpserver-bun-staging.yaml similarity index 54% rename from .github/workflows/example-bun-staging.yaml rename to .github/workflows/example-httpserver-bun-staging.yaml index 410a1c9b..751639e9 100644 --- a/.github/workflows/example-bun-staging.yaml +++ b/.github/workflows/example-httpserver-bun-staging.yaml @@ -1,26 +1,29 @@ -name: examples/bun (staging) +name: examples/httpserver-bun (staging) on: workflow_dispatch: push: - branches: [ bun ] + branches: [ main ] paths: - - '.github/workflows/example-bun-staging.yaml' - - 'bun/**' - - '!bun/README.md' + - '.github/workflows/example-httpserver-bun-staging.yaml' + - 'httpserver-bun/**' + - '!httpserver-bun/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-bun-staging.yaml' - - 'bun/**' - - '!bun/README.md' + - '.github/workflows/example-httpserver-bun-staging.yaml' + - 'httpserver-bun/**' + - '!httpserver-bun/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd bun; + cd httpserver-bun; kraft cloud deploy \ --no-start \ - --name bun-${GITHUB_RUN_ID} \ + --name httpserver-bun-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain bun-${GITHUB_RUN_ID} \ + --subdomain httpserver-bun-${GITHUB_RUN_ID} \ -p 443:3000 \ -M 512 \ .; # wait for the instance to start - kraft cloud vm start -w 5s bun-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-bun-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://bun-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-bun-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop bun-${GITHUB_RUN_ID} || true; - kraft cloud vm logs bun-${GITHUB_RUN_ID} || true; - kraft cloud vm rm bun-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/bun-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-bun-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-bun-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-bun-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-bun-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-dotnet10.0-stable.yaml b/.github/workflows/example-httpserver-dotnet10.0-stable.yaml similarity index 81% rename from .github/workflows/example-http-dotnet10.0-stable.yaml rename to .github/workflows/example-httpserver-dotnet10.0-stable.yaml index 493d948b..02d5050c 100644 --- a/.github/workflows/example-http-dotnet10.0-stable.yaml +++ b/.github/workflows/example-httpserver-dotnet10.0-stable.yaml @@ -1,70 +1,73 @@ -name: examples/http-dotnet10.0 (stable) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet10.0-stable.yaml' - - 'http-dotnet10.0/**' - - '!http-dotnet10.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet10.0-stable.yaml' - - 'http-dotnet10.0/**' - - '!http-dotnet10.0/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe - cd http-dotnet10.0 - kraft cloud deploy \ - --no-start \ - --name http-dotnet10-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-dotnet10-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - . - kraft cloud vm start -w 5s http-dotnet10-${GITHUB_RUN_ID} - sleep 5 - curl -Lv --fail-with-body --max-time 10 https://http-dotnet10-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe - kraft cloud vm stop http-dotnet10-${GITHUB_RUN_ID} || true - kraft cloud vm logs http-dotnet10-${GITHUB_RUN_ID} || true - kraft cloud vm rm http-dotnet10-${GITHUB_RUN_ID} || true - kraft cloud img rm index.unikraft.io/test/http-dotnet10-${GITHUB_RUN_ID} || true +name: examples/httpserver-dotnet10.0 (stable) + +on: + workflow_dispatch: + + push: + branches: [ main ] + paths: + - '.github/workflows/example-httpserver-dotnet10.0-stable.yaml' + - 'httpserver-dotnet10.0/**' + - '!httpserver-dotnet10.0/README.md' + + pull_request: + types: [ opened, synchronize, reopened ] + branches: [ main ] + paths: + - '.github/workflows/example-httpserver-dotnet10.0-stable.yaml' + - 'httpserver-dotnet10.0/**' + - '!httpserver-dotnet10.0/README.md' + + schedule: + - cron: '0 15 * * 1-5' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + cancel-in-progress: true + +env: + UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" + UKC_TOKEN: ${{ secrets.UKC_TOKEN }} + KRAFTKIT_NO_CHECK_UPDATES: true + KRAFTKIT_LOG_LEVEL: debug + +jobs: + integration: + timeout-minutes: 60 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Test + id: test + uses: unikraft/kraftkit@staging + with: + run: | + set -xe + cd httpserver-dotnet10.0 + kraft cloud deploy \ + --no-start \ + --name http-dotnet10-${GITHUB_RUN_ID} \ + --runtime index.unikraft.io/official-testing/base-compat:latest \ + --subdomain http-dotnet10-${GITHUB_RUN_ID} \ + -p 443:8080 \ + -M 512 \ + . + kraft cloud vm start -w 5s http-dotnet10-${GITHUB_RUN_ID} + sleep 5 + curl -Lv --fail-with-body --max-time 10 https://http-dotnet10-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + + - name: Cleanup + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe + kraft cloud vm stop http-dotnet10-${GITHUB_RUN_ID} || true + kraft cloud vm logs http-dotnet10-${GITHUB_RUN_ID} || true + kraft cloud vm rm http-dotnet10-${GITHUB_RUN_ID} || true + kraft cloud img rm index.unikraft.io/test/http-dotnet10-${GITHUB_RUN_ID} || true diff --git a/.github/workflows/example-http-dotnet10.0-staging.yaml b/.github/workflows/example-httpserver-dotnet10.0-staging.yaml similarity index 81% rename from .github/workflows/example-http-dotnet10.0-staging.yaml rename to .github/workflows/example-httpserver-dotnet10.0-staging.yaml index 4dc75d08..f24ca798 100644 --- a/.github/workflows/example-http-dotnet10.0-staging.yaml +++ b/.github/workflows/example-httpserver-dotnet10.0-staging.yaml @@ -1,70 +1,73 @@ -name: examples/http-dotnet10.0 (staging) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet10.0-staging.yaml' - - 'http-dotnet10.0/**' - - '!http-dotnet10.0/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-http-dotnet10.0-staging.yaml' - - 'http-dotnet10.0/**' - - '!http-dotnet10.0/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe - cd http-dotnet10.0 - kraft cloud deploy \ - --no-start \ - --name http-dotnet10-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-dotnet10-${GITHUB_RUN_ID} \ - -p 443:8080 \ - -M 512 \ - . - kraft cloud vm start -w 5s http-dotnet10-${GITHUB_RUN_ID} - sleep 5 - curl -Lv --fail-with-body --max-time 10 https://http-dotnet10-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe - kraft cloud vm stop http-dotnet10-${GITHUB_RUN_ID} || true - kraft cloud vm logs http-dotnet10-${GITHUB_RUN_ID} || true - kraft cloud vm rm http-dotnet10-${GITHUB_RUN_ID} || true - kraft cloud img rm index.unikraft.io/test/http-dotnet10-${GITHUB_RUN_ID} || true +name: examples/httpserver-dotnet10.0 (staging) + +on: + workflow_dispatch: + + push: + branches: [ main ] + paths: + - '.github/workflows/example-httpserver-dotnet10.0-staging.yaml' + - 'httpserver-dotnet10.0/**' + - '!httpserver-dotnet10.0/README.md' + + pull_request: + types: [ opened, synchronize, reopened ] + branches: [ main ] + paths: + - '.github/workflows/example-httpserver-dotnet10.0-staging.yaml' + - 'httpserver-dotnet10.0/**' + - '!httpserver-dotnet10.0/README.md' + + schedule: + - cron: '0 15 * * 1-5' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + cancel-in-progress: true + +env: + UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" + UKC_TOKEN: ${{ secrets.UKC_TOKEN }} + KRAFTKIT_NO_CHECK_UPDATES: true + KRAFTKIT_LOG_LEVEL: debug + +jobs: + integration: + timeout-minutes: 60 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Test + id: test + uses: unikraft/kraftkit@staging + with: + run: | + set -xe + cd httpserver-dotnet10.0 + kraft cloud deploy \ + --no-start \ + --name http-dotnet10-${GITHUB_RUN_ID} \ + --runtime index.unikraft.io/official-staging/base-compat:latest \ + --subdomain http-dotnet10-${GITHUB_RUN_ID} \ + -p 443:8080 \ + -M 512 \ + . + kraft cloud vm start -w 5s http-dotnet10-${GITHUB_RUN_ID} + sleep 5 + curl -Lv --fail-with-body --max-time 10 https://http-dotnet10-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + + - name: Cleanup + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe + kraft cloud vm stop http-dotnet10-${GITHUB_RUN_ID} || true + kraft cloud vm logs http-dotnet10-${GITHUB_RUN_ID} || true + kraft cloud vm rm http-dotnet10-${GITHUB_RUN_ID} || true + kraft cloud img rm index.unikraft.io/test/http-dotnet10-${GITHUB_RUN_ID} || true diff --git a/.github/workflows/example-node20-nextjs-stable.yaml b/.github/workflows/example-httpserver-elixir1.16-stable.yaml similarity index 54% rename from .github/workflows/example-node20-nextjs-stable.yaml rename to .github/workflows/example-httpserver-elixir1.16-stable.yaml index 7f9fc997..0e9d03c7 100644 --- a/.github/workflows/example-node20-nextjs-stable.yaml +++ b/.github/workflows/example-httpserver-elixir1.16-stable.yaml @@ -1,4 +1,4 @@ -name: examples/node20-nextjs (stable) +name: examples/httpserver-elixir1.16 (stable) on: workflow_dispatch: @@ -6,20 +6,23 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-node20-nextjs-stable.yaml' - - 'node20-nextjs/**' - - '!node20-nextjs/README.md' + - '.github/workflows/example-httpserver-elixir1.16-stable.yaml' + - 'httpserver-elixir1.16/**' + - '!httpserver-elixir1.16/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-node20-nextjs-stable.yaml' - - 'node20-nextjs/**' - - '!node20-nextjs/README.md' + - '.github/workflows/example-httpserver-elixir1.16-stable.yaml' + - 'httpserver-elixir1.16/**' + - '!httpserver-elixir1.16/README.md' schedule: - - cron: '15 16 * * 1-5' + - cron: '0 15 * * 1-5' + +permissions: + contents: read # Automatically cancel in-progress actions on the same branch concurrency: @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd node21-nextjs; + cd httpserver-elixir1.16; kraft cloud deploy \ --no-start \ - --name node20-nextjs-stable-${GITHUB_RUN_ID} \ + --name httpserver-elixir116-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain node20-nextjs-stable-${GITHUB_RUN_ID} \ + --subdomain httpserver-elixir116-${GITHUB_RUN_ID} \ -p 443:3000 \ - -M 756 \ + -M 1Gi \ .; # wait for the instance to start - kraft cloud vm start -w 5s node20-nextjs-stable-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-elixir116-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://node20-nextjs-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-elixir116-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop node20-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node20-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node20-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node20-nextjs-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-elixir116-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-elixir116-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-elixir116-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-elixir116-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node21-remix-staging.yaml b/.github/workflows/example-httpserver-elixir1.16-staging.yaml similarity index 54% rename from .github/workflows/example-node21-remix-staging.yaml rename to .github/workflows/example-httpserver-elixir1.16-staging.yaml index 79ca57ad..8bfa7666 100644 --- a/.github/workflows/example-node21-remix-staging.yaml +++ b/.github/workflows/example-httpserver-elixir1.16-staging.yaml @@ -1,4 +1,4 @@ -name: examples/node21-remix (staging) +name: examples/httpserver-elixir1.16 (staging) on: workflow_dispatch: @@ -6,20 +6,23 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-node21-remix-staging.yaml' - - 'node21-remix/**' - - '!node21-remix/README.md' + - '.github/workflows/example-httpserver-elixir1.16-staging.yaml' + - 'httpserver-elixir1.16/**' + - '!httpserver-elixir1.16/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-node21-remix-staging.yaml' - - 'node21-remix/**' - - '!node21-remix/README.md' + - '.github/workflows/example-httpserver-elixir1.16-staging.yaml' + - 'httpserver-elixir1.16/**' + - '!httpserver-elixir1.16/README.md' schedule: - - cron: '30 16 * * 1-5' + - cron: '0 15 * * 1-5' + +permissions: + contents: read # Automatically cancel in-progress actions on the same branch concurrency: @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd node21-remix; + cd httpserver-elixir1.16; kraft cloud deploy \ --no-start \ - --name node21-remix-staging-${GITHUB_RUN_ID} \ + --name httpserver-elixir116-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain node21-remix-staging-${GITHUB_RUN_ID} \ + --subdomain httpserver-elixir116-${GITHUB_RUN_ID} \ -p 443:3000 \ - -M 768 \ + -M 1Gi \ .; # wait for the instance to start - kraft cloud vm start -w 5s node21-remix-staging-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-elixir116-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://node21-remix-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-elixir116-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop node21-remix-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node21-remix-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node21-remix-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node21-remix-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-elixir116-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-elixir116-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-elixir116-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-elixir116-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-httpserver-perl5.38-stable.yaml b/.github/workflows/example-httpserver-erlang26.2-stable.yaml similarity index 55% rename from .github/workflows/example-httpserver-perl5.38-stable.yaml rename to .github/workflows/example-httpserver-erlang26.2-stable.yaml index 57512bba..1f29d905 100644 --- a/.github/workflows/example-httpserver-perl5.38-stable.yaml +++ b/.github/workflows/example-httpserver-erlang26.2-stable.yaml @@ -1,4 +1,4 @@ -name: examples/httpserver-perl5.38 (stable) +name: examples/httpserver-erlang26.2 (stable) on: workflow_dispatch: @@ -6,20 +6,23 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-httpserver-perl5.38-stable.yaml' - - 'httpserver-perl5.38/**' - - '!httpserver-perl5.38/README.md' + - '.github/workflows/example-httpserver-erlang26.2-stable.yaml' + - 'httpserver-erlang26.2/**' + - '!httpserver-erlang26.2/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-httpserver-perl5.38-stable.yaml' - - 'httpserver-perl5.38/**' - - '!httpserver-perl5.38/README.md' + - '.github/workflows/example-httpserver-erlang26.2-stable.yaml' + - 'httpserver-erlang26.2/**' + - '!httpserver-erlang26.2/README.md' schedule: - - cron: '15 15 * * 1-5' + - cron: '0 15 * * 1-5' + +permissions: + contents: read # Automatically cancel in-progress actions on the same branch concurrency: @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd httpserver-perl5.38; + cd httpserver-erlang26.2; kraft cloud deploy \ --no-start \ - --name httpserver-perl538-${GITHUB_RUN_ID} \ + --name httpserver-erlang262-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain httpserver-perl538-${GITHUB_RUN_ID} \ + --subdomain httpserver-erlang262-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 512 \ .; # wait for the instance to start - kraft cloud vm start -w 5s httpserver-perl538-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-erlang262-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://httpserver-perl538-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-erlang262-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop httpserver-perl538-${GITHUB_RUN_ID} || true; - kraft cloud vm logs httpserver-perl538-${GITHUB_RUN_ID} || true; - kraft cloud vm rm httpserver-perl538-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/httpserver-perl538-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-erlang262-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-erlang262-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-erlang262-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-erlang262-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-httpserver-perl5.38-staging.yaml b/.github/workflows/example-httpserver-erlang26.2-staging.yaml similarity index 55% rename from .github/workflows/example-httpserver-perl5.38-staging.yaml rename to .github/workflows/example-httpserver-erlang26.2-staging.yaml index 08e0adc6..5c286f69 100644 --- a/.github/workflows/example-httpserver-perl5.38-staging.yaml +++ b/.github/workflows/example-httpserver-erlang26.2-staging.yaml @@ -1,4 +1,4 @@ -name: examples/httpserver-perl5.38 (staging) +name: examples/httpserver-erlang26.2 (staging) on: workflow_dispatch: @@ -6,20 +6,23 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-httpserver-perl5.38-staging.yaml' - - 'httpserver-perl5.38/**' - - '!httpserver-perl5.38/README.md' + - '.github/workflows/example-httpserver-erlang26.2-staging.yaml' + - 'httpserver-erlang26.2/**' + - '!httpserver-erlang26.2/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-httpserver-perl5.38-staging.yaml' - - 'httpserver-perl5.38/**' - - '!httpserver-perl5.38/README.md' + - '.github/workflows/example-httpserver-erlang26.2-staging.yaml' + - 'httpserver-erlang26.2/**' + - '!httpserver-erlang26.2/README.md' schedule: - - cron: '15 15 * * 1-5' + - cron: '0 15 * * 1-5' + +permissions: + contents: read # Automatically cancel in-progress actions on the same branch concurrency: @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd httpserver-perl5.38; + cd httpserver-erlang26.2; kraft cloud deploy \ --no-start \ - --name httpserver-perl538-${GITHUB_RUN_ID} \ + --name httpserver-erlang262-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain httpserver-perl538-${GITHUB_RUN_ID} \ + --subdomain httpserver-erlang262-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 512 \ .; # wait for the instance to start - kraft cloud vm start -w 5s httpserver-perl538-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-erlang262-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://httpserver-perl538-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-erlang262-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop httpserver-perl538-${GITHUB_RUN_ID} || true; - kraft cloud vm logs httpserver-perl538-${GITHUB_RUN_ID} || true; - kraft cloud vm rm httpserver-perl538-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/httpserver-perl538-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-erlang262-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-erlang262-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-erlang262-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-erlang262-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-expressjs4.18-node21-stable.yaml b/.github/workflows/example-httpserver-expressjs4.18-node21-stable.yaml similarity index 80% rename from .github/workflows/example-expressjs4.18-node21-stable.yaml rename to .github/workflows/example-httpserver-expressjs4.18-node21-stable.yaml index 95ad5ade..1453bad2 100644 --- a/.github/workflows/example-expressjs4.18-node21-stable.yaml +++ b/.github/workflows/example-httpserver-expressjs4.18-node21-stable.yaml @@ -1,4 +1,4 @@ -name: examples/expressjs4.18-node21 (stable) +name: examples/httpserver-expressjs4.18-node21 (stable) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-expressjs4.18-node21-stable.yaml' - - 'expressjs4.18-node21/**' - - '!expressjs4.18-node21/README.md' + - '.github/workflows/example-httpserver-expressjs4.18-node21-stable.yaml' + - 'httpserver-expressjs4.18-node21/**' + - '!httpserver-expressjs4.18-node21/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-expressjs4.18-node21-stable.yaml' - - 'expressjs4.18-node21/**' - - '!expressjs4.18-node21/README.md' + - '.github/workflows/example-httpserver-expressjs4.18-node21-stable.yaml' + - 'httpserver-expressjs4.18-node21/**' + - '!httpserver-expressjs4.18-node21/README.md' schedule: - cron: '0 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd expressjs4.18-node21; + cd httpserver-expressjs4.18-node21; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-expressjs4.18-node21-staging.yaml b/.github/workflows/example-httpserver-expressjs4.18-node21-staging.yaml similarity index 80% rename from .github/workflows/example-expressjs4.18-node21-staging.yaml rename to .github/workflows/example-httpserver-expressjs4.18-node21-staging.yaml index 76dbad22..511deaf8 100644 --- a/.github/workflows/example-expressjs4.18-node21-staging.yaml +++ b/.github/workflows/example-httpserver-expressjs4.18-node21-staging.yaml @@ -1,4 +1,4 @@ -name: examples/expressjs4.18-node21 (staging) +name: examples/httpserver-expressjs4.18-node21 (staging) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-expressjs4.18-node21-staging.yaml' - - 'expressjs4.18-node21/**' - - '!expressjs4.18-node21/README.md' + - '.github/workflows/example-httpserver-expressjs4.18-node21-staging.yaml' + - 'httpserver-expressjs4.18-node21/**' + - '!httpserver-expressjs4.18-node21/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-expressjs4.18-node21-staging.yaml' - - 'expressjs4.18-node21/**' - - '!expressjs4.18-node21/README.md' + - '.github/workflows/example-httpserver-expressjs4.18-node21-staging.yaml' + - 'httpserver-expressjs4.18-node21/**' + - '!httpserver-expressjs4.18-node21/README.md' schedule: - cron: '0 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd expressjs4.18-node21; + cd httpserver-expressjs4.18-node21; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-httpserver-g++13.2-stable.yaml b/.github/workflows/example-httpserver-g++13.2-stable.yaml index d76cd7a2..36989573 100644 --- a/.github/workflows/example-httpserver-g++13.2-stable.yaml +++ b/.github/workflows/example-httpserver-g++13.2-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-g++13.2-staging.yaml b/.github/workflows/example-httpserver-g++13.2-staging.yaml index 2770197e..b3031f8d 100644 --- a/.github/workflows/example-httpserver-g++13.2-staging.yaml +++ b/.github/workflows/example-httpserver-g++13.2-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-gcc13.2-stable.yaml b/.github/workflows/example-httpserver-gcc13.2-stable.yaml index 079f40e7..62ce79e8 100644 --- a/.github/workflows/example-httpserver-gcc13.2-stable.yaml +++ b/.github/workflows/example-httpserver-gcc13.2-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-gcc13.2-staging.yaml b/.github/workflows/example-httpserver-gcc13.2-staging.yaml index 5bbc4980..bfac1b5a 100644 --- a/.github/workflows/example-httpserver-gcc13.2-staging.yaml +++ b/.github/workflows/example-httpserver-gcc13.2-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-go1.21-stable.yaml b/.github/workflows/example-httpserver-go1.21-stable.yaml index f05bb25b..59d54d71 100644 --- a/.github/workflows/example-httpserver-go1.21-stable.yaml +++ b/.github/workflows/example-httpserver-go1.21-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-go1.21-staging.yaml b/.github/workflows/example-httpserver-go1.21-staging.yaml index 7b8dbfe8..dd1b87f8 100644 --- a/.github/workflows/example-httpserver-go1.21-staging.yaml +++ b/.github/workflows/example-httpserver-go1.21-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-java17-spring-petclinic-stable.yaml b/.github/workflows/example-httpserver-java17-spring-petclinic-stable.yaml new file mode 100644 index 00000000..474cfcf7 --- /dev/null +++ b/.github/workflows/example-httpserver-java17-spring-petclinic-stable.yaml @@ -0,0 +1,74 @@ +name: examples/httpserver-java17-spring-petclinic (stable) + +on: + workflow_dispatch: + + push: + branches: [ada-dev1419/httpserver-java17-spring-petclinic] + paths: + - '.github/workflows/example-httpserver-java17-spring-petclinic-stable.yaml' + - 'httpserver-java17-spring-petclinic/**' + - '!httpserver-java17-spring-petclinic/README.md' + + pull_request: + types: [opened, synchronize, reopened] + branches: [main] + paths: + - '.github/workflows/example-httpserver-java17-spring-petclinic-stable.yaml' + - 'httpserver-java17-spring-petclinic/**' + - '!httpserver-java17-spring-petclinic/README.md' + + schedule: + - cron: '0 15 * * 1-5' + +permissions: + contents: read + +# Automatically cancel in-progress actions on the same branch +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + cancel-in-progress: true + +env: + UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" + UKC_TOKEN: ${{ secrets.UKC_TOKEN }} + KRAFTKIT_NO_CHECK_UPDATES: true + KRAFTKIT_LOG_LEVEL: debug + +jobs: + integration: + timeout-minutes: 60 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Test + id: test + uses: unikraft/kraftkit@staging + with: + run: | + set -xe; + cd httpserver-java17-spring-petclinic; + kraft cloud deploy \ + --no-start \ + --memory 1024 \ + --name httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} \ + --runtime index.unikraft.io/official-testing/base-compat:latest \ + --subdomain httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} \ + -p 443:8080 \ + .; + # wait for the instance to start + kraft cloud vm start -w 5s httpserver-java17-spring-petclinic-${GITHUB_RUN_ID}; + sleep 5; + curl -Lv --fail-with-body --max-time 10 https://httpserver-java17-spring-petclinic-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + - name: Cleanup + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe; + kraft cloud vm stop httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-httpserver-java17-spring-petclinic-staging.yaml b/.github/workflows/example-httpserver-java17-spring-petclinic-staging.yaml new file mode 100644 index 00000000..b43828c9 --- /dev/null +++ b/.github/workflows/example-httpserver-java17-spring-petclinic-staging.yaml @@ -0,0 +1,74 @@ +name: examples/httpserver-java17-spring-petclinic (staging) + +on: + workflow_dispatch: + + push: + branches: [ada-dev1419/httpserver-java17-spring-petclinic] + paths: + - '.github/workflows/example-httpserver-java17-spring-petclinic-staging.yaml' + - 'httpserver-java17-spring-petclinic/**' + - '!httpserver-java17-spring-petclinic/README.md' + + pull_request: + types: [opened, synchronize, reopened] + branches: [main] + paths: + - '.github/workflows/example-httpserver-java17-spring-petclinic-staging.yaml' + - 'httpserver-java17-spring-petclinic/**' + - '!httpserver-java17-spring-petclinic/README.md' + + schedule: + - cron: '0 15 * * 1-5' + +permissions: + contents: read + +# Automatically cancel in-progress actions on the same branch +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} + cancel-in-progress: true + +env: + UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" + UKC_TOKEN: ${{ secrets.UKC_TOKEN }} + KRAFTKIT_NO_CHECK_UPDATES: true + KRAFTKIT_LOG_LEVEL: debug + +jobs: + integration: + timeout-minutes: 60 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Test + id: test + uses: unikraft/kraftkit@staging + with: + run: | + set -xe; + cd httpserver-java17-spring-petclinic; + kraft cloud deploy \ + --no-start \ + --memory 1024 \ + --name httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} \ + --runtime index.unikraft.io/official-staging/base-compat:latest \ + --subdomain httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} \ + -p 443:8080 \ + .; + # wait for the instance to start + kraft cloud vm start -w 5s httpserver-java17-spring-petclinic-${GITHUB_RUN_ID}; + sleep 5; + curl -Lv --fail-with-body --max-time 10 https://httpserver-java17-spring-petclinic-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + - name: Cleanup + uses: unikraft/kraftkit@staging + if: always() + with: + run: | + set -xe; + kraft cloud vm stop httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-java17-spring-petclinic-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-java17-springboot32x-stable.yaml b/.github/workflows/example-httpserver-java17-springboot3.2.x-stable.yaml similarity index 81% rename from .github/workflows/example-java17-springboot32x-stable.yaml rename to .github/workflows/example-httpserver-java17-springboot3.2.x-stable.yaml index 2027dad2..137cf7c6 100644 --- a/.github/workflows/example-java17-springboot32x-stable.yaml +++ b/.github/workflows/example-httpserver-java17-springboot3.2.x-stable.yaml @@ -6,21 +6,24 @@ on: push: branches: [ada-dev1419/java17-springboot32x] paths: - - '.github/workflows/example-java17-springboot32x-stable.yaml' - - 'java17-springboot3.2.x/**' - - '!java17-springboot3.2.x/README.md' + - '.github/workflows/example-httpserver-java17-springboot3.2.x-stable.yaml' + - 'httpserver-java17-springboot3.2.x/**' + - '!httpserver-java17-springboot3.2.x/README.md' pull_request: types: [opened, synchronize, reopened] branches: [main] paths: - - '.github/workflows/example-java17-springboot32x-stable.yaml' - - 'java17-springboot3.2.x/**' - - '!java17-springboot3.2.x/README.md' + - '.github/workflows/example-httpserver-java17-springboot3.2.x-stable.yaml' + - 'httpserver-java17-springboot3.2.x/**' + - '!httpserver-java17-springboot3.2.x/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -46,7 +49,7 @@ jobs: with: run: | set -xe; - cd java17-springboot3.2.x; + cd httpserver-java17-springboot3.2.x; kraft cloud deploy \ --no-start \ --memory 1024 \ diff --git a/.github/workflows/example-java17-springboot32x-staging.yaml b/.github/workflows/example-httpserver-java17-springboot3.2.x-staging.yaml similarity index 81% rename from .github/workflows/example-java17-springboot32x-staging.yaml rename to .github/workflows/example-httpserver-java17-springboot3.2.x-staging.yaml index 936aabe4..8cd7cf77 100644 --- a/.github/workflows/example-java17-springboot32x-staging.yaml +++ b/.github/workflows/example-httpserver-java17-springboot3.2.x-staging.yaml @@ -6,21 +6,24 @@ on: push: branches: [ada-dev1419/java17-springboot32x] paths: - - '.github/workflows/example-java17-springboot32x-staging.yaml' - - 'java17-springboot3.2.x/**' - - '!java17-springboot3.2.x/README.md' + - '.github/workflows/example-httpserver-java17-springboot3.2.x-staging.yaml' + - 'httpserver-java17-springboot3.2.x/**' + - '!httpserver-java17-springboot3.2.x/README.md' pull_request: types: [opened, synchronize, reopened] branches: [main] paths: - - '.github/workflows/example-java17-springboot32x-staging.yaml' - - 'java17-springboot3.2.x/**' - - '!java17-springboot3.2.x/README.md' + - '.github/workflows/example-httpserver-java17-springboot3.2.x-staging.yaml' + - 'httpserver-java17-springboot3.2.x/**' + - '!httpserver-java17-springboot3.2.x/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} cancel-in-progress: true @@ -45,7 +48,7 @@ jobs: with: run: | set -xe; - cd java17-springboot3.2.x; + cd httpserver-java17-springboot3.2.x; kraft cloud deploy \ --no-start \ --memory 1024 \ diff --git a/.github/workflows/example-http-java21-stable.yaml b/.github/workflows/example-httpserver-java21-stable.yaml similarity index 50% rename from .github/workflows/example-http-java21-stable.yaml rename to .github/workflows/example-httpserver-java21-stable.yaml index 88a4db2e..b24e7e91 100644 --- a/.github/workflows/example-http-java21-stable.yaml +++ b/.github/workflows/example-httpserver-java21-stable.yaml @@ -1,4 +1,4 @@ -name: examples/http-java21 (stable) +name: examples/httpserver-java21 (stable) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-http-java21-stable.yaml' - - 'http-java21/**' - - '!http-java21/README.md' + - '.github/workflows/example-httpserver-java21-stable.yaml' + - 'httpserver-java21/**' + - '!httpserver-java21/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-java21-stable.yaml' - - 'http-java21/**' - - '!http-java21/README.md' + - '.github/workflows/example-httpserver-java21-stable.yaml' + - 'httpserver-java21/**' + - '!httpserver-java21/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} cancel-in-progress: true @@ -46,20 +49,20 @@ jobs: run: | set -xe; - cd http-java21; + cd httpserver-java21; kraft cloud deploy \ --no-start \ - --name http-java21-${GITHUB_RUN_ID} \ - --subdomain http-java21-${GITHUB_RUN_ID} \ + --name httpserver-java21-${GITHUB_RUN_ID} \ + --subdomain httpserver-java21-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 1Gi \ .; - kraft cloud vm start -w 5s http-java21-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-java21-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://http-java21-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-java21-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -68,7 +71,7 @@ jobs: run: | set -xe; - kraft cloud vm stop http-java21-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-java21-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-java21-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-java21-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-java21-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-java21-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-java21-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-java21-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-java21-staging.yaml b/.github/workflows/example-httpserver-java21-staging.yaml similarity index 50% rename from .github/workflows/example-http-java21-staging.yaml rename to .github/workflows/example-httpserver-java21-staging.yaml index 9d3a47e8..e49f0bb1 100644 --- a/.github/workflows/example-http-java21-staging.yaml +++ b/.github/workflows/example-httpserver-java21-staging.yaml @@ -1,4 +1,4 @@ -name: examples/http-java21 (staging) +name: examples/httpserver-java21 (staging) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-http-java21-staging.yaml' - - 'http-java21/**' - - '!http-java21/README.md' + - '.github/workflows/example-httpserver-java21-staging.yaml' + - 'httpserver-java21/**' + - '!httpserver-java21/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-java21-staging.yaml' - - 'http-java21/**' - - '!http-java21/README.md' + - '.github/workflows/example-httpserver-java21-staging.yaml' + - 'httpserver-java21/**' + - '!httpserver-java21/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} cancel-in-progress: true @@ -46,20 +49,20 @@ jobs: run: | set -xe; - cd http-java21; + cd httpserver-java21; kraft cloud deploy \ --no-start \ - --name http-java21-${GITHUB_RUN_ID} \ - --subdomain http-java21-${GITHUB_RUN_ID} \ + --name httpserver-java21-${GITHUB_RUN_ID} \ + --subdomain httpserver-java21-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 1Gi \ .; - kraft cloud vm start -w 5s http-java21-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-java21-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://http-java21-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-java21-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -68,7 +71,7 @@ jobs: run: | set -xe; - kraft cloud vm stop http-java21-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-java21-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-java21-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-java21-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-java21-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-java21-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-java21-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-java21-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-httpserver-lua5.1-stable.yaml b/.github/workflows/example-httpserver-lua5.1-stable.yaml index 87143ede..9e16bdd1 100644 --- a/.github/workflows/example-httpserver-lua5.1-stable.yaml +++ b/.github/workflows/example-httpserver-lua5.1-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-lua5.1-staging.yaml b/.github/workflows/example-httpserver-lua5.1-staging.yaml index 4127d0d3..f5060e6a 100644 --- a/.github/workflows/example-httpserver-lua5.1-staging.yaml +++ b/.github/workflows/example-httpserver-lua5.1-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node21-nextjs-stable.yaml b/.github/workflows/example-httpserver-node21-nextjs-stable.yaml similarity index 51% rename from .github/workflows/example-node21-nextjs-stable.yaml rename to .github/workflows/example-httpserver-node21-nextjs-stable.yaml index f93b5788..69e82289 100644 --- a/.github/workflows/example-node21-nextjs-stable.yaml +++ b/.github/workflows/example-httpserver-node21-nextjs-stable.yaml @@ -1,4 +1,4 @@ -name: examples/node21-nextjs (stable) +name: examples/httpserver-node21-nextjs (stable) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-node21-nextjs-stable.yaml' - - 'node21-nextjs/**' - - '!node21-nextjs/README.md' + - '.github/workflows/example-httpserver-node21-nextjs-stable.yaml' + - 'httpserver-node21-nextjs/**' + - '!httpserver-node21-nextjs/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-node21-nextjs-stable.yaml' - - 'node21-nextjs/**' - - '!node21-nextjs/README.md' + - '.github/workflows/example-httpserver-node21-nextjs-stable.yaml' + - 'httpserver-node21-nextjs/**' + - '!httpserver-node21-nextjs/README.md' schedule: - cron: '15 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd node21-nextjs; + cd httpserver-node21-nextjs; kraft cloud deploy \ --no-start \ - --name node21-nextjs-stable-${GITHUB_RUN_ID} \ + --name httpserver-node21-nextjs-stable-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain node21-nextjs-stable-${GITHUB_RUN_ID} \ + --subdomain httpserver-node21-nextjs-stable-${GITHUB_RUN_ID} \ -p 443:3000 \ -M 768 \ .; # wait for the instance to start - kraft cloud vm start -w 5s node21-nextjs-stable-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-node21-nextjs-stable-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://node21-nextjs-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-node21-nextjs-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop node21-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node21-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node21-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node21-nextjs-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-node21-nextjs-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-node21-nextjs-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-node21-nextjs-stable-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-node21-nextjs-stable-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node21-nextjs-staging.yaml b/.github/workflows/example-httpserver-node21-nextjs-staging.yaml similarity index 50% rename from .github/workflows/example-node21-nextjs-staging.yaml rename to .github/workflows/example-httpserver-node21-nextjs-staging.yaml index b29a389c..000fde83 100644 --- a/.github/workflows/example-node21-nextjs-staging.yaml +++ b/.github/workflows/example-httpserver-node21-nextjs-staging.yaml @@ -1,4 +1,4 @@ -name: examples/node21-nextjs (staging) +name: examples/httpserver-node21-nextjs (staging) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-node21-nextjs-staging.yaml' - - 'node21-nextjs/**' - - '!node21-nextjs/README.md' + - '.github/workflows/example-httpserver-node21-nextjs-staging.yaml' + - 'httpserver-node21-nextjs/**' + - '!httpserver-node21-nextjs/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-node21-nextjs-staging.yaml' - - 'node21-nextjs/**' - - '!node21-nextjs/README.md' + - '.github/workflows/example-httpserver-node21-nextjs-staging.yaml' + - 'httpserver-node21-nextjs/**' + - '!httpserver-node21-nextjs/README.md' schedule: - cron: '15 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd node21-nextjs; + cd httpserver-node21-nextjs; kraft cloud deploy \ --no-start \ - --name node21-nextjs-staging-${GITHUB_RUN_ID} \ + --name httpserver-node21-nextjs-staging-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain node21-nextjs-staging-${GITHUB_RUN_ID} \ + --subdomain httpserver-node21-nextjs-staging-${GITHUB_RUN_ID} \ -p 443:3000 \ -M 768 \ .; # wait for the instance to start - kraft cloud vm start -w 5s node21-nextjs-staging-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-node21-nextjs-staging-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://node21-nextjs-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-node21-nextjs-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop node21-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node21-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node21-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node21-nextjs-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-node21-nextjs-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-node21-nextjs-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-node21-nextjs-staging-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-node21-nextjs-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-python3.12-django5.0-stable.yaml b/.github/workflows/example-httpserver-node21-remix-stable.yaml similarity index 53% rename from .github/workflows/example-http-python3.12-django5.0-stable.yaml rename to .github/workflows/example-httpserver-node21-remix-stable.yaml index 3f3cf8bb..2f39b751 100644 --- a/.github/workflows/example-http-python3.12-django5.0-stable.yaml +++ b/.github/workflows/example-httpserver-node21-remix-stable.yaml @@ -1,4 +1,4 @@ -name: examples/http-python3.12-django5.0 (stable) +name: examples/httpserver-node21-remix (stable) on: workflow_dispatch: @@ -6,20 +6,23 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-django5.0-stable.yaml' - - 'http-python3.12-django5.0/**' - - '!http-python3.12-django5.0/README.md' + - '.github/workflows/example-httpserver-node21-remix-stable.yaml' + - 'httpserver-node21-remix/**' + - '!httpserver-node21-remix/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-django5.0-stable.yaml' - - 'http-python3.12-django5.0/**' - - '!http-python3.12-django5.0/README.md' + - '.github/workflows/example-httpserver-node21-remix-stable.yaml' + - 'httpserver-node21-remix/**' + - '!httpserver-node21-remix/README.md' schedule: - - cron: '30 15 * * 1-5' + - cron: '30 16 * * 1-5' + +permissions: + contents: read # Automatically cancel in-progress actions on the same branch concurrency: @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd httpserver-python3.12-django5.0; + cd httpserver-node21-remix; kraft cloud deploy \ --no-start \ - --name http-python312-django50-stable-${GITHUB_RUN_ID} \ + --name httpserver-node21-remix-stable-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain http-python312-django50-stable-${GITHUB_RUN_ID} \ - -p 443:80 \ - -M 1Gi \ + --subdomain httpserver-node21-remix-stable-${GITHUB_RUN_ID} \ + -p 443:3000 \ + -M 768 \ .; # wait for the instance to start - kraft cloud vm start -w 5s http-python312-django50-stable-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-node21-remix-stable-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://http-python312-django50-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-node21-remix-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop http-python312-django50-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-python312-django50-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-python312-django50-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-python312-django50-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-node21-remix-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-node21-remix-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-node21-remix-stable-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-node21-remix-stable-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-python3.12-django5.0-staging.yaml b/.github/workflows/example-httpserver-node21-remix-staging.yaml similarity index 53% rename from .github/workflows/example-http-python3.12-django5.0-staging.yaml rename to .github/workflows/example-httpserver-node21-remix-staging.yaml index a2ea3fc5..10686491 100644 --- a/.github/workflows/example-http-python3.12-django5.0-staging.yaml +++ b/.github/workflows/example-httpserver-node21-remix-staging.yaml @@ -1,4 +1,4 @@ -name: examples/http-python3.12-django5.0 (staging) +name: examples/httpserver-node21-remix (staging) on: workflow_dispatch: @@ -6,20 +6,23 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-django5.0-staging.yaml' - - 'http-python3.12-django5.0/**' - - '!http-python3.12-django5.0/README.md' + - '.github/workflows/example-httpserver-node21-remix-staging.yaml' + - 'httpserver-node21-remix/**' + - '!httpserver-node21-remix/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-django5.0-staging.yaml' - - 'http-python3.12-django5.0/**' - - '!http-python3.12-django5.0/README.md' + - '.github/workflows/example-httpserver-node21-remix-staging.yaml' + - 'httpserver-node21-remix/**' + - '!httpserver-node21-remix/README.md' schedule: - - cron: '30 15 * * 1-5' + - cron: '30 16 * * 1-5' + +permissions: + contents: read # Automatically cancel in-progress actions on the same branch concurrency: @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd httpserver-python3.12-django5.0; + cd httpserver-node21-remix; kraft cloud deploy \ --no-start \ - --name http-python312-django50-staging-${GITHUB_RUN_ID} \ + --name httpserver-node21-remix-staging-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain http-python312-django50-staging-${GITHUB_RUN_ID} \ - -p 443:80 \ - -M 1Gi \ + --subdomain httpserver-node21-remix-staging-${GITHUB_RUN_ID} \ + -p 443:3000 \ + -M 768 \ .; # wait for the instance to start - kraft cloud vm start -w 5s http-python312-django50-staging-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-node21-remix-staging-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://http-python312-django50-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-node21-remix-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop http-python312-django50-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs http-python312-django50-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm http-python312-django50-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/http-python312-django50-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-node21-remix-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-node21-remix-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-node21-remix-staging-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-node21-remix-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node21-solidstart-stable.yaml b/.github/workflows/example-httpserver-node21-solid-start-stable.yaml similarity index 90% rename from .github/workflows/example-node21-solidstart-stable.yaml rename to .github/workflows/example-httpserver-node21-solid-start-stable.yaml index 1966ad20..3e19972e 100644 --- a/.github/workflows/example-node21-solidstart-stable.yaml +++ b/.github/workflows/example-httpserver-node21-solid-start-stable.yaml @@ -6,7 +6,7 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-node21-solidstart-stable.yaml' + - '.github/workflows/example-httpserver-node21-solid-start-stable.yaml' - 'node21-solidstart/**' - '!node21-solidstart/README.md' @@ -14,13 +14,16 @@ on: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-node21-solidstart-stable.yaml' + - '.github/workflows/example-httpserver-node21-solid-start-stable.yaml' - 'node21-solidstart/**' - '!node21-solidstart/README.md' schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd node21-solid-start; + cd httpserver-node21-solid-start; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-node21-solidstart-staging.yaml b/.github/workflows/example-httpserver-node21-solid-start-staging.yaml similarity index 90% rename from .github/workflows/example-node21-solidstart-staging.yaml rename to .github/workflows/example-httpserver-node21-solid-start-staging.yaml index 54628a22..6da562ad 100644 --- a/.github/workflows/example-node21-solidstart-staging.yaml +++ b/.github/workflows/example-httpserver-node21-solid-start-staging.yaml @@ -6,7 +6,7 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-node21-solidstart-staging.yaml' + - '.github/workflows/example-httpserver-node21-solid-start-staging.yaml' - 'node21-solidstart/**' - '!node21-solidstart/README.md' @@ -14,13 +14,16 @@ on: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-node21-solidstart-staging.yaml' + - '.github/workflows/example-httpserver-node21-solid-start-staging.yaml' - 'node21-solidstart/**' - '!node21-solidstart/README.md' schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd node21-solid-start; + cd httpserver-node21-solid-start; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-httpserver-nodejs21-stable.yaml b/.github/workflows/example-httpserver-node25-stable.yaml similarity index 55% rename from .github/workflows/example-httpserver-nodejs21-stable.yaml rename to .github/workflows/example-httpserver-node25-stable.yaml index 1fc9ee38..3cba6e12 100644 --- a/.github/workflows/example-httpserver-nodejs21-stable.yaml +++ b/.github/workflows/example-httpserver-node25-stable.yaml @@ -1,26 +1,29 @@ -name: examples/httpserver-nodejs21 (stable) +name: examples/httpserver-node25 (stable) on: workflow_dispatch: push: - branches: [ main ] + branches: [main] paths: - - '.github/workflows/example-httpserver-nodejs21-stable.yaml' - - 'httpserver-nodejs21/**' - - '!httpserver-nodejs21/README.md' + - '.github/workflows/example-httpserver-node25-stable.yaml' + - 'httpserver-node25/**' + - '!httpserver-node25/README.md' pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] + types: [opened, synchronize, reopened] + branches: [main] paths: - - '.github/workflows/example-httpserver-nodejs21-stable.yaml' - - 'httpserver-nodejs21/**' - - '!httpserver-nodejs21/README.md' + - '.github/workflows/example-httpserver-node25-stable.yaml' + - 'httpserver-node25/**' + - '!httpserver-node25/README.md' schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd httpserver-nodejs21; + cd httpserver-node25; kraft cloud deploy \ --no-start \ - --name httpserver-nodejs21-stable-${GITHUB_RUN_ID} \ + --name httpserver-node25-stable-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain httpserver-nodejs21-stable-${GITHUB_RUN_ID} \ + --subdomain httpserver-node25-stable-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 512 \ .; # wait for the instance to start - kraft cloud vm start -w 5s httpserver-nodejs21-stable-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-node25-stable-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://httpserver-nodejs21-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-node25-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop httpserver-nodejs21-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs httpserver-nodejs21-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm httpserver-nodejs21-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/httpserver-nodejs21-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-node25-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-node25-stable-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-node25-stable-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-node25-stable-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-httpserver-nodejs21-staging.yaml b/.github/workflows/example-httpserver-node25-staging.yaml similarity index 55% rename from .github/workflows/example-httpserver-nodejs21-staging.yaml rename to .github/workflows/example-httpserver-node25-staging.yaml index 3478b591..21446824 100644 --- a/.github/workflows/example-httpserver-nodejs21-staging.yaml +++ b/.github/workflows/example-httpserver-node25-staging.yaml @@ -1,26 +1,29 @@ -name: examples/httpserver-nodejs21 (staging) +name: examples/httpserver-node25 (staging) on: workflow_dispatch: push: - branches: [ main ] + branches: [main] paths: - - '.github/workflows/example-httpserver-nodejs21-staging.yaml' - - 'httpserver-nodejs21/**' - - '!httpserver-nodejs21/README.md' + - '.github/workflows/example-httpserver-node25-staging.yaml' + - 'httpserver-node25/**' + - '!httpserver-node25/README.md' pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] + types: [opened, synchronize, reopened] + branches: [main] paths: - - '.github/workflows/example-httpserver-nodejs21-staging.yaml' - - 'httpserver-nodejs21/**' - - '!httpserver-nodejs21/README.md' + - '.github/workflows/example-httpserver-node25-staging.yaml' + - 'httpserver-node25/**' + - '!httpserver-node25/README.md' schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,22 +50,22 @@ jobs: run: | set -xe; - cd httpserver-nodejs21; + cd httpserver-node25; kraft cloud deploy \ --no-start \ - --name httpserver-nodejs21-staging-${GITHUB_RUN_ID} \ + --name httpserver-node25-staging-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain httpserver-nodejs21-staging-${GITHUB_RUN_ID} \ + --subdomain httpserver-node25-staging-${GITHUB_RUN_ID} \ -p 443:8080 \ -M 512 \ .; # wait for the instance to start - kraft cloud vm start -w 5s httpserver-nodejs21-staging-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s httpserver-node25-staging-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://httpserver-nodejs21-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://httpserver-node25-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -71,7 +74,7 @@ jobs: run: | set -xe; - kraft cloud vm stop httpserver-nodejs21-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs httpserver-nodejs21-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm httpserver-nodejs21-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/httpserver-nodejs21-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm stop httpserver-node25-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm logs httpserver-node25-staging-${GITHUB_RUN_ID} || true; + kraft cloud vm rm httpserver-node25-staging-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/httpserver-node25-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-http-perl5.42-stable.yaml b/.github/workflows/example-httpserver-perl5.42-stable.yaml similarity index 83% rename from .github/workflows/example-http-perl5.42-stable.yaml rename to .github/workflows/example-httpserver-perl5.42-stable.yaml index d8ec4ae3..0fb34608 100644 --- a/.github/workflows/example-http-perl5.42-stable.yaml +++ b/.github/workflows/example-httpserver-perl5.42-stable.yaml @@ -1,4 +1,4 @@ -name: examples/http-perl5.42 (stable) +name: examples/httpserver-perl5.42 (stable) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-http-perl5.42-stable.yaml' - - 'http-perl5.42/**' - - '!http-perl5.42/README.md' + - '.github/workflows/example-httpserver-perl5.42-stable.yaml' + - 'httpserver-perl5.42/**' + - '!httpserver-perl5.42/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-perl5.42-stable.yaml' - - 'http-perl5.42/**' - - '!http-perl5.42/README.md' + - '.github/workflows/example-httpserver-perl5.42-stable.yaml' + - 'httpserver-perl5.42/**' + - '!httpserver-perl5.42/README.md' schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -49,7 +52,7 @@ jobs: run: | set -xe; - cd http-perl5.42; + cd httpserver-perl5.42; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-http-perl5.42-staging.yaml b/.github/workflows/example-httpserver-perl5.42-staging.yaml similarity index 83% rename from .github/workflows/example-http-perl5.42-staging.yaml rename to .github/workflows/example-httpserver-perl5.42-staging.yaml index e023a1b3..be66e010 100644 --- a/.github/workflows/example-http-perl5.42-staging.yaml +++ b/.github/workflows/example-httpserver-perl5.42-staging.yaml @@ -1,4 +1,4 @@ -name: examples/http-perl5.42 (staging) +name: examples/httpserver-perl5.42 (staging) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-http-perl5.42-staging.yaml' - - 'http-perl5.42/**' - - '!http-perl5.42/README.md' + - '.github/workflows/example-httpserver-perl5.42-staging.yaml' + - 'httpserver-perl5.42/**' + - '!httpserver-perl5.42/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-perl5.42-staging.yaml' - - 'http-perl5.42/**' - - '!http-perl5.42/README.md' + - '.github/workflows/example-httpserver-perl5.42-staging.yaml' + - 'httpserver-perl5.42/**' + - '!httpserver-perl5.42/README.md' schedule: - cron: '15 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -49,7 +52,7 @@ jobs: run: | set -xe; - cd http-perl5.42; + cd httpserver-perl5.42; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-httpserver-php8.2-stable.yaml b/.github/workflows/example-httpserver-php8.2-stable.yaml index f4490dbd..a5b08196 100644 --- a/.github/workflows/example-httpserver-php8.2-stable.yaml +++ b/.github/workflows/example-httpserver-php8.2-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-php8.2-staging.yaml b/.github/workflows/example-httpserver-php8.2-staging.yaml index f0b5e119..bbac1f7b 100644 --- a/.github/workflows/example-httpserver-php8.2-staging.yaml +++ b/.github/workflows/example-httpserver-php8.2-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-prisma-expressjs4.19-node18-stable.yaml b/.github/workflows/example-httpserver-prisma-expressjs4.19-node18-stable.yaml similarity index 78% rename from .github/workflows/example-prisma-expressjs4.19-node18-stable.yaml rename to .github/workflows/example-httpserver-prisma-expressjs4.19-node18-stable.yaml index 0746af90..cb7534f2 100644 --- a/.github/workflows/example-prisma-expressjs4.19-node18-stable.yaml +++ b/.github/workflows/example-httpserver-prisma-expressjs4.19-node18-stable.yaml @@ -1,4 +1,4 @@ -name: examples/prisma-expressjs4.19-node18 (stable) +name: examples/httpserver-prisma-expressjs4.19-node18 (stable) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-prisma-expressjs4.19-node18-stable.yaml' - - 'prisma-expressjs4.19-node18/**' - - '!prisma-expressjs4.19-node18/README.md' + - '.github/workflows/example-httpserver-prisma-expressjs4.19-node18-stable.yaml' + - 'httpserver-prisma-expressjs4.19-node18/**' + - '!httpserver-prisma-expressjs4.19-node18/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-prisma-expressjs4.19-node18-stable.yaml' - - 'prisma-expressjs4.19-node18/**' - - '!prisma-expressjs4.19-node18/README.md' + - '.github/workflows/example-httpserver-prisma-expressjs4.19-node18-stable.yaml' + - 'httpserver-prisma-expressjs4.19-node18/**' + - '!httpserver-prisma-expressjs4.19-node18/README.md' schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd prisma-expressjs4.19-node18; + cd httpserver-prisma-expressjs4.19-node18; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-prisma-expressjs4.19-node18-staging.yaml b/.github/workflows/example-httpserver-prisma-expressjs4.19-node18-staging.yaml similarity index 78% rename from .github/workflows/example-prisma-expressjs4.19-node18-staging.yaml rename to .github/workflows/example-httpserver-prisma-expressjs4.19-node18-staging.yaml index db05087a..99821284 100644 --- a/.github/workflows/example-prisma-expressjs4.19-node18-staging.yaml +++ b/.github/workflows/example-httpserver-prisma-expressjs4.19-node18-staging.yaml @@ -1,4 +1,4 @@ -name: examples/prisma-expressjs4.19-node18 (staging) +name: examples/httpserver-prisma-expressjs4.19-node18 (staging) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-prisma-expressjs4.19-node18-staging.yaml' - - 'prisma-expressjs4.19-node18/**' - - '!prisma-expressjs4.19-node18/README.md' + - '.github/workflows/example-httpserver-prisma-expressjs4.19-node18-staging.yaml' + - 'httpserver-prisma-expressjs4.19-node18/**' + - '!httpserver-prisma-expressjs4.19-node18/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-prisma-expressjs4.19-node18-staging.yaml' - - 'prisma-expressjs4.19-node18/**' - - '!prisma-expressjs4.19-node18/README.md' + - '.github/workflows/example-httpserver-prisma-expressjs4.19-node18-staging.yaml' + - 'httpserver-prisma-expressjs4.19-node18/**' + - '!httpserver-prisma-expressjs4.19-node18/README.md' schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd prisma-expressjs4.19-node18; + cd httpserver-prisma-expressjs4.19-node18; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-http-python3.12-FastAPI-0.121.3-stable.yaml b/.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-stable.yaml similarity index 77% rename from .github/workflows/example-http-python3.12-FastAPI-0.121.3-stable.yaml rename to .github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-stable.yaml index 2d1c23b9..8d37904b 100644 --- a/.github/workflows/example-http-python3.12-FastAPI-0.121.3-stable.yaml +++ b/.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-stable.yaml @@ -1,23 +1,26 @@ -name: examples/http-python3.12-FastAPI-0.121.3 (stable) +name: examples/httpserver-python3.12-FastAPI-0.121.3 (stable) on: workflow_dispatch: push: branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-FastAPI-0.121.3-stable.yaml' - - 'http-python3.12-FastAPI-0.121.3/**' - - '!http-python3.12-FastAPI-0.121.3/README.md' + - '.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-stable.yaml' + - 'httpserver-python3.12-FastAPI-0.121.3/**' + - '!httpserver-python3.12-FastAPI-0.121.3/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-FastAPI-0.121.3-stable.yaml' - - 'http-python3.12-FastAPI-0.121.3/**' - - '!http-python3.12-FastAPI-0.121.3/README.md' + - '.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-stable.yaml' + - 'httpserver-python3.12-FastAPI-0.121.3/**' + - '!httpserver-python3.12-FastAPI-0.121.3/README.md' schedule: - cron: '0 2 * * 1-5' +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} cancel-in-progress: true @@ -40,7 +43,7 @@ jobs: with: run: | set -xe; - cd http-python3.12-FastAPI-0.121.3; + cd httpserver-python3.12-FastAPI-0.121.3; kraft cloud deploy \ --no-start \ --name fastapi-${GITHUB_RUN_ID} \ diff --git a/.github/workflows/example-http-python3.12-FastAPI-0.121.3-staging.yaml b/.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-staging.yaml similarity index 77% rename from .github/workflows/example-http-python3.12-FastAPI-0.121.3-staging.yaml rename to .github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-staging.yaml index 4d0d8c49..0c2259ea 100644 --- a/.github/workflows/example-http-python3.12-FastAPI-0.121.3-staging.yaml +++ b/.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-staging.yaml @@ -1,23 +1,26 @@ -name: examples/http-python3.12-FastAPI-0.121.3 (staging) +name: examples/httpserver-python3.12-FastAPI-0.121.3 (staging) on: workflow_dispatch: push: branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-FastAPI-0.121.3-staging.yaml' - - 'http-python3.12-FastAPI-0.121.3/**' - - '!http-python3.12-FastAPI-0.121.3/README.md' + - '.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-staging.yaml' + - 'httpserver-python3.12-FastAPI-0.121.3/**' + - '!httpserver-python3.12-FastAPI-0.121.3/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-http-python3.12-FastAPI-0.121.3-staging.yaml' - - 'http-python3.12-FastAPI-0.121.3/**' - - '!http-python3.12-FastAPI-0.121.3/README.md' + - '.github/workflows/example-httpserver-python3.12-FastAPI-0.121.3-staging.yaml' + - 'httpserver-python3.12-FastAPI-0.121.3/**' + - '!httpserver-python3.12-FastAPI-0.121.3/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} cancel-in-progress: true @@ -40,7 +43,7 @@ jobs: with: run: | set -xe; - cd http-python3.12-FastAPI-0.121.3; + cd httpserver-python3.12-FastAPI-0.121.3; kraft cloud deploy \ --no-start \ --name fastapi-${GITHUB_RUN_ID} \ diff --git a/.github/workflows/example-httpserver-python3.12-django5.0-stable.yaml b/.github/workflows/example-httpserver-python3.12-django5.0-stable.yaml index f15e8596..2fadb0cb 100644 --- a/.github/workflows/example-httpserver-python3.12-django5.0-stable.yaml +++ b/.github/workflows/example-httpserver-python3.12-django5.0-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-python3.12-django5.0-staging.yaml b/.github/workflows/example-httpserver-python3.12-django5.0-staging.yaml index eb572ad8..20435fdd 100644 --- a/.github/workflows/example-httpserver-python3.12-django5.0-staging.yaml +++ b/.github/workflows/example-httpserver-python3.12-django5.0-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-python3.12-flask3.0-stable.yaml b/.github/workflows/example-httpserver-python3.12-flask3.0-stable.yaml index 9aa9f30f..5a58aa0c 100644 --- a/.github/workflows/example-httpserver-python3.12-flask3.0-stable.yaml +++ b/.github/workflows/example-httpserver-python3.12-flask3.0-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-python3.12-flask3.0staging.yaml b/.github/workflows/example-httpserver-python3.12-flask3.0-staging.yaml similarity index 98% rename from .github/workflows/example-httpserver-python3.12-flask3.0staging.yaml rename to .github/workflows/example-httpserver-python3.12-flask3.0-staging.yaml index 7c8d488b..b76ebc60 100644 --- a/.github/workflows/example-httpserver-python3.12-flask3.0staging.yaml +++ b/.github/workflows/example-httpserver-python3.12-flask3.0-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-python3.12-stable.yaml b/.github/workflows/example-httpserver-python3.12-stable.yaml index ea715f10..444a2dd7 100644 --- a/.github/workflows/example-httpserver-python3.12-stable.yaml +++ b/.github/workflows/example-httpserver-python3.12-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-python3.12-staging.yaml b/.github/workflows/example-httpserver-python3.12-staging.yaml index 4dec707b..b0477955 100644 --- a/.github/workflows/example-httpserver-python3.12-staging.yaml +++ b/.github/workflows/example-httpserver-python3.12-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-ruby3.2-stable.yaml b/.github/workflows/example-httpserver-ruby3.2-stable.yaml index 40a5bc8e..7926a38b 100644 --- a/.github/workflows/example-httpserver-ruby3.2-stable.yaml +++ b/.github/workflows/example-httpserver-ruby3.2-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-ruby3.2-staging.yaml b/.github/workflows/example-httpserver-ruby3.2-staging.yaml index 8444ae52..542c97dc 100644 --- a/.github/workflows/example-httpserver-ruby3.2-staging.yaml +++ b/.github/workflows/example-httpserver-ruby3.2-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml b/.github/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml index 3b93d476..7a111762 100644 --- a/.github/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml +++ b/.github/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml b/.github/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml index d77dd1d8..05744ceb 100644 --- a/.github/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml +++ b/.github/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml b/.github/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml index 26a1d80b..78906837 100644 --- a/.github/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml +++ b/.github/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml b/.github/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml index 4b1813fe..e023a995 100644 --- a/.github/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml +++ b/.github/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-httpserver-rust1.73-stable.yaml b/.github/workflows/example-httpserver-rust1.91-stable.yaml similarity index 83% rename from .github/workflows/example-httpserver-rust1.73-stable.yaml rename to .github/workflows/example-httpserver-rust1.91-stable.yaml index 2d34c343..1e95121f 100644 --- a/.github/workflows/example-httpserver-rust1.73-stable.yaml +++ b/.github/workflows/example-httpserver-rust1.91-stable.yaml @@ -1,4 +1,4 @@ -name: examples/httpserver-rust1.73 (stable) +name: examples/httpserver-rust1.91 (stable) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-httpserver-rust1.73-stable.yaml' - - 'httpserver-rust1.73/**' - - '!httpserver-rust1.73/README.md' + - '.github/workflows/example-httpserver-rust1.91-stable.yaml' + - 'httpserver-rust1.91/**' + - '!httpserver-rust1.91/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-httpserver-rust1.73-stable.yaml' - - 'httpserver-rust1.73/**' - - '!httpserver-rust1.73/README.md' + - '.github/workflows/example-httpserver-rust1.91-stable.yaml' + - 'httpserver-rust1.91/**' + - '!httpserver-rust1.91/README.md' schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd httpserver-rust1.73; + cd httpserver-rust1.91; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-httpserver-rust1.73-staging.yaml b/.github/workflows/example-httpserver-rust1.91-staging.yaml similarity index 83% rename from .github/workflows/example-httpserver-rust1.73-staging.yaml rename to .github/workflows/example-httpserver-rust1.91-staging.yaml index 8b86efd3..4fc9e1ff 100644 --- a/.github/workflows/example-httpserver-rust1.73-staging.yaml +++ b/.github/workflows/example-httpserver-rust1.91-staging.yaml @@ -1,4 +1,4 @@ -name: examples/httpserver-rust1.73 (staging) +name: examples/httpserver-rust1.91 (staging) on: workflow_dispatch: @@ -6,21 +6,24 @@ on: push: branches: [ main ] paths: - - '.github/workflows/example-httpserver-rust1.73-staging.yaml' - - 'httpserver-rust1.73/**' - - '!httpserver-rust1.73/README.md' + - '.github/workflows/example-httpserver-rust1.91-staging.yaml' + - 'httpserver-rust1.91/**' + - '!httpserver-rust1.91/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-httpserver-rust1.73-staging.yaml' - - 'httpserver-rust1.73/**' - - '!httpserver-rust1.73/README.md' + - '.github/workflows/example-httpserver-rust1.91-staging.yaml' + - 'httpserver-rust1.91/**' + - '!httpserver-rust1.91/README.md' schedule: - cron: '45 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd httpserver-rust1.73; + cd httpserver-rust1.91; kraft cloud deploy \ --no-start \ diff --git a/.github/workflows/example-imaginary-stable.yaml b/.github/workflows/example-imaginary-stable.yaml index 6e4afc96..faa5202b 100644 --- a/.github/workflows/example-imaginary-stable.yaml +++ b/.github/workflows/example-imaginary-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-imaginary-staging.yaml b/.github/workflows/example-imaginary-staging.yaml index b9f38a9f..f704afc2 100644 --- a/.github/workflows/example-imaginary-staging.yaml +++ b/.github/workflows/example-imaginary-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-java17-spring-petclinic-stable.yaml b/.github/workflows/example-java17-spring-petclinic-stable.yaml deleted file mode 100644 index 629521a4..00000000 --- a/.github/workflows/example-java17-spring-petclinic-stable.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: examples/java17-spring-petclinic (stable) - -on: - workflow_dispatch: - - push: - branches: [ada-dev1419/java17-spring-petclinic] - paths: - - '.github/workflows/example-java17-spring-petclinic-stable.yaml' - - 'java17-spring-petclinic/**' - - '!java17-spring-petclinic/README.md' - - pull_request: - types: [opened, synchronize, reopened] - branches: [main] - paths: - - '.github/workflows/example-java17-spring-petclinic-stable.yaml' - - 'java17-spring-petclinic/**' - - '!java17-spring-petclinic/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - cd java17-spring-petclinic; - kraft cloud deploy \ - --no-start \ - --memory 1024 \ - --name java17-spring-petclinic-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain java17-spring-petclinic-${GITHUB_RUN_ID} \ - -p 443:8080 \ - .; - # wait for the instance to start - kraft cloud vm start -w 5s java17-spring-petclinic-${GITHUB_RUN_ID}; - sleep 5; - curl -Lv --fail-with-body --max-time 10 https://java17-spring-petclinic-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - kraft cloud vm stop java17-spring-petclinic-${GITHUB_RUN_ID} || true; - kraft cloud vm logs java17-spring-petclinic-${GITHUB_RUN_ID} || true; - kraft cloud vm rm java17-spring-petclinic-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/java17-spring-petclinic-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-java17-spring-petclinic-staging.yaml b/.github/workflows/example-java17-spring-petclinic-staging.yaml deleted file mode 100644 index 48200a46..00000000 --- a/.github/workflows/example-java17-spring-petclinic-staging.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: examples/java17-spring-petclinic (staging) - -on: - workflow_dispatch: - - push: - branches: [ada-dev1419/java17-spring-petclinic] - paths: - - '.github/workflows/example-java17-spring-petclinic-staging.yaml' - - 'java17-spring-petclinic/**' - - '!java17-spring-petclinic/README.md' - - pull_request: - types: [opened, synchronize, reopened] - branches: [main] - paths: - - '.github/workflows/example-java17-spring-petclinic-staging.yaml' - - 'java17-spring-petclinic/**' - - '!java17-spring-petclinic/README.md' - - schedule: - - cron: '0 15 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - cd java17-spring-petclinic; - kraft cloud deploy \ - --no-start \ - --memory 1024 \ - --name java17-spring-petclinic-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain java17-spring-petclinic-${GITHUB_RUN_ID} \ - -p 443:8080 \ - .; - # wait for the instance to start - kraft cloud vm start -w 5s java17-spring-petclinic-${GITHUB_RUN_ID}; - sleep 5; - curl -Lv --fail-with-body --max-time 10 https://java17-spring-petclinic-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - kraft cloud vm stop java17-spring-petclinic-${GITHUB_RUN_ID} || true; - kraft cloud vm logs java17-spring-petclinic-${GITHUB_RUN_ID} || true; - kraft cloud vm rm java17-spring-petclinic-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/java17-spring-petclinic-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-nginx-stable.yaml b/.github/workflows/example-nginx-stable.yaml index 45d46882..7c7f2f8b 100644 --- a/.github/workflows/example-nginx-stable.yaml +++ b/.github/workflows/example-nginx-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-nginx-staging.yaml b/.github/workflows/example-nginx-staging.yaml index 6522eb9b..8acf3143 100644 --- a/.github/workflows/example-nginx-staging.yaml +++ b/.github/workflows/example-nginx-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node-playwright-chromium-stable.yaml b/.github/workflows/example-node-playwright-chromium-stable.yaml index be26f0ac..8217a4fd 100644 --- a/.github/workflows/example-node-playwright-chromium-stable.yaml +++ b/.github/workflows/example-node-playwright-chromium-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node-playwright-chromium-staging.yaml b/.github/workflows/example-node-playwright-chromium-staging.yaml index 6cbc0959..2195d523 100644 --- a/.github/workflows/example-node-playwright-chromium-staging.yaml +++ b/.github/workflows/example-node-playwright-chromium-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node-playwright-firefox-stable.yaml b/.github/workflows/example-node-playwright-firefox-stable.yaml index 67629d6e..5e4dee73 100644 --- a/.github/workflows/example-node-playwright-firefox-stable.yaml +++ b/.github/workflows/example-node-playwright-firefox-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node-playwright-firefox-staging.yaml b/.github/workflows/example-node-playwright-firefox-staging.yaml index 8efc3bfd..ea98a52c 100644 --- a/.github/workflows/example-node-playwright-firefox-staging.yaml +++ b/.github/workflows/example-node-playwright-firefox-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node-playwright-webkit-stable.yaml b/.github/workflows/example-node-playwright-webkit-stable.yaml index 8323f89a..f23a13db 100644 --- a/.github/workflows/example-node-playwright-webkit-stable.yaml +++ b/.github/workflows/example-node-playwright-webkit-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node-playwright-webkit-staging.yaml b/.github/workflows/example-node-playwright-webkit-staging.yaml index 59f0e995..b42977d8 100644 --- a/.github/workflows/example-node-playwright-webkit-staging.yaml +++ b/.github/workflows/example-node-playwright-webkit-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node18-nextjs-stable.yaml b/.github/workflows/example-node18-nextjs-stable.yaml deleted file mode 100644 index 72a291e7..00000000 --- a/.github/workflows/example-node18-nextjs-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/node18-nextjs (stable) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-node18-nextjs-stable.yaml' - - 'node18-nextjs/**' - - '!node18-nextjs/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-node18-nextjs-stable.yaml' - - 'node18-nextjs/**' - - '!node18-nextjs/README.md' - - schedule: - - cron: '16 16 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd node21-nextjs; - - kraft cloud deploy \ - --no-start \ - --name node18-nextjs-stable-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain node18-nextjs-stable-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 756 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s node18-nextjs-stable-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://node18-nextjs-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop node18-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node18-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node18-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node18-nextjs-stable-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node18-nextjs-staging.yaml b/.github/workflows/example-node18-nextjs-staging.yaml deleted file mode 100644 index 17164480..00000000 --- a/.github/workflows/example-node18-nextjs-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/node18-nextjs (staging) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-node18-nextjs-staging.yaml' - - 'node18-nextjs/**' - - '!node18-nextjs/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-node18-nextjs-staging.yaml' - - 'node18-nextjs/**' - - '!node18-nextjs/README.md' - - schedule: - - cron: '15 16 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd node21-nextjs; - - kraft cloud deploy \ - --no-start \ - --name node18-nextjs-staging-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain node18-nextjs-staging-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 756 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s node18-nextjs-staging-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://node18-nextjs-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop node18-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node18-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node18-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node18-nextjs-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node19-nextjs-stable.yaml b/.github/workflows/example-node19-nextjs-stable.yaml deleted file mode 100644 index cc6db8b6..00000000 --- a/.github/workflows/example-node19-nextjs-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/node19-nextjs (stable) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-node19-nextjs-stable.yaml' - - 'node19-nextjs/**' - - '!node19-nextjs/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-node19-nextjs-stable.yaml' - - 'node19-nextjs/**' - - '!node19-nextjs/README.md' - - schedule: - - cron: '15 16 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd node21-nextjs; - - kraft cloud deploy \ - --no-start \ - --name node19-nextjs-stable-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain node19-nextjs-stable-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 756 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s node19-nextjs-stable-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://node19-nextjs-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop node19-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node19-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node19-nextjs-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node19-nextjs-stable-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node19-nextjs-staging.yaml b/.github/workflows/example-node19-nextjs-staging.yaml deleted file mode 100644 index 22563739..00000000 --- a/.github/workflows/example-node19-nextjs-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/node19-nextjs (staging) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-node19-nextjs-staging.yaml' - - 'node19-nextjs/**' - - '!node19-nextjs/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-node19-nextjs-staging.yaml' - - 'node19-nextjs/**' - - '!node19-nextjs/README.md' - - schedule: - - cron: '15 16 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd node21-nextjs; - - kraft cloud deploy \ - --no-start \ - --name node19-nextjs-staging-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain node19-nextjs-staging-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 756 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s node19-nextjs-staging-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://node19-nextjs-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop node19-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node19-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node19-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node19-nextjs-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node20-nextjs-staging.yaml b/.github/workflows/example-node20-nextjs-staging.yaml deleted file mode 100644 index b37933a9..00000000 --- a/.github/workflows/example-node20-nextjs-staging.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/node20-nextjs (staging) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-node20-nextjs-staging.yaml' - - 'node20-nextjs/**' - - '!node20-nextjs/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-node20-nextjs-staging.yaml' - - 'node20-nextjs/**' - - '!node20-nextjs/README.md' - - schedule: - - cron: '15 16 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd node21-nextjs; - - kraft cloud deploy \ - --no-start \ - --name node20-nextjs-staging-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain node20-nextjs-staging-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 756 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s node20-nextjs-staging-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://node20-nextjs-staging-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop node20-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node20-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node20-nextjs-staging-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node20-nextjs-staging-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node21-remix-stable.yaml b/.github/workflows/example-node21-remix-stable.yaml deleted file mode 100644 index 2f1f4907..00000000 --- a/.github/workflows/example-node21-remix-stable.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: examples/node21-remix (stable) - -on: - workflow_dispatch: - - push: - branches: [ main ] - paths: - - '.github/workflows/example-node21-remix-stable.yaml' - - 'node21-remix/**' - - '!node21-remix/README.md' - - pull_request: - types: [ opened, synchronize, reopened ] - branches: [ main ] - paths: - - '.github/workflows/example-node21-remix-stable.yaml' - - 'node21-remix/**' - - '!node21-remix/README.md' - - schedule: - - cron: '30 16 * * 1-5' - -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - -env: - UKC_METRO: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1" - UKC_TOKEN: ${{ secrets.UKC_TOKEN }} - KRAFTKIT_NO_CHECK_UPDATES: true - KRAFTKIT_LOG_LEVEL: debug - -jobs: - integration: - timeout-minutes: 60 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Test - id: test - uses: unikraft/kraftkit@staging - with: - run: | - set -xe; - - cd node21-remix; - - kraft cloud deploy \ - --no-start \ - --name node21-remix-stable-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-testing/base-compat:latest \ - --subdomain node21-remix-stable-${GITHUB_RUN_ID} \ - -p 443:3000 \ - -M 768 \ - .; - - # wait for the instance to start - kraft cloud vm start -w 5s node21-remix-stable-${GITHUB_RUN_ID}; - sleep 5; - - curl -Lv --fail-with-body --max-time 10 https://node21-remix-stable-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - - - name: Cleanup - uses: unikraft/kraftkit@staging - if: always() - with: - run: | - set -xe; - - kraft cloud vm stop node21-remix-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm logs node21-remix-stable-${GITHUB_RUN_ID} || true; - kraft cloud vm rm node21-remix-stable-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/node21-remix-stable-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-node21-websocket-stable.yaml b/.github/workflows/example-node21-websocket-stable.yaml index 768df8da..c3a77f63 100644 --- a/.github/workflows/example-node21-websocket-stable.yaml +++ b/.github/workflows/example-node21-websocket-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-node21-websocket-staging.yaml b/.github/workflows/example-node21-websocket-staging.yaml index 321f45b6..893cf4d3 100644 --- a/.github/workflows/example-node21-websocket-staging.yaml +++ b/.github/workflows/example-node21-websocket-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '30 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-opentelemetry-collector-stable.yaml b/.github/workflows/example-opentelemetry-collector-stable.yaml index 46814bcd..32d81193 100644 --- a/.github/workflows/example-opentelemetry-collector-stable.yaml +++ b/.github/workflows/example-opentelemetry-collector-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-opentelemetry-collector-staging.yaml b/.github/workflows/example-opentelemetry-collector-staging.yaml index f7bea2e4..7859d598 100644 --- a/.github/workflows/example-opentelemetry-collector-staging.yaml +++ b/.github/workflows/example-opentelemetry-collector-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-postgres-stable.yaml b/.github/workflows/example-postgres-stable.yaml index 8cf27d9f..48b5f794 100644 --- a/.github/workflows/example-postgres-stable.yaml +++ b/.github/workflows/example-postgres-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-postgres-staging.yaml b/.github/workflows/example-postgres-staging.yaml index e1ffa1c7..bff97a94 100644 --- a/.github/workflows/example-postgres-staging.yaml +++ b/.github/workflows/example-postgres-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-python-playwright-chromium-stable.yaml b/.github/workflows/example-python-playwright-chromium-stable.yaml index aff8400b..1248f260 100644 --- a/.github/workflows/example-python-playwright-chromium-stable.yaml +++ b/.github/workflows/example-python-playwright-chromium-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-python-playwright-chromium-staging.yaml b/.github/workflows/example-python-playwright-chromium-staging.yaml index 7912f490..84dcf2d3 100644 --- a/.github/workflows/example-python-playwright-chromium-staging.yaml +++ b/.github/workflows/example-python-playwright-chromium-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '45 16 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-ruby3.2-rails-stable.yaml b/.github/workflows/example-ruby3.2-rails-stable.yaml index fdaa8ac5..f8156cac 100644 --- a/.github/workflows/example-ruby3.2-rails-stable.yaml +++ b/.github/workflows/example-ruby3.2-rails-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-ruby3.2-rails-staging.yaml b/.github/workflows/example-ruby3.2-rails-staging.yaml index 0d611289..a5bb6d08 100644 --- a/.github/workflows/example-ruby3.2-rails-staging.yaml +++ b/.github/workflows/example-ruby3.2-rails-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-skipper0.18-stable.yaml b/.github/workflows/example-skipper0.18-stable.yaml index 6e08f589..0527793d 100644 --- a/.github/workflows/example-skipper0.18-stable.yaml +++ b/.github/workflows/example-skipper0.18-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-skipper0.18-staging.yaml b/.github/workflows/example-skipper0.18-staging.yaml index 8c0e846f..57846e0a 100644 --- a/.github/workflows/example-skipper0.18-staging.yaml +++ b/.github/workflows/example-skipper0.18-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-traefik-stable.yaml b/.github/workflows/example-traefik-stable.yaml index c992c90f..a58e9130 100644 --- a/.github/workflows/example-traefik-stable.yaml +++ b/.github/workflows/example-traefik-stable.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-traefik-staging.yaml b/.github/workflows/example-traefik-staging.yaml index 6b955571..273d965d 100644 --- a/.github/workflows/example-traefik-staging.yaml +++ b/.github/workflows/example-traefik-staging.yaml @@ -21,6 +21,9 @@ on: schedule: - cron: '0 17 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} diff --git a/.github/workflows/example-code-server-stable.yaml b/.github/workflows/example-visual-studio-code-server-stable.yaml similarity index 56% rename from .github/workflows/example-code-server-stable.yaml rename to .github/workflows/example-visual-studio-code-server-stable.yaml index 3ade74f9..e8f8fa5c 100644 --- a/.github/workflows/example-code-server-stable.yaml +++ b/.github/workflows/example-visual-studio-code-server-stable.yaml @@ -1,26 +1,29 @@ -name: examples/code-server (stable) +name: examples/visual-studio-code-server (stable) on: workflow_dispatch: push: - branches: [ mariaciobanoiu8/code-server ] + branches: [ main ] paths: - - '.github/workflows/example-code-server-stable.yaml' - - 'code-server/**' - - '!code-server/README.md' + - '.github/workflows/example-visual-studio-code-server-stable.yaml' + - 'visual-studio-code-server/**' + - '!visual-studio-code-server/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-code-server-stable.yaml' - - 'code-server/**' - - '!code-server/README.md' + - '.github/workflows/example-visual-studio-code-server-stable.yaml' + - 'visual-studio-code-server/**' + - '!visual-studio-code-server/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd code-server; + cd visual-studio-code-server; kraft cloud volume create \ --name code-workspace \ @@ -58,9 +61,9 @@ jobs: --scale-to-zero on \ --scale-to-zero-stateful \ --scale-to-zero-cooldown 4s \ - --name code-server-${GITHUB_RUN_ID} \ - --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain code-server-${GITHUB_RUN_ID} \ + --name visual-studio-code-server-${GITHUB_RUN_ID} \ + --runtime index.unikraft.io/official-testing/base-compat:latest \ + --subdomain visual-studio-code-server-${GITHUB_RUN_ID} \ -p 443:8443 \ -M 2Gi \ -v code-workspace:/workspace \ @@ -72,10 +75,10 @@ jobs: .; # wait for the instance to start - kraft cloud vm start -w 5s code-server-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s visual-studio-code-server-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://code-server-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://visual-studio-code-server-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -84,7 +87,7 @@ jobs: run: | set -xe; - kraft cloud vm stop code-server-${GITHUB_RUN_ID} || true; - kraft cloud vm logs code-server-${GITHUB_RUN_ID} || true; - kraft cloud vm rm code-server-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/code-server-${GITHUB_RUN_ID} || true; + kraft cloud vm stop visual-studio-code-server-${GITHUB_RUN_ID} || true; + kraft cloud vm logs visual-studio-code-server-${GITHUB_RUN_ID} || true; + kraft cloud vm rm visual-studio-code-server-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/visual-studio-code-server-${GITHUB_RUN_ID} || true; diff --git a/.github/workflows/example-code-server-staging.yaml b/.github/workflows/example-visual-studio-code-server-staging.yaml similarity index 58% rename from .github/workflows/example-code-server-staging.yaml rename to .github/workflows/example-visual-studio-code-server-staging.yaml index de1c02fb..44f75d27 100644 --- a/.github/workflows/example-code-server-staging.yaml +++ b/.github/workflows/example-visual-studio-code-server-staging.yaml @@ -1,26 +1,29 @@ -name: examples/code-server (staging) +name: examples/visual-studio-code-server (staging) on: workflow_dispatch: push: - branches: [ mariaciobanoiu8/code-server ] + branches: [ main ] paths: - - '.github/workflows/example-code-server-staging.yaml' - - 'code-server/**' - - '!code-server/README.md' + - '.github/workflows/example-visual-studio-code-server-staging.yaml' + - 'visual-studio-code-server/**' + - '!visual-studio-code-server/README.md' pull_request: types: [ opened, synchronize, reopened ] branches: [ main ] paths: - - '.github/workflows/example-code-server-staging.yaml' - - 'code-server/**' - - '!code-server/README.md' + - '.github/workflows/example-visual-studio-code-server-staging.yaml' + - 'visual-studio-code-server/**' + - '!visual-studio-code-server/README.md' schedule: - cron: '0 15 * * 1-5' +permissions: + contents: read + # Automatically cancel in-progress actions on the same branch concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} @@ -47,7 +50,7 @@ jobs: run: | set -xe; - cd code-server; + cd visual-studio-code-server; kraft cloud volume create \ --name code-workspace \ @@ -58,9 +61,9 @@ jobs: --scale-to-zero on \ --scale-to-zero-stateful \ --scale-to-zero-cooldown 4s \ - --name code-server-${GITHUB_RUN_ID} \ + --name visual-studio-code-server-${GITHUB_RUN_ID} \ --runtime index.unikraft.io/official-staging/base-compat:latest \ - --subdomain code-server-${GITHUB_RUN_ID} \ + --subdomain visual-studio-code-server-${GITHUB_RUN_ID} \ -p 443:8443 \ -M 2Gi \ -v code-workspace:/workspace \ @@ -72,10 +75,10 @@ jobs: .; # wait for the instance to start - kraft cloud vm start -w 5s code-server-${GITHUB_RUN_ID}; + kraft cloud vm start -w 5s visual-studio-code-server-${GITHUB_RUN_ID}; sleep 5; - curl -Lv --fail-with-body --max-time 10 https://code-server-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app + curl -Lv --fail-with-body --max-time 10 https://visual-studio-code-server-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app - name: Cleanup uses: unikraft/kraftkit@staging @@ -84,7 +87,7 @@ jobs: run: | set -xe; - kraft cloud vm stop code-server-${GITHUB_RUN_ID} || true; - kraft cloud vm logs code-server-${GITHUB_RUN_ID} || true; - kraft cloud vm rm code-server-${GITHUB_RUN_ID} || true; - kraft cloud img rm index.unikraft.io/test/code-server-${GITHUB_RUN_ID} || true; + kraft cloud vm stop visual-studio-code-server-${GITHUB_RUN_ID} || true; + kraft cloud vm logs visual-studio-code-server-${GITHUB_RUN_ID} || true; + kraft cloud vm rm visual-studio-code-server-${GITHUB_RUN_ID} || true; + kraft cloud img rm index.unikraft.io/test/visual-studio-code-server-${GITHUB_RUN_ID} || true; diff --git a/README.md b/README.md index 95715cc5..0e0c2b2c 100644 --- a/README.md +++ b/README.md @@ -6,39 +6,82 @@ This repository contains examples of how to deploy applications onto [Unikraft C Example | Unikraft Cloud
`stable` | Unikraft Cloud
`staging` | |-|-|-| -[`caddy2.7-go1.21`](https://github.com/unikraft-cloud/examples/tree/main/caddy2.7-go1.21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-caddy2.7-go1.21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/.github/workflows/example-caddy2.7-go1.21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-caddy2.7-go1.21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/.github/workflows/example-caddy2.7-go1.21-staging.yaml) | -[`httpserver-gcc13.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-gcc13.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-staging.yaml) | -[`httpserver-g++13.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-g++13.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-staging.yaml) | -[`httpserver-boost1.74-g++13.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-boost1.74-g++13.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml) | -[`httpserver-go1.21`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-go1.21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-staging.yaml) | -[`httpserver-lua5.1`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-lua5.1) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-staging.yaml) | -[`httpserver-nodejs21`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-nodejs21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-nodejs21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-nodejs21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-nodejs21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-nodejs21-staging.yaml) | -[`httpserver-perl5.38`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-perl5.38) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.38-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.38-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.38-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.38-staging.yaml) | -[`httpserver-php8.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-php8.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-staging.yaml) | -[`httpserver-python3.12`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-staging.yaml) | -[`http-python3.12-flask3.0`](https://github.com/unikraft-cloud/examples/tree/main/http-python3.12-flask3.0) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-flask3.0-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-flask3.0-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-flask3.0-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-flask3.0-staging.yaml) | -[`http-python3.12-django5.0`](https://github.com/unikraft-cloud/examples/tree/main/http-python3.12-django5.0) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-django5.0-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-django5.0-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-django5.0-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-http-python3.12-django5.0-staging.yaml) | -[`httpserver-ruby3.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-ruby3.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-staging.yaml) | -[`httpserver-rust1.73`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust1.73) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.73-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.73-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.73-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.73-staging.yaml) | -[`httpserver-rust1.87-actix-web4`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust1.87-actix-web4) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml) | -[`httpserver-rust1.81-rocket0.5`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust1.81-rocket0.5) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml) | -[`imaginary`](https://github.com/unikraft-cloud/examples/tree/main/imaginary) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-staging.yaml) | -[`nginx`](https://github.com/unikraft-cloud/examples/tree/main/nginx) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-staging.yaml) | -[`expressjs4.18-node21`](https://github.com/unikraft-cloud/examples/tree/main/expressjs4.18-node21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-expressjs4.18-node21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-expressjs4.18-node21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-expressjs4.18-node21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-expressjs4.18-node21-staging.yaml) | -[`node19-nextjs`](https://github.com/unikraft-cloud/examples/tree/main/node21-nextjs) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node19-nextjs-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node19-nextjs-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node19-nextjs-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node19-nextjs-staging.yaml) | -[`node20-nextjs`](https://github.com/unikraft-cloud/examples/tree/main/node21-nextjs) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node20-nextjs-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node20-nextjs-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node20-nextjs-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node20-nextjs-staging.yaml) | -[`node21-nextjs`](https://github.com/unikraft-cloud/examples/tree/main/node21-nextjs) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-nextjs-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-nextjs-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-nextjs-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-nextjs-staging.yaml) | -[`node18-nextjs`](https://github.com/unikraft-cloud/examples/tree/main/node21-nextjs) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-staging.yaml) | -[`node21-solidstart`](https://github.com/unikraft-cloud/examples/tree/main/node21-solid-start) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-staging.yaml) | -[`node21-remix`](https://github.com/unikraft-cloud/examples/tree/main/node21-remix) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-staging.yaml) | -[`node21-websocket`](https://github.com/unikraft-cloud/examples/tree/main/node21-websocket) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml) | -[`prisma-expressjs4.19-node18`](https://github.com/unikraft-cloud/examples/tree/main/prisma-expressjs4.19-node18) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-prisma-expressjs4.19-node18-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-prisma-expressjs4.19-node18-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-prisma-expressjs4.19-node18-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-prisma-expressjs4.19-node18-staging.yaml) | -[`node-playwright-chromium`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-chromium) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml) | -[`node-playwright-firefox`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-firefox) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml) | -[`node-playwright-webkit`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-webkit) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-staging.yaml) | -[`postgres`](https://github.com/unikraft-cloud/examples/tree/main/postgres) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-staging.yaml) | -[`python-playwright-chromium`](https://github.com/unikraft-cloud/examples/tree/main/python-playwright-chromium) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-staging.yaml) | -[`ruby3.2-rails`](https://github.com/unikraft-cloud/examples/tree/main/ruby3.2-rails) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-staging.yaml) | -[`skipper0.18`](https://github.com/unikraft-cloud/examples/tree/main/skipper0.18) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-staging.yaml) | -[`traefik`](https://github.com/unikraft-cloud/examples/tree/main/traefik) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-staging.yaml) | -[`opentelemetry-collector`](https://github.com/unikraft-cloud/examples/tree/main/opentelemetry-collector) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-staging.yaml) | +| [`caddy2.7-go1.21`](https://github.com/unikraft-cloud/examples/tree/main/caddy2.7-go1.21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-caddy2.7-go1.21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-caddy2.7-go1.21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-caddy2.7-go1.21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-caddy2.7-go1.21-staging.yaml) | +| [`chromium-cdp`](https://github.com/unikraft-cloud/examples/tree/main/chromium-cdp) | | | +| [`debian-ssh`](https://github.com/unikraft-cloud/examples/tree/main/debian-ssh) | | | +| [`dragonflydb`](https://github.com/unikraft-cloud/examples/tree/main/dragonflydb) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-dragonflydb-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-dragonflydb-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-dragonflydb-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-dragonflydb-staging.yaml) | +| [`duckdb-go1.21`](https://github.com/unikraft-cloud/examples/tree/main/duckdb-go1.21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-duckdb-go1.21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-duckdb-go1.21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-duckdb-go1.21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-duckdb-go1.21-staging.yaml) | +| [`github-webhook-node`](https://github.com/unikraft-cloud/examples/tree/main/github-webhook-node) | | | +| [`grafana`](https://github.com/unikraft-cloud/examples/tree/main/grafana) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-grafana-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-grafana-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-grafana-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-grafana-staging.yaml) | +| [`haproxy`](https://github.com/unikraft-cloud/examples/tree/main/haproxy) | | | +| [`httpserver-boost1.74-g++13.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-boost1.74-g++13.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-boost1.74-g++13.2-staging.yaml) | +| [`httpserver-bun`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-bun) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-bun-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-bun-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-bun-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-bun-staging.yaml) | +| [`httpserver-c-debug`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-c-debug) | | | +| [`httpserver-dotnet10.0`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-dotnet10.0) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-dotnet10.0-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-dotnet10.0-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-dotnet10.0-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-dotnet10.0-staging.yaml) | +| [`httpserver-elixir1.16`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-elixir1.16) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-elixir1.16-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-elixir1.16-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-elixir1.16-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-elixir1.16-staging.yaml) | +| [`httpserver-erlang26.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-erlang26.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-erlang26.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-erlang26.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-erlang26.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-erlang26.2-staging.yaml) | +| [`httpserver-expressjs4.18-node21`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-expressjs4.18-node21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-expressjs4.18-node21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-expressjs4.18-node21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-expressjs4.18-node21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-expressjs4.18-node21-staging.yaml) | +| [`httpserver-flask-redis`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-flask-redis) | | | +| [`httpserver-g++13.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-g++13.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-g++13.2-staging.yaml) | +| [`httpserver-gcc13.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-gcc13.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-gcc13.2-staging.yaml) | +| [`httpserver-go1.21`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-go1.21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-go1.21-staging.yaml) | +| [`httpserver-go1.22-redis`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-go1.22-redis) | | | +| [`httpserver-java17-spring-petclinic`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-java17-spring-petclinic) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-spring-petclinic-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-spring-petclinic-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-spring-petclinic-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-spring-petclinic-staging.yaml) | +| [`httpserver-java17-springboot3.2.x`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-java17-springboot3.2.x) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-springboot3.2.x-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-springboot3.2.x-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-springboot3.2.x-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java17-springboot3.2.x-staging.yaml) | +| [`httpserver-java21`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-java21) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java21-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java21-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java21-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-java21-staging.yaml) | +| [`httpserver-lua5.1`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-lua5.1) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-lua5.1-staging.yaml) | +| [`httpserver-nginx-vite-vanilla`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-nginx-vite-vanilla) | | | +| [`httpserver-node-express-puppeteer`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node-express-puppeteer) | | | +| [`httpserver-node-vite-ssr-vanilla`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node-vite-ssr-vanilla) | | | +| [`httpserver-node-vite-vanilla`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node-vite-vanilla) | | | +| [`httpserver-node21-nextjs`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node21-nextjs) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-nextjs-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-nextjs-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-nextjs-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-nextjs-staging.yaml) | +| [`httpserver-node21-remix`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node21-remix) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-remix-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-remix-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-remix-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-remix-staging.yaml) | +| [`httpserver-node21-solid-start`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node21-solid-start) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-solid-start-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-solid-start-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-solid-start-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node21-solid-start-staging.yaml) | +| [`httpserver-node21-sveltekit`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node21-sveltekit) | | | +| [`httpserver-node25`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-node25) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node25-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node25-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node25-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-node25-staging.yaml) | +| [`httpserver-perl5.42`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-perl5.42) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.42-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.42-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.42-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-perl5.42-staging.yaml) | +| [`httpserver-php8.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-php8.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-php8.2-staging.yaml) | +| [`httpserver-prisma-expressjs4.19-node18`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-prisma-expressjs4.19-node18) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-prisma-expressjs4.19-node18-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-prisma-expressjs4.19-node18-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-prisma-expressjs4.19-node18-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-prisma-expressjs4.19-node18-staging.yaml) | +| [`httpserver-python3.12`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-staging.yaml) | +| [`httpserver-python3.12-FastAPI-0.121.3`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-FastAPI-0.121.3) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-FastAPI-0.121.3-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-FastAPI-0.121.3-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-FastAPI-0.121.3-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-FastAPI-0.121.3-staging.yaml) | +| [`httpserver-python3.12-django5.0`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-django5.0) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-django5.0-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-django5.0-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-django5.0-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-django5.0-staging.yaml) | +| [`httpserver-python3.12-flask3.0`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-flask3.0) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-flask3.0-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-flask3.0-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-flask3.0-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-python3.12-flask3.0-staging.yaml) | +| [`httpserver-python3.12-flask3.0-sqlite`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-flask3.0-sqlite) | | | +| [`httpserver-ruby3.2`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-ruby3.2) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-ruby3.2-staging.yaml) | +| [`httpserver-rust-trunkrs-leptos`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust-trunkrs-leptos) | | | +| [`httpserver-rust1.75-tokio`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust1.75-tokio) | | | +| [`httpserver-rust1.81-rocket0.5`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust1.81-rocket0.5) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.81-rocket0.5-staging.yaml) | +| [`httpserver-rust1.87-actix-web4`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust1.87-actix-web4) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.87-actix-web4-staging.yaml) | +| [`httpserver-rust1.91`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-rust1.91) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.91-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.91-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.91-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-httpserver-rust1.91-staging.yaml) | +| [`hugo0.122`](https://github.com/unikraft-cloud/examples/tree/main/hugo0.122) | | | +| [`imaginary`](https://github.com/unikraft-cloud/examples/tree/main/imaginary) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-imaginary-staging.yaml) | +| [`mariadb`](https://github.com/unikraft-cloud/examples/tree/main/mariadb) | | | +| [`mcp-server-arxiv`](https://github.com/unikraft-cloud/examples/tree/main/mcp-server-arxiv) | | | +| [`mcp-server-simple`](https://github.com/unikraft-cloud/examples/tree/main/mcp-server-simple) | | | +| [`memcached1.6`](https://github.com/unikraft-cloud/examples/tree/main/memcached1.6) | | | +| [`minio`](https://github.com/unikraft-cloud/examples/tree/main/minio) | | | +| [`mongodb`](https://github.com/unikraft-cloud/examples/tree/main/mongodb) | | | +| [`nginx`](https://github.com/unikraft-cloud/examples/tree/main/nginx) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-nginx-staging.yaml) | +| [`nginx-flask-mongo`](https://github.com/unikraft-cloud/examples/tree/main/nginx-flask-mongo) | | | +| [`node-playwright-chromium`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-chromium) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml) | +| [`node-playwright-firefox`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-firefox) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml) | +| [`node-playwright-webkit`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-webkit) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-webkit-staging.yaml) | +| [`node18-agario`](https://github.com/unikraft-cloud/examples/tree/main/node18-agario) | | | +| [`node18-wingsio`](https://github.com/unikraft-cloud/examples/tree/main/node18-wingsio) | | | +| [`node21-websocket`](https://github.com/unikraft-cloud/examples/tree/main/node21-websocket) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml) | +| [`node24-karaoke`](https://github.com/unikraft-cloud/examples/tree/main/node24-karaoke) | | | +| [`novnc-browser`](https://github.com/unikraft-cloud/examples/tree/main/novnc-browser) | | | +| [`opentelemetry-collector`](https://github.com/unikraft-cloud/examples/tree/main/opentelemetry-collector) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-opentelemetry-collector-staging.yaml) | +| [`phoenix-postgres`](https://github.com/unikraft-cloud/examples/tree/main/phoenix-postgres) | | | +| [`postgres`](https://github.com/unikraft-cloud/examples/tree/main/postgres) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-postgres-staging.yaml) | +| [`python-playwright-chromium`](https://github.com/unikraft-cloud/examples/tree/main/python-playwright-chromium) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-python-playwright-chromium-staging.yaml) | +| [`ruby3.2-rails`](https://github.com/unikraft-cloud/examples/tree/main/ruby3.2-rails) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-ruby3.2-rails-staging.yaml) | +| [`skipper0.18`](https://github.com/unikraft-cloud/examples/tree/main/skipper0.18) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-skipper0.18-staging.yaml) | +| [`spin-wagi-http`](https://github.com/unikraft-cloud/examples/tree/main/spin-wagi-http) | | | +| [`traefik`](https://github.com/unikraft-cloud/examples/tree/main/traefik) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-traefik-staging.yaml) | +| [`tyk`](https://github.com/unikraft-cloud/examples/tree/main/tyk) | | | +| [`visual-studio-code-server`](https://github.com/unikraft-cloud/examples/tree/main/visual-studio-code-server) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-visual-studio-code-server-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-visual-studio-code-server-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-visual-studio-code-server-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-visual-studio-code-server-staging.yaml) | +| [`vsftpd`](https://github.com/unikraft-cloud/examples/tree/main/vsftpd) | | | +| [`wazero-import-go`](https://github.com/unikraft-cloud/examples/tree/main/wazero-import-go) | | | +| [`wordpress-all-in-one`](https://github.com/unikraft-cloud/examples/tree/main/wordpress-all-in-one) | | | +| [`wordpress-compose`](https://github.com/unikraft-cloud/examples/tree/main/wordpress-compose) | | | diff --git a/caddy2.7-go1.21/README.md b/caddy2.7-go1.21/README.md index 8bd6b257..8bc8fa1a 100644 --- a/caddy2.7-go1.21/README.md +++ b/caddy2.7-go1.21/README.md @@ -7,11 +7,11 @@ To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/caddy/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/caddy2.7-go1.21/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/caddy/ +cd examples/caddy2.7-go1.21/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -34,20 +34,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: caddy-vhf4m + ├────────── name: caddy2.7-go1.21-vhf4m ├────────── uuid: db624eff-4739-4500-873c-f7c58e4eefd7 ├───────── state: running ├─────────── url: https://frosty-sky-vz8kwsmb.fra.unikraft.app - ├───────── image: caddy@sha256:25df97e3c43147c683f31dd062d0fa75122358b596de5804ca246c4e8613dd56 + ├───────── image: caddy2.7-go1.21@sha256:25df97e3c43147c683f31dd062d0fa75122358b596de5804ca246c4e8613dd56 ├───── boot time: 20.18ms ├──────── memory: 256 MiB ├─────── service: frosty-sky-vz8kwsmb - ├── private fqdn: caddy-vhf4m.internal + ├── private fqdn: caddy2.7-go1.21-vhf4m.internal ├──── private ip: 172.16.6.2 └────────── args: /usr/bin/caddy run --config /etc/caddy/Caddyfile ``` -In this case, the instance name is `caddy-vhf4m` and the address is `https://frosty-sky-vz8kwsmb.fra.unikraft.app`. +In this case, the instance name is `caddy2.7-go1.21-vhf4m` and the address is `https://frosty-sky-vz8kwsmb.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of Caddy. @@ -55,6 +55,7 @@ Use `curl` to query the Unikraft Cloud instance of Caddy. ```bash curl https://frosty-sky-vz8kwsmb.fra.unikraft.app ``` + ```text Hello World! ``` @@ -64,15 +65,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -caddy-vhf4m frosty-sky-vz8kwsmb.fra.unikraft.app running 1 minute ago caddy@sha25:25df97e3c43147c683f... 256 MiB 1 /usr/bin/caddy run --config /e... 20180us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +caddy2.7-go1.21-vhf4m frosty-sky-vz8kwsmb.fra.unikraft.app running 1 minute ago caddy2.7-go1.21@sha256:25df97e3c... 256 MiB 1 /usr/bin/caddy run --config /e... 20180us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove caddy-vhf4m +kraft cloud instance remove caddy2.7-go1.21-vhf4m ``` ## Customize your app diff --git a/chromium-cdp/README.md b/chromium-cdp/README.md index c1efe186..7b5983df 100644 --- a/chromium-cdp/README.md +++ b/chromium-cdp/README.md @@ -6,7 +6,7 @@ To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/get-docker/). -2. Clone [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/chromium-cdp/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/chromium-cdp/` directory: ```bash git clone https://github.com/unikraft-cloud/examples @@ -45,7 +45,8 @@ The output shows the instance address and other details. └─────── args: /usr/bin/wrapper.sh /usr/bin/node /app/proxy.js ``` -In this case, the instance name is `chromium-cdp-d0l6y` and the address is `https://spring-dream-p5wxwwl0.fra.unikraft.app`. They're different for each run. +In this case, the instance name is `chromium-cdp-d0l6y` and the address is `https://spring-dream-p5wxwwl0.fra.unikraft.app`. +They're different for each run. To query the service you need to use a CDP client. You can use the Python-based implementation in the `test/` directory. diff --git a/debian-ssh/README.md b/debian-ssh/README.md index 4c9d5ca7..8585be22 100644 --- a/debian-ssh/README.md +++ b/debian-ssh/README.md @@ -1,4 +1,4 @@ -# Debian with SSH +# Debian SSH server This guide explains how to create and deploy a Debian app with SSH enabled. To run this example, follow these steps: @@ -59,7 +59,8 @@ Then connect to the instance via SSH using: ssh -l root localhost -p 2222 ``` -You might see warnings like `REMOTE HOST IDENTIFICATION HAS CHANGED`. This is normal if you have set up tunnels to connect with SSH on `localhost`, so do not worry. +You might see warnings like `REMOTE HOST IDENTIFICATION HAS CHANGED`. +This is normal if you have set up tunnels to connect with SSH on `localhost`, so don't worry. You can list information about the instance by running: diff --git a/dragonflydb/README.md b/dragonflydb/README.md index b9aea796..1a1f92a1 100644 --- a/dragonflydb/README.md +++ b/dragonflydb/README.md @@ -54,6 +54,7 @@ Use `curl` to query the Unikraft Cloud instance of Drangonfly. ```bash curl https://dry-moon-x6bgl6c0.fra.unikraft.app ``` + ```html @@ -86,6 +87,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME dragonflydb-10zgk dry-moon-x6bgl6c0.fra.unikraft.app running 1 minute ago dragonflydb@sha256:21e6d3... 512 MiB 1 /usr/bin/dragonfly --maxmemor... 28740us diff --git a/duckdb-go1.21/README.md b/duckdb-go1.21/README.md index 92161a01..647e856b 100644 --- a/duckdb-go1.21/README.md +++ b/duckdb-go1.21/README.md @@ -6,11 +6,11 @@ To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/duckdb-go/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/duckdb-go1.21/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/duckdb-go/ +cd examples/duckdb-go1.21/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -33,20 +33,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: duckdb-go-qfd8x + ├────────── name: duckdb-go1.21-qfd8x ├────────── uuid: 90960d27-458b-4dd7-a037-2a9a3a47f095 ├───────── state: running ├─────────── url: https://autumn-gorilla-hg4h6sup.fra.unikraft.app - ├───────── image: duckdb-go@sha256:6999293f8694ac00beb6a1d639fab8f96f78c2e6ecb8ccb2311539908895a699 + ├───────── image: duckdb-go1.21@sha256:6999293f8694ac00beb6a1d639fab8f96f78c2e6ecb8ccb2311539908895a699 ├───── boot time: 32.12 ms ├──────── memory: 256 MiB ├─────── service: autumn-gorilla-hg4h6sup - ├── private fqdn: duckdb-go-qfd8x.internal + ├── private fqdn: duckdb-go1.21-qfd8x.internal ├──── private ip: 172.16.6.2 └────────── args: /server ``` -In this case, the instance name is `duckdb-go-qfd8x` and the address is `https://autumn-gorilla-hg4h6sup.fra.unikraft.app`. +In this case, the instance name is `duckdb-go1.21-qfd8x` and the address is `https://autumn-gorilla-hg4h6sup.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of DuckDB. @@ -54,6 +54,7 @@ Use `curl` to query the Unikraft Cloud instance of DuckDB. ```bash curl https://autumn-gorilla-hg4h6sup.fra.unikraft.app ``` + ```text id: %d, name: %s 42 John ``` @@ -63,15 +64,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -duckdb-go-qfd8x autumn-gorilla-hg4h6sup.fra.unikraft.app running 1 minute ago duckdb-go... 256 MiB 1 /server 32118us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +duckdb-go1.21-qfd8x autumn-gorilla-hg4h6sup.fra.unikraft.app running 1 minute ago duckdb-go1.21@sha256:6999293f869... 256 MiB 1 /server 32118us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove duckdb-go-qfd8x +kraft cloud instance remove duckdb-go1.21-qfd8x ``` ## Customize your app diff --git a/flask3.0-python3.12-sqlite3/Dockerfile b/flask3.0-python3.12-sqlite3/Dockerfile deleted file mode 100644 index af331146..00000000 --- a/flask3.0-python3.12-sqlite3/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM python:3.12-bookworm AS build - -RUN set -xe; \ - /usr/sbin/ldconfig /usr/local/lib - -WORKDIR /app - -COPY requirements.txt /app - -RUN pip3 install -r requirements.txt --no-cache-dir - -FROM scratch - -COPY --from=build /usr/local/lib /usr/local/lib -COPY --from=build /usr/local/bin/python3 /usr/bin/python3 -COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6 -COPY --from=build /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6 -COPY --from=build /usr/lib/x86_64-linux-gnu/libz.so.1 /usr/lib/x86_64-linux-gnu/libz.so.1 -COPY --from=build /usr/lib/x86_64-linux-gnu/libcrypto.so.3 /usr/lib/x86_64-linux-gnu/libcrypto.so.3 -COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 -COPY --from=build /etc/ld.so.cache /etc/ld.so.cache - -COPY ./server.py /src/server.py diff --git a/flask3.0-python3.12-sqlite3/Kraftfile b/flask3.0-python3.12-sqlite3/Kraftfile deleted file mode 100644 index 103c377c..00000000 --- a/flask3.0-python3.12-sqlite3/Kraftfile +++ /dev/null @@ -1,12 +0,0 @@ -spec: v0.6 - -runtime: base-compat:latest - -labels: - cloud.unikraft.v1.instances/scale_to_zero.policy: "on" - cloud.unikraft.v1.instances/scale_to_zero.stateful: "false" - cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 - -rootfs: ./Dockerfile - -cmd: ["/usr/bin/python3", "/src/server.py"] diff --git a/flask3.0-python3.12-sqlite3/README.md b/flask3.0-python3.12-sqlite3/README.md deleted file mode 100644 index f3ce6f25..00000000 --- a/flask3.0-python3.12-sqlite3/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# Flask - -This guide explains how to create and deploy a [Flask](https://flask.palletsprojects.com/en/3.0.x/) web server. -To run this example, follow these steps: - -1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). - -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-python3.12-flask3.0/` directory: - -```bash -git clone https://github.com/unikraft-cloud/examples -cd examples/http-python3.12-flask3.0/ -``` - -Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. -This guide uses `fra` (Frankfurt, 🇩🇪): - -```bash -export UKC_TOKEN=token -# Set metro to Frankfurt, DE -export UKC_METRO=fra -``` - -When done, invoke the following command to deploy this app on Unikraft Cloud: - -```bash -kraft cloud deploy -p 443:8080 -M 512 . -``` - -The output shows the instance address and other details: - -```ansi -[●] Deployed successfully! - │ - ├────────── name: http-python312-flask30-bxwxm - ├────────── uuid: 3ff1ebad-2639-4214-bab4-ed35c4c32fa4 - ├───────── state: running - ├─────────── url: https://damp-sunset-azd6dtyt.fra.unikraft.app - ├───────── image: http-python312-flask30@sha256:d6c8e4c5a4f44e1d642d8eaeaa1d820b2841194dd6c5d4a872ae0a895c767da9 - ├───── boot time: 222.27 ms - ├──────── memory: 512 MiB - ├─────── service: damp-sunset-azd6dtyt - ├── private fqdn: http-python312-flask30-bxwxm.internal - ├──── private ip: 172.16.6.5 - └────────── args: /usr/bin/python3 /app/server.py -``` - -In this case, the instance name is `http-python312-flask30-bxwxm` and the address is `https://damp-sunset-azd6dtyt.fra.unikraft.app`. -They're different for each run. - -Use `curl` to query the Unikraft Cloud instance of the Python-based HTTP web server: - -```bash -curl https://young-night-5fpf0jj8.fra.unikraft.app -``` -```text -Hello, World! -``` - -You can list information about the instance by running: - -```bash -kraft cloud instance list -``` -```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-python312-flask30-bxwxm damp-sunset-azd6dtyt.fra.unikraft.app running 1 minute ago http-python312-flask30@sha256:d6c8e... 512 MiB 1 /usr/bin/python3 /app/server.py 222273us -``` - -When done, you can remove the instance: - -```bash -kraft cloud instance remove http-python312-flask30-bxwxm -``` - -## Customize your app - -To customize the app, update the files in the repository, listed below: - -* `server.py`: the actual Python HTTP server -* `Kraftfile`: the Unikraft Cloud specification -* `Dockerfile`: the Docker-specified app filesystem - -Lines in the `Kraftfile` have the following roles: - -* `spec: v0.6`: The current `Kraftfile` specification version is `0.6`. - -* `runtime: python:3.12`: The Unikraft runtime kernel to use is Python 3.12. - -* `rootfs: ./Dockerfile`: Build the app root filesystem using the `Dockerfile`. - -* `cmd: ["/usr/bin/python3", "/src/server.py"]`: Use `/usr/bin/python3 /src/server.py` as the starting command of the instance. - -Lines in the `Dockerfile` have the following roles: - -* `FROM scratch`: Build the filesystem from the [`scratch` container image](https://hub.docker.com/_/scratch/), to [create a base image](https://docs.docker.com/build/building/base-images/). - -* `COPY ./server.py /app/server.py`: Copy the server implementation file (`server.py`) in the Docker filesystem (in `/app/server.py`). - -The following options are available for customizing the app: - -* If you only update the implementation in the `server.py` source file, you don't need to make any other changes. - -* If you create any new source files, copy them into the app filesystem by using the `COPY` command in the `Dockerfile`. - -* More extensive changes may require extending the `Dockerfile` ([see `Dockerfile` syntax reference](https://docs.docker.com/engine/reference/builder/)). - This includes the use of Python frameworks and the use of `pip`, as shown in the next section. - -## Using `pip` - -[`pip`](https://pip.pypa.io/en/stable/) is a package manager for Python. -It's used to install dependencies for Python apps. -`pip` uses the `requirements.txt` file to list required dependencies (with versions). - -To create an `pip`-based app: - -1. Add the `requirements.txt` file used by `pip`. - -2. Add framework-specific source files. - In this case, this means the `server.py` file. - -3. Update the `Dockerfile` to: - - 3.1. `COPY` the local files. - - 3.2. `RUN` the `pip3 install` command to install dependencies. - - 3.3. `COPY` of the resulting and required files (`/usr/local/lib/python3.12` and `server.py`) in the app filesystem, using the [`scratch` container](https://hub.docker.com/_/scratch/). - -The following lists the files: - -The `requirements.txt` file lists the `flask` dependency. - -The `Kraftfile` is the same one used for `http-python3.12`. - -For `Dockerfile` newly added lines have the following roles: - -* `FROM python:3.12-bookworm AS base`: Use the base image of the `python:3.12-bookworm` container. - This provides the `pip3` binary and other Python-related components. - Name the current image `base`. - -* `WORKDIR /app`: Use `/app` as working directory. - All other commands in the `Dockerfile` run inside this directory. - -* `COPY requirements.txt /app`: Copy the package configuration file to the Docker filesystem. - -* `RUN pip3 install ...`: Install `pip` components listed in `requirements.txt`. - -* `COPY --from=base ...`: Copy generated Python files in the new `base` image in the `scratch`-based image. - -Similar actions apply to other `pip3`-based apps. - -## Learn more - -Use the `--help` option for detailed information on using Unikraft Cloud: - -```bash -kraft cloud --help -``` - -Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/flask3.0-python3.12-sqlite3/requirements.txt b/flask3.0-python3.12-sqlite3/requirements.txt deleted file mode 100644 index 34e39e64..00000000 --- a/flask3.0-python3.12-sqlite3/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -flask>=3.0,<3.1 diff --git a/flask3.0-python3.12-sqlite3/server.py b/flask3.0-python3.12-sqlite3/server.py deleted file mode 100644 index f6f20f2b..00000000 --- a/flask3.0-python3.12-sqlite3/server.py +++ /dev/null @@ -1,9 +0,0 @@ -from flask import Flask -app = Flask(__name__) - -@app.route('/') -def hello(): - return "Hello, World!\n" - -if __name__ == '__main__': - app.run(host='0.0.0.0', port=8080) diff --git a/webhook-github-node/.gitignore b/github-webhook-node/.gitignore similarity index 100% rename from webhook-github-node/.gitignore rename to github-webhook-node/.gitignore diff --git a/webhook-github-node/Dockerfile b/github-webhook-node/Dockerfile similarity index 100% rename from webhook-github-node/Dockerfile rename to github-webhook-node/Dockerfile diff --git a/webhook-github-node/Kraftfile b/github-webhook-node/Kraftfile similarity index 100% rename from webhook-github-node/Kraftfile rename to github-webhook-node/Kraftfile diff --git a/webhook-github-node/README.md b/github-webhook-node/README.md similarity index 80% rename from webhook-github-node/README.md rename to github-webhook-node/README.md index ed1974c6..bb0e4429 100644 --- a/webhook-github-node/README.md +++ b/github-webhook-node/README.md @@ -7,11 +7,11 @@ To run this it, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/webhook-github-node/` directory: +1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/github-webhook-node/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/webhook-github-node/ +cd examples/github-webhook-node/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -29,25 +29,26 @@ When done, invoke the following command to deploy this app on Unikraft Cloud: kraft cloud deploy -p 443:3000 -M 1Gi -e GITHUB_WEBHOOK_SECRET=your_secret_here . ``` -`GITHUB_WEBHOOK_SECRET` is the secret used to validate incoming webhook requests from GitHub. Set it to a string with high entropy. +`GITHUB_WEBHOOK_SECRET` is the secret used to verify incoming webhook requests from GitHub. +Set it to a string with high entropy. The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├─────── name: webhook-github-node-bzq7u + ├─────── name: github-webhook-node-bzq7u ├─────── uuid: 8a8634f1-fc78-4cc0-aa36-8f082d8a59f5 ├────── metro: https://api.fra.unikraft.cloud/v1 ├────── state: starting ├───── domain: https://dry-cloud-uuw0qlb6.fra.unikraft.app - ├────── image: acioc/webhook-github-node@sha256:10974aac67ce6355148e21d91f918960bf0af29ad840fffeeb2fd01f8c905f66 + ├────── image: github-webhook-node@sha256:10974aac67ce6355148e21d91f918960bf0af29ad840fffeeb2fd01f8c905f66 ├───── memory: 1024 MiB ├──── service: dry-cloud-uuw0qlb6 ├─ private ip: 10.0.1.205 └─────── args: node /app/server.js ``` -In this case, the instance name is `webhook-github-node-bzq7u` and the address is `https://dry-cloud-uuw0qlb6.fra.unikraft.app`. +In this case, the instance name is `github-webhook-node-bzq7u` and the address is `https://dry-cloud-uuw0qlb6.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Node.js webhook server's health endpoint: @@ -55,18 +56,20 @@ Use `curl` to query the Unikraft Cloud instance of the Node.js webhook server's ```bash curl https://dry-cloud-uuw0qlb6.fra.unikraft.app/health ``` + ```text {"status":"healthy","timestamp":"2025-12-17T14:55:20.953Z","uptime":0.063799807} ``` -The `uptime` field is so small because the instance is scaled to zero when no connections are active. +The `uptime` field is so small because Unikraft Cloud scales the instance to zero when no connections are active. When a request comes in, Unikraft Cloud automatically starts the instance. To see the incoming webhook events (you set up the [webhook in GitHub](#test-github-webhooks)), you can retrieve the logs of the instance by running: ```bash -kraft cloud instance logs webhook-github-node-bzq7u --follow +kraft cloud instance logs github-webhook-node-bzq7u --follow ``` + ```console [2025-12-17T15:20:54.524Z] Webhook received: ping { @@ -81,34 +84,36 @@ kraft cloud instance logs webhook-github-node-bzq7u --follow ... ``` -The `ping` event is sent by GitHub when you set up the webhook. +GitHub sends the `ping` event when you set up the webhook. You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -webhook-github-node-bzq7u dry-cloud-uuw0qlb6.fra.unikraft.app standby standby webhook-github-node@sha256:10974aac67ce6355148e... 1.0 GiB 1 node /app/server.js 197.47 ms +github-webhook-node-bzq7u dry-cloud-uuw0qlb6.fra.unikraft.app standby standby github-webhook-node@sha256:10974aac67ce6355148e... 1.0 GiB 1 node /app/server.js 197.47 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove webhook-github-node-bzq7u +kraft cloud instance remove github-webhook-node-bzq7u ``` ## Test GitHub webhooks To test the GitHub webhook receiver, you must set up a [webhook in a GitHub repository](https://docs.github.com/en/webhooks/using-webhooks/creating-webhooks). -Make sure to set the payload URL to the Unikraft Cloud instance webhook, in this case `https://dry-cloud-uuw0qlb6.fra.unikraft.app/webhook/github`. +Make sure to set the payload address to the Unikraft Cloud instance webhook, in this case `https://dry-cloud-uuw0qlb6.fra.unikraft.app/webhook/github`. You should also set the content type to `application/json` and select the events you want to receive. -Lastly, you should set the secret to validate that the requests come from GitHub and were not tampered with. +Lastly, you should set the secret to verify that the requests come from GitHub and weren't tampered with. Now, once you make changes in the repository (that you are listening to), you should see the webhook events logged in the instance logs: ```bash -kraft cloud instance logs webhook-github-node-bzq7u --follow +kraft cloud instance logs github-webhook-node-bzq7u --follow ``` + ```console [2025-12-17T17:28:51.136Z] Webhook received: push { diff --git a/webhook-github-node/package-lock.json b/github-webhook-node/package-lock.json similarity index 100% rename from webhook-github-node/package-lock.json rename to github-webhook-node/package-lock.json diff --git a/webhook-github-node/package.json b/github-webhook-node/package.json similarity index 100% rename from webhook-github-node/package.json rename to github-webhook-node/package.json diff --git a/webhook-github-node/server.js b/github-webhook-node/server.js similarity index 100% rename from webhook-github-node/server.js rename to github-webhook-node/server.js diff --git a/grafana/README.md b/grafana/README.md index 9d21f653..3538db6b 100644 --- a/grafana/README.md +++ b/grafana/README.md @@ -57,6 +57,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME grafana-sikrv icy-sea-i6m5fwyk.fra.unikraft.app running 11 minutes ago grafana@sha256:484d6f98c... 2048 MiB 1 /usr/share/grafana/bin/grafana server... 502651us diff --git a/haproxy/README.md b/haproxy/README.md index e18498ca..bb8172cc 100644 --- a/haproxy/README.md +++ b/haproxy/README.md @@ -57,6 +57,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME haproxy-rfx6z cool-paper-svzzr3qq.fra.unikraft.app running 1 minute ago haproxy@sha256:32296847231c1515... 256 MiB 1 /usr/bin/haproxy -f /etc/hapro... 26596us diff --git a/http-elixir1.17/.dockerignore b/http-elixir1.17/.dockerignore deleted file mode 100644 index 4cfc4755..00000000 --- a/http-elixir1.17/.dockerignore +++ /dev/null @@ -1,29 +0,0 @@ -# The directory Mix will write compiled artifacts to. -/_build/ - -# If you run "mix test --cover", coverage assets end up here. -/cover/ - -# The directory Mix downloads your dependencies sources to. -/deps/ - -# Where third-party dependencies like ExDoc output generated docs. -/doc/ - -# Ignore .fetch files in case you like to edit your project deps locally. -/.fetch - -# If the VM crashes, it generates a dump, let's ignore it too. -erl_crash.dump - -# Also ignore archive artifacts (built via "mix archive.build"). -*.ez - -# Ignore package tarball (built via "mix hex.build"). -server-*.tar - -# Temporary files, for example, from tests. -/tmp/ - -# Unikraft build files. -/.unikraft/ diff --git a/http-elixir1.17/.formatter.exs b/http-elixir1.17/.formatter.exs deleted file mode 100644 index d2cda26e..00000000 --- a/http-elixir1.17/.formatter.exs +++ /dev/null @@ -1,4 +0,0 @@ -# Used by "mix format" -[ - inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] -] diff --git a/http-elixir1.17/.gitignore b/http-elixir1.17/.gitignore deleted file mode 100644 index 4cfc4755..00000000 --- a/http-elixir1.17/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -# The directory Mix will write compiled artifacts to. -/_build/ - -# If you run "mix test --cover", coverage assets end up here. -/cover/ - -# The directory Mix downloads your dependencies sources to. -/deps/ - -# Where third-party dependencies like ExDoc output generated docs. -/doc/ - -# Ignore .fetch files in case you like to edit your project deps locally. -/.fetch - -# If the VM crashes, it generates a dump, let's ignore it too. -erl_crash.dump - -# Also ignore archive artifacts (built via "mix archive.build"). -*.ez - -# Ignore package tarball (built via "mix hex.build"). -server-*.tar - -# Temporary files, for example, from tests. -/tmp/ - -# Unikraft build files. -/.unikraft/ diff --git a/http-elixir1.17/Dockerfile b/http-elixir1.17/Dockerfile deleted file mode 100644 index ad0516ba..00000000 --- a/http-elixir1.17/Dockerfile +++ /dev/null @@ -1,91 +0,0 @@ -FROM --platform=$BUILDPLATFORM elixir:1.17.3-slim AS build - -WORKDIR /src - -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - git \ - ca-certificates \ - openssl \ - && rm -rf /var/lib/apt/lists/* \ - && update-ca-certificates - -RUN update-ca-certificates - -COPY . . - -RUN mix deps.get - -RUN MIX_TARGET=$TARGETARCH mix compile && mix release - -FROM alpine:3 AS sys - -RUN set -xe; \ - mkdir -p /target/etc; \ - mkdir -p /blank; \ - apk --no-cache add \ - ca-certificates \ - tzdata \ - ; \ - update-ca-certificates; \ - ln -sf /usr/share/zoneinfo/Etc/UTC /target/etc/localtime; \ - echo "Etc/UTC" > /target/etc/timezone; - -FROM --platform=$TARGETPLATFORM elixir:1.17.3-slim AS runtime - -FROM scratch - -COPY --from=sys /target/etc /etc -COPY --from=sys /usr/share/zoneinfo/UTC /usr/share/zoneinfo/UTC -COPY --from=sys /usr/share/zoneinfo/Etc/UTC /usr/share/zoneinfo/Etc/UTC -COPY --from=sys /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --from=sys /blank /tmp - -COPY --from=runtime /lib/x86_64-linux-gnu/libc.so.6 \ - /lib/x86_64-linux-gnu/libgcc_s.so.1 \ - /lib/x86_64-linux-gnu/libm.so.6 \ - /lib/x86_64-linux-gnu/libsctp.so.1 \ - /lib/x86_64-linux-gnu/libstdc++.so.6 \ - /lib/x86_64-linux-gnu/libtinfo.so.6 \ - /lib/x86_64-linux-gnu/libcrypto.so.3 \ - /lib/x86_64-linux-gnu/libselinux.so.1 \ - /lib/x86_64-linux-gnu/libc.so.6 \ - /lib/x86_64-linux-gnu/libpcre2-8.so.0 \ - /lib/x86_64-linux-gnu/libacl.so.1 \ - /lib/x86_64-linux-gnu/ - -COPY --from=runtime /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 - -COPY --from=runtime /usr/local/lib/erlang /usr/local/lib/erlang -COPY --from=runtime /usr/local/lib/elixir /usr/local/lib/elixir - -# Erlang and Elixir-related executables -COPY --from=runtime /usr/local/bin /usr/local/bin - -COPY --from=runtime /usr/lib/locale /usr/lib/locale - -COPY --from=runtime /usr/bin/dirname \ - /usr/bin/basename \ - /usr/bin/readlink \ - /usr/bin/env \ - /usr/bin/ - -COPY --from=runtime /bin/rm \ - /bin/mknod \ - /bin/bash \ - /bin/sh \ - /bin/ - -COPY --from=build /root /root -COPY --from=build /src/deps /src/deps -COPY --from=build /src/_build /src/_build -COPY --from=build /src/lib /src/lib -COPY --from=build /src/mix.exs /src/mix.exs -COPY --from=build /src/mix.lock /src/mix.lock - -COPY --from=build /usr/bin/cut /usr/bin/cut -COPY --from=build /usr/bin/sed /usr/bin/sed -COPY --from=build /usr/bin/cat /usr/bin/cat -COPY --from=build /usr/bin/grep /usr/bin/grep - -COPY ./wrapper.sh /usr/bin/wrapper.sh diff --git a/http-elixir1.17/Kraftfile b/http-elixir1.17/Kraftfile deleted file mode 100644 index 5c990972..00000000 --- a/http-elixir1.17/Kraftfile +++ /dev/null @@ -1,14 +0,0 @@ -spec: v0.6 - -name: elixir - -runtime: base-compat:latest - -labels: - cloud.unikraft.v1.instances/scale_to_zero.policy: "idle" - cloud.unikraft.v1.instances/scale_to_zero.stateful: "true" - cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 3000 - -rootfs: ./Dockerfile - -cmd: ["/usr/bin/wrapper.sh", "_build/dev/rel/server/bin/server", "start"] diff --git a/http-elixir1.17/README.md b/http-elixir1.17/README.md deleted file mode 100644 index 83f3e0d8..00000000 --- a/http-elixir1.17/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# Elixir - -This guide explains how to create and deploy a simple Elixir-based HTTP web server. -To run this example, follow these steps: - -1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). - -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-elixir1.16/` directory: - -```bash -git clone https://github.com/unikraft-cloud/examples -cd examples/http-elixir1.16/ -``` - -Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. -This guide uses `fra` (Frankfurt, 🇩🇪): - -```bash -export UKC_TOKEN=token -# Set metro to Frankfurt, DE -export UKC_METRO=fra -``` - -When done, invoke the following command to deploy this app on Unikraft Cloud: - -```bash -kraft cloud deploy -p 443:3000 -M 1Gi . -``` - -The output shows the instance address and other details: - -```text -[●] Deployed successfully! - │ - ├────────── name: elixir-qo9k3 - ├────────── uuid: e5fbf089-b000-4b2d-a827-44a1f5d28f24 - ├───────── state: running - ├──────── domain: https://small-water-tl8lr8am.fra.unikraft.app - ├───────── image: http-elixir116@sha256:67f5df003758a1180932e931727f8cb7006bbbf6fdd84058e27fe05e4829bba0 - ├──────── memory: 1024 MiB - ├─────── service: small-water-tl8lr8am - ├── private fqdn: elixir-qo9k3.internal - ├──── private ip: 172.16.3.4 - └────────── args: /usr/bin/wrapper.sh /usr/local/bin/mix run --no-halt -``` - -In this case, the instance name is `elixir-qo9k3` and the address is `https://small-water-tl8lr8am.fra.unikraft.app`. -They're different for each run. - -Use `curl` to query the Unikraft Cloud instance of the Elixir-based HTTP web server: - -```bash -curl https://small-water-tl8lr8am.fra.unikraft.app -``` - -```text -Hello, World! -``` - -You can list information about the instance by running: - -```bash -kraft cloud instance list -``` - -```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -elixir-qo9k3 small-water-tl8lr8am.fra.unikraft.app running since 9mins http-elixir116@sha256:67f5df0... 1.0 GiB 1 /usr/bin/wrapper.sh /usr/local/bin/mix r... 437.43 ms -``` - -When done, you can remove the instance: - -```bash -kraft cloud instance remove elixir-qo9k3 -``` - -## Customize your app - -To customize the app, update the files in the repository, listed below: - -* `lib/`, `mix.esx`: the actual Elixir HTTP server -* `Kraftfile`: the Unikraft Cloud specification -* `Dockerfile`: the Docker-specified app filesystem - -The following options are available for customizing the app: - -* If you only update the implementation in the `lib/server.ex` or `lib/server/app.ex` source code files, no other changes apply. - If you add new source files in the `lib/` directory, you don't need to make any other changes. - -* If you create any new source files, copy them into the app filesystem by using the `COPY` command in the `Dockerfile`. - -* More extensive changes may require extending the `Dockerfile` ([see `Dockerfile` syntax reference](https://docs.docker.com/engine/reference/builder/)). - -The following commands generate the current source code files and configuration file (`mix.exs`): - -```console -mix new --app server . --sup -``` - -Use a similar command to create a new app. -Then update it and deploy it on Unikraft Cloud using the above instructions. - -## Learn more - -Use the `--help` option for detailed information on using Unikraft Cloud: - -```bash -kraft cloud --help -``` - -Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/http-elixir1.17/lib/server.ex b/http-elixir1.17/lib/server.ex deleted file mode 100644 index 8beee001..00000000 --- a/http-elixir1.17/lib/server.ex +++ /dev/null @@ -1,20 +0,0 @@ -defmodule Server do - @moduledoc """ - A Plug that always responds with a string - """ - import Plug.Conn - - def init(options) do - options - end - - @doc """ - Simple route that returns a string - """ - @spec call(Plug.Conn.t(), any) :: Plug.Conn.t() - def call(conn, _opts) do - conn - |> put_resp_content_type("text/plain") - |> send_resp(200, "Hello, World!\n") - end -end diff --git a/http-elixir1.17/lib/server/application.ex b/http-elixir1.17/lib/server/application.ex deleted file mode 100644 index 07655c5e..00000000 --- a/http-elixir1.17/lib/server/application.ex +++ /dev/null @@ -1,21 +0,0 @@ -defmodule Server.Application do - # See https://hexdocs.pm/elixir/Application.html - # for more information on OTP Applications - @moduledoc false - - use Application - - @impl true - def start(_type, _args) do - children = [ - # Starts a worker by calling: Server.Worker.start_link(arg) - # {Server.Worker, arg} - {Plug.Cowboy, scheme: :http, plug: Server, options: [port: 3000]} - ] - - # See https://hexdocs.pm/elixir/Supervisor.html - # for other strategies and supported options - opts = [strategy: :one_for_one, name: Server.Supervisor] - Supervisor.start_link(children, opts) - end -end diff --git a/http-elixir1.17/mix.exs b/http-elixir1.17/mix.exs deleted file mode 100644 index 0973e9d8..00000000 --- a/http-elixir1.17/mix.exs +++ /dev/null @@ -1,30 +0,0 @@ -defmodule Server.MixProject do - use Mix.Project - - def project do - [ - app: :server, - version: "0.1.0", - elixir: "~> 1.17", - start_permanent: Mix.env() == :prod, - deps: deps() - ] - end - - # Run "mix help compile.app" to learn about applications. - def application do - [ - extra_applications: [:logger], - mod: {Server.Application, []} - ] - end - - # Run "mix help deps" to learn about dependencies. - defp deps do - [ - # {:dep_from_hexpm, "~> 0.3.0"}, - # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} - {:plug_cowboy, "~> 2.7"} - ] - end -end diff --git a/http-elixir1.17/mix.lock b/http-elixir1.17/mix.lock deleted file mode 100644 index 0819fc65..00000000 --- a/http-elixir1.17/mix.lock +++ /dev/null @@ -1,11 +0,0 @@ -%{ - "cowboy": {:hex, :cowboy, "2.14.2", "4008be1df6ade45e4f2a4e9e2d22b36d0b5aba4e20b0a0d7049e28d124e34847", [:make, :rebar3], [{:cowlib, ">= 2.16.0 and < 3.0.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, ">= 1.8.0 and < 3.0.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "569081da046e7b41b5df36aa359be71a0c8874e5b9cff6f747073fc57baf1ab9"}, - "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"}, - "cowlib": {:hex, :cowlib, "2.16.0", "54592074ebbbb92ee4746c8a8846e5605052f29309d3a873468d76cdf932076f", [:make, :rebar3], [], "hexpm", "7f478d80d66b747344f0ea7708c187645cfcc08b11aa424632f78e25bf05db51"}, - "mime": {:hex, :mime, "2.0.7", "b8d739037be7cd402aee1ba0306edfdef982687ee7e9859bee6198c1e7e2f128", [:mix], [], "hexpm", "6171188e399ee16023ffc5b76ce445eb6d9672e2e241d2df6050f3c771e80ccd"}, - "plug": {:hex, :plug, "1.19.1", "09bac17ae7a001a68ae393658aa23c7e38782be5c5c00c80be82901262c394c0", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "560a0017a8f6d5d30146916862aaf9300b7280063651dd7e532b8be168511e62"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.7.5", "261f21b67aea8162239b2d6d3b4c31efde4daa22a20d80b19c2c0f21b34b270e", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "20884bf58a90ff5a5663420f5d2c368e9e15ed1ad5e911daf0916ea3c57f77ac"}, - "plug_crypto": {:hex, :plug_crypto, "2.1.1", "19bda8184399cb24afa10be734f84a16ea0a2bc65054e23a62bb10f06bc89491", [:mix], [], "hexpm", "6470bce6ffe41c8bd497612ffde1a7e4af67f36a15eea5f921af71cf3e11247c"}, - "ranch": {:hex, :ranch, "2.2.0", "25528f82bc8d7c6152c57666ca99ec716510fe0925cb188172f41ce93117b1b0", [:make, :rebar3], [], "hexpm", "fa0b99a1780c80218a4197a59ea8d3bdae32fbff7e88527d7d8a4787eff4f8e7"}, - "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, -} diff --git a/http-elixir1.17/test/server_test.exs b/http-elixir1.17/test/server_test.exs deleted file mode 100644 index 4fa9b617..00000000 --- a/http-elixir1.17/test/server_test.exs +++ /dev/null @@ -1,8 +0,0 @@ -defmodule ServerTest do - use ExUnit.Case - doctest Server - - test "greets the world" do - assert Server.hello() == :world - end -end diff --git a/http-elixir1.17/test/test_helper.exs b/http-elixir1.17/test/test_helper.exs deleted file mode 100644 index 869559e7..00000000 --- a/http-elixir1.17/test/test_helper.exs +++ /dev/null @@ -1 +0,0 @@ -ExUnit.start() diff --git a/http-elixir1.17/wrapper.sh b/http-elixir1.17/wrapper.sh deleted file mode 100755 index af954e94..00000000 --- a/http-elixir1.17/wrapper.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -cd /src -export PATH=/usr/bin:/usr/local/bin -export LC_ALL=C.UTF-8 -export LANG=C.UTF-8 -export LANGUAGE=C.UTF-8 -export MIX_HOME=/root/.mix -exec $@ diff --git a/http-rust-1.79-axum-scale-to-zero/.dockerignore b/http-rust-1.79-axum-scale-to-zero/.dockerignore deleted file mode 100644 index 67f492f1..00000000 --- a/http-rust-1.79-axum-scale-to-zero/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -.unikraft/ -target/ -Kraftfile -Dockerfile diff --git a/http-rust-1.79-axum-scale-to-zero/.gitignore b/http-rust-1.79-axum-scale-to-zero/.gitignore deleted file mode 100644 index ea8c4bf7..00000000 --- a/http-rust-1.79-axum-scale-to-zero/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/http-rust-1.79-axum-scale-to-zero/Cargo.lock b/http-rust-1.79-axum-scale-to-zero/Cargo.lock deleted file mode 100644 index 70363545..00000000 --- a/http-rust-1.79-axum-scale-to-zero/Cargo.lock +++ /dev/null @@ -1,779 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "async-trait" -version = "0.1.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "axum" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper 1.0.1", - "tokio", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 0.1.2", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "backtrace" -version = "0.3.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - -[[package]] -name = "cc" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-core", - "futures-macro", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", -] - -[[package]] -name = "hyper-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "proc-macro2" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "serde" -version = "1.0.204" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.204" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.120" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "syn" -version = "2.0.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" - -[[package]] -name = "tokio" -version = "1.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" -dependencies = [ - "backtrace", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-stream" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unikraft-scale-to-zero-demo" -version = "0.1.0" -dependencies = [ - "axum", - "futures-util", - "tokio", - "tokio-stream", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/http-rust-1.79-axum-scale-to-zero/Cargo.toml b/http-rust-1.79-axum-scale-to-zero/Cargo.toml deleted file mode 100644 index 0020f430..00000000 --- a/http-rust-1.79-axum-scale-to-zero/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "unikraft-scale-to-zero-demo" -version = "0.1.0" -edition = "2021" - -[dependencies] -axum = { version = "0.7" } -tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread", "fs"] } -futures-util = "0.3" -tokio-stream = "0.1" - diff --git a/http-rust-1.79-axum-scale-to-zero/Dockerfile b/http-rust-1.79-axum-scale-to-zero/Dockerfile deleted file mode 100644 index 38b0a5ee..00000000 --- a/http-rust-1.79-axum-scale-to-zero/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM rust:1.79-alpine AS build - -RUN apk add --no-cache make musl-dev - -COPY . /src - -WORKDIR /src -RUN --mount=type=cache,target=/src/target \ - cargo build --release && \ - cp /src/target/release/unikraft-scale-to-zero-demo /server - -FROM scratch - -COPY --from=build /server /server diff --git a/http-rust-1.79-axum-scale-to-zero/Kraftfile b/http-rust-1.79-axum-scale-to-zero/Kraftfile deleted file mode 100644 index ebe14024..00000000 --- a/http-rust-1.79-axum-scale-to-zero/Kraftfile +++ /dev/null @@ -1,7 +0,0 @@ -spec: v0.6 - -runtime: base-compat:latest - -rootfs: ./Dockerfile - -cmd: ["/server"] diff --git a/http-rust-1.79-axum-scale-to-zero/README.md b/http-rust-1.79-axum-scale-to-zero/README.md deleted file mode 100644 index 63c4ca24..00000000 --- a/http-rust-1.79-axum-scale-to-zero/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# Rust with Scale-to-Zero - -This guide explains how to create and deploy a Rust app with scale-to-zero enabled. -To run this example, follow these steps: - -1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). - -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-rust-1.79-axum-scale-to-zero` directory: - -```bash -git clone https://github.com/unikraft-cloud/examples -cd examples/http-rust-1.79-axum-scale-to-zero/ -``` - -Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. -This guide uses `fra` (Frankfurt, 🇩🇪): - -```bash -export UKC_TOKEN=token -# Set metro to Frankfurt, DE -export UKC_METRO=fra -``` - -When done, invoke the following command to deploy the app on Unikraft Cloud: - -```bash -kraft cloud deploy --scale-to-zero on -p 443:8080 -M 512 . -``` - -Alternatively, you can expose the application with the non-HTTP mode by using a different port: - -```bash -kraft cloud deploy --scale-to-zero on -p 8080:8080/tls -M 512 . -``` - -The output shows the instance address and other details: - -```ansi -[●] Deployed successfully! - │ - ├────── name: http-rust-179-axum-scale-to-zero-5vhoh - ├────── uuid: 9bb36cb4-11e4-4ab5-ba20-cb0c29571e90 - ├───── metro: https://api.fra.unikraft.cloud/v1 - ├───── state: running - ├──── domain: https://icy-butterfly-ygnprvel.fra.unikraft.app - ├───── image: http-rust-179-axum-scale-to-zero@sha256:08b0a4d7237e3ca40166ae57c22b3f99befa2530e4696a97c0c47c3f81345c89 - ├─ boot time: 14.29 ms - ├──── memory: 512 MiB - ├─── service: icy-butterfly-ygnprvel - ├ private ip: 10.0.0.49 - └────── args: /server -``` - -In this case, the instance name is `http-rust-179-axum-scale-to-zero-5vhoh` and the address is `https://icy-butterfly-ygnprvel.fra.unikraft.app`. -They're different for each run. - -This mode allows you to use more advanced HTTP features such as [Server-Sent-Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). - -After deploying, you can interact with the following endpoints: - -| Endpoint | Description | Curl Example | -| -------- | ----------- | ------------ | -| `GET` `/` | Get the current content of the `scale_to_zero_disable` file | `curl https:///` | -| `POST` `/set/` | Set the count of disable requests to `` | `curl -X POST https:///set/10` | -| `POST` `/add` | Increment the count by one | `curl -X POST https:///add` | -| `POST` `/add/` | Increment the count by `` | `curl -X POST https:///add/2` | -| `POST` `/sub` | Decrement the count by one | `curl -X POST https:///sub` | -| `POST` `/sub/` | Decrement the count by `` | `curl -X POST https:///sub/2` | -| `GET` `/sse/` | Get periodic server side events every `` seconds (Only works for a non-HTTP handler port) | `curl https:///sse/1` | - -You can list information about the instance by running: - -```bash -kraft cloud instance list -``` - -```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-rust-179-axum-scale-to-zero-5vhoh icy-butterfly-ygnprvel.fra.unikraft.app running 1 minute ago http-rust-179-axum-scale-to-zero@sha256:0... 512 MiB 1 /server 14291us -``` - -When done, you can remove the instance: - -```bash -kraft cloud instance remove http-cpp-boost-rae7s -``` - -## Learn more - -Use the `--help` option for detailed information on using Unikraft Cloud: - -```bash -kraft cloud --help -``` - -Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/http-rust-1.79-axum-scale-to-zero/src/main.rs b/http-rust-1.79-axum-scale-to-zero/src/main.rs deleted file mode 100644 index ba7ace28..00000000 --- a/http-rust-1.79-axum-scale-to-zero/src/main.rs +++ /dev/null @@ -1,89 +0,0 @@ -use std::convert::Infallible; -use std::time::Duration; - -use axum::extract::Path; -use axum::http::StatusCode; -use axum::response::sse::{Event, KeepAlive}; -use axum::response::{IntoResponse, Sse}; -use axum::routing::{get, post}; -use axum::Router; -use futures_util::stream::{self, Stream}; -use tokio::fs; -use tokio_stream::StreamExt as _; - -const LIBUKP_FILE: &str = "/uk/libukp/scale_to_zero_disable"; - -enum Error { - IoError(std::io::Error), -} - -impl IntoResponse for Error { - fn into_response(self) -> axum::response::Response { - let (status, message) = match self { - Error::IoError(e) => (StatusCode::INTERNAL_SERVER_ERROR, format!("I/O error: {e}")), - }; - - (status, message).into_response() - } -} - -impl From for Error { - fn from(value: std::io::Error) -> Self { - Self::IoError(value) - } -} - -async fn read_libukp_disable() -> std::io::Result { - fs::read_to_string(LIBUKP_FILE).await -} - -async fn write_libukp_disable(content: impl AsRef<[u8]>) -> std::io::Result { - fs::write(LIBUKP_FILE, content).await?; - read_libukp_disable().await -} - -async fn counter_set(Path(value): Path) -> Result { - Ok(write_libukp_disable(&format!("={value}")).await?) -} - -async fn counter_inc() -> Result { - Ok(write_libukp_disable("+").await?) -} - -async fn counter_add(Path(adj): Path) -> Result { - Ok(write_libukp_disable(&format!("+{adj}")).await?) -} - -async fn counter_dec() -> Result { - Ok(write_libukp_disable("-").await?) -} - -async fn counter_sub(Path(adj): Path) -> Result { - Ok(write_libukp_disable(&format!("-{adj}")).await?) -} - -async fn counter_get() -> Result { - Ok(read_libukp_disable().await?) -} - -async fn sse(Path(sec): Path) -> Sse>> { - let stream = stream::repeat_with(|| Event::default().data("ping")) - .map(Ok) - .throttle(Duration::from_secs(sec.into())); - - Sse::new(stream).keep_alive(KeepAlive::default()) -} - -#[tokio::main] -async fn main() { - let app = Router::new() - .route("/", get(counter_get)) - .route("/sse/:sec", get(sse)) - .route("/set/:value", post(counter_set)) - .route("/add", post(counter_inc)) - .route("/add/:adj", post(counter_add)) - .route("/sub", post(counter_dec)) - .route("/sub/:adj", post(counter_sub)); - let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await.unwrap(); - axum::serve(listener, app).await.unwrap(); -} diff --git a/httpserver-boost1.74-g++13.2/README.md b/httpserver-boost1.74-g++13.2/README.md index 3c6c7a68..43a9fd55 100644 --- a/httpserver-boost1.74-g++13.2/README.md +++ b/httpserver-boost1.74-g++13.2/README.md @@ -1,15 +1,15 @@ -# C++ Boost +# HTTP Server with C++ Boost This guide explains how to create and deploy a C++-based HTTP web server using the [Boost](https://www.boost.org/) libraries. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [example repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-cpp-boost/` directory: +2. Clone the [example repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-boost1.74-g++13.2/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-cpp-boost/ +cd examples/httpserver-boost1.74-g++13.2/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```text [●] Deployed successfully! │ - ├────────── name: http-cpp-boost-rae7s + ├────────── name: httpserver-boost1.74-g++13.2-rae7s ├────────── uuid: 5a9886fa-f8a3-4860-afcf-d5eb13fdc38d ├───────── state: running ├─────────── url: https://red-snow-3bn7bzc8.fra.unikraft.app - ├───────── image: http-cpp-boost@sha256:61cf86b89fed46351af53689e27189315e466576475f61c7240bf17644613489 + ├───────── image: httpserver-boost1.74-g++13.2@sha256:61cf86b89fed46351af53689e27189315e466576475f61c7240bf17644613489 ├───── boot time: 15.00 ms ├──────── memory: 256 MiB ├─────── service: red-snow-3bn7bzc8 - ├── private fqdn: http-cpp-boost-rae7s.internal + ├── private fqdn: httpserver-boost1.74-g++13.2-rae7s.internal ├──── private ip: 172.16.6.4 └────────── args: /http_server ``` -In this case, the instance name is `http-cpp-boost-rae7s` and the address is `https://red-snow-3bn7bzc8.fra.unikraft.app`. +In this case, the instance name is `httpserver-boost1.74-g++13.2-rae7s` and the address is `https://red-snow-3bn7bzc8.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the C++ Boost HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the C++ Boost HTTP web server ```bash curl https://red-snow-3bn7bzc8.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,22 +63,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-cpp-boost-rae7s red-snow-3bn7bzc8.fra.unikraft.app running 1 minute ago http-cpp-boost@sha256:61cf86b89fed46351af53689e27189315e... 256 MiB 1 /http_server 15000us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-boost1.74-g++13.2-rae7s red-snow-3bn7bzc8.fra.unikraft.app running 1 minute ago httpserver-boost1.74-g++13.2@sha256:61cf86... 256 MiB 1 /http_server 15000us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-cpp-boost-rae7s +kraft cloud instance remove httpserver-boost1.74-g++13.2-rae7s ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `http_server.cpp`: the C++ HTTP server +* `http_server.cpp`: the C++ HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/bun/.dockerignore b/httpserver-bun/.dockerignore similarity index 100% rename from bun/.dockerignore rename to httpserver-bun/.dockerignore diff --git a/bun/.gitignore b/httpserver-bun/.gitignore similarity index 100% rename from bun/.gitignore rename to httpserver-bun/.gitignore diff --git a/bun/Dockerfile b/httpserver-bun/Dockerfile similarity index 100% rename from bun/Dockerfile rename to httpserver-bun/Dockerfile diff --git a/bun/Kraftfile b/httpserver-bun/Kraftfile similarity index 100% rename from bun/Kraftfile rename to httpserver-bun/Kraftfile diff --git a/bun/README.md b/httpserver-bun/README.md similarity index 78% rename from bun/README.md rename to httpserver-bun/README.md index bbdee22e..9a044389 100644 --- a/bun/README.md +++ b/httpserver-bun/README.md @@ -1,15 +1,15 @@ -# Bun +# HTTP Server with Bun This guide explains how to create and deploy a Bun app. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/bun` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-bun` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/bun/ +cd examples/httpserver-bun/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,22 +32,22 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: bun-700mp + ├────────── name: httpserver-bun-700mp ├────────── uuid: e467a880-075c-41e0-97ac-88e3e938523e ├───────── state: starting ├──────── domain: https://quiet-pond-ao44imcg.fra.unikraft.app - ├───────── image: bun@sha256:dfcbee1efe0d8a1d43ab2dab70cf1cc5066bb1353aa1c528c745533d2cc33276 + ├───────── image: httpserver-bun@sha256:dfcbee1efe0d8a1d43ab2dab70cf1cc5066bb1353aa1c528c745533d2cc33276 ├──────── memory: 512 MiB ├─────── service: quiet-pond-ao44imcg - ├── private fqdn: bun-700mp.internal + ├── private fqdn: httpserver-bun-700mp.internal ├──── private ip: 172.16.3.3 └────────── args: /usr/bin/bun run /usr/src/server.ts ``` -In this case, the instance name is `bun-700mp` and the address is `https://quiet-pond-ao44imcg.fra.unikraft.app`. +In this case, the instance name is `httpserver-bun-700mp` and the address is `https://quiet-pond-ao44imcg.fra.unikraft.app`. They're different for each run. -Use `curl` to query the Unikraft Cloud instance of the Bun instance: +Use `curl` to query the Unikraft Cloud instance of the Bun HTTP web server: ```bash curl https://quiet-pond-ao44imcg.fra.unikraft.app @@ -64,14 +64,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -bun-700mp quiet-pond-ao44imcg.fra.unikraft.app running since 3mins bun@sha256:dfcbee1efe0d8a1d43ab... 512 MiB 1 /usr/bin/bun run /usr/src/server.ts 289.03 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-bun-700mp quiet-pond-ao44imcg.fra.unikraft.app running since 3mins httpserver-bun@sha256:dfcbee1ef... 512 MiB 1 /usr/bin/bun run /usr/src/server.ts 289.03 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove bun-700mp +kraft cloud instance remove httpserver-bun-700mp ``` ## Customize your app diff --git a/bun/server.ts b/httpserver-bun/server.ts similarity index 100% rename from bun/server.ts rename to httpserver-bun/server.ts diff --git a/http-c-debug/Dockerfile b/httpserver-c-debug/Dockerfile similarity index 100% rename from http-c-debug/Dockerfile rename to httpserver-c-debug/Dockerfile diff --git a/http-c-debug/Kraftfile b/httpserver-c-debug/Kraftfile similarity index 100% rename from http-c-debug/Kraftfile rename to httpserver-c-debug/Kraftfile diff --git a/http-c-debug/README.md b/httpserver-c-debug/README.md similarity index 73% rename from http-c-debug/README.md rename to httpserver-c-debug/README.md index d1c5bc54..e636f6b8 100644 --- a/http-c-debug/README.md +++ b/httpserver-c-debug/README.md @@ -1,15 +1,15 @@ -# C with Debugging +# SSH and HTTP Server with C and Debugging Tools This guide explains how to create and deploy a C app with debugging enabled. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-c-debug` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-c-debug` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-c-debug/ +cd examples/httpserver-c-debug/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -38,12 +38,12 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────── name: http-c-debug-5pvem + ├────── name: httpserver-c-debug-5pvem ├────── uuid: 08629a94-e2b1-466e-abb9-15ce46411b66 ├───── metro: https://api.fra.unikraft.cloud/v1 ├───── state: running ├──── domain: https://patient-snow-zdzhdy8r.fra.unikraft.app - ├───── image: http-c-debug@sha256:b24b95e236c8eff69615dd4f5d257beed5ee4047fd98d1b6fb200f89c63fa54c + ├───── image: httpserver-c-debug@sha256:b24b95e236c8eff69615dd4f5d257beed5ee4047fd98d1b6fb200f89c63fa54c ├─ boot time: 66.56 ms ├──── memory: 256 MiB ├─── service: patient-snow-zdzhdy8r @@ -51,7 +51,7 @@ The output shows the instance address and other details: └────── args: /usr/bin/wrapper.sh ``` -In this case, the instance name is `http-c-debug-5pvem` and the address is `patient-snow-zdzhdy8r.fra.unikraft.app`. +In this case, the instance name is `httpserver-c-debug-5pvem` and the address is `patient-snow-zdzhdy8r.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance: @@ -76,7 +76,8 @@ Then connect to the instance via SSH using: ssh -l root localhost -p 2222 ``` -You might see warnings like `REMOTE HOST IDENTIFICATION HAS CHANGED`. This is normal if you have set up tunnels to connect with SSH on `localhost`, so do not worry. +You might see warnings like `REMOTE HOST IDENTIFICATION HAS CHANGED`. +This is normal if you have set up tunnels to connect with SSH on `localhost`, so don't worry. You can list information about the instance by running: @@ -85,14 +86,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-c-debug-5pvem patient-snow-zdzhdy8r.fra.unikraft.app running since 4mins http-c-debug@sha256:b2... 256 MiB 1 /usr/bin/wrapper.sh 66.56 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-c-debug-5pvem patient-snow-zdzhdy8r.fra.unikraft.app running since 4mins httpserver-c-debug@sha256:b2... 256 MiB 1 /usr/bin/wrapper.sh 66.56 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-c-debug-5pvem +kraft cloud instance remove httpserver-c-debug-5pvem ``` ## Learn more diff --git a/http-c-debug/http_server.c b/httpserver-c-debug/http_server.c similarity index 100% rename from http-c-debug/http_server.c rename to httpserver-c-debug/http_server.c diff --git a/http-c-debug/sshd_config b/httpserver-c-debug/sshd_config similarity index 100% rename from http-c-debug/sshd_config rename to httpserver-c-debug/sshd_config diff --git a/http-c-debug/wrapper.sh b/httpserver-c-debug/wrapper.sh similarity index 100% rename from http-c-debug/wrapper.sh rename to httpserver-c-debug/wrapper.sh diff --git a/httpserver-dotnet10.0/README.md b/httpserver-dotnet10.0/README.md index 6a4c0463..5198310f 100644 --- a/httpserver-dotnet10.0/README.md +++ b/httpserver-dotnet10.0/README.md @@ -1,14 +1,127 @@ -# .NET on Unikraft Cloud +# HTTP Server with .NET -To run this example, first [install the `kraft` CLI tool](https://unikraft.org/docs/cli). +This guide explains how to create and deploy a simple .NET-based HTTP web server. +To run this example, follow these steps: -To deploy this application on Unikraft Cloud, invoke: +1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). + +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-dotnet10.0/` directory: + +```bash +git clone https://github.com/unikraft-cloud/examples +cd examples/httpserver-dotnet10.0/ +``` + +Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. +This guide uses `fra` (Frankfurt, 🇩🇪): + +```bash +export UKC_TOKEN=token +# Set metro to Frankfurt, DE +export UKC_METRO=fra +``` + +When done, invoke the following command to deploy this app on Unikraft Cloud: ```bash kraft cloud deploy -p 443:8080 -M 512 . ``` +The output shows the instance address and other details: + +```ansi +[●] Deployed successfully! + │ + ├────────── name: httpserver-dotnet100-dsmkh + ├────────── uuid: 25459494-cb43-4009-9d05-f0996de5b7e4 + ├───────── state: starting + ├─────────── url: https://cold-fog-hl98aw6q.fra.unikraft.app + ├───────── image: httpserver-dotnet100@sha256:4fad7453995ae96b636696e9929ee0e7376bfbbd63ab9698c1f1e02602aa2575 + ├──────── memory: 512 MiB + ├─────── service: cold-fog-hl98aw6q + ├── private fqdn: httpserver-dotnet100-dsmkh.internal + ├──── private ip: 172.16.3.1 + └────────── args: /usr/bin/app/src +``` + +In this case, the instance name is `httpserver-dotnet100-dsmkh` and the address is `https://cold-fog-hl98aw6q.fra.unikraft.app`. +They're different for each run. + +Use `curl` to query the Unikraft Cloud instance of the .NET-based HTTP web server: + +```bash +curl https://cold-fog-hl98aw6q.fra.unikraft.app +``` + +```text +Hello, World! +``` + +You can list information about the instance by running: + +```bash +kraft cloud instance list +``` + +```ansi +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-dotnet100-dsmkh cold-fog-hl98aw6q.fra.unikraft.app running 2 minutes ago httpserver-dotnet100@sha256:4fad74e... 512 MiB 1 /usr/bin/app/src 328.69 ms +``` + +When done, you can remove the instance: + +```bash +kraft cloud instance remove httpserver-dotnet100-dsmkh +``` + +## Customize your app + +To customize the app, update the files in the repository, listed below: + +* `SimpleHttpServer.cs`: the actual .NET HTTP server implementation +* `Kraftfile`: the Unikraft Cloud specification +* `Dockerfile`: the Docker-specified app filesystem + +Lines in the `Kraftfile` have the following roles: + +* `spec: v0.6`: The current `Kraftfile` specification version is `0.6`. + +* `runtime: base-compat:latest`: The runtime kernel to use is the base compatibility kernel. + +* `rootfs: ./Dockerfile`: Build the app root filesystem using the `Dockerfile`. + +* `cmd:`: Use as the starting command of the instance. + +Lines in the `Dockerfile` have the following roles: + +* `WORKDIR /src`: Use the `/src` directory as the working directory. + +* `RUN dotnet new console`: Create a new `dotnet` project. + +* `RUN rm Program.cs`: Remove template source code file. + +* `COPY ./SimpleHttpServer.cs .`: Copy the source code of the HTTP server. + +* `RUN dotnet build .`: Build dotnet project. + +* `FROM scratch`: Build the filesystem from the [`scratch` container image](https://hub.docker.com/_/scratch/), to [create a base image](https://docs.docker.com/build/building/base-images/). + +* `COPY --from=build ...`: Copy on the required files from the filesystem: the binary executable, the .NET framework files and the binary library files. + +The following options are available for customizing the app: + +* If you only update the implementation in the `SimpleHttpServer.cs` source file, you don't need to make any other changes. + +* If you create any new source files, copy them into the app filesystem by using the `COPY` command in the `Dockerfile`. + +* More extensive changes may require extending the `Dockerfile` ([see `Dockerfile` syntax reference](https://docs.docker.com/engine/reference/builder/)). + ## Learn more -- [Unikraft Cloud's Documentation](https://unikraft.cloud/docs/) -- [How to build `Dockerfile` root filesystems with BuildKit](https://unikraft.org/docs/getting-started/integrations/buildkit) +Use the `--help` option for detailed information on using Unikraft Cloud: + +```bash +kraft cloud --help +``` + +Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/httpserver-dotnet8.0/Dockerfile b/httpserver-dotnet8.0/Dockerfile deleted file mode 100644 index a3538f11..00000000 --- a/httpserver-dotnet8.0/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG TARGETARCH -ARG BUILDPLATFORM - -WORKDIR /src -RUN dotnet new console -RUN rm Program.cs -COPY ./SimpleHttpServer.cs . -RUN dotnet publish -a "$TARGETARCH" --self-contained -o /app - -FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS runtime - -FROM scratch - -# Binary executable -COPY --from=build /app /app - -# System libraries -COPY --from=runtime /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libpthread.so.0 -COPY --from=runtime /lib/x86_64-linux-gnu/librt.so.1 /lib/x86_64-linux-gnu/librt.so.1 -COPY --from=runtime /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so.2 -COPY --from=runtime /lib/x86_64-linux-gnu/libstdc++.so.6 /lib/x86_64-linux-gnu/libstdc++.so.6 -COPY --from=runtime /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6 -COPY --from=runtime /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/libgcc_s.so.1 -COPY --from=runtime /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6 -COPY --from=runtime /lib/x86_64-linux-gnu/libicuuc.so.72 /lib/x86_64-linux-gnu/libicuuc.so.72 -COPY --from=runtime /lib/x86_64-linux-gnu/libicudata.so.72 /lib/x86_64-linux-gnu/libicudata.so.72 -COPY --from=runtime /lib/x86_64-linux-gnu/libicui18n.so.72 /lib/x86_64-linux-gnu/libicui18n.so.72 -COPY --from=runtime /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 diff --git a/httpserver-dotnet8.0/Kraftfile b/httpserver-dotnet8.0/Kraftfile deleted file mode 100644 index 9653fa72..00000000 --- a/httpserver-dotnet8.0/Kraftfile +++ /dev/null @@ -1,14 +0,0 @@ -spec: v0.6 - -name: dotnet - -runtime: base-compat:latest - -labels: - cloud.unikraft.v1.instances/scale_to_zero.policy: "on" - cloud.unikraft.v1.instances/scale_to_zero.stateful: "true" - cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 - -rootfs: ./Dockerfile - -cmd: ["/app/src"] diff --git a/httpserver-dotnet8.0/README.md b/httpserver-dotnet8.0/README.md deleted file mode 100644 index d4a78cf7..00000000 --- a/httpserver-dotnet8.0/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# .NET - -This guide explains how to create and deploy a simple .NET-based HTTP web server. -To run this example, follow these steps: - -1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). - -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-dotnet8.0/` directory: - -```bash -git clone https://github.com/unikraft-cloud/examples -cd examples/http-dotnet8.0/ -``` - -Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. -This guide uses `fra` (Frankfurt, 🇩🇪): - -```bash -export UKC_TOKEN=token -# Set metro to Frankfurt, DE -export UKC_METRO=fra -``` - -When done, invoke the following command to deploy this app on Unikraft Cloud: - -```bash -kraft cloud deploy -p 443:8080 -M 512 . -``` - -The output shows the instance address and other details: - -```ansi -[●] Deployed successfully! - │ - ├────────── name: http-dotnet80-dsmkh - ├────────── uuid: 25459494-cb43-4009-9d05-f0996de5b7e4 - ├───────── state: starting - ├─────────── url: cold-fog-hl98aw6q.fra.unikraft.app - ├───────── image: http-dotnet80@sha256:4fad7453995ae96b636696e9929ee0e7376bfbbd63ab9698c1f1e02602aa2575 - ├──────── memory: 512 MiB - ├─────── service: cold-fog-hl98aw6q - ├── private fqdn: http-dotnet80-dsmkh.internal - ├──── private ip: 172.16.3.1 - └────────── args: /usr/bin/app/src -``` - -In this case, the instance name is `http-dotnet80-dsmkh` and the address is `https://cold-fog-hl98aw6q.fra.unikraft.app`. -They're different for each run. - -Use `curl` to query the Unikraft Cloud instance of the .NET-based HTTP web server: - -```bash -curl https://cold-fog-hl98aw6q.fra.unikraft.app -``` - -```text -Hello, World! -``` - -You can list information about the instance by running: - -```bash -kraft cloud instance list -``` - -```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-dotnet80-dsmkh cold-fog-hl98aw6q.fra.unikraft.app running 2 minutes ago http-dotnet80@sha256:4fad7453995ae... 512 MiB 1 /usr/bin/app/src 328.69 ms -``` - -When done, you can remove the instance: - -```bash -kraft cloud instance remove http-dotnet80-dsmkh -``` - -## Customize your app - -To customize the app, update the files in the repository, listed below: - -* `SimpleHttpServer.cs`: the actual .NET HTTP server -* `Kraftfile`: the Unikraft Cloud specification -* `Dockerfile`: the Docker-specified app filesystem - -Lines in the `Kraftfile` have the following roles: - -* `spec: v0.6`: The current `Kraftfile` specification version is `0.6`. - -* `runtime: base-compat:latest`: The runtime kernel to use is the base compatibility kernel. - -* `rootfs: ./Dockerfile`: Build the app root filesystem using the `Dockerfile`. - -* `cmd:`: Use as the starting command of the instance. - -Lines in the `Dockerfile` have the following roles: - -* `WORKDIR /src`: Use the `/src` directory as the working directory. - -* `RUN dotnet new console`: Create a new `dotnet` project. - -* `RUN rm Program.cs`: Remove template source code file. - -* `COPY ./SimpleHttpServer.cs .`: Copy the source code of the HTTP server. - -* `RUN dotnet build .`: Build dotnet project. - -* `FROM scratch`: Build the filesystem from the [`scratch` container image](https://hub.docker.com/_/scratch/), to [create a base image](https://docs.docker.com/build/building/base-images/). - -* `COPY --from=build ...`: Copy on the required files from the filesystem: the binary executable, the .NET framework files and the binary library files. - -The following options are available for customizing the app: - -* If you only update the implementation in the `SimpleHttpServer.rs` source file, you don't need to make any other changes. - -* If you create any new source files, copy them into the app filesystem by using the `COPY` command in the `Dockerfile`. - -* More extensive changes may require extending the `Dockerfile` ([see `Dockerfile` syntax reference](https://docs.docker.com/engine/reference/builder/)). - -## Learn more - -Use the `--help` option for detailed information on using Unikraft Cloud: - -```bash -kraft cloud --help -``` - -Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/httpserver-dotnet8.0/SimpleHttpServer.cs b/httpserver-dotnet8.0/SimpleHttpServer.cs deleted file mode 100644 index 357aa165..00000000 --- a/httpserver-dotnet8.0/SimpleHttpServer.cs +++ /dev/null @@ -1,34 +0,0 @@ -// https://codingvision.net/c-simple-http-server - -using System; -using System.Net; -using System.IO; -using System.Text; - -namespace test -{ - class SimpleHttpServer - { - static void Main(string[] args) - { - HttpListener server = new HttpListener(); - server.Prefixes.Add("http://*:8080/"); - - server.Start(); - Console.WriteLine("Listening on port 8080 ..."); - - while (true) - { - HttpListenerContext context = server.GetContext(); - HttpListenerResponse response = context.Response; - - byte[] buffer = Encoding.UTF8.GetBytes("Hello, World!\n"); - response.ContentLength64 = buffer.Length; - response.OutputStream.Write(buffer, 0, buffer.Length); - - context.Response.Close(); - } - - } - } -} diff --git a/httpserver-elixir1.16/README.md b/httpserver-elixir1.16/README.md index 83f3e0d8..098d996c 100644 --- a/httpserver-elixir1.16/README.md +++ b/httpserver-elixir1.16/README.md @@ -1,15 +1,15 @@ -# Elixir +# HTTP Server with Elixir This guide explains how to create and deploy a simple Elixir-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-elixir1.16/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-elixir1.16/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-elixir1.16/ +cd examples/httpserver-elixir1.16/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,19 +32,19 @@ The output shows the instance address and other details: ```text [●] Deployed successfully! │ - ├────────── name: elixir-qo9k3 + ├────────── name: httpserver-elixir116-qo9k3 ├────────── uuid: e5fbf089-b000-4b2d-a827-44a1f5d28f24 ├───────── state: running ├──────── domain: https://small-water-tl8lr8am.fra.unikraft.app - ├───────── image: http-elixir116@sha256:67f5df003758a1180932e931727f8cb7006bbbf6fdd84058e27fe05e4829bba0 + ├───────── image: httpserver-elixir116@sha256:67f5df003758a1180932e931727f8cb7006bbbf6fdd84058e27fe05e4829bba0 ├──────── memory: 1024 MiB ├─────── service: small-water-tl8lr8am - ├── private fqdn: elixir-qo9k3.internal + ├── private fqdn: httpserver-elixir116-qo9k3.internal ├──── private ip: 172.16.3.4 └────────── args: /usr/bin/wrapper.sh /usr/local/bin/mix run --no-halt ``` -In this case, the instance name is `elixir-qo9k3` and the address is `https://small-water-tl8lr8am.fra.unikraft.app`. +In this case, the instance name is `httpserver-elixir116-qo9k3` and the address is `https://small-water-tl8lr8am.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Elixir-based HTTP web server: @@ -64,21 +64,21 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -elixir-qo9k3 small-water-tl8lr8am.fra.unikraft.app running since 9mins http-elixir116@sha256:67f5df0... 1.0 GiB 1 /usr/bin/wrapper.sh /usr/local/bin/mix r... 437.43 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-elixir116-qo9k3 small-water-tl8lr8am.fra.unikraft.app running since 9mins httpserver-elixir116@sha256:6... 1.0 GiB 1 /usr/bin/wrapper.sh /usr/local/bin/mix r... 437.43 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove elixir-qo9k3 +kraft cloud instance remove httpserver-elixir116-qo9k3 ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `lib/`, `mix.esx`: the actual Elixir HTTP server +* `lib/`, `mix.esx`: the actual Elixir HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/httpserver-erlang26.2/README.md b/httpserver-erlang26.2/README.md index c14eca58..862c1f1f 100644 --- a/httpserver-erlang26.2/README.md +++ b/httpserver-erlang26.2/README.md @@ -1,15 +1,15 @@ -# Erlang +# HTTP Server with Erlang This guide explains how to create and deploy a simple Erlang-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-erlang26.2/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-erlang26.2/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-erlang26.2/ +cd examples/httpserver-erlang26.2/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,19 +32,19 @@ The output shows the instance address and other details: ```text [●] Deployed successfully! │ - ├────────── name: erlang-sw2bp + ├────────── name: httpserver-erlang26.2-sw2bp ├────────── uuid: 1c4a8a51-fb61-45fc-87b8-26d192a7c2bc ├───────── state: starting ├──────── domain: https://patient-field-ck629j2u.fra.unikraft.app - ├───────── image: erlang@sha256:d99feefa7973ba43f726356497f54c34a16421aa25a27fa547d2c1add418204e + ├───────── image: httpserver-erlang26.2@sha256:d99feefa7973ba43f726356497f54c34a16421aa25a27fa547d2c1add418204e ├──────── memory: 512 MiB ├─────── service: patient-field-ck629j2u - ├── private fqdn: erlang-sw2bp.internal + ├── private fqdn: httpserver-erlang26.2-sw2bp.internal ├──── private ip: 172.16.3.3 └────────── args: /usr/bin/wrapper.sh /usr/bin/erl -noshell -s http_server ``` -In this case, the instance name is `erlang-sw2bp` and the address is `https://patient-field-ck629j2u.fra.unikraft.app`. +In this case, the instance name is `httpserver-erlang26.2-sw2bp` and the address is `https://patient-field-ck629j2u.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Erlang-based HTTP web server: @@ -64,21 +64,21 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -erlang-sw2bp patient-field-ck629jsu.fra.unikraft.app running since 35secs erlang@sha256:d99feefa7973ba43f72... 512 MiB 1 /usr/bin/wrapper.sh /usr/bin/erl -noshell -s http_se... 404.04 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-erlang26.2-sw2bp patient-field-ck629jsu.fra.unikraft.app running since 35secs httpserver-erlang26.2@sha256:4372... 512 MiB 1 /usr/bin/wrapper.sh /usr/bin/erl ... 404.04 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove erlang-sw2bp +kraft cloud instance remove httpserver-erlang26.2-sw2bp ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `http_server.erl`: the actual Erlang HTTP server +* `http_server.erl`: the actual Erlang HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/expressjs4.18-node21/.dockerignore b/httpserver-expressjs4.18-node21/.dockerignore similarity index 100% rename from expressjs4.18-node21/.dockerignore rename to httpserver-expressjs4.18-node21/.dockerignore diff --git a/expressjs4.18-node21/.gitignore b/httpserver-expressjs4.18-node21/.gitignore similarity index 100% rename from expressjs4.18-node21/.gitignore rename to httpserver-expressjs4.18-node21/.gitignore diff --git a/expressjs4.18-node21/Dockerfile b/httpserver-expressjs4.18-node21/Dockerfile similarity index 100% rename from expressjs4.18-node21/Dockerfile rename to httpserver-expressjs4.18-node21/Dockerfile diff --git a/expressjs4.18-node21/Kraftfile b/httpserver-expressjs4.18-node21/Kraftfile similarity index 100% rename from expressjs4.18-node21/Kraftfile rename to httpserver-expressjs4.18-node21/Kraftfile diff --git a/expressjs4.18-node21/README.md b/httpserver-expressjs4.18-node21/README.md similarity index 77% rename from expressjs4.18-node21/README.md rename to httpserver-expressjs4.18-node21/README.md index 6c2ef3e3..92c85fae 100644 --- a/expressjs4.18-node21/README.md +++ b/httpserver-expressjs4.18-node21/README.md @@ -1,4 +1,4 @@ -# Node 21 Express +# HTTP Server with Express [Express](https://expressjs.com/) is a fast, unopinionated, minimalist web framework for Node.js. @@ -6,11 +6,11 @@ To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/expressjs4.18-node21` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-expressjs4.18-node21` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/expressjs4.18-node21/ +cd examples/httpserver-expressjs4.18-node21/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -33,22 +33,22 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: expressjs4.18-node21-lb3p2 + ├────────── name: httpserver-expressjs4.18-node21-lb3p2 ├────────── uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890 ├───────── state: starting ├──────── domain: https://calm-ocean-r9x4mk7v.fra.unikraft.app - ├───────── image: node21-expressjs@sha256:2e7d3f1a9c4b8e05d6f2a3b7c1e4d8f0a2b5c9e3d7f1a4b8 + ├───────── image: httpserver-expressjs4.18-node21@sha256:2e7d3f1a9c4b8e05d6f2a3b7c1e4d8f0a2b5c9e3d7f1a4b8 ├──────── memory: 512 MiB ├─────── service: calm-ocean-r9x4mk7v - ├── private fqdn: expressjs4.18-node21-lb3p2.internal + ├── private fqdn: httpserver-expressjs4.18-node21-lb3p2.internal ├──── private ip: 172.16.3.4 └────────── args: /usr/bin/node /usr/src/server.js ``` -In this case, the instance name is `expressjs4.18-node21-lb3p2` and the address is `https://calm-ocean-r9x4mk7v.fra.unikraft.app`. +In this case, the instance name is `httpserver-expressjs4.18-node21-lb3p2` and the address is `https://calm-ocean-r9x4mk7v.fra.unikraft.app`. They're different for each run. -Use `curl` to query the Unikraft Cloud instance of the Express.js instance: +Use `curl` to query the Unikraft Cloud instance of the Express.js-based HTTP web server: ```bash curl https://calm-ocean-r9x4mk7v.fra.unikraft.app @@ -65,14 +65,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -expressjs4.18-node21-lb3p2 calm-ocean-r9x4mk7v.fra.unik... running since 3mins node21-expressjs@sha256:2e7d3f1a9c4b... 512 MiB 1 /usr/bin/node /usr/src/server.js 312.45 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-expressjs4.18-node21-lb3p2 calm-ocean-r9x4mk7v.fra... running since 3mins httpserver-expressjs4.18-node21@sha256:2... 512 MiB 1 /usr/bin/node /usr/src/server.js 312.45 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove expressjs4.18-node21-lb3p2 +kraft cloud instance remove httpserver-expressjs4.18-node21-lb3p2 ``` ## Customize your app @@ -97,7 +97,7 @@ Lines in the `Dockerfile` have the following roles: * `FROM node:21-alpine AS build`: Build the app using the Node.js 21 Alpine image. -* `COPY ...`: Copy required files to the app filesystem: the `node` binary executable, libraries, configuration files, and the Express.js application. +* `COPY ...`: Copy required files to the app filesystem: the `node` binary executable, libraries, configuration files, and the Express.js app. * `RUN npm install`: Install Express.js and other dependencies. diff --git a/expressjs4.18-node21/app/index.js b/httpserver-expressjs4.18-node21/app/index.js similarity index 100% rename from expressjs4.18-node21/app/index.js rename to httpserver-expressjs4.18-node21/app/index.js diff --git a/expressjs4.18-node21/package.json b/httpserver-expressjs4.18-node21/package.json similarity index 100% rename from expressjs4.18-node21/package.json rename to httpserver-expressjs4.18-node21/package.json diff --git a/flask-redis/.dockerignore b/httpserver-flask-redis/.dockerignore similarity index 100% rename from flask-redis/.dockerignore rename to httpserver-flask-redis/.dockerignore diff --git a/flask-redis/Dockerfile b/httpserver-flask-redis/Dockerfile similarity index 100% rename from flask-redis/Dockerfile rename to httpserver-flask-redis/Dockerfile diff --git a/flask-redis/Kraftfile b/httpserver-flask-redis/Kraftfile similarity index 100% rename from flask-redis/Kraftfile rename to httpserver-flask-redis/Kraftfile diff --git a/flask-redis/README.md b/httpserver-flask-redis/README.md similarity index 88% rename from flask-redis/README.md rename to httpserver-flask-redis/README.md index 4ca12448..8874a313 100644 --- a/flask-redis/README.md +++ b/httpserver-flask-redis/README.md @@ -1,15 +1,15 @@ -# Flask with Redis +# HTTP Server with Flask and Redis This guide explains how to create and deploy a Flask app with a Redis database. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/flask-redis` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-flask-redis` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/flask-redis/ +cd examples/httpserver-flask-redis/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. diff --git a/flask-redis/app.py b/httpserver-flask-redis/app.py similarity index 100% rename from flask-redis/app.py rename to httpserver-flask-redis/app.py diff --git a/flask-redis/compose.yaml b/httpserver-flask-redis/compose.yaml similarity index 100% rename from flask-redis/compose.yaml rename to httpserver-flask-redis/compose.yaml diff --git a/flask-redis/requirements.txt b/httpserver-flask-redis/requirements.txt similarity index 100% rename from flask-redis/requirements.txt rename to httpserver-flask-redis/requirements.txt diff --git a/httpserver-g++13.2/README.md b/httpserver-g++13.2/README.md index 8131da2b..8a5c0287 100644 --- a/httpserver-g++13.2/README.md +++ b/httpserver-g++13.2/README.md @@ -1,15 +1,15 @@ -# C++ +# HTTP Server with C++ This guide explains how to create and deploy a simple C++-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [example repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-cpp/` directory: +2. Clone the [example repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-g++13.2/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-cpp/ +cd examples/httpserver-g++13.2/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```text [●] Deployed successfully! │ - ├────────── name: http-cpp-jzbuo + ├────────── name: httpserver-g++13.2-jzbuo ├────────── uuid: b8e015fd-d006-49d5-849e-3fd497c9159a ├───────── state: running ├─────────── url: https://throbbing-wave-grxjih4t.fra.unikraft.app - ├───────── image: http-cpp@sha256:a58873987104b52c13b79168a2e2f1a81876ba6efacd6dbc98e996afe5c09699 + ├───────── image: httpserver-g++13.2@sha256:a58873987104b52c13b79168a2e2f1a81876ba6efacd6dbc98e996afe5c09699 ├───── boot time: 15.61 ms ├──────── memory: 256 MiB ├─────── service: throbbing-wave-grxjih4t - ├── private fqdn: http-cpp-jzbuo.internal + ├── private fqdn: httpserver-g++13.2-jzbuo.internal ├──── private ip: 172.16.6.5 └────────── args: /http_server ``` -In this case, the instance name is `http-cpp-jzbuo` and the address is `https://throbbing-wave-grxjih4t.fra.unikraft.app`. +In this case, the instance name is `httpserver-g++13.2-jzbuo` and the address is `https://throbbing-wave-grxjih4t.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the C++ HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the C++ HTTP web server: ```bash curl https://throbbing-wave-grxjih4t.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,22 +63,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-cpp-jzbuo throbbing-wave-grxjih4t.fra.unikraft.app running 1 minute ago http-cpp@sha256:a58873987104b52c13b79168a2e2f1a81876ba6efac... 256 MiB 1 /http_server 15614us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-g++13.2-jzbuo throbbing-wave-grxjih4t.fra.unikraft.app running 1 minute ago httpserver-g++13.2@sha256:a58873987104b52c13b79168a2e2f1a81... 256 MiB 1 /http_server 15614us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-cpp-jzbuo +kraft cloud instance remove httpserver-g++13.2-jzbuo ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `http_server.cpp`: the actual C++ HTTP server +* `http_server.cpp`: the actual C++ HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/httpserver-gcc13.2/README.md b/httpserver-gcc13.2/README.md index 7b895956..f78af01c 100644 --- a/httpserver-gcc13.2/README.md +++ b/httpserver-gcc13.2/README.md @@ -1,15 +1,15 @@ -# C +# HTTP Server with C This guide explains how to create and deploy a C app. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-c` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-gcc13.2` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-c/ +cd examples/httpserver-gcc13.2/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,12 +32,12 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────── name: http-c-is2s9 + ├────── name: httpserver-gcc13.2-is2s9 ├────── uuid: bec814ce-6ed5-4858-b247-e7f0b17750f5 ├───── metro: https://api.fra.unikraft.cloud/v1 ├───── state: running ├──── domain: https://still-resonance-bja3lste.fra.unikraft.app - ├───── image: http-c@sha256:375677bf052f14c18ca79c86d2f47a68f3ea5f8636bcd8830753a254f0e06c1b + ├───── image: httpserver-gcc13.2@sha256:375677bf052f14c18ca79c86d2f47a68f3ea5f8636bcd8830753a254f0e06c1b ├─ boot time: 13.29 ms ├──── memory: 256 MiB ├─── service: still-resonance-bja3lste @@ -45,7 +45,7 @@ The output shows the instance address and other details: └────── args: /http_server ``` -In this case, the instance name is `http-c-is2s9` and the address is `https://still-resonance-bja3lste.fra.unikraft.app`. +In this case, the instance name is `httpserver-gcc13.2-is2s9` and the address is `https://still-resonance-bja3lste.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance: @@ -65,14 +65,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-c-is2s9 still-resonance-bja3lste.fra.unikraft.app standby standby http-c@sha256:375677bf052f14c18ca79c8... 256 MiB 1 /http_server 12.91 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-gcc13.2-is2s9 still-resonance-bja3lste.fra.unikraft.app standby standby httpserver-gcc13.2@sha256:375677bf052f14c18cc8... 256 MiB 1 /http_server 12.91 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-c-is2s9 +kraft cloud instance remove httpserver-gcc13.2-is2s9 ``` ## Learn more diff --git a/httpserver-go1.21/README.md b/httpserver-go1.21/README.md index 77ea5f6b..5c501ceb 100644 --- a/httpserver-go1.21/README.md +++ b/httpserver-go1.21/README.md @@ -1,15 +1,15 @@ -# Golang +# HTTP Server with Go This guide explains how to create and deploy a simple Go-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-go1.21/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-go1.21/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-go1.21/ +cd examples/httpserver-go1.21/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/metros#available) close to you. @@ -32,27 +32,28 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-go121-9a2wv + ├────────── name: httpserver-go1.21-9a2wv ├────────── uuid: 8bb34040-9434-4a28-bd1e-c24ee532e2da ├───────── state: running ├─────────── url: https://red-dew-jtk6yxk1.fra.unikraft.app - ├───────── image: http-go121@sha256:b16d61bb7898e764d8c11ab5a0b995e8c25a25b5ff89e161fc994ebf25a75680 + ├───────── image: httpserver-go1.21@sha256:b16d61bb7898e764d8c11ab5a0b995e8c25a25b5ff89e161fc994ebf25a75680 ├───── boot time: 11.05 ms ├──────── memory: 256 MiB ├─────── service: red-dew-jtk6yxk1 - ├── private fqdn: http-go121-9a2wv.internal + ├── private fqdn: httpserver-go1.21-9a2wv.internal ├──── private ip: 172.16.3.3 └────────── args: /server ``` -In this case, the instance name is `http-go121-9a2wv` and the address is `https://red-dew-jtk6yxk1.fra.unikraft.app`. +In this case, the instance name is `httpserver-go1.21-9a2wv` and the address is `https://red-dew-jtk6yxk1.fra.unikraft.app`. They're different for each run. -Use `curl` to query the Unikraft Cloud instance of the Lua-based HTTP web server: +Use `curl` to query the Unikraft Cloud instance of the Go-based HTTP web server: ```bash curl https://red-dew-jtk6yxk1.fra.unikraft.app ``` + ```text hello, world! ``` @@ -62,22 +63,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-go121-9a2wv red-dew-jtk6yxk1.fra.unikraft.app running 1 minute ago alex/http-go121@sha256:b16d61bb7898e764d... 256 MiB 1 /server 9324us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-go1.21-9a2wv red-dew-jtk6yxk1.fra.unikraft.app running 1 minute ago httpserver-go1.21@sha256:b16d61bb7898e764d... 256 MiB 1 /server 9324us ``` When done, you can remove the instance: ```bash -kraft cloud instance delete http-go121-9a2wv +kraft cloud instance delete httpserver-go1.21-9a2wv ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `server.go`: the actual Go HTTP server +* `server.go`: the actual Go HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/httpserver-go1.22-redis/README.md b/httpserver-go1.22-redis/README.md index 2a214264..e0ade303 100644 --- a/httpserver-go1.22-redis/README.md +++ b/httpserver-go1.22-redis/README.md @@ -1,15 +1,15 @@ -# Go with Redis +# HTTP Server with Go and Redis This guide explains how to create and deploy a Go app with a Redis database. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-go1.22-redis` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-go1.22-redis` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-go1.22-redis/ +cd examples/httpserver-go1.22-redis/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. diff --git a/java17-spring-petclinic/Dockerfile b/httpserver-java17-spring-petclinic/Dockerfile similarity index 100% rename from java17-spring-petclinic/Dockerfile rename to httpserver-java17-spring-petclinic/Dockerfile diff --git a/java17-spring-petclinic/Kraftfile b/httpserver-java17-spring-petclinic/Kraftfile similarity index 100% rename from java17-spring-petclinic/Kraftfile rename to httpserver-java17-spring-petclinic/Kraftfile diff --git a/java17-spring-petclinic/README.md b/httpserver-java17-spring-petclinic/README.md similarity index 100% rename from java17-spring-petclinic/README.md rename to httpserver-java17-spring-petclinic/README.md diff --git a/java17-springboot3.2.x/DemoApplication.java b/httpserver-java17-springboot3.2.x/DemoApplication.java similarity index 100% rename from java17-springboot3.2.x/DemoApplication.java rename to httpserver-java17-springboot3.2.x/DemoApplication.java diff --git a/java17-springboot3.2.x/Dockerfile b/httpserver-java17-springboot3.2.x/Dockerfile similarity index 100% rename from java17-springboot3.2.x/Dockerfile rename to httpserver-java17-springboot3.2.x/Dockerfile diff --git a/java17-springboot3.2.x/Kraftfile b/httpserver-java17-springboot3.2.x/Kraftfile similarity index 100% rename from java17-springboot3.2.x/Kraftfile rename to httpserver-java17-springboot3.2.x/Kraftfile diff --git a/java17-springboot3.2.x/README.md b/httpserver-java17-springboot3.2.x/README.md similarity index 83% rename from java17-springboot3.2.x/README.md rename to httpserver-java17-springboot3.2.x/README.md index c180f14a..4b77655a 100644 --- a/java17-springboot3.2.x/README.md +++ b/httpserver-java17-springboot3.2.x/README.md @@ -1,15 +1,15 @@ -# Run a Spring Boot app +# HTTP Server with Spring Boot This guide explains how to create and deploy a Spring Boot web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/java17-springboot3.2.x/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-java17-springboot3.2.x/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/java17-springboot3.2.x/ +cd examples/httpserver-java17-springboot3.2.x/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: java17-springboot32x-qseeo + ├────────── name: httpserver-java17-springboot32x-qseeo ├────────── uuid: b081166d-a2a0-43af-982d-1aa17f06b5c4 ├───────── state: running ├─────────── url: https://long-dust-si7xsngk.fra.unikraft.app - ├───────── image: java17-springboot32x@sha256:cc2f2ad18ce8e36b8e8f4debee096fef7b0bb8b47762575a2ba5a9de8199c64a + ├───────── image: httpserver-java17-springboot32x@sha256:cc2f2ad18ce8e36b8e8f4debee096fef7b0bb8b47762575a2ba5a9de8199c64a ├───── boot time: 153.97 ms ├──────── memory: 1024 MiB ├─────── service: long-dust-si7xsngk - ├── private fqdn: java17-springboot32x-qseeo.internal + ├── private fqdn: httpserver-java17-springboot32x-qseeo.internal ├──── private ip: 172.16.6.2 └────────── args: /usr/lib/jvm/java-17-openjdk-amd64/bin/java -jar /usr/src/demo-0.0.1-SNAPSHOT.jar ``` -In this case, the instance name is `java17-springboot32x-qseeo` and the address is `https://long-dust-si7xsngk.fra.unikraft.app`. +In this case, the instance name is `httpserver-java17-springboot32x-qseeo` and the address is `https://long-dust-si7xsngk.fra.unikraft.app`. They're different for each run. Use `curl` to query the Spring Boot server's `hello` endpoint: @@ -53,6 +53,7 @@ Use `curl` to query the Spring Boot server's `hello` endpoint: ```bash curl https://long-dust-si7xsngk.fra.unikraft.app/hello ``` + ```text Hello World! ``` @@ -60,7 +61,7 @@ Hello World! When done, you can remove the instance: ```bash -kraft cloud instance remove java17-springboot32x-qseeo +kraft cloud instance remove httpserver-java17-springboot32x-qseeo ``` ## Customize your app diff --git a/httpserver-java17/Dockerfile b/httpserver-java17/Dockerfile deleted file mode 100644 index 54cee774..00000000 --- a/httpserver-java17/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM --platform=linux/x86_64 debian:bookworm AS build - -RUN set -xe ; \ - apt -yqq update ; \ - apt -yqq install default-jre ; \ - apt -yqq install default-jdk \ - ; - -RUN ldconfig /usr/lib/jvm/java-17-openjdk-amd64/lib/ - -WORKDIR /src - -COPY ./SimpleHttpServer.java /src/SimpleHttpServer.java - -RUN javac SimpleHttpServer.java - -FROM scratch - -COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6 -COPY --from=build /lib/x86_64-linux-gnu/libstdc++.so.6 /lib/x86_64-linux-gnu/libstdc++.so.6 -COPY --from=build /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6 -COPY --from=build /usr/lib/x86_64-linux-gnu/libz.so.1 /usr/lib/x86_64-linux-gnu/libz.so.1 -COPY --from=build /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/libgcc_s.so.1 -COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 -COPY --from=build /etc/ld.so.cache /etc/ld.so.cache - -COPY --from=build /usr/lib/jvm/java-17-openjdk-amd64/ /usr/lib/jvm/java-17-openjdk-amd64/ -COPY --from=build /etc/ssl/certs/java/cacerts /etc/ssl/certs/java/cacerts - -COPY --from=build /etc/java-17-openjdk/security/ /etc/java-17-openjdk/security/ - -COPY --from=build /src/SimpleHttpServer.class /usr/src/SimpleHttpServer.class diff --git a/httpserver-java17/Kraftfile b/httpserver-java17/Kraftfile deleted file mode 100644 index 8b3ac282..00000000 --- a/httpserver-java17/Kraftfile +++ /dev/null @@ -1,12 +0,0 @@ -spec: v0.6 - -runtime: base-compat:latest - -labels: - cloud.unikraft.v1.instances/scale_to_zero.policy: "idle" - cloud.unikraft.v1.instances/scale_to_zero.stateful: "true" - cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 - -rootfs: ./Dockerfile - -cmd: ["/usr/lib/jvm/java-17-openjdk-amd64/bin/java", "-classpath", "/usr/src/", "SimpleHttpServer"] diff --git a/httpserver-java17/README.md b/httpserver-java17/README.md deleted file mode 100644 index c2446602..00000000 --- a/httpserver-java17/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# Java - -This guide explains how to create and deploy a simple Java-based HTTP web server. -To run this example, follow these steps: - -1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). - -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-java17/` directory: - -```bash -git clone https://github.com/unikraft-cloud/examples -cd examples/http-java17/ -``` - -Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. -This guide uses `fra` (Frankfurt, 🇩🇪): - -```bash -export UKC_TOKEN=token -# Set metro to Frankfurt, DE -export UKC_METRO=fra -``` - -When done, invoke the following command to deploy this app on Unikraft Cloud: - -```bash -kraft cloud deploy -p 443:8080 -M 1Gi . -``` - -The output shows the instance address and other details: - -```ansi -[●] Deployed successfully! - │ - ├────────── name: http-java17-xx739 - ├────────── uuid: 15346dbe-6c6e-461a-a998-e6fc9bfa6d89 - ├───────── state: running - ├─────────── url: https://bold-voice-irwjijr5.fra.unikraft.app - ├───────── image: http-java17@sha256:554deac043859fc0eb4f8aeebe2daeb76c5d30960157a00746b9fb7b177ef0ca - ├───── boot time: 157.15 ms - ├──────── memory: 1024 MiB - ├─────── service: bold-voice-irwjijr5 - ├── private fqdn: http-java17-xx739.internal - ├──── private ip: 172.16.28.2 - └────────── args: /usr/lib/jvm/java-17-openjdk-amd64/bin/java -classpath /usr/src/ SimpleHttpServer -``` - -In this case, the instance name is `http-java17-xx739` and the address is `https://bold-voice-irwjijr5.fra.unikraft.app`. -They're different for each run. - -Use `curl` to query the Unikraft Cloud instance of the Java-based HTTP web server: - -```bash -curl https://bold-voice-irwjijr5.fra.unikraft.app -``` -```text -Hello, World! -``` - -You can list information about the instance by running: - -```bash -kraft cloud instance list -``` -```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-java17-xx739 bold-voice-irwjijr5.fra.unikraft.app running 1 minute ago http-java17@sha256:6f4cb7632ecbab952feb072e37a1a9... 1.0 GiB 1 /usr/lib/jvm/java-17-openjdk... 157154us -``` - -When done, you can remove the instance: - -```bash -kraft cloud instance remove http-java17-xx739 -``` - -## Customize your app - -To customize the app, update the files in the repository, listed below: - -* `SimpleHttpServer.java`: the actual Java HTTP server -* `Kraftfile`: the Unikraft Cloud specification -* `Dockerfile`: the Docker-specified app filesystem - -Lines in the `Kraftfile` have the following roles: - -* `spec: v0.6`: The current `Kraftfile` specification version is `0.6`. - -* `runtime: java:latest`: The Unikraft runtime kernel to use is Java. - -* `rootfs: ./Dockerfile`: Build the app root filesystem using the `Dockerfile`. - -* `cmd:`: Use as the starting command of the instance. - -Lines in the `Dockerfile` have the following roles: - -* `FROM scratch`: Build the filesystem from the [`scratch` container image](https://hub.docker.com/_/scratch/), to [create a base image](https://docs.docker.com/build/building/base-images/). - -* `COPY ./SimpleHttpServer.java /src/SimpleHttpServer.java`: Copy the server implementation file in the Docker filesystem. - -* `RUN javac SimpleHttpServer.java`: Compile the Java source file. - -The following options are available for customizing the app: - -* If you only update the implementation in the `SimpleHttpServer.java` source file, you don't need to make any other changes. - -* If you create any new source files, copy them into the app filesystem by using the `COPY` command in the `Dockerfile`. - -* More extensive changes may require extending the `Dockerfile` ([see `Dockerfile` syntax reference](https://docs.docker.com/engine/reference/builder/)). - -## Learn more - -Use the `--help` option for detailed information on using Unikraft Cloud: - -```bash -kraft cloud --help -``` - -Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/httpserver-java17/SimpleHttpServer.java b/httpserver-java17/SimpleHttpServer.java deleted file mode 100644 index 44c2b248..00000000 --- a/httpserver-java17/SimpleHttpServer.java +++ /dev/null @@ -1,29 +0,0 @@ -// https://www.logicbig.com/tutorials/core-java-tutorial/http-server/http-server-basic.html - -import com.sun.net.httpserver.HttpContext; -import com.sun.net.httpserver.HttpExchange; -import com.sun.net.httpserver.HttpServer; -import java.io.IOException; -import java.io.OutputStream; -import java.net.InetSocketAddress; - -public class SimpleHttpServer { - private static final int listenPort = 8080; - - public static void main(String[] args) throws IOException { - HttpServer server = HttpServer.create(new InetSocketAddress(listenPort), 0); - HttpContext context = server.createContext("/"); - context.setHandler(SimpleHttpServer::handleRequest); - System.out.println("Waiting for HTTP connections on port " + listenPort + " ..."); - server.start(); - } - - private static void handleRequest(HttpExchange exchange) throws IOException { - String response = "Hello, World!\n"; - exchange.sendResponseHeaders(200, response.getBytes().length); // response code and length - OutputStream os = exchange.getResponseBody(); - os.write(response.getBytes()); - os.close(); - } - -} diff --git a/http-java21/Dockerfile b/httpserver-java21/Dockerfile similarity index 100% rename from http-java21/Dockerfile rename to httpserver-java21/Dockerfile diff --git a/http-java21/Kraftfile b/httpserver-java21/Kraftfile similarity index 100% rename from http-java21/Kraftfile rename to httpserver-java21/Kraftfile diff --git a/http-java21/README.md b/httpserver-java21/README.md similarity index 80% rename from http-java21/README.md rename to httpserver-java21/README.md index 79bbe755..798a1b04 100644 --- a/http-java21/README.md +++ b/httpserver-java21/README.md @@ -1,4 +1,4 @@ -# Simple Java 21 HTTP Server +# HTTP Server with Java This is a simple HTTP server written in the [Java](https://www.java.com/en/) programming language. @@ -6,11 +6,11 @@ To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-java21` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-java21` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-java21/ +cd examples/httpserver-java21/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -33,22 +33,22 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-java21-5xw9m + ├────────── name: httpserver-java21-5xw9m ├────────── uuid: b2c3d4e5-f6a7-8901-bcde-f12345678901 ├───────── state: starting ├──────── domain: https://gentle-wind-b2x9pkqm.fra.unikraft.app - ├───────── image: http-java21@sha256:4f8a2c6e1d9b3f7a5c0e2b4d8f6a1c3e7b9d2f4a6c8e0b2d4f6a8c0e2b4d6f + ├───────── image: httpserver-java21@sha256:4f8a2c6e1d9b3f7a5c0e2b4d8f6a1c3e7b9d2f4a6c8e0b2d4f6a8c0e2b4d6f ├──────── memory: 1 GiB ├─────── service: gentle-wind-b2x9pkqm - ├── private fqdn: http-java21-5xw9m.internal + ├── private fqdn: httpserver-java21-5xw9m.internal ├──── private ip: 172.16.3.5 └────────── args: /usr/lib/jvm/java-21-openjdk-amd64/bin/java -classpath /usr/src/ SimpleHttpServer ``` -In this case, the instance name is `http-java21-5xw9m` and the address is `https://gentle-wind-b2x9pkqm.fra.unikraft.app`. +In this case, the instance name is `httpserver-java21-5xw9m` and the address is `https://gentle-wind-b2x9pkqm.fra.unikraft.app`. They're different for each run. -Use `curl` to query the Unikraft Cloud instance of the Java HTTP server instance: +Use `curl` to query the Unikraft Cloud instance of the Java HTTP server: ```bash curl https://gentle-wind-b2x9pkqm.fra.unikraft.app @@ -65,14 +65,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-java21-5xw9m gentle-wind-b2x9pkqm.fra.unik... running since 3mins http-java21@sha256:4f8a2c6e1d9b3f... 1 GiB 1 /usr/lib/jvm/java-21-openjdk-amd64/bin/java -classpath /usr/src/ SimpleHttpServer 421.30 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-java21-5xw9m gentle-wind-b2x9pkqm.fra.unik... running since 3mins httpserver-java21@sha256:4f8a2c6e... 1 GiB 1 /usr/lib/jvm/java-21-openjdk-amd64/bin/java -cla... 421.30 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-java21-5xw9m +kraft cloud instance remove httpserver-java21-5xw9m ``` ## Customize your app diff --git a/http-java21/SimpleHttpServer.java b/httpserver-java21/SimpleHttpServer.java similarity index 81% rename from http-java21/SimpleHttpServer.java rename to httpserver-java21/SimpleHttpServer.java index e2c9b25a..27434364 100644 --- a/http-java21/SimpleHttpServer.java +++ b/httpserver-java21/SimpleHttpServer.java @@ -7,28 +7,26 @@ public class SimpleHttpServer { private static final int listenPort = 8080; - // Static variable to store startup duration for display in the browser private static long startupDuration = 0; + public static void main(String[] args) throws IOException { long startTime = System.currentTimeMillis(); + HttpServer server = HttpServer.create(new InetSocketAddress(listenPort), 0); HttpContext context = server.createContext("/"); context.setHandler(SimpleHttpServer::handleRequest); server.start(); + long endTime = System.currentTimeMillis(); - // Calculate duration and save it to the static variable startupDuration = endTime - startTime; - // Display in server logs (visible via 'kraft cloud logs') + System.out.println("------------------------------------------------"); System.out.println(" [Log] Server started in " + startupDuration + " ms!"); System.out.println(" Waiting for connections..."); System.out.println("------------------------------------------------"); } + private static void handleRequest(HttpExchange exchange) throws IOException { - // Combine the messages here: - // 1. "Hello, World!" - // 2. "\n" (new line) - // 3. Startup time String response = "Hello, World!\n[Unikraft Speed] Boot time: " + startupDuration + " ms\n"; exchange.sendResponseHeaders(200, response.getBytes().length); OutputStream os = exchange.getResponseBody(); diff --git a/httpserver-lua5.1/README.md b/httpserver-lua5.1/README.md index 8853429c..feeb2412 100644 --- a/httpserver-lua5.1/README.md +++ b/httpserver-lua5.1/README.md @@ -1,15 +1,15 @@ -# Lua +# HTTP Server with Lua This guide explains how to create and deploy a simple Lua-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-lua5.1/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-lua5.1/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-lua5.1/ +cd examples/httpserver-lua5.1/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-lua51-ma2i9 + ├────────── name: httpserver-lua51-ma2i9 ├────────── uuid: e7389eee-9808-4152-b2ec-1f3c0541fd05 ├───────── state: running ├─────────── url: https://young-night-5fpf0jj8.fra.unikraft.app - ├───────── image: http-lua51@sha256:278cb8b14f9faf9c2702dddd8bfb6124912d82c11b4a2c6590b6e32fc4049472 + ├───────── image: httpserver-lua51@sha256:278cb8b14f9faf9c2702dddd8bfb6124912d82c11b4a2c6590b6e32fc4049472 ├───── boot time: 15.09 ms ├──────── memory: 256 MiB ├─────── service: young-night-5fpf0jj8 - ├── private fqdn: http-lua51-ma2i9.internal + ├── private fqdn: httpserver-lua51-ma2i9.internal ├──── private ip: 172.16.3.3 └────────── args: /usr/bin/lua /http_server.lua ``` -In this case, the instance name is `http-lua51-ma2i9` and the address is `https://young-night-5fpf0jj8.fra.unikraft.app`. +In this case, the instance name is `httpserver-lua51-ma2i9` and the address is `https://young-night-5fpf0jj8.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Lua-based HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the Lua-based HTTP web server ```bash curl https://young-night-5fpf0jj8.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,22 +63,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-lua51-ma2i9 young-night-5fpf0jj8.fra.unikraft.app running 1 minute ago http-lua51@sha256:278cb8b14f9faf9c27... 256 MiB 1 /usr/bin/lua /http_server.lua 15094us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-lua51-ma2i9 young-night-5fpf0jj8.fra.unikraft.app running 1 minute ago httpserver-lua51@sha256:278cb8b14f9f... 256 MiB 1 /usr/bin/lua /http_server.lua 15094us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-lua51-ma2i9 +kraft cloud instance remove httpserver-lua51-ma2i9 ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `http_server.lua`: the actual Lua HTTP server +* `http_server.lua`: the actual Lua HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/nginx-vite-vanilla/.gitignore b/httpserver-nginx-vite-vanilla/.gitignore similarity index 100% rename from nginx-vite-vanilla/.gitignore rename to httpserver-nginx-vite-vanilla/.gitignore diff --git a/nginx-vite-vanilla/Dockerfile b/httpserver-nginx-vite-vanilla/Dockerfile similarity index 100% rename from nginx-vite-vanilla/Dockerfile rename to httpserver-nginx-vite-vanilla/Dockerfile diff --git a/nginx-vite-vanilla/Kraftfile b/httpserver-nginx-vite-vanilla/Kraftfile similarity index 100% rename from nginx-vite-vanilla/Kraftfile rename to httpserver-nginx-vite-vanilla/Kraftfile diff --git a/nginx-vite-vanilla/README.md b/httpserver-nginx-vite-vanilla/README.md similarity index 69% rename from nginx-vite-vanilla/README.md rename to httpserver-nginx-vite-vanilla/README.md index ad70076a..5b1e3afb 100644 --- a/nginx-vite-vanilla/README.md +++ b/httpserver-nginx-vite-vanilla/README.md @@ -1,17 +1,18 @@ -# Vite +# HTTP Server with Nginx and Vite -This example demonstrates how to run a [Vite](https://vite.dev) project which has been built for production on Unikraft Cloud. The deployment does not perform any server side rendering (non-SSR) and instead serves the resulting artifacts statically (via `npm run build`) using [`nginx`](https://github.com/unikraft-cloud/examples/nginx). -To use Vite in SSR mode or via the `dev` subcommand on a NodeJS runtime, please see the [`node-vite-vanilla`](https://github.com/unikraft-cloud/examples/node-vite-vanilla) sibling project. +This example demonstrates how to run a [Vite](https://vite.dev) project targeting production on Unikraft Cloud. +The deployment doesn't perform any server-side rendering and instead serves the resulting artifacts statically (via `npm run build`) using [`nginx`](https://github.com/unikraft-cloud/examples/nginx). +To use Vite in server-side rendering (SSR) mode or via the `dev` subcommand on a NodeJS runtime, please see the [`httpserver-node-vite-vanilla`](https://github.com/unikraft-cloud/examples/httpserver-node-vite-vanilla) sibling project. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/nginx-vite-vanilla` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-nginx-vite-vanilla` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/nginx-vite-vanilla/ +cd examples/httpserver-nginx-vite-vanilla/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -34,19 +35,19 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: nginx-vite-vanilla-2rk6p + ├────────── name: httpserver-nginx-vite-vanilla-2rk6p ├────────── uuid: d4e5f6a7-b8c9-0123-defa-234567890123 ├───────── state: starting ├──────── domain: https://swift-lake-m4n8vqzp.fra.unikraft.app - ├───────── image: nginx-vite-vanilla@sha256:9c5f2d8b4e7a1c3f6d9b2e5a8c1f4d7a0b3e6c9f2d5a8b1e4c7f0d3a6b9c2 + ├───────── image: httpserver-nginx-vite-vanilla@sha256:9c5f2d8b4e7a1c3f6d9b2e5a8c1f4d7a0b3e6c9f2d5a8b1e4c7f0d3a6b9c2 ├──────── memory: 256 MiB ├─────── service: swift-lake-m4n8vqzp - ├── private fqdn: nginx-vite-vanilla-2rk6p.internal + ├── private fqdn: httpserver-nginx-vite-vanilla-2rk6p.internal ├──── private ip: 172.16.3.7 └────────── args: /usr/bin/nginx -c /etc/nginx/nginx.conf ``` -In this case, the instance name is `nginx-vite-vanilla-2rk6p` and the address is `https://swift-lake-m4n8vqzp.fra.unikraft.app`. +In this case, the instance name is `httpserver-nginx-vite-vanilla-2rk6p` and the address is `https://swift-lake-m4n8vqzp.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Vite instance: @@ -76,14 +77,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -nginx-vite-vanilla-2rk6p swift-lake-m4n8vqzp.fra.unikraft.app running since 3mins nginx-vite-vanilla@sha256:9c5f2d8b4e7a1c... 256 MiB 1 /usr/bin/nginx -c /etc/nginx/nginx.conf 198.62 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-nginx-vite-vanilla-2rk6p swift-lake-m4n8vqzp.fra.unikraft.app running since 3mins httpserver-nginx-vite-vanilla@sha256:9c5... 256 MiB 1 /usr/bin/nginx -c /etc/nginx/nginx.conf 198.62 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove nginx-vite-vanilla-2rk6p +kraft cloud instance remove httpserver-nginx-vite-vanilla-2rk6p ``` ## Customize your app @@ -92,7 +93,7 @@ To customize the app, update the files in the repository, listed below: * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem -* `src/`: the Vite application source files +* `src/`: the Vite app source files Lines in the `Kraftfile` have the following roles: @@ -112,7 +113,7 @@ Lines in the `Dockerfile` have the following roles: * `FROM scratch`: Build the runtime filesystem from a minimal base image. -* `COPY --from=build /app/dist /wwwroot`: Copy the built Vite artifacts to be served by nginx. +* `COPY --from=build /app/dist /wwwroot`: nginx serves the built Vite artifacts from `/wwwroot`. The following options are available for customizing the app: diff --git a/nginx-vite-vanilla/index.html b/httpserver-nginx-vite-vanilla/index.html similarity index 100% rename from nginx-vite-vanilla/index.html rename to httpserver-nginx-vite-vanilla/index.html diff --git a/nginx-vite-vanilla/package-lock.json b/httpserver-nginx-vite-vanilla/package-lock.json similarity index 100% rename from nginx-vite-vanilla/package-lock.json rename to httpserver-nginx-vite-vanilla/package-lock.json diff --git a/nginx-vite-vanilla/package.json b/httpserver-nginx-vite-vanilla/package.json similarity index 100% rename from nginx-vite-vanilla/package.json rename to httpserver-nginx-vite-vanilla/package.json diff --git a/nginx-vite-vanilla/public/vite.svg b/httpserver-nginx-vite-vanilla/public/vite.svg similarity index 100% rename from nginx-vite-vanilla/public/vite.svg rename to httpserver-nginx-vite-vanilla/public/vite.svg diff --git a/nginx-vite-vanilla/src/counter.js b/httpserver-nginx-vite-vanilla/src/counter.js similarity index 100% rename from nginx-vite-vanilla/src/counter.js rename to httpserver-nginx-vite-vanilla/src/counter.js diff --git a/nginx-vite-vanilla/src/javascript.svg b/httpserver-nginx-vite-vanilla/src/javascript.svg similarity index 100% rename from nginx-vite-vanilla/src/javascript.svg rename to httpserver-nginx-vite-vanilla/src/javascript.svg diff --git a/nginx-vite-vanilla/src/main.js b/httpserver-nginx-vite-vanilla/src/main.js similarity index 100% rename from nginx-vite-vanilla/src/main.js rename to httpserver-nginx-vite-vanilla/src/main.js diff --git a/nginx-vite-vanilla/src/style.css b/httpserver-nginx-vite-vanilla/src/style.css similarity index 100% rename from nginx-vite-vanilla/src/style.css rename to httpserver-nginx-vite-vanilla/src/style.css diff --git a/node-express-puppeteer/.dockerignore b/httpserver-node-express-puppeteer/.dockerignore similarity index 100% rename from node-express-puppeteer/.dockerignore rename to httpserver-node-express-puppeteer/.dockerignore diff --git a/node-express-puppeteer/.gitignore b/httpserver-node-express-puppeteer/.gitignore similarity index 100% rename from node-express-puppeteer/.gitignore rename to httpserver-node-express-puppeteer/.gitignore diff --git a/node-express-puppeteer/Dockerfile b/httpserver-node-express-puppeteer/Dockerfile similarity index 100% rename from node-express-puppeteer/Dockerfile rename to httpserver-node-express-puppeteer/Dockerfile diff --git a/node-express-puppeteer/Kraftfile b/httpserver-node-express-puppeteer/Kraftfile similarity index 100% rename from node-express-puppeteer/Kraftfile rename to httpserver-node-express-puppeteer/Kraftfile diff --git a/node-express-puppeteer/LICENSE b/httpserver-node-express-puppeteer/LICENSE similarity index 100% rename from node-express-puppeteer/LICENSE rename to httpserver-node-express-puppeteer/LICENSE diff --git a/node-express-puppeteer/README.md b/httpserver-node-express-puppeteer/README.md similarity index 71% rename from node-express-puppeteer/README.md rename to httpserver-node-express-puppeteer/README.md index 3d5d3656..5e2cef29 100644 --- a/node-express-puppeteer/README.md +++ b/httpserver-node-express-puppeteer/README.md @@ -1,4 +1,4 @@ -# Puppeteer +# HTTP Server with Puppeteer This guide shows you how to use [Puppeteer](https://pptr.dev/), a Node.js library which provides a high-level API to control browsers, including the option to run them headless (no UI). @@ -6,11 +6,11 @@ To run it, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/node-express-puppeteer/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-node-express-puppeteer/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/node-express-puppeteer/ +cd examples/httpserver-node-express-puppeteer/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -37,19 +37,19 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: node-express-puppeteer-7afg3 + ├────────── name: httpserver-node-express-puppeteer-7afg3 ├────────── uuid: 7bb479d7-5b3e-444f-b07c-eae4da6f57cc ├───────── state: starting ├──────── domain: https://nameless-fog-0tvh1uov.fra.unikraft.app - ├───────── image: node-express-puppeteer@sha256:78d0b180161c876f17d05116b93011ddcd44c76758d6fa0359f05938e67cea65 + ├───────── image: httpserver-node-express-puppeteer@sha256:78d0b180161c876f17d05116b93011ddcd44c76758d6fa0359f05938e67cea65 ├──────── memory: 4096 MiB ├─────── service: little-snow-7qwu6vv5 - ├── private fqdn: node-express-puppeteer-7afg3.internal + ├── private fqdn: httpserver-node-express-puppeteer-7afg3.internal ├──── private ip: 172.16.3.1 └────────── args: /usr/bin/wrapper.sh /usr/bin/node /app/bin/www ``` -In this case, the instance name is `node-express-puppeteer-7afg3`. +In this case, the instance name is `httpserver-node-express-puppeteer-7afg3`. They're different for each run. Use a browser to access the landing page of the Puppeteer (that uses [ExpressJS](https://expressjs.com/)). @@ -61,18 +61,18 @@ You can use the landing page to generate the PDF version of a remote page. You can list information about the instance by running: ```bash -kraft cloud instance list node-express-puppeteer-7afg3 +kraft cloud instance list httpserver-node-express-puppeteer-7afg3 ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -node-express-puppeteer-7afg3 nameless-fog-0tvh1uov.fra.unikraft.app running since 6mins node-express-puppeteer@s... 4.0 GiB 1 /usr/bin/wrapper.sh /usr/bin/n... 15.27 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-node-express-puppeteer-7afg3 nameless-fog-0tvh1uov.fra.unikraft.app running since 6mins httpserver-node-express-puppeteer@s... 4.0 GiB 1 /usr/bin/wrapper.sh /usr/bin/n... 15.27 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove node-express-puppeteer-7afg3 +kraft cloud instance remove httpserver-node-express-puppeteer-7afg3 ``` ## Customize your deployment diff --git a/node-express-puppeteer/app.js b/httpserver-node-express-puppeteer/app.js similarity index 100% rename from node-express-puppeteer/app.js rename to httpserver-node-express-puppeteer/app.js diff --git a/node-express-puppeteer/bin/www b/httpserver-node-express-puppeteer/bin/www similarity index 100% rename from node-express-puppeteer/bin/www rename to httpserver-node-express-puppeteer/bin/www diff --git a/node-express-puppeteer/controller/generatePdf.js b/httpserver-node-express-puppeteer/controller/generatePdf.js similarity index 100% rename from node-express-puppeteer/controller/generatePdf.js rename to httpserver-node-express-puppeteer/controller/generatePdf.js diff --git a/node-express-puppeteer/example.env b/httpserver-node-express-puppeteer/example.env similarity index 100% rename from node-express-puppeteer/example.env rename to httpserver-node-express-puppeteer/example.env diff --git a/node-express-puppeteer/package-lock.json b/httpserver-node-express-puppeteer/package-lock.json similarity index 100% rename from node-express-puppeteer/package-lock.json rename to httpserver-node-express-puppeteer/package-lock.json diff --git a/node-express-puppeteer/package.json b/httpserver-node-express-puppeteer/package.json similarity index 100% rename from node-express-puppeteer/package.json rename to httpserver-node-express-puppeteer/package.json diff --git a/node-express-puppeteer/public/example.gif b/httpserver-node-express-puppeteer/public/example.gif similarity index 100% rename from node-express-puppeteer/public/example.gif rename to httpserver-node-express-puppeteer/public/example.gif diff --git a/node-express-puppeteer/public/helpful-contribution.png b/httpserver-node-express-puppeteer/public/helpful-contribution.png similarity index 100% rename from node-express-puppeteer/public/helpful-contribution.png rename to httpserver-node-express-puppeteer/public/helpful-contribution.png diff --git a/node-express-puppeteer/public/helpful.html b/httpserver-node-express-puppeteer/public/helpful.html similarity index 100% rename from node-express-puppeteer/public/helpful.html rename to httpserver-node-express-puppeteer/public/helpful.html diff --git a/node-express-puppeteer/public/index.html b/httpserver-node-express-puppeteer/public/index.html similarity index 100% rename from node-express-puppeteer/public/index.html rename to httpserver-node-express-puppeteer/public/index.html diff --git a/node-express-puppeteer/public/wot.png b/httpserver-node-express-puppeteer/public/wot.png similarity index 100% rename from node-express-puppeteer/public/wot.png rename to httpserver-node-express-puppeteer/public/wot.png diff --git a/node-express-puppeteer/routes/index.js b/httpserver-node-express-puppeteer/routes/index.js similarity index 100% rename from node-express-puppeteer/routes/index.js rename to httpserver-node-express-puppeteer/routes/index.js diff --git a/node-express-puppeteer/wrapper.sh b/httpserver-node-express-puppeteer/wrapper.sh similarity index 100% rename from node-express-puppeteer/wrapper.sh rename to httpserver-node-express-puppeteer/wrapper.sh diff --git a/node-vite-ssr-vanilla/.dockerignore b/httpserver-node-vite-ssr-vanilla/.dockerignore similarity index 100% rename from node-vite-ssr-vanilla/.dockerignore rename to httpserver-node-vite-ssr-vanilla/.dockerignore diff --git a/node-vite-ssr-vanilla/.gitignore b/httpserver-node-vite-ssr-vanilla/.gitignore similarity index 100% rename from node-vite-ssr-vanilla/.gitignore rename to httpserver-node-vite-ssr-vanilla/.gitignore diff --git a/node-vite-ssr-vanilla/Dockerfile b/httpserver-node-vite-ssr-vanilla/Dockerfile similarity index 100% rename from node-vite-ssr-vanilla/Dockerfile rename to httpserver-node-vite-ssr-vanilla/Dockerfile diff --git a/node-vite-ssr-vanilla/Kraftfile b/httpserver-node-vite-ssr-vanilla/Kraftfile similarity index 100% rename from node-vite-ssr-vanilla/Kraftfile rename to httpserver-node-vite-ssr-vanilla/Kraftfile diff --git a/node-vite-ssr-vanilla/README.md b/httpserver-node-vite-ssr-vanilla/README.md similarity index 85% rename from node-vite-ssr-vanilla/README.md rename to httpserver-node-vite-ssr-vanilla/README.md index 28b88359..765b1a2a 100644 --- a/node-vite-ssr-vanilla/README.md +++ b/httpserver-node-vite-ssr-vanilla/README.md @@ -37,5 +37,5 @@ After deploying, you can query the service using the provided URL. ## See also -- [Vite (vanilla) node "dev" server on Unikraft Cloud](../node-vite-vanilla) -- [Vite (vanilla) static build on Unikraft Cloud](../nginx-vite-vanilla) +- [Vite (vanilla) node "dev" server on Unikraft Cloud](../httpserver-node-vite-vanilla) +- [Vite (vanilla) static build on Unikraft Cloud](../httpserver-nginx-vite-vanilla) diff --git a/node-vite-ssr-vanilla/index.html b/httpserver-node-vite-ssr-vanilla/index.html similarity index 100% rename from node-vite-ssr-vanilla/index.html rename to httpserver-node-vite-ssr-vanilla/index.html diff --git a/node-vite-ssr-vanilla/package-lock.json b/httpserver-node-vite-ssr-vanilla/package-lock.json similarity index 100% rename from node-vite-ssr-vanilla/package-lock.json rename to httpserver-node-vite-ssr-vanilla/package-lock.json diff --git a/node-vite-ssr-vanilla/package.json b/httpserver-node-vite-ssr-vanilla/package.json similarity index 100% rename from node-vite-ssr-vanilla/package.json rename to httpserver-node-vite-ssr-vanilla/package.json diff --git a/node-vite-ssr-vanilla/public/vite.svg b/httpserver-node-vite-ssr-vanilla/public/vite.svg similarity index 100% rename from node-vite-ssr-vanilla/public/vite.svg rename to httpserver-node-vite-ssr-vanilla/public/vite.svg diff --git a/node-vite-ssr-vanilla/server.js b/httpserver-node-vite-ssr-vanilla/server.js similarity index 100% rename from node-vite-ssr-vanilla/server.js rename to httpserver-node-vite-ssr-vanilla/server.js diff --git a/node-vite-ssr-vanilla/src/counter.js b/httpserver-node-vite-ssr-vanilla/src/counter.js similarity index 100% rename from node-vite-ssr-vanilla/src/counter.js rename to httpserver-node-vite-ssr-vanilla/src/counter.js diff --git a/node-vite-ssr-vanilla/src/entry-client.js b/httpserver-node-vite-ssr-vanilla/src/entry-client.js similarity index 100% rename from node-vite-ssr-vanilla/src/entry-client.js rename to httpserver-node-vite-ssr-vanilla/src/entry-client.js diff --git a/node-vite-ssr-vanilla/src/entry-server.js b/httpserver-node-vite-ssr-vanilla/src/entry-server.js similarity index 100% rename from node-vite-ssr-vanilla/src/entry-server.js rename to httpserver-node-vite-ssr-vanilla/src/entry-server.js diff --git a/node-vite-ssr-vanilla/src/javascript.svg b/httpserver-node-vite-ssr-vanilla/src/javascript.svg similarity index 100% rename from node-vite-ssr-vanilla/src/javascript.svg rename to httpserver-node-vite-ssr-vanilla/src/javascript.svg diff --git a/node-vite-ssr-vanilla/src/style.css b/httpserver-node-vite-ssr-vanilla/src/style.css similarity index 100% rename from node-vite-ssr-vanilla/src/style.css rename to httpserver-node-vite-ssr-vanilla/src/style.css diff --git a/node-vite-vanilla/.dockerignore b/httpserver-node-vite-vanilla/.dockerignore similarity index 100% rename from node-vite-vanilla/.dockerignore rename to httpserver-node-vite-vanilla/.dockerignore diff --git a/node-vite-vanilla/.gitignore b/httpserver-node-vite-vanilla/.gitignore similarity index 100% rename from node-vite-vanilla/.gitignore rename to httpserver-node-vite-vanilla/.gitignore diff --git a/node-vite-vanilla/Dockerfile b/httpserver-node-vite-vanilla/Dockerfile similarity index 100% rename from node-vite-vanilla/Dockerfile rename to httpserver-node-vite-vanilla/Dockerfile diff --git a/node-vite-vanilla/Kraftfile b/httpserver-node-vite-vanilla/Kraftfile similarity index 100% rename from node-vite-vanilla/Kraftfile rename to httpserver-node-vite-vanilla/Kraftfile diff --git a/node-vite-vanilla/README.md b/httpserver-node-vite-vanilla/README.md similarity index 80% rename from node-vite-vanilla/README.md rename to httpserver-node-vite-vanilla/README.md index 82a548e6..3e60bccc 100644 --- a/node-vite-vanilla/README.md +++ b/httpserver-node-vite-vanilla/README.md @@ -5,7 +5,7 @@ executes via the `vite` program on top of the `node` runtime. > [!NOTE] > This is **not** the most efficient way to run a Vite project! See -> [`nginx-vite-vanilla`](../nginx-vite-vanilla/) for more details. +> [`httpserver-nginx-vite-vanilla`](../httpserver-nginx-vite-vanilla/) for more details. ## Initialization @@ -40,5 +40,5 @@ After deploying, you can query the service using the provided URL. ## See also -- [Vite (vanilla) static build on Unikraft Cloud](../nginx-vite-vanilla) -- [Vite (vanilla) SSR mode on Unikraft Cloud](../node-vite-ssr-vanilla) +- [Vite (vanilla) static build on Unikraft Cloud](../httpserver-nginx-vite-vanilla) +- [Vite (vanilla) SSR mode on Unikraft Cloud](../httpserver-node-vite-ssr-vanilla) diff --git a/node-vite-vanilla/index.html b/httpserver-node-vite-vanilla/index.html similarity index 100% rename from node-vite-vanilla/index.html rename to httpserver-node-vite-vanilla/index.html diff --git a/node-vite-vanilla/package-lock.json b/httpserver-node-vite-vanilla/package-lock.json similarity index 100% rename from node-vite-vanilla/package-lock.json rename to httpserver-node-vite-vanilla/package-lock.json diff --git a/node-vite-vanilla/package.json b/httpserver-node-vite-vanilla/package.json similarity index 100% rename from node-vite-vanilla/package.json rename to httpserver-node-vite-vanilla/package.json diff --git a/node-vite-vanilla/public/vite.svg b/httpserver-node-vite-vanilla/public/vite.svg similarity index 100% rename from node-vite-vanilla/public/vite.svg rename to httpserver-node-vite-vanilla/public/vite.svg diff --git a/node-vite-vanilla/src/counter.js b/httpserver-node-vite-vanilla/src/counter.js similarity index 100% rename from node-vite-vanilla/src/counter.js rename to httpserver-node-vite-vanilla/src/counter.js diff --git a/node-vite-vanilla/src/javascript.svg b/httpserver-node-vite-vanilla/src/javascript.svg similarity index 100% rename from node-vite-vanilla/src/javascript.svg rename to httpserver-node-vite-vanilla/src/javascript.svg diff --git a/node-vite-vanilla/src/main.js b/httpserver-node-vite-vanilla/src/main.js similarity index 100% rename from node-vite-vanilla/src/main.js rename to httpserver-node-vite-vanilla/src/main.js diff --git a/node-vite-vanilla/src/style.css b/httpserver-node-vite-vanilla/src/style.css similarity index 100% rename from node-vite-vanilla/src/style.css rename to httpserver-node-vite-vanilla/src/style.css diff --git a/node-vite-vanilla/vite.config.js b/httpserver-node-vite-vanilla/vite.config.js similarity index 100% rename from node-vite-vanilla/vite.config.js rename to httpserver-node-vite-vanilla/vite.config.js diff --git a/node21-nextjs/.dockerignore b/httpserver-node21-nextjs/.dockerignore similarity index 100% rename from node21-nextjs/.dockerignore rename to httpserver-node21-nextjs/.dockerignore diff --git a/node21-nextjs/.gitignore b/httpserver-node21-nextjs/.gitignore similarity index 100% rename from node21-nextjs/.gitignore rename to httpserver-node21-nextjs/.gitignore diff --git a/node21-nextjs/Dockerfile b/httpserver-node21-nextjs/Dockerfile similarity index 100% rename from node21-nextjs/Dockerfile rename to httpserver-node21-nextjs/Dockerfile diff --git a/node21-nextjs/Kraftfile b/httpserver-node21-nextjs/Kraftfile similarity index 100% rename from node21-nextjs/Kraftfile rename to httpserver-node21-nextjs/Kraftfile diff --git a/node21-nextjs/README.md b/httpserver-node21-nextjs/README.md similarity index 77% rename from node21-nextjs/README.md rename to httpserver-node21-nextjs/README.md index 15ed3343..263b927a 100644 --- a/node21-nextjs/README.md +++ b/httpserver-node21-nextjs/README.md @@ -1,15 +1,15 @@ -# Next.js +# HTTP Server with Next.js This guide explains how to create and deploy a Next.js app. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/node21-nextjs` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-node21-nextjs` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/node21-nextjs/ +cd examples/httpserver-node21-nextjs/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,27 +32,28 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: node21-nextjs-bfrq0 + ├────────── name: httpserver-node21-nextjs-bfrq0 ├────────── uuid: 2adf9664-c4ae-4e0e-99de-c9781282b370 ├───────── state: running ├─────────── url: https://small-frog-ri8c1vtw.fra.unikraft.app - ├───────── image: node21-nextjs@sha256:ea5b2f145eea9762431ebdea933dd1dfb8427fe23306d2bd7966dd502d6c88f6 + ├───────── image: httpserver-node21-nextjs@sha256:ea5b2f145eea9762431ebdea933dd1dfb8427fe23306d2bd7966dd502d6c88f6 ├───── boot time: 83.60 ms ├──────── memory: 768 MiB ├─────── service: small-frog-ri8c1vtw - ├── private fqdn: node21-nextjs-bfrq0.internal + ├── private fqdn: httpserver-node21-nextjs-bfrq0.internal ├──── private ip: 172.16.28.2 └────────── args: /usr/bin/node /usr/src/server.js ``` -In this case, the instance name is `node21-nextjs-bfrq0` and the address is `https://small-frog-ri8c1vtw.fra.unikraft.app`. +In this case, the instance name is `httpserver-node21-nextjs-bfrq0` and the address is `https://small-frog-ri8c1vtw.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Next.js server: ```bash -curl node21-nextjs-bfrq0 +curl httpserver-node21-nextjs-bfrq0 ``` + ```text { - - // 1. Tell the browser everything is OK (Status code 200), and the data is in plain text - response.writeHead(200, { - 'Content-Type': 'text/plain' - }); - - // 2. Write the announced text to the body of the page - response.write('Hello, World!\n'); - - // 3. Tell the server that all of the response headers and body have been sent - response.end(); - -}).listen(8080); // 4. Tells the server what port to be on diff --git a/httpserver-perl5.38/Dockerfile b/httpserver-perl5.38/Dockerfile deleted file mode 100644 index c3f96f75..00000000 --- a/httpserver-perl5.38/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM perl:5.38.0-bookworm AS build - -RUN set -xe ; \ - cpanm HTTP::Daemon - -FROM scratch - -# Perl binary -COPY --from=build /usr/local/bin/perl /usr/bin/perl - -# Perl libraries -COPY --from=build /usr/local/lib/perl5 /usr/local/lib/perl5 - -# System libraries -COPY --from=build /usr/local/lib/perl5/5.38.0/x86_64-linux-gnu/CORE/libperl.so /usr/local/lib/perl5/5.38.0/x86_64-linux-gnu/CORE/libperl.so -COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6 -COPY --from=build /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6 -COPY --from=build /lib/x86_64-linux-gnu/libcrypt.so.1 /lib/x86_64-linux-gnu/libcrypt.so.1 -COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 -COPY --from=build /etc/ld.so.cache /etc/ld.so.cache - -# Simple Perl HTTP server -COPY ./server.pl /usr/src/server.pl diff --git a/httpserver-perl5.38/Kraftfile b/httpserver-perl5.38/Kraftfile deleted file mode 100644 index 70bdc903..00000000 --- a/httpserver-perl5.38/Kraftfile +++ /dev/null @@ -1,12 +0,0 @@ -spec: v0.6 - -runtime: base-compat:latest - -labels: - cloud.unikraft.v1.instances/scale_to_zero.policy: "on" - cloud.unikraft.v1.instances/scale_to_zero.stateful: "false" - cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 - -rootfs: ./Dockerfile - -cmd: ["/usr/bin/perl", "/usr/src/server.pl"] diff --git a/httpserver-perl5.38/README.md b/httpserver-perl5.38/README.md deleted file mode 100644 index 48b04e2b..00000000 --- a/httpserver-perl5.38/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# Perl - -This guide explains how to create and deploy a simple Perl-based HTTP web server. -To run this example, follow these steps: - -1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). - -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-perl5.38/` directory: - -```bash -git clone https://github.com/unikraft-cloud/examples -cd examples/http-perl5.38/ -``` - -Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. -This guide uses `fra` (Frankfurt, 🇩🇪): - -```bash -export UKC_TOKEN=token -# Set metro to Frankfurt, DE -export UKC_METRO=fra -``` - -When done, invoke the following command to deploy this app on Unikraft Cloud: - -```bash -kraft cloud deploy -p 443:8080 -M 512 . -``` - -The output shows the instance address and other details: - -```ansi -[●] Deployed successfully! - │ - ├────────── name: http-perl538-1p4ml - ├────────── uuid: eabb0080-0065-40ff-81a8-f790f1b218ee - ├───────── state: running - ├─────────── url: https://cold-brook-ba71jc16.fra.unikraft.app - ├───────── image: http-perl538@sha256:8c2c1f536b349c24e04ab4fec508b69f7f2349302d42a02855318ee55c12e37c - ├───── boot time: 64.56 ms - ├──────── memory: 512 MiB - ├─────── service: cold-brook-ba71jc16 - ├── private fqdn: http-perl538-1p4ml.internal - ├──── private ip: 172.16.3.3 - └────────── args: /usr/bin/perl /usr/src/server.pl -``` - -In this case, the instance name is `http-perl538-1p4ml` and the address is `https://cold-brook-ba71jc16.fra.unikraft.app`. -They're different for each run. - -Use `curl` to query the Unikraft Cloud instance of the Perl-based HTTP web server: - -```bash -curl https://cold-brook-ba71jc16.fra.unikraft.app -``` -```text -Hello, World! -``` - -You can list information about the instance by running: - -```bash -kraft cloud instance list -``` -```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-perl538-1p4ml cold-brook-ba71jc16.fra.unikraft.app running 37 seconds ago http-perl538@sha256:8c2c1f536b349c... 512 MiB 1 /usr/bin/perl /usr/src/server.pl 64556us -``` - -When done, you can remove the instance: - -```bash -kraft cloud instance remove http-perl538-1p4ml -``` - -## Customize your app - -To customize the app, update the files in the repository, listed below: - -* `server.pl`: the actual Perl HTTP server -* `Kraftfile`: the Unikraft Cloud specification -* `Dockerfile`: the Docker-specified app filesystem - -The following options are available for customizing the app: - -* If you only update the implementation in the `server.pl` source file, you don't need to make any other changes. - -* If you create any new source files, copy them into the app filesystem by using the `COPY` command in the `Dockerfile`. - -* More extensive changes may require extending the `Dockerfile` ([see `Dockerfile` syntax reference](https://docs.docker.com/engine/reference/builder/)). - -## Learn more - -Use the `--help` option for detailed information on using Unikraft Cloud: - -```bash -kraft cloud --help -``` - -Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/httpserver-perl5.38/server.pl b/httpserver-perl5.38/server.pl deleted file mode 100644 index bcba35c0..00000000 --- a/httpserver-perl5.38/server.pl +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/perl - -use warnings; -use strict; - -use HTTP::Daemon; -use HTTP::Status; -use HTTP::Response; - -my $daemon = HTTP::Daemon->new( - LocalAddr => '0.0.0.0', - LocalPort => 8080, -) or die; - -while (my $client_connection = $daemon->accept) { - my $request = $client_connection->get_request; - my $response = HTTP::Response->new(200); - $response->content("Hello, World!\n"); - $client_connection->send_response($response); -} diff --git a/http-perl5.42/Dockerfile b/httpserver-perl5.42/Dockerfile similarity index 100% rename from http-perl5.42/Dockerfile rename to httpserver-perl5.42/Dockerfile diff --git a/http-perl5.42/Kraftfile b/httpserver-perl5.42/Kraftfile similarity index 100% rename from http-perl5.42/Kraftfile rename to httpserver-perl5.42/Kraftfile diff --git a/http-perl5.42/README.md b/httpserver-perl5.42/README.md similarity index 67% rename from http-perl5.42/README.md rename to httpserver-perl5.42/README.md index 5d8969d0..cf873434 100644 --- a/http-perl5.42/README.md +++ b/httpserver-perl5.42/README.md @@ -1,15 +1,15 @@ -# Perl +# HTTP Server with Perl This guide explains how to create and deploy a simple Perl-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-perl5.42/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-perl5.42/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-perl5.42/ +cd examples/httpserver-perl5.42/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,12 +32,12 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────── name: http-perl542-xue8j + ├────── name: httpserver-perl542-xue8j ├────── uuid: 59d08bbc-cbb7-4c6b-a2cb-847828845db9 ├───── metro: fra ├───── state: running ├──── domain: https://fragrant-water-wau08gaw.fra.unikraft.app - ├───── image: http-perl542@sha256:af86e8f03c0d4cfd596ccfd9a9d18ea75ac68c996c9cde31f64db24dc11100fe + ├───── image: httpserver-perl542@sha256:af86e8f03c0d4cfd596ccfd9a9d18ea75ac68c996c9cde31f64db24dc11100fe ├─ boot time: 109.36 ms ├──── memory: 512 MiB ├─── service: fragrant-water-wau08gaw @@ -45,7 +45,7 @@ The output shows the instance address and other details: └────── args: /usr/bin/perl /usr/src/server.pl ``` -In this case, the instance name is `http-perl542-xue8j` and the address is `https://fragrant-water-wau08gaw.fra.unikraft.app`. +In this case, the instance name is `httpserver-perl542-xue8j` and the address is `https://fragrant-water-wau08gaw.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Perl-based HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the Perl-based HTTP web serve ```bash curl https://fragrant-water-wau08gaw.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,13 +63,15 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-perl542-xue8j fragrant-water-wau08gaw.fra.unikraft.app standby standby http-perl542@sha256:af86e8f03c0d4cfd596ccfd9a9d18e... 512 MiB 1 /usr/bin/perl /usr/src/server.pl 109.46 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-perl542-xue8j fragrant-water-wau08gaw.fra.unikraft.app standby standby httpserver-perl542@sha256:af86e8f03c0d4cfd5... 512 MiB 1 /usr/bin/perl /usr/src/server.pl 109.46 ms ``` -When you list your instances, you might notice they show as standby. This is normal behavior and means the instance is using Unikraft Cloud's scale-to-zero feature that saves resources when there is no traffic. -To check your instance is working properly you can open two terminals and use these commands to watch the status: +When you list your instances, you might notice they show as standby. +This is normal behavior and means the instance is using Unikraft Cloud's scale-to-zero feature that saves resources when there is no traffic. +To check your instance is working, open two terminals and use these commands to watch the status: ```bash watch -n 1 "kraft cloud instance list" @@ -76,19 +79,19 @@ watch -n 1 "kraft cloud instance list" curl https://fragrant-water-wau08gaw.fra.unikraft.app ``` -It briefly switches to "running" then back to "standby". +It switches to "running" then back to "standby." When done, you can remove the instance: ```bash -kraft cloud instance remove http-perl542-xue8j +kraft cloud instance remove httpserver-perl542-xue8j ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `server.pl`: the actual Perl HTTP server +* `server.pl`: the actual Perl HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/http-perl5.42/server.pl b/httpserver-perl5.42/server.pl similarity index 100% rename from http-perl5.42/server.pl rename to httpserver-perl5.42/server.pl diff --git a/httpserver-php8.2/README.md b/httpserver-php8.2/README.md index a708ecce..bf3c2f26 100644 --- a/httpserver-php8.2/README.md +++ b/httpserver-php8.2/README.md @@ -1,15 +1,15 @@ -# PHP +# HTTP Server with PHP This guide explains how to create and deploy a simple PHP-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-php8.2/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-php8.2/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-php8.2/ +cd examples/httpserver-php8.2/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-php82-g00si + ├────────── name: httpserver-php82-g00si ├────────── uuid: 033b2f4b-72ff-414d-b0de-63571477c657 ├───────── state: running ├─────────── url: https://aged-fire-rh0oi0tj.fra.unikraft.app - ├───────── image: http-php82@sha256:dccaac053982673765b8f00497a9736c31458ab23ad59a550b09aa8dedfabb34 + ├───────── image: httpserver-php82@sha256:dccaac053982673765b8f00497a9736c31458ab23ad59a550b09aa8dedfabb34 ├───── boot time: 32.80 ms ├──────── memory: 512 MiB ├─────── service: aged-fire-rh0oi0tj - ├── private fqdn: http-php82-g00si.internal + ├── private fqdn: httpserver-php82-g00si.internal ├──── private ip: 172.16.3.3 └────────── args: /usr/local/bin/php /usr/src/server.php ``` -In this case, the instance name is `http-php82-g00si` and the address is `https://aged-fire-rh0oi0tj.fra.unikraft.app`. +In this case, the instance name is `httpserver-php82-g00si` and the address is `https://aged-fire-rh0oi0tj.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the PHP-based HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the PHP-based HTTP web server ```bash curl https://aged-fire-rh0oi0tj.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,22 +63,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-php82-g00si aged-fire-rh0oi0tj.fra.unikraft.app running 50 seconds ago http-php82@sha256:dccaac05398267376... 512 MiB 1 /usr/local/bin/php /usr/src/server.php 32801us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-php82-g00si aged-fire-rh0oi0tj.fra.unikraft.app running 50 seconds ago httpserver-php82@sha256:dccaac05398... 512 MiB 1 /usr/local/bin/php /usr/src/server.php 32801us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-php82-g00si +kraft cloud instance remove httpserver-php82-g00si ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `server.php`: the actual PHP HTTP server +* `server.php`: the actual PHP HTTP server implementation * `php.ini`: the PHP configuration * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/prisma-expressjs4.19-node18/.dockerignore b/httpserver-prisma-expressjs4.19-node18/.dockerignore similarity index 100% rename from prisma-expressjs4.19-node18/.dockerignore rename to httpserver-prisma-expressjs4.19-node18/.dockerignore diff --git a/prisma-expressjs4.19-node18/.gitignore b/httpserver-prisma-expressjs4.19-node18/.gitignore similarity index 100% rename from prisma-expressjs4.19-node18/.gitignore rename to httpserver-prisma-expressjs4.19-node18/.gitignore diff --git a/prisma-expressjs4.19-node18/Dockerfile b/httpserver-prisma-expressjs4.19-node18/Dockerfile similarity index 100% rename from prisma-expressjs4.19-node18/Dockerfile rename to httpserver-prisma-expressjs4.19-node18/Dockerfile diff --git a/prisma-expressjs4.19-node18/Kraftfile b/httpserver-prisma-expressjs4.19-node18/Kraftfile similarity index 100% rename from prisma-expressjs4.19-node18/Kraftfile rename to httpserver-prisma-expressjs4.19-node18/Kraftfile diff --git a/prisma-expressjs4.19-node18/README.md b/httpserver-prisma-expressjs4.19-node18/README.md similarity index 89% rename from prisma-expressjs4.19-node18/README.md rename to httpserver-prisma-expressjs4.19-node18/README.md index f33cf985..c58d5781 100644 --- a/prisma-expressjs4.19-node18/README.md +++ b/httpserver-prisma-expressjs4.19-node18/README.md @@ -1,4 +1,4 @@ -# Prisma +# HTTP Server with Prisma This app comes from [Prisma's REST API Example](https://github.com/prisma/prisma-examples/tree/latest/javascript/rest-express) and shows how to create a **REST API** using [Express](https://expressjs.com/) and [Prisma Client](https://www.prisma.io/docs/concepts/components/prisma-client) and deploy it onto Unikraft Cloud. It uses a SQLite database file with some initial [migration data](./prisma/migrations/20240208151224_init/). @@ -6,11 +6,11 @@ To run it, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/node18-prisma-rest-express/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-node18-prisma-rest-express/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/node18-prisma-rest-express/ +cd examples/httpserver-node18-prisma-rest-express/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -33,20 +33,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: node18-prisma-hdof1 + ├────────── name: httpserver-node18-prisma-hdof1 ├────────── uuid: 066f55cb-bcbd-45e5-9f6b-b3866c3a3a4c ├───────── state: running ├─────────── url: https://funky-sun-4bf8v7g9.fra.unikraft.app - ├───────── image: node18-prisma@sha256:770d4af1d490daea11171c680eaf99e2a6017a262ba9fbf1ba8d708f5fc32bfe + ├───────── image: httpserver-node18-prisma@sha256:770d4af1d490daea11171c680eaf99e2a6017a262ba9fbf1ba8d708f5fc32bfe ├───── boot time: 37.94 ms ├──────── memory: 512 MiB ├─────── service: funky-sun-4bf8v7g9 - ├── private fqdn: node18-prisma-hdof1.internal + ├── private fqdn: httpserver-node18-prisma-hdof1.internal ├──── private ip: 172.16.28.2 └────────── args: /usr/bin/node /usr/src/server.js ``` -In this case, the instance name is `node18-prisma-hdof1` and the address is `https://funky-sun-4bf8v7g9.fra.unikraft.app`. +In this case, the instance name is `httpserver-node18-prisma-hdof1` and the address is `https://funky-sun-4bf8v7g9.fra.unikraft.app`. They're different for each run. Use `curl` to test the REST API, such as the `/users` endpoint: @@ -68,14 +68,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -node18-prisma-hdof1 funky-sun-4bf8v7g9.fra.unikraft.app running 1 minute ago node18-prisma@sha25... 512 MiB 1 /usr/bin/node /usr/src/server.js 37935us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-node18-prisma-hdof1 funky-sun-4bf8v7g9.fra.unikraft.app running 1 minute ago httpserver-node18-prisma@sha25... 512 MiB 1 /usr/bin/node /usr/src/server.js 37935us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove node18-prisma-hdof1 +kraft cloud instance remove httpserver-node18-prisma-hdof1 ``` ## Using the app diff --git a/prisma-expressjs4.19-node18/package.json b/httpserver-prisma-expressjs4.19-node18/package.json similarity index 100% rename from prisma-expressjs4.19-node18/package.json rename to httpserver-prisma-expressjs4.19-node18/package.json diff --git a/prisma-expressjs4.19-node18/prisma/migrations/20240208151224_init/migration.sql b/httpserver-prisma-expressjs4.19-node18/prisma/migrations/20240208151224_init/migration.sql similarity index 100% rename from prisma-expressjs4.19-node18/prisma/migrations/20240208151224_init/migration.sql rename to httpserver-prisma-expressjs4.19-node18/prisma/migrations/20240208151224_init/migration.sql diff --git a/prisma-expressjs4.19-node18/prisma/migrations/migration_lock.toml b/httpserver-prisma-expressjs4.19-node18/prisma/migrations/migration_lock.toml similarity index 100% rename from prisma-expressjs4.19-node18/prisma/migrations/migration_lock.toml rename to httpserver-prisma-expressjs4.19-node18/prisma/migrations/migration_lock.toml diff --git a/prisma-expressjs4.19-node18/prisma/schema.prisma b/httpserver-prisma-expressjs4.19-node18/prisma/schema.prisma similarity index 100% rename from prisma-expressjs4.19-node18/prisma/schema.prisma rename to httpserver-prisma-expressjs4.19-node18/prisma/schema.prisma diff --git a/prisma-expressjs4.19-node18/prisma/seed.js b/httpserver-prisma-expressjs4.19-node18/prisma/seed.js similarity index 100% rename from prisma-expressjs4.19-node18/prisma/seed.js rename to httpserver-prisma-expressjs4.19-node18/prisma/seed.js diff --git a/prisma-expressjs4.19-node18/src/index.js b/httpserver-prisma-expressjs4.19-node18/src/index.js similarity index 100% rename from prisma-expressjs4.19-node18/src/index.js rename to httpserver-prisma-expressjs4.19-node18/src/index.js diff --git a/prisma-expressjs4.19-node18/webpack.config.js b/httpserver-prisma-expressjs4.19-node18/webpack.config.js similarity index 100% rename from prisma-expressjs4.19-node18/webpack.config.js rename to httpserver-prisma-expressjs4.19-node18/webpack.config.js diff --git a/http-python3.12-FastAPI-0.121.3/.dockerignore b/httpserver-python3.12-FastAPI-0.121.3/.dockerignore similarity index 100% rename from http-python3.12-FastAPI-0.121.3/.dockerignore rename to httpserver-python3.12-FastAPI-0.121.3/.dockerignore diff --git a/http-python3.12-FastAPI-0.121.3/.gitignore b/httpserver-python3.12-FastAPI-0.121.3/.gitignore similarity index 100% rename from http-python3.12-FastAPI-0.121.3/.gitignore rename to httpserver-python3.12-FastAPI-0.121.3/.gitignore diff --git a/http-python3.12-FastAPI-0.121.3/Dockerfile b/httpserver-python3.12-FastAPI-0.121.3/Dockerfile similarity index 100% rename from http-python3.12-FastAPI-0.121.3/Dockerfile rename to httpserver-python3.12-FastAPI-0.121.3/Dockerfile diff --git a/http-python3.12-FastAPI-0.121.3/Kraftfile b/httpserver-python3.12-FastAPI-0.121.3/Kraftfile similarity index 100% rename from http-python3.12-FastAPI-0.121.3/Kraftfile rename to httpserver-python3.12-FastAPI-0.121.3/Kraftfile diff --git a/http-python3.12-FastAPI-0.121.3/README.md b/httpserver-python3.12-FastAPI-0.121.3/README.md similarity index 78% rename from http-python3.12-FastAPI-0.121.3/README.md rename to httpserver-python3.12-FastAPI-0.121.3/README.md index 8420e097..be7ba40d 100644 --- a/http-python3.12-FastAPI-0.121.3/README.md +++ b/httpserver-python3.12-FastAPI-0.121.3/README.md @@ -1,15 +1,15 @@ -# FastAPI +# HTTP Server with FastAPI This guide explains how to create and deploy a Python FastAPI web app. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-python3.12-FastAPI-0.121.3/` directory: +1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-python3.12-FastAPI-0.121.3/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-python3.12-FastAPI-0.121.3/ +cd examples/httpserver-python3.12-FastAPI-0.121.3/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -30,14 +30,14 @@ kraft cloud deploy -p 443:8080 -M 512 . The output shows the instance address and other details: ```text - [●] Deployed successfully! +[●] Deployed successfully! │ - ├────── name: http-python312-fastapi-01213-0n84f + ├────── name: httpserver-python312-fastapi-01213-0n84f ├────── uuid: 5d7fc331-3c23-4953-b025-d152a872ea29 ├───── metro: fra ├───── state: running ├──── domain: https://dry-water-0oexx89g.fra.unikraft.app - ├───── image: paun-cristian/http-python312-fastapi-01213@sha256:fb2a00dcf1cfc3ac821cbda05f82f38d66e63121344b9bc60c6a6e2f11917b98 + ├───── image: httpserver-python312-fastapi-01213@sha256:fb2a00dcf1cfc3ac821cbda05f82f38d66e63121344b9bc60c6a6e2f11917b98 ├─ boot time: 170.42 ms ├──── memory: 512 MiB ├─── service: dry-water-0oexx89g @@ -45,13 +45,13 @@ The output shows the instance address and other details: └────── args: /usr/bin/python3 -m uvicorn src.server:app --host 0.0.0.0 --port 8080 ``` -In this case, the instance name is `http-python312-fastapi-01213-0n84f` and the address is `ttps://dry-water-0oexx89g.fra.unikraft.app`. +In this case, the instance name is `httpserver-python312-fastapi-01213-0n84f` and the address is `https://dry-water-0oexx89g.fra.unikraft.app`. They're different for each run. -Use `curl` to query the Unikraft Cloud instance of the Django web app server: +Use `curl` to query the Unikraft Cloud instance of the Python FastAPI web app server: ```bash -curl ttps://dry-water-0oexx89g.fra.unikraft.app +curl https://dry-water-0oexx89g.fra.unikraft.app ``` ```text @@ -62,15 +62,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-python312-fastapi-01213-0n84f dry-water-0oexx89g.fra.unikraft.app standby standby paun-cristian/http-python312-fastapi-01213@sha25... 512 MiB 1 /usr/bin/python3 -m uvicorn src.server:app --hos... 169.45 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-python312-fastapi-01213-0n84f dry-water-0oexx89g.fra.unikraft.app standby standby httpserver-python312-fastapi-01213@sha25... 512 MiB 1 /usr/bin/python3 -m uvicorn src.server:app --hos... 169.45 ms ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-python312-fastapi-01213-0n84f +kraft cloud instance remove httpserver-python312-fastapi-01213-0n84f ``` ## Customize your app @@ -110,7 +111,7 @@ The following options are available for customizing the app: It's used to install dependencies for Python apps. `pip` uses the `requirements.txt` file to list required dependencies (with versions). -The [`http-python3.12-FastAPI-0.121.3`](https://github.com/paun-cristian/examples/tree/main/http-python3.12-FastAPI-0.121.3) guide details the use of `pip` to deploy an app using the [`FastAPI`](https://fastapi.tiangolo.com/) framework on Unikraft Cloud. +The [`httpserver-python3.12-FastAPI-0.121.3`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-FastAPI-0.121.3) guide details the use of `pip` to deploy an app using the [`FastAPI`](https://fastapi.tiangolo.com/) framework on Unikraft Cloud. Run the command below to deploy the app on Unikraft Cloud: @@ -137,7 +138,7 @@ The following lists the files: The `requirements.txt` file lists the `fastapi` and `uvicorn` dependencies. -The `Kraftfile` is the same one used for `http-python3.12`, except changed lines that have the following roles: +The `Kraftfile` is the same one used for `httpserver-python3.12`, except changed lines that have the following roles: * `cmd: ["/usr/bin/python3", "-m", "uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "8080"]`: Use `/usr/bin/python3 -m uvicorn src.server:app --host 0.0.0.0 --port 8080` as the starting command of the instance. For `Dockerfile` newly added lines have the following roles: diff --git a/http-python3.12-FastAPI-0.121.3/requirements.txt b/httpserver-python3.12-FastAPI-0.121.3/requirements.txt similarity index 100% rename from http-python3.12-FastAPI-0.121.3/requirements.txt rename to httpserver-python3.12-FastAPI-0.121.3/requirements.txt diff --git a/http-python3.12-FastAPI-0.121.3/server.py b/httpserver-python3.12-FastAPI-0.121.3/server.py similarity index 100% rename from http-python3.12-FastAPI-0.121.3/server.py rename to httpserver-python3.12-FastAPI-0.121.3/server.py diff --git a/httpserver-python3.12-django5.0/README.md b/httpserver-python3.12-django5.0/README.md index cda87b9b..99187ee5 100644 --- a/httpserver-python3.12-django5.0/README.md +++ b/httpserver-python3.12-django5.0/README.md @@ -1,15 +1,15 @@ -# Django +# HTTP Server with Django This guide explains how to create and deploy a Python Django web app. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-python3.12-django5.0/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-python3.12-django5.0/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-python3.12-django5.0/ +cd examples/httpserver-python3.12-django5.0/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```text [●] Deployed successfully! │ - ├────────── name: http-python312-django50-vt56c + ├────────── name: httpserver-python312-django50-vt56c ├────────── uuid: d8469447-fdf6-4caf-9fea-494218ca6f72 ├───────── state: running ├─────────── url: https://dawn-sound-n5wrkxi2.fra.unikraft.app - ├───────── image: http-python312-django50@sha256:221666d414299aff54dbf10020b3d540270ee0c5907c1c6a728ca254ce8b0e50 + ├───────── image: httpserver-python312-django50@sha256:221666d414299aff54dbf10020b3d540270ee0c5907c1c6a728ca254ce8b0e50 ├───── boot time: 80.32 ms ├──────── memory: 1024 MiB ├─────── service: dawn-sound-n5wrkxi2 - ├── private fqdn: http-python312-django50-vt56c.internal + ├── private fqdn: httpserver-python312-django50-vt56c.internal ├──── private ip: 172.16.6.5 └────────── args: /usr/bin/python3 /app/main.py ``` -In this case, the instance name is `http-python312-django50-vt56c` and the address is `https://dawn-sound-n5wrkxi2.fra.unikraft.app`. +In this case, the instance name is `httpserver-python312-django50-vt56c` and the address is `https://dawn-sound-n5wrkxi2.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Django web app server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the Django web app server: ```bash curl https://dawn-sound-n5wrkxi2.fra.unikraft.app ``` + ```html @@ -84,15 +85,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-python312-django50-vt56c dawn-sound-n5wrkxi2.fra.unikraft.app running 1 minute ago http-python312-django50@sha256:221666d41... 1024 MiB 1 /usr/bin/python3 /app/main.py 80321us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-python312-django50-vt56c dawn-sound-n5wrkxi2.fra.unikraft.app running 1 minute ago httpserver-python312-django50@sha256:221... 1024 MiB 1 /usr/bin/python3 /app/main.py 80321us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-python312-django50-vt56c +kraft cloud instance remove httpserver-python312-django50-vt56c ``` ## Customize your app @@ -132,7 +134,7 @@ The following options are available for customizing the app: It's used to install dependencies for Python apps. `pip` uses the `requirements.txt` file to list required dependencies (with versions). -The [`http-python3.12-flask3.0`](https://github.com/unikraft-cloud/examples/tree/main/http-python3.12-flask3.0) guide details the use of `pip` to deploy an app using the [`Flask`](https://flask.palletsprojects.com/en/3.0.x/) framework on Unikraft Cloud. +The [`httpserver-python3.12-flask3.0`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-flask3.0) guide details the use of `pip` to deploy an app using the [`Flask`](https://flask.palletsprojects.com/en/3.0.x/) framework on Unikraft Cloud. Run the command below to deploy the app on Unikraft Cloud: diff --git a/httpserver-python3.12-django5.0/main.py b/httpserver-python3.12-django5.0/main.py index db65775a..e7473042 100644 --- a/httpserver-python3.12-django5.0/main.py +++ b/httpserver-python3.12-django5.0/main.py @@ -1,6 +1,5 @@ import bjoern import helloworld.wsgi -import os from werkzeug.middleware.shared_data import SharedDataMiddleware app = helloworld.wsgi.application @@ -8,4 +7,3 @@ '/static': '/app/static', }) bjoern.run(app, "0.0.0.0", 80) - diff --git a/python3.12-flask3.0-sqlite/.dockerignore b/httpserver-python3.12-flask3.0-sqlite/.dockerignore similarity index 100% rename from python3.12-flask3.0-sqlite/.dockerignore rename to httpserver-python3.12-flask3.0-sqlite/.dockerignore diff --git a/python3.12-flask3.0-sqlite/Dockerfile b/httpserver-python3.12-flask3.0-sqlite/Dockerfile similarity index 100% rename from python3.12-flask3.0-sqlite/Dockerfile rename to httpserver-python3.12-flask3.0-sqlite/Dockerfile diff --git a/python3.12-flask3.0-sqlite/Kraftfile b/httpserver-python3.12-flask3.0-sqlite/Kraftfile similarity index 100% rename from python3.12-flask3.0-sqlite/Kraftfile rename to httpserver-python3.12-flask3.0-sqlite/Kraftfile diff --git a/python3.12-flask3.0-sqlite/README.md b/httpserver-python3.12-flask3.0-sqlite/README.md similarity index 82% rename from python3.12-flask3.0-sqlite/README.md rename to httpserver-python3.12-flask3.0-sqlite/README.md index cd3fa74a..cb23a259 100644 --- a/python3.12-flask3.0-sqlite/README.md +++ b/httpserver-python3.12-flask3.0-sqlite/README.md @@ -1,15 +1,15 @@ -# Flask with SQLite +# HTTP Server with Flask and SQLite This guide explains how to create and deploy a Python Flask app using SQLite. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/python3.12-flask3.0-sqlite/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-python3.12-flask3.0-sqlite/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/python3.12-flask3.0-sqlite/ +cd examples/httpserver-python3.12-flask3.0-sqlite/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -30,20 +30,20 @@ kraft cloud deploy -p 443:8080 -M 768 . ```ansi [●] Deployed successfully! │ - ├────────── name: python312-flask30-sqlite-qodkd + ├────────── name: httpserver-python312-flask30-sqlite-qodkd ├────────── uuid: e00e7aca-962d-409c-87c2-c245ca08b54b ├───────── state: running ├─────────── url: https://lingering-orangutan-840mmdvd.fra.unikraft.app - ├───────── image: python312-flask30-sqlite@sha256:bdb0bf35a9675b9b3836cbb626606da0606334d91768c7ba31195c3062d6f517 + ├───────── image: httpserver-python312-flask30-sqlite@sha256:bdb0bf35a9675b9b3836cbb626606da0606334d91768c7ba31195c3062d6f517 ├───── boot time: 166.25 ms ├──────── memory: 768 MiB ├─────── service: lingering-orangutan-840mmdvd - ├── private fqdn: python312-flask30-sqlite-qodkd.internal + ├── private fqdn: httpserver-python312-flask30-sqlite-qodkd.internal ├──── private ip: 172.16.3.3 └────────── args: /usr/bin/python3 /app/server.py ``` -In this case, the instance name is `python312-flask30-sqlite-qodkd` and the address is `https://lingering-orangutan-840mmdvd.fra.unikraft.app`. +In this case, the instance name is `httpserver-python312-flask30-sqlite-qodkd` and the address is `https://lingering-orangutan-840mmdvd.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Python-based HTTP web server: @@ -51,6 +51,7 @@ Use `curl` to query the Unikraft Cloud instance of the Python-based HTTP web ser ```bash curl https://young-night-5fpf0jj8.fra.unikraft.app ``` + ```text @@ -77,15 +78,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -python312-flask30-sqlite-qodkd lingering-orangutan-840mmdvd.fra.unikraft.app running 1 minute ago python312-flask30-sqlite@sha256... 768 MiB 1 /usr/bin/python3 /app/server.py 166250us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-python312-flask30-sqlite-qodkd lingering-orangutan-840mmdvd.fra.... running 1 minute ago httpserver-python312-flask30-sqlite@sha256... 768 MiB 1 /usr/bin/python3 /app/server.py 166250us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove python312-flask30-sqlite-qodkd +kraft cloud instance remove httpserver-python312-flask30-sqlite-qodkd ``` ## Implementation details diff --git a/python3.12-flask3.0-sqlite/init_db.py b/httpserver-python3.12-flask3.0-sqlite/init_db.py similarity index 100% rename from python3.12-flask3.0-sqlite/init_db.py rename to httpserver-python3.12-flask3.0-sqlite/init_db.py diff --git a/python3.12-flask3.0-sqlite/requirements.txt b/httpserver-python3.12-flask3.0-sqlite/requirements.txt similarity index 100% rename from python3.12-flask3.0-sqlite/requirements.txt rename to httpserver-python3.12-flask3.0-sqlite/requirements.txt diff --git a/python3.12-flask3.0-sqlite/schema.sql b/httpserver-python3.12-flask3.0-sqlite/schema.sql similarity index 100% rename from python3.12-flask3.0-sqlite/schema.sql rename to httpserver-python3.12-flask3.0-sqlite/schema.sql diff --git a/python3.12-flask3.0-sqlite/server.py b/httpserver-python3.12-flask3.0-sqlite/server.py similarity index 100% rename from python3.12-flask3.0-sqlite/server.py rename to httpserver-python3.12-flask3.0-sqlite/server.py diff --git a/python3.12-flask3.0-sqlite/static/css/style.css b/httpserver-python3.12-flask3.0-sqlite/static/css/style.css similarity index 100% rename from python3.12-flask3.0-sqlite/static/css/style.css rename to httpserver-python3.12-flask3.0-sqlite/static/css/style.css diff --git a/python3.12-flask3.0-sqlite/templates/base.html b/httpserver-python3.12-flask3.0-sqlite/templates/base.html similarity index 100% rename from python3.12-flask3.0-sqlite/templates/base.html rename to httpserver-python3.12-flask3.0-sqlite/templates/base.html diff --git a/python3.12-flask3.0-sqlite/templates/create.html b/httpserver-python3.12-flask3.0-sqlite/templates/create.html similarity index 100% rename from python3.12-flask3.0-sqlite/templates/create.html rename to httpserver-python3.12-flask3.0-sqlite/templates/create.html diff --git a/python3.12-flask3.0-sqlite/templates/edit.html b/httpserver-python3.12-flask3.0-sqlite/templates/edit.html similarity index 100% rename from python3.12-flask3.0-sqlite/templates/edit.html rename to httpserver-python3.12-flask3.0-sqlite/templates/edit.html diff --git a/python3.12-flask3.0-sqlite/templates/index.html b/httpserver-python3.12-flask3.0-sqlite/templates/index.html similarity index 100% rename from python3.12-flask3.0-sqlite/templates/index.html rename to httpserver-python3.12-flask3.0-sqlite/templates/index.html diff --git a/python3.12-flask3.0-sqlite/templates/post.html b/httpserver-python3.12-flask3.0-sqlite/templates/post.html similarity index 100% rename from python3.12-flask3.0-sqlite/templates/post.html rename to httpserver-python3.12-flask3.0-sqlite/templates/post.html diff --git a/httpserver-python3.12-flask3.0/README.md b/httpserver-python3.12-flask3.0/README.md index f3ce6f25..d5c3ce44 100644 --- a/httpserver-python3.12-flask3.0/README.md +++ b/httpserver-python3.12-flask3.0/README.md @@ -1,15 +1,15 @@ -# Flask +# HTTP Server with Flask This guide explains how to create and deploy a [Flask](https://flask.palletsprojects.com/en/3.0.x/) web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-python3.12-flask3.0/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-python3.12-flask3.0/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-python3.12-flask3.0/ +cd examples/httpserver-python3.12-flask3.0/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,27 +32,28 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-python312-flask30-bxwxm + ├────────── name: httpserver-python312-flask30-bxwxm ├────────── uuid: 3ff1ebad-2639-4214-bab4-ed35c4c32fa4 ├───────── state: running ├─────────── url: https://damp-sunset-azd6dtyt.fra.unikraft.app - ├───────── image: http-python312-flask30@sha256:d6c8e4c5a4f44e1d642d8eaeaa1d820b2841194dd6c5d4a872ae0a895c767da9 + ├───────── image: httpserver-python312-flask30@sha256:d6c8e4c5a4f44e1d642d8eaeaa1d820b2841194dd6c5d4a872ae0a895c767da9 ├───── boot time: 222.27 ms ├──────── memory: 512 MiB ├─────── service: damp-sunset-azd6dtyt - ├── private fqdn: http-python312-flask30-bxwxm.internal + ├── private fqdn: httpserver-python312-flask30-bxwxm.internal ├──── private ip: 172.16.6.5 └────────── args: /usr/bin/python3 /app/server.py ``` -In this case, the instance name is `http-python312-flask30-bxwxm` and the address is `https://damp-sunset-azd6dtyt.fra.unikraft.app`. +In this case, the instance name is `httpserver-python312-flask30-bxwxm` and the address is `https://damp-sunset-azd6dtyt.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Python-based HTTP web server: ```bash -curl https://young-night-5fpf0jj8.fra.unikraft.app +curl https://damp-sunset-azd6dtyt.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,15 +63,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-python312-flask30-bxwxm damp-sunset-azd6dtyt.fra.unikraft.app running 1 minute ago http-python312-flask30@sha256:d6c8e... 512 MiB 1 /usr/bin/python3 /app/server.py 222273us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-python312-flask30-bxwxm damp-sunset-azd6dtyt.fra.unikraft.app running 1 minute ago httpserver-python312-flask30@sha256:d6c8... 512 MiB 1 /usr/bin/python3 /app/server.py 222273us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-python312-flask30-bxwxm +kraft cloud instance remove httpserver-python312-flask30-bxwxm ``` ## Customize your app @@ -131,7 +133,7 @@ The following lists the files: The `requirements.txt` file lists the `flask` dependency. -The `Kraftfile` is the same one used for `http-python3.12`. +The `Kraftfile` is the same one used for `httpserver-python3.12`. For `Dockerfile` newly added lines have the following roles: diff --git a/httpserver-python3.12/README.md b/httpserver-python3.12/README.md index 80988ba9..b139cdf2 100644 --- a/httpserver-python3.12/README.md +++ b/httpserver-python3.12/README.md @@ -1,15 +1,15 @@ -# Python +# HTTP Server with Python This guide explains how to create and deploy a simple Python-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-python3.12/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-python3.12/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-python3.12/ +cd examples/httpserver-python3.12/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-python312-ma2i9 + ├────────── name: httpserver-python312-ma2i9 ├────────── uuid: e7389eee-9808-4152-b2ec-1f3c0541fd05 ├───────── state: running ├─────────── url: https://young-night-5fpf0jj8.fra.unikraft.app - ├───────── image: http-python312@sha256:278cb8b14f9faf9c2702dddd8bfb6124912d82c11b4a2c6590b6e32fc4049472 + ├───────── image: httpserver-python312@sha256:278cb8b14f9faf9c2702dddd8bfb6124912d82c11b4a2c6590b6e32fc4049472 ├───── boot time: 15.09 ms ├──────── memory: 512 MiB ├─────── service: young-night-5fpf0jj8 - ├── private fqdn: http-python312-ma2i9.internal + ├── private fqdn: httpserver-python312-ma2i9.internal ├──── private ip: 172.16.3.3 └────────── args: /usr/bin/python /src/server.py ``` -In this case, the instance name is `http-python312-ma2i9` and the address is `https://young-night-5fpf0jj8.fra.unikraft.app`. +In this case, the instance name is `httpserver-python312-ma2i9` and the address is `https://young-night-5fpf0jj8.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Python-based HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the Python-based HTTP web ser ```bash curl https://young-night-5fpf0jj8.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,22 +63,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-python312-ma2i9 young-night-5fpf0jj8.fra.unikraft.app running 1 minute ago http-python312@sha256:278cb8b14f9faf9c27... 512 MiB 1 /usr/bin/python /src/server.py 15094us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-python312-ma2i9 young-night-5fpf0jj8.fra.unikraft.app running 1 minute ago httpserver-python312@sha256:278cb8b14f27... 512 MiB 1 /usr/bin/python /src/server.py 15094us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-python312-ma2i9 +kraft cloud instance remove httpserver-python312-ma2i9 ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `server.py`: the actual Python HTTP server +* `server.py`: the actual Python HTTP server implementation * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem @@ -112,7 +114,7 @@ The following options are available for customizing the app: It's used to install dependencies for Python apps. `pip` uses the `requirements.txt` file to list required dependencies (with versions). -The [`http-python3.12-flask3.0`](https://github.com/unikraft-cloud/examples/tree/main/http-python3.12-flask3.0) guide details the use of `pip` to deploy an app using the [`Flask`](https://flask.palletsprojects.com/en/3.0.x/) framework on Unikraft Cloud. +The [`httpserver-python3.12-flask3.0`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-flask3.0) guide details the use of `pip` to deploy an app using the [`Flask`](https://flask.palletsprojects.com/en/3.0.x/) framework on Unikraft Cloud. Run the command below to deploy the app on Unikraft Cloud: @@ -120,7 +122,7 @@ Run the command below to deploy the app on Unikraft Cloud: kraft cloud deploy -p 443:8080 -M 512 . ``` -Differences from the `http-python3.12` app are also the steps required to create an `pip`-based app: +Differences from the `httpserver-python3.12` app are also the steps required to create an `pip`-based app: 1. Add the `requirements.txt` file used by `pip`. @@ -139,7 +141,7 @@ The following lists the files: The `requirements.txt` file lists the `flask` dependency. -The `Kraftfile` is the same one used for `http-python3.12`. +The `Kraftfile` is the same one used for `httpserver-python3.12`. For `Dockerfile` newly added lines have the following roles: @@ -157,7 +159,7 @@ For `Dockerfile` newly added lines have the following roles: * `COPY --from=base ...`: Copy generated Python files in the new `base` image in the `scratch`-based image. Similar actions apply to other `pip3`-based apps. -See also the [`http-python3.12-django5.0`](https://github.com/unikraft-cloud/examples/tree/main/http-python3.12-django5.0) example. +See also the [`httpserver-python3.12-django5.0`](https://github.com/unikraft-cloud/examples/tree/main/httpserver-python3.12-django5.0) example. ## Learn more diff --git a/httpserver-ruby3.2/README.md b/httpserver-ruby3.2/README.md index 8f926362..1d392fcf 100644 --- a/httpserver-ruby3.2/README.md +++ b/httpserver-ruby3.2/README.md @@ -1,15 +1,15 @@ -# Ruby +# HTTP Server with Ruby This guide explains how to create and deploy a simple Ruby-based HTTP web server. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-ruby3.2/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-ruby3.2/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-ruby3.2/ +cd examples/httpserver-ruby3.2/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-ruby32-s6l8n + ├────────── name: httpserver-ruby32-s6l8n ├────────── uuid: b1ebbbc0-5efa-476c-adb6-99866773245c ├───────── state: running ├─────────── url: https://silent-resonance-1jtz5c66.fra.unikraft.app - ├───────── image: http-ruby32@sha256:4cf3b341898e6ebff18ff2b68353ef872dded650c9d16a6f005a8fbe8a7cbb3d + ├───────── image: httpserver-ruby32@sha256:4cf3b341898e6ebff18ff2b68353ef872dded650c9d16a6f005a8fbe8a7cbb3d ├───── boot time: 71.19 ms ├──────── memory: 256 MiB ├─────── service: silent-resonance-1jtz5c66 - ├── private fqdn: http-ruby32-s6l8n.internal + ├── private fqdn: httpserver-ruby32-s6l8n.internal ├──── private ip: 172.16.3.3 └────────── args: /usr/bin/ruby /src/server.rb ``` -In this case, the instance name is `http-ruby32-s6l8n` and the address is `https://silent-resonance-1jtz5c66.fra.unikraft.app`. +In this case, the instance name is `httpserver-ruby32-s6l8n` and the address is `https://silent-resonance-1jtz5c66.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Ruby-based HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the Ruby-based HTTP web serve ```bash curl https://silent-resonance-1jtz5c66.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,15 +63,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-ruby32-s6l8n silent-resonance-1jtz5c66.fra.unikraft.app running 12 minutes ago http-ruby32@sha256:4cf3b341898e6ebff18ff2b68353ef... 256 MiB 1 /usr/bin/ruby /src/server.rb 71191us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-ruby32-s6l8n silent-resonance-1jtz5c66.fra.unikraft.app running 12 minutes ago httpserver-ruby32@sha256:4cf3b341898e6ff2b68353ef... 256 MiB 1 /usr/bin/ruby /src/server.rb 71191us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-ruby32-s6l8n +kraft cloud instance remove httpserver-ruby32-s6l8n ``` ## Customize your app diff --git a/http-rust-trunkrs-leptos/.gitignore b/httpserver-rust-trunkrs-leptos/.gitignore similarity index 100% rename from http-rust-trunkrs-leptos/.gitignore rename to httpserver-rust-trunkrs-leptos/.gitignore diff --git a/http-rust-trunkrs-leptos/Dockerfile b/httpserver-rust-trunkrs-leptos/Dockerfile similarity index 100% rename from http-rust-trunkrs-leptos/Dockerfile rename to httpserver-rust-trunkrs-leptos/Dockerfile diff --git a/http-rust-trunkrs-leptos/Kraftfile b/httpserver-rust-trunkrs-leptos/Kraftfile similarity index 100% rename from http-rust-trunkrs-leptos/Kraftfile rename to httpserver-rust-trunkrs-leptos/Kraftfile diff --git a/http-rust-trunkrs-leptos/README.md b/httpserver-rust-trunkrs-leptos/README.md similarity index 100% rename from http-rust-trunkrs-leptos/README.md rename to httpserver-rust-trunkrs-leptos/README.md diff --git a/http-rust-trunkrs-leptos/frontend/Cargo.lock b/httpserver-rust-trunkrs-leptos/frontend/Cargo.lock similarity index 100% rename from http-rust-trunkrs-leptos/frontend/Cargo.lock rename to httpserver-rust-trunkrs-leptos/frontend/Cargo.lock diff --git a/http-rust-trunkrs-leptos/frontend/Cargo.toml b/httpserver-rust-trunkrs-leptos/frontend/Cargo.toml similarity index 100% rename from http-rust-trunkrs-leptos/frontend/Cargo.toml rename to httpserver-rust-trunkrs-leptos/frontend/Cargo.toml diff --git a/http-rust-trunkrs-leptos/frontend/Trunk.toml b/httpserver-rust-trunkrs-leptos/frontend/Trunk.toml similarity index 100% rename from http-rust-trunkrs-leptos/frontend/Trunk.toml rename to httpserver-rust-trunkrs-leptos/frontend/Trunk.toml diff --git a/http-rust-trunkrs-leptos/frontend/index.html b/httpserver-rust-trunkrs-leptos/frontend/index.html similarity index 100% rename from http-rust-trunkrs-leptos/frontend/index.html rename to httpserver-rust-trunkrs-leptos/frontend/index.html diff --git a/http-rust-trunkrs-leptos/frontend/nginx.conf b/httpserver-rust-trunkrs-leptos/frontend/nginx.conf similarity index 100% rename from http-rust-trunkrs-leptos/frontend/nginx.conf rename to httpserver-rust-trunkrs-leptos/frontend/nginx.conf diff --git a/http-rust-trunkrs-leptos/frontend/src/main.rs b/httpserver-rust-trunkrs-leptos/frontend/src/main.rs similarity index 100% rename from http-rust-trunkrs-leptos/frontend/src/main.rs rename to httpserver-rust-trunkrs-leptos/frontend/src/main.rs diff --git a/http-rust-trunkrs-leptos/shared_lib/Cargo.lock b/httpserver-rust-trunkrs-leptos/shared_lib/Cargo.lock similarity index 100% rename from http-rust-trunkrs-leptos/shared_lib/Cargo.lock rename to httpserver-rust-trunkrs-leptos/shared_lib/Cargo.lock diff --git a/http-rust-trunkrs-leptos/shared_lib/Cargo.toml b/httpserver-rust-trunkrs-leptos/shared_lib/Cargo.toml similarity index 100% rename from http-rust-trunkrs-leptos/shared_lib/Cargo.toml rename to httpserver-rust-trunkrs-leptos/shared_lib/Cargo.toml diff --git a/http-rust-trunkrs-leptos/shared_lib/src/lib.rs b/httpserver-rust-trunkrs-leptos/shared_lib/src/lib.rs similarity index 100% rename from http-rust-trunkrs-leptos/shared_lib/src/lib.rs rename to httpserver-rust-trunkrs-leptos/shared_lib/src/lib.rs diff --git a/httpserver-rust1.73/Dockerfile b/httpserver-rust1.73/Dockerfile deleted file mode 100644 index fad40502..00000000 --- a/httpserver-rust1.73/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM --platform=linux/x86_64 rust:1.73.0-bookworm AS build - -WORKDIR /src - -COPY ./server.rs /src/server.rs - -RUN set -xe; \ - rustc -o /server /src/server.rs - -FROM scratch - -COPY --from=build /server /server -COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/ -COPY --from=build /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/ -COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/ diff --git a/httpserver-rust1.73/README.md b/httpserver-rust1.73/README.md deleted file mode 100644 index 234ac969..00000000 --- a/httpserver-rust1.73/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# Rust - -This guide explains how to create and deploy a Rust app. -To run this example, follow these steps: - -1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). - -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-rust1.73` directory: - -```bash -git clone https://github.com/unikraft-cloud/examples -cd examples/http-rust1.73/ -``` - -Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. -This guide uses `fra` (Frankfurt, 🇩🇪): - -```bash -export UKC_TOKEN=token -# Set metro to Frankfurt, DE -export UKC_METRO=fra -``` - -When done, invoke the following command to deploy the app on Unikraft Cloud: - -```bash -kraft cloud deploy -p 443:8080 -M 256 . -``` - -The output shows the instance address and other details: - -```ansi -[●] Deployed successfully! - │ - ├────── name: http-rust173-8gsmk - ├────── uuid: 27b47a6d-ab44-4f84-8931-90013467aa1a - ├───── metro: https://api.fra.unikraft.cloud/v1 - ├───── state: running - ├──── domain: https://hidden-sky-c1tp5r6e.fra.unikraft.app - ├───── image: http-rust173@sha256:451277edb27c1201929d2da12898d910cca2f0a2ca71b8f8fa7da22c23a10bba - ├─ boot time: 17.49 ms - ├──── memory: 256 MiB - ├─── service: hidden-sky-c1tp5r6e - ├ private ip: 10.0.0.109 - └────── args: /server -``` - -In this case, the instance name is `http-rust173-8gsmk` and the address is `hidden-sky-c1tp5r6e.fra.unikraft.app`. -They're different for each run. - -Use `curl` to query the Unikraft Cloud instance: - -```bash -curl hidden-sky-c1tp5r6e.fra.unikraft.app -``` - -```text -Hello, World! -``` - -You can list information about the instance by running: - -```bash -kraft cloud instance list -``` - -```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-rust173-8gsmk hidden-sky-c1tp5r6e.fra.unikraft.app standby standby http-rust173@sha256:451277edb27c1201... 256 MiB 1 /server 17.49 ms -``` - -When done, you can remove the instance: - -```bash -kraft cloud instance remove http-rust173-8gsmk -``` - -## Learn more - -Use the `--help` option for detailed information on using Unikraft Cloud: - -```bash -kraft cloud --help -``` - -Or visit the [CLI Reference](https://unikraft.com/docs/cli/overview). diff --git a/httpserver-rust1.73/server.rs b/httpserver-rust1.73/server.rs deleted file mode 100644 index 25317574..00000000 --- a/httpserver-rust1.73/server.rs +++ /dev/null @@ -1,50 +0,0 @@ -// https://gist.github.com/mjohnsullivan/e5182707caf0a9dbdf2d -// Updated example from http://rosettacode.org/wiki/Hello_world/Web_server#Rust -// to work with Rust 1.0 beta - -use std::net::{TcpStream, TcpListener}; -use std::io::{Read, Write}; -use std::thread; - - -fn handle_read(mut stream: &TcpStream) { - let mut buf = [0u8 ;4096]; - match stream.read(&mut buf) { - Ok(_) => { - let req_str = String::from_utf8_lossy(&buf); - println!("{}", req_str); - }, - Err(e) => println!("Unable to read stream: {}", e), - } -} - -fn handle_write(mut stream: TcpStream) { - let response = b"HTTP/1.1 200 OK\r\nContent-Type: text/plain; charset=UTF-8\r\n\r\nHello, World!\r\n"; - match stream.write(response) { - Ok(_) => println!("Response sent"), - Err(e) => println!("Failed sending response: {}", e), - } -} - -fn handle_client(stream: TcpStream) { - handle_read(&stream); - handle_write(stream); -} - -fn main() { - let listener = TcpListener::bind("0.0.0.0:8080").unwrap(); - println!("Listening for connections on port {}", 8080); - - for stream in listener.incoming() { - match stream { - Ok(stream) => { - thread::spawn(|| { - handle_client(stream) - }); - } - Err(e) => { - println!("Unable to connect: {}", e); - } - } - } -} diff --git a/httpserver-rust1.73/.gitignore b/httpserver-rust1.75-tokio/.gitignore similarity index 100% rename from httpserver-rust1.73/.gitignore rename to httpserver-rust1.75-tokio/.gitignore diff --git a/httpserver-rust1.75/Cargo.toml b/httpserver-rust1.75-tokio/Cargo.toml similarity index 100% rename from httpserver-rust1.75/Cargo.toml rename to httpserver-rust1.75-tokio/Cargo.toml diff --git a/httpserver-rust1.75/Dockerfile b/httpserver-rust1.75-tokio/Dockerfile similarity index 100% rename from httpserver-rust1.75/Dockerfile rename to httpserver-rust1.75-tokio/Dockerfile diff --git a/http-rust1.91/Kraftfile b/httpserver-rust1.75-tokio/Kraftfile similarity index 100% rename from http-rust1.91/Kraftfile rename to httpserver-rust1.75-tokio/Kraftfile diff --git a/httpserver-rust1.75/README.md b/httpserver-rust1.75-tokio/README.md similarity index 75% rename from httpserver-rust1.75/README.md rename to httpserver-rust1.75-tokio/README.md index 761a038c..c7ea2b60 100644 --- a/httpserver-rust1.75/README.md +++ b/httpserver-rust1.75-tokio/README.md @@ -1,15 +1,15 @@ -# Rust (Tokio) +# HTTP Server with Rust (Tokio) This example uses [`Tokio`](https://tokio.rs/), a popular Rust asynchronous runtime. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-rust1.75-tokio/` directory: +1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-rust1.75-tokio/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-rust1.75-tokio/ +cd examples/httpserver-rust1.75-tokio/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-rust175-tokio-6gxsp + ├────────── name: httpserver-rust175-tokio-6gxsp ├────────── uuid: d5719f64-0653-42d7-b2de-aa6dee0ce467 ├───────── state: running ├─────────── url: https://empty-dawn-3coedrce.fra.unikraft.app - ├───────── image: http-rust175-tokio@sha256:0ce75912711aa2329232a2ca6c3ccb7a244b6d546fafc081f815c2fde8224856 + ├───────── image: httpserver-rust175-tokio@sha256:0ce75912711aa2329232a2ca6c3ccb7a244b6d546fafc081f815c2fde8224856 ├───── boot time: 21.41 ms ├──────── memory: 256 Mi ├─────── service: empty-dawn-3coedrce - ├── private fqdn: http-rust175-tokio-6gxsp.internal + ├── private fqdn: httpserver-rust175-tokio-6gxsp.internal ├──── private ip: 172.16.6.3 └────────── args: /server ``` -In this case, the instance name is `http-rust175-tokio-6gxsp` and the address is `https://empty-dawn-3coedrce.fra.unikraft.app. +In this case, the instance name is `httpserver-rust175-tokio-6gxsp` and the address is `https://empty-dawn-3coedrce.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Tokio-based HTTP web server: @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the Tokio-based HTTP web serv ```bash curl https://empty-dawn-3coedrce.fra.unikraft.app ``` + ```text Hello, World! ``` @@ -62,15 +63,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-rust175-tokio-6gxsp empty-dawn-3coedrce.fra.unikraft.app running 1 minute ago http-rust175-tokio@sha256:0ce75912... 256 MiB 1 /server 21412us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-rust175-tokio-6gxsp empty-dawn-3coedrce.fra.unikraft.app running 1 minute ago httpserver-rust175-tokio@sha256:0ce75912... 256 MiB 1 /server 21412us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-rust175-tokio-6gxsp +kraft cloud instance remove httpserver-rust175-tokio-6gxsp ``` ## Customize your app diff --git a/httpserver-rust1.75/src/main.rs b/httpserver-rust1.75-tokio/src/main.rs similarity index 100% rename from httpserver-rust1.75/src/main.rs rename to httpserver-rust1.75-tokio/src/main.rs diff --git a/httpserver-rust1.75/.gitignore b/httpserver-rust1.75/.gitignore deleted file mode 100644 index 2f7896d1..00000000 --- a/httpserver-rust1.75/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target/ diff --git a/httpserver-rust1.75/Kraftfile b/httpserver-rust1.75/Kraftfile deleted file mode 100644 index 2e8447af..00000000 --- a/httpserver-rust1.75/Kraftfile +++ /dev/null @@ -1,12 +0,0 @@ -spec: v0.6 - -runtime: base-compat:latest - -labels: - cloud.unikraft.v1.instances/scale_to_zero.policy: "on" - cloud.unikraft.v1.instances/scale_to_zero.stateful: "false" - cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 - -rootfs: ./Dockerfile - -cmd: ["/server"] diff --git a/httpserver-rust1.81-rocket0.5/README.md b/httpserver-rust1.81-rocket0.5/README.md index 100f559b..ccbf8983 100644 --- a/httpserver-rust1.81-rocket0.5/README.md +++ b/httpserver-rust1.81-rocket0.5/README.md @@ -1,15 +1,15 @@ -# Rust (Rocket) +# HTTP Server with Rust (Rocket) This example uses [`Rocket`](https://rocket.rs/), a popular Rust web framework. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-rust1.75-rocket0.5/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-rust1.81-rocket0.5/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-rust1.75-rocket0.5 +cd examples/httpserver-rust1.81-rocket0.5 ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-rust175-rocket05-tuwq3 + ├────────── name: httpserver-rust181-rocket05-tuwq3 ├────────── uuid: b6fe13e4-93b7-402b-bdec-1bc4d81bc275 ├───────── state: running ├─────────── url: https://empty-bobo-n3htmpye.fra.unikraft.app - ├───────── image: http-rust175-rocket05@sha256:23a7a6e155758e6e8f75e9570f0aec5fb744f08c1bad2454d7386367c5ea45d6 + ├───────── image: httpserver-rust181-rocket05@sha256:23a7a6e155758e6e8f75e9570f0aec5fb744f08c1bad2454d7386367c5ea45d6 ├───── boot time: 17.41 ms ├──────── memory: 256 MiB ├─────── service: empty-bobo-n3htmpye - ├── private fqdn: http-rust175-rocket05-tuwq3.internal + ├── private fqdn: httpserver-rust181-rocket05-tuwq3.internal ├──── private ip: 172.16.6.6 └────────── args: /server ``` -In this case, the instance name is `http-rust175-rocket05-tuwq3` and the address is `https://empty-bobo-n3htmpye.fra.unikraft.app`. +In this case, the instance name is `httpserver-rust181-rocket05-tuwq3` and the address is `https://empty-bobo-n3htmpye.fra.unikraft.app`. They're different for each run. Use `curl` to query any of the Rocket server's paths, for example: @@ -53,6 +53,7 @@ Use `curl` to query any of the Rocket server's paths, for example: ```bash curl https://empty-bobo-n3htmpye.fra.unikraft.app/wave/Rocketeer/100 ``` + ```text 👋 Hello, 100 year old named Rocketeer! ``` @@ -62,22 +63,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-rust175-rocket05-tuwq3 empty-bobo-n3htmpye.fra.unikraft.app running 1 minute ago http-rust175-rocket05@sha256:23a7a6... 256 MiB 1 /server 17412us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-rust181-rocket05-tuwq3 empty-bobo-n3htmpye.fra.unikraft.app running 1 minute ago httpserver-rust181-rocket05@sha256:23a7a6... 256 MiB 1 /server 17412us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-rust175-rocket05-tuwq3 +kraft cloud instance remove httpserver-rust181-rocket05-tuwq3 ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `src/main.rs`: the actual server +* `src/main.rs`: the actual server implementation * `Cargo.toml`: the Cargo package manager configuration file * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/httpserver-rust1.87-actix-web4/README.md b/httpserver-rust1.87-actix-web4/README.md index b0b49297..6beff0d3 100644 --- a/httpserver-rust1.87-actix-web4/README.md +++ b/httpserver-rust1.87-actix-web4/README.md @@ -1,15 +1,15 @@ -# Rust (Actix Web) +# HTTP Server with Rust (Actix Web) This example uses [`actix-web`](https://actix.rs), a popular Rust web framework. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-rust1.87-actix-web4/` directory: +1. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-rust1.87-actix-web4/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-rust1.87-actix-web4/ +cd examples/httpserver-rust1.87-actix-web4/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,20 +32,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: http-rust187-actix-web4-3pj27 + ├────────── name: httpserver-rust187-actix-web4-3pj27 ├────────── uuid:33e9b4ba-58d7-4b3a-b9dd-4c406c0e7b07 ├───────── state: running ├─────────── url: https://autumn-silence-wupu2nus.fra.unikraft.app - ├───────── image: http-rust187-actix-web4@sha256:11723705230f0f4545d2be7e4867dc67b396870769e91f05e2fa6d9da94f9b59 + ├───────── image: httpserver-rust187-actix-web4@sha256:11723705230f0f4545d2be7e4867dc67b396870769e91f05e2fa6d9da94f9b59 ├───── boot time: 11.67 ms ├──────── memory: 256 MiB ├─────── service: autumn-silence-wupu2nus - ├── private fqdn: http-rust187-actix-web4-3pj27.internal + ├── private fqdn: httpserver-rust187-actix-web4-3pj27.internal ├──── private ip: 172.16.3.3 └────────── args: /server ``` -In this case, the instance name is `http-rust187-actix-web4-3pj27` and the address is `https://autumn-silence-wupu2nus.fra.unikraft.app`. +In this case, the instance name is `httpserver-rust187-actix-web4-3pj27` and the address is `https://autumn-silence-wupu2nus.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of the Rust-based HTTP web server: @@ -54,6 +54,7 @@ Use `curl` to query the Unikraft Cloud instance of the Rust-based HTTP web serve curl https://autumn-silence-wupu2nus.fra.unikraft.app curl https://autumn-silence-wupu2nus.fra.unikraft.app/hey ``` + ```text Hello world! Hey there! @@ -64,22 +65,23 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-rust187-actix-web4-3pj27 autumn-silence-wupu2nus.fra.unikraft.app running 10 minutes ago http-rust187-actix-web4@sha256:11723705230f0f4545d2be7... 256 MiB 1 /server 11672us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-rust187-actix-web4-3pj27 autumn-silence-wupu2nus.fra.unikraft.app running 10 minutes ago httpserver-rust187-actix-web4@sha256:117237052305d2be7... 256 MiB 1 /server 11672us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove http-rust187-actix-web4-3pj27 +kraft cloud instance remove httpserver-rust187-actix-web4-3pj27 ``` ## Customize your app To customize the app, update the files in the repository, listed below: -* `src/main.rs`: the actual implementation +* `src/main.rs`: the actual server implementation * `Cargo.toml`: the Cargo package manager configuration file * `Kraftfile`: the Unikraft Cloud specification * `Dockerfile`: the Docker-specified app filesystem diff --git a/http-rust1.91/.gitignore b/httpserver-rust1.91/.gitignore similarity index 100% rename from http-rust1.91/.gitignore rename to httpserver-rust1.91/.gitignore diff --git a/http-rust1.91/Dockerfile b/httpserver-rust1.91/Dockerfile similarity index 100% rename from http-rust1.91/Dockerfile rename to httpserver-rust1.91/Dockerfile diff --git a/httpserver-rust1.73/Kraftfile b/httpserver-rust1.91/Kraftfile similarity index 100% rename from httpserver-rust1.73/Kraftfile rename to httpserver-rust1.91/Kraftfile diff --git a/http-rust1.91/README.md b/httpserver-rust1.91/README.md similarity index 68% rename from http-rust1.91/README.md rename to httpserver-rust1.91/README.md index f25a0f10..e54b8003 100644 --- a/http-rust1.91/README.md +++ b/httpserver-rust1.91/README.md @@ -1,15 +1,15 @@ -# Rust +# HTTP Server with Rust This guide explains how to create and deploy a Rust app. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/http-rust1.91` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/httpserver-rust1.91` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/http-rust1.91/ +cd examples/httpserver-rust1.91/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -32,19 +32,19 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────── name: http-rust191-pinzf + ├────── name: httpserver-rust191-pinzf ├────── uuid: 8acb3d35-38ba-4929-81de-950340662c14 ├───── metro: fra ├───── state: starting ├──── domain: https://snowy-feather-k4pfgl8t.fra.unikraft.app - ├───── image: http-rust191@sha256:7725556f4db01037438c08d5f934eabe89f33c172b4ae6c7424b3286351619e9 + ├───── image: httpserver-rust191@sha256:7725556f4db01037438c08d5f934eabe89f33c172b4ae6c7424b3286351619e9 ├──── memory: 384 MiB ├─── service: snowy-feather-k4pfgl8t ├ private ip: 10.0.2.53 └────── args: /server ``` -In this case, the instance name is `http-rust191-pinzf` and the address is `snowy-feather-k4pfgl8t.fra.unikraft.app`. +In this case, the instance name is `httpserver-rust191-pinzf` and the address is `snowy-feather-k4pfgl8t.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance: @@ -64,8 +64,8 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -http-rust191-pinzf snowy-feather-k4pfgl8t.fra.unikraft.app standby standby http-rust191@sha256:7725556f4db01037438c08d5f934eabe89f33c172b4ae6c7424b3286351619e9 384 MiB 1 /server 0.00 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +httpserver-rust191-pinzf snowy-feather-k4pfgl8t.fra.unikraft.app standby standby httpserver-rust191@sha256:7725556f4db01037438c08d5f934eabe89f33c172b4ae6... 384 MiB 1 /server 11672us ``` When done, you can remove the instance: diff --git a/http-rust1.91/server.rs b/httpserver-rust1.91/server.rs similarity index 100% rename from http-rust1.91/server.rs rename to httpserver-rust1.91/server.rs diff --git a/hugo0.122/README.md b/hugo0.122/README.md index f92631be..37412e30 100644 --- a/hugo0.122/README.md +++ b/hugo0.122/README.md @@ -6,11 +6,11 @@ To run it, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/hugo/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/hugo0.122/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/hugo/ +cd examples/hugo0.122/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -33,20 +33,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: hugo-zpabu + ├────────── name: hugo0122-zpabu ├────────── uuid: dfc6e06c-76cc-4aa1-a053-c4eded0d2456 ├───────── state: running ├─────────── url: https://morning-rain-jikpfy3t.fra.unikraft.app - ├───────── image: hugo@sha256:68d20fdb707076b1cd0f2848b17cc75670d8a92b740edb9417aeb8463fef7f19 + ├───────── image: hugo0122@sha256:68d20fdb707076b1cd0f2848b17cc75670d8a92b740edb9417aeb8463fef7f19 ├───── boot time: 77.17 ms ├──────── memory: 512 MiB ├─────── service: morning-rain-jikpfy3t - ├── private fqdn: hugo-zpabu.internal + ├── private fqdn: hugo0122-zpabu.internal ├──── private ip: 172.16.6.4 └────────── args: /usr/bin/hugo server --bind=0.0.0.0 --source /site ``` -In this case, the instance name is `hugo-zpabu` and the address is `https://morning-rain-jikpfy3t.fra.unikraft.app`. +In this case, the instance name is `hugo0122-zpabu` and the address is `https://morning-rain-jikpfy3t.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of Hugo. @@ -54,6 +54,7 @@ Use `curl` to query the Unikraft Cloud instance of Hugo. ```bash curl https://morning-rain-jikpfy3t.fra.unikraft.app ``` + ```html @@ -68,15 +69,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -hugo-zpabu morning-rain-jikpfy3t.fra.unikraft.app running 1 minute ago hugo@sha256:68d20fdb707076b1cd0f2848b17cc75670d8a... 512 MiB 1 /usr/bin/hugo server --bind=... 77166us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +hugo0122-zpabu morning-rain-jikpfy3t.fra.unikraft.app running 1 minute ago hugo0122@sha256:68d20fdb707076b1cd0f2848b17cc75670d8a... 512 MiB 1 /usr/bin/hugo server --bind=... 77166us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove hugo-zpabu +kraft cloud instance remove hugo0122-zpabu ``` ## Customize your app diff --git a/imaginary/README.md b/imaginary/README.md index c39c981c..0da4de38 100644 --- a/imaginary/README.md +++ b/imaginary/README.md @@ -55,6 +55,7 @@ You will get a health status of the service: ```bash curl -s https://divine-wind-1ycjvhqs.fra.unikraft.app/health | jq ``` + ```json { "uptime": 414, @@ -81,6 +82,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME imaginary-mwb4y divine-wind-1ycjvhqs.fra.unikraft.app running 54 seconds ago imaginary@sha256:673834bc531038bb621266f7... 256 MiB 1 /usr/bin/imaginary -p 8080 32262us diff --git a/mariadb/README.md b/mariadb/README.md index 82c75dce..72ef2d5d 100644 --- a/mariadb/README.md +++ b/mariadb/README.md @@ -84,6 +84,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME mariadb-w2g2z twilight-sun-82lt4ddk.fra.unikraft.app running 1 minute ago mariadb@s... 1.0 GiB 1 /usr/sbin/mariadbd --user=ro... 159065us diff --git a/mcp-server-arxiv/README.md b/mcp-server-arxiv/README.md index 0b9a8992..0b8df6f9 100644 --- a/mcp-server-arxiv/README.md +++ b/mcp-server-arxiv/README.md @@ -45,22 +45,23 @@ The output shows your instance details: ```ansi [●] Deployed successfully! │ - ├─────── name: mcp-arxiv-l7l24 + ├─────── name: mcp-server-arxiv-l7l24 ├─────── uuid: 1a721bb8-4472-4149-9870-789b1df5f80a ├────── metro: https://api.fra.unikraft.cloud/v1 ├────── state: starting ├───── domain: https://billowing-breeze-nuusy7l2.fra.unikraft.app - ├────── image: mcp-arxiv@sha256:ea1e677ccc03628a3e7d57a4cd41118e3d2a631bcb2c34203bb9b175e7977f00 + ├────── image: mcp-server-arxiv@sha256:ea1e677ccc03628a3e7d57a4cd41118e3d2a631bcb2c34203bb9b175e7977f00 ├───── memory: 2048 MiB ├──── service: billowing-breeze-nuusy7l2 ├─ private ip: 10.0.1.149 └─────── args: /usr/local/bin/python /src/server.py ``` -In this case, the instance name is `mcp-arxiv-l7l24` and the service `billowing-breeze-nuusy7l2`. +In this case, the instance name is `mcp-server-arxiv-l7l24` and the service `billowing-breeze-nuusy7l2`. They're different for each run. -For testing, you can use the example client included in this directory. First, [install `uv`](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2) if you haven't already, then run: +For testing, you can use the example client included in this directory. +First, [install `uv`](https://docs.astral.sh/uv/getting-started/installation/) if you haven't already, then run: ```bash export MCP_SERVER_URL=https://billowing-breeze-nuusy7l2.fra.unikraft.app/mcp @@ -83,14 +84,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -mcp-arxiv-l7l24 billowing-breeze-nuusy7l2.fra.unikraft.app standby standby mcp-arxiv@sha256:ea1e677ccc03628a3e7d57a4cd41118e3d2a631bcb2c3... 2.0 GiB 1 /usr/bin/python3 /src/server.py 213.07 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +mcp-server-arxiv-l7l24 billowing-breeze-nuusy7l2.fra.unikraft.app standby standby mcp-server-arxiv@sha256:ea1e677ccc03628a3e7d57a4cd41118e3d2a63... 2.0 GiB 1 /usr/bin/python3 /src/server.py 213.07 ms ``` When done, you can delete the instance with: ```bash -kraft cloud instance remove mcp-arxiv-l7l24 +kraft cloud instance remove mcp-server-arxiv-l7l24 ``` ## Using volumes @@ -99,13 +100,13 @@ You can use [volumes](https://unikraft.com/docs/platform/volumes) for data persi For that you would first create a volume: ```console -kraft cloud volume create --name mcp-arxiv-data --size 500 +kraft cloud volume create --name mcp-server-arxiv-data --size 500 ``` Then start the MCP server instance and mount that volume (while specifying the storage path): ```console -kraft cloud deploy -v mcp-arxiv-data:/volume -p 443:8080 -M 2Gi . -- --storage-path /volume +kraft cloud deploy -v mcp-server-arxiv-data:/volume -p 443:8080 -M 2Gi . -- --storage-path /volume ``` ## Available tools diff --git a/mcp-server-simple/README.md b/mcp-server-simple/README.md index a8002c51..52ab866c 100644 --- a/mcp-server-simple/README.md +++ b/mcp-server-simple/README.md @@ -1,4 +1,4 @@ -# Custom MCP Server +# Simple MCP Server This example demonstrates how to build a minimal custom MCP (Model Context Protocol) server from scratch using [FastMCP 2.0](https://github.com/jlowin/fastmcp). @@ -37,12 +37,12 @@ The output shows your instance details: ```ansi [●] Deployed successfully! │ - ├────── name: mcp-simple-bbdcb + ├────── name: mcp-server-simple-bbdcb ├────── uuid: e87d3591-3497-4f30-bd76-1dc886059647 ├───── metro: https://api.fra.unikraft.cloud/v1 ├───── state: running ├──── domain: https://cool-paper-b6mht7jv.fra.unikraft.app - ├───── image: mcp-simple@sha256:cbbfb441ee313a6c7c0de571e9002f0f6031312e203ffb6be3b8f4950df3bc20 + ├───── image: mcp-server-simple@sha256:cbbfb441ee313a6c7c0de571e9002f0f6031312e203ffb6be3b8f4950df3bc20 ├─ boot time: 145.96 ms ├──── memory: 512 MiB ├─── service: cool-paper-b6mht7jv @@ -50,10 +50,11 @@ The output shows your instance details: └────── args: /usr/bin/python3 /src/server.py ``` -In this case, the instance name is `mcp-simple-bbdcb` and the service `cool-paper-b6mht7jv`. +In this case, the instance name is `mcp-server-simple-bbdcb` and the service `cool-paper-b6mht7jv`. They're different for each run. -For testing, you can use the example client included in this directory. First, [install `uv`](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2) if you haven't already, then run: +For testing, you can use the example client included in this directory. +First, [install `uv`](https://docs.astral.sh/uv/getting-started/installation) if you haven't already, then run: ```bash export MCP_SERVER_URL=https://cool-paper-b6mht7jv.fra.unikraft.app/mcp @@ -85,14 +86,14 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -mcp-simple-bbdcb cool-paper-b6mht7jv.fra.unikraft.app standby standby mcp-simple@sha256:cbbfb441ee313a6c7c0de5... 512 MiB 1 /usr/bin/python3 /src/server.py 9.15 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +mcp-server-simple-bbdcb cool-paper-b6mht7jv.fra.unikraft.app standby standby mcp-server-simple@sha256:cbbfb441ee313a6c7c0de5... 512 MiB 1 /usr/bin/python3 /src/server.py 9.15 ms ``` When done, you can delete the instance with: ```bash -kraft cloud instance remove mcp-simple-bbdcb +kraft cloud instance remove mcp-server-simple-bbdcb ``` ## Available tools @@ -105,14 +106,15 @@ This MCP Server provides the following tools: ## Building your own tools -This example shows the basic structure of an MCP server using FastMCP. To add your own tools: +This example shows the basic structure of an MCP server using FastMCP. +To add your own tools: 1. **Define the tool** using the `@mcp.tool()` decorator: * Add type hints for parameters * Include a docstring describing what the tool does * Parameters are automatically converted to JSON schema -1. **Implement the tool** function: +1. **Write the tool** function: * Process the parameters * Return a string result (or raise an exception for errors) diff --git a/memcached1.6/README.md b/memcached1.6/README.md index 15704f46..04c2bde2 100644 --- a/memcached1.6/README.md +++ b/memcached1.6/README.md @@ -7,11 +7,11 @@ To run it, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/memcached/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/memcached1.6/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/memcached/ +cd examples/memcached1.6/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -34,25 +34,25 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: memcached-arkv7 + ├────────── name: memcached16-arkv7 ├────────── uuid: da436eca-bc64-46d7-a04c-72832652b10e ├───────── state: running ├────────── fqdn: weathered-smoke-hehsdinv.fra.unikraft.app - ├───────── image: memcached@sha256:f53cdbce4dc185e8acc8ecb93a0ab0ba99085ca0837a0ad2062aae9e31382e58 + ├───────── image: memcached16@sha256:f53cdbce4dc185e8acc8ecb93a0ab0ba99085ca0837a0ad2062aae9e31382e58 ├───── boot time: 19.27 ms ├──────── memory: 256 MiB ├─────── service: weathered-smoke-hehsdinv - ├── private fqdn: memcached-arkv7.internal + ├── private fqdn: memcached16-arkv7.internal ├──── private ip: 172.16.6.5 └────────── args: /usr/bin/memcached -u root ``` -In this case, the instance name is `memcached-arkv7` which is different for each run. +In this case, the instance name is `memcached16-arkv7` which is different for each run. To test the deployment, first forward the port with the `kraft cloud tunnel` command: ```bash -kraft cloud tunnel 11211:memcached-arkv7:11211 +kraft cloud tunnel 11211:memcached16-arkv7:11211 ``` Now, on a separate console, run the following commands to test that it works (you should see output when incrementing): @@ -84,15 +84,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -memcached-arkv7 weathered-smoke-hehsdinv.fra.unikraft.app running 11 minutes ago memcached@sha256:f53cdbce4... 256 MiB 1 /usr/bin/memcached -u root 19266us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +memcached16-arkv7 weathered-smoke-hehsdinv.fra.unikraft.app running 11 minutes ago memcached16@sha256:f53cdbce4... 256 MiB 1 /usr/bin/memcached -u root 19266us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove memcached-arkv7 +kraft cloud instance remove memcached16-arkv7 ``` ## Customize your app diff --git a/minio/README.md b/minio/README.md index f788b9b7..97e50d9c 100644 --- a/minio/README.md +++ b/minio/README.md @@ -58,6 +58,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME minio-w2my8 icy-bird-tregaga9.fra.unikraft.app running 1 minute ago minio@sha256:ba4657c607495326b0e29b51... 512 MiB 1 /usr/bin/minio server --addres... 73651us diff --git a/mongodb/README.md b/mongodb/README.md index 91bd4da5..ae1ac351 100644 --- a/mongodb/README.md +++ b/mongodb/README.md @@ -90,6 +90,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME mongodb-6tiuu bold-brook-khkwv7of.fra.unikraft.app running 20 minutes ago mongodb@sha256:e6ff5153f106e2... 1.0 GiB 1 /usr/bin/mongod --bind_ip_all... 82410us diff --git a/nginx/README.md b/nginx/README.md index 20b65157..1acc5c0e 100644 --- a/nginx/README.md +++ b/nginx/README.md @@ -1,4 +1,4 @@ -# NGINX +# Nginx This example uses [`Nginx`](https://nginx.org), one of the most popular web servers. Nginx can be used with Unikraft / Unikraft Cloud to serve static web content. @@ -55,6 +55,7 @@ Use `curl` to query the Unikraft Cloud instance of Nginx. ```bash curl https://nameless-fog-0tvh1uov.fra.unikraft.app ``` + ```text @@ -68,6 +69,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME nginx-67zbu nameless-fog-0tvh1uov.fra.unikraft.app running 5 minutes ago nginx@sha256:f51ecc121c9ca34abb... 256 MiB 1 /usr/bin/nginx -c /etc/nginx/nginx.conf 11129us diff --git a/database-redis7.2/Dockerfile b/node-playwright-firefox/redis7.2/Dockerfile similarity index 100% rename from database-redis7.2/Dockerfile rename to node-playwright-firefox/redis7.2/Dockerfile diff --git a/database-redis7.2/Kraftfile b/node-playwright-firefox/redis7.2/Kraftfile similarity index 100% rename from database-redis7.2/Kraftfile rename to node-playwright-firefox/redis7.2/Kraftfile diff --git a/database-redis7.2/README.md b/node-playwright-firefox/redis7.2/README.md similarity index 99% rename from database-redis7.2/README.md rename to node-playwright-firefox/redis7.2/README.md index 09b07144..0be1df6e 100644 --- a/database-redis7.2/README.md +++ b/node-playwright-firefox/redis7.2/README.md @@ -96,6 +96,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME redis-alb4r rough-wind-8vxrd1ms.fra.unikraft.app running 1 minute ago redis@sha256:9665c5... 512 MiB 1 /usr/bin/redis-server /etc/red... 26131us diff --git a/database-redis7.2/fs/etc/redis/redis.conf b/node-playwright-firefox/redis7.2/fs/etc/redis/redis.conf similarity index 100% rename from database-redis7.2/fs/etc/redis/redis.conf rename to node-playwright-firefox/redis7.2/fs/etc/redis/redis.conf diff --git a/node21-remix/Kraftfile b/node21-remix/Kraftfile deleted file mode 100644 index 83dc7641..00000000 --- a/node21-remix/Kraftfile +++ /dev/null @@ -1,12 +0,0 @@ -spec: v0.6 - -runtime: base-compat:latest - -labels: - cloud.unikraft.v1.instances/scale_to_zero.policy: "on" - cloud.unikraft.v1.instances/scale_to_zero.stateful: "false" - cloud.unikraft.v1.instances/scale_to_zero.cooldown_time_ms: 1000 - -rootfs: ./Dockerfile - -cmd: ["/usr/bin/node", "/usr/src/server.js"] diff --git a/node24-karaoke/README.md b/node24-karaoke/README.md index 36b4973d..5baf6128 100644 --- a/node24-karaoke/README.md +++ b/node24-karaoke/README.md @@ -1,4 +1,4 @@ -# Node 24 AllKaraoke +# Node AllKaraoke [Allkaraoke](https://github.com/Asvarox/allkaraoke) offers an ultrastar deluxe-like online platform for karaoke. diff --git a/vnc-browser/Dockerfile b/novnc-browser/Dockerfile similarity index 100% rename from vnc-browser/Dockerfile rename to novnc-browser/Dockerfile diff --git a/vnc-browser/Kraftfile b/novnc-browser/Kraftfile similarity index 100% rename from vnc-browser/Kraftfile rename to novnc-browser/Kraftfile diff --git a/vnc-browser/README.md b/novnc-browser/README.md similarity index 77% rename from vnc-browser/README.md rename to novnc-browser/README.md index 29001de5..eee5f0f5 100644 --- a/vnc-browser/README.md +++ b/novnc-browser/README.md @@ -3,17 +3,17 @@ This guide explains how to create and deploy a [noVNC](https://novnc.com/info.html) app, allowing you to access remote desktops through a web interface inside a modern browser. -**Note**: This example is inspired from Anthropic's [Computer Use Demo](https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo). +**Note**: Anthropic's [Computer Use Demo](https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo) inspired this example. To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/vnc-browser` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/novnc-browser` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/vnc-browser/ +cd examples/novnc-browser/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -48,7 +48,7 @@ The output shows the instance address and other details: ├────── metro: https://api.fra.unikraft.cloud/v1 ├────── state: starting ├───── domain: https://weathered-fog-y5jjmwfd.fra.unikraft.app - ├────── image: vnc-browser@sha256:fdb4887e84362ebbaf54c713e0d85f547e8ee173fe63a6ab39e94b7e612a9892 + ├────── image: novnc-browser@sha256:fdb4887e84362ebbaf54c713e0d85f547e8ee173fe63a6ab39e94b7e612a9892 ├───── memory: 4096 MiB ├──── service: weathered-fog-y5jjmwfd ├─ private ip: 10.0.0.49 @@ -56,8 +56,8 @@ The output shows the instance address and other details: ``` In this case, the instance name is `vnc-browser` and the address is `https://weathered-fog-y5jjmwfd.fra.unikraft.app`. -The name was preset, but the address is different for each run. Enter the provided URL into your browser of choice to access -remote desktop interface. +The name was preset, but the address is different for each run. +Enter the provided address into your browser of choice to access the remote desktop interface. Use `curl` to query the Unikraft Cloud instance: @@ -76,8 +76,8 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -vnc-browser weathered-fog-y5jjmwfd.fra.unikraft.app standby standby vnc-browser@sha256:fdb4887e84362ebbaf5... 4.0 GiB 1 /wrapper.sh 7.17 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +vnc-browser weathered-fog-y5jjmwfd.fra.unikraft.app standby standby novnc-browser@sha256:fdb4887e84362ebbaf5... 4.0 GiB 1 /wrapper.sh 7.17 ms ``` When done, you can remove the instance: diff --git a/vnc-browser/image/.config/tint2/applications/firefox-custom.desktop b/novnc-browser/image/.config/tint2/applications/firefox-custom.desktop similarity index 100% rename from vnc-browser/image/.config/tint2/applications/firefox-custom.desktop rename to novnc-browser/image/.config/tint2/applications/firefox-custom.desktop diff --git a/vnc-browser/image/.config/tint2/applications/gedit.desktop b/novnc-browser/image/.config/tint2/applications/gedit.desktop similarity index 100% rename from vnc-browser/image/.config/tint2/applications/gedit.desktop rename to novnc-browser/image/.config/tint2/applications/gedit.desktop diff --git a/vnc-browser/image/.config/tint2/applications/terminal.desktop b/novnc-browser/image/.config/tint2/applications/terminal.desktop similarity index 100% rename from vnc-browser/image/.config/tint2/applications/terminal.desktop rename to novnc-browser/image/.config/tint2/applications/terminal.desktop diff --git a/vnc-browser/image/.config/tint2/tint2rc b/novnc-browser/image/.config/tint2/tint2rc similarity index 100% rename from vnc-browser/image/.config/tint2/tint2rc rename to novnc-browser/image/.config/tint2/tint2rc diff --git a/vnc-browser/image/mutter_startup.sh b/novnc-browser/image/mutter_startup.sh similarity index 100% rename from vnc-browser/image/mutter_startup.sh rename to novnc-browser/image/mutter_startup.sh diff --git a/vnc-browser/image/start_all.sh b/novnc-browser/image/start_all.sh similarity index 100% rename from vnc-browser/image/start_all.sh rename to novnc-browser/image/start_all.sh diff --git a/vnc-browser/image/tint2_startup.sh b/novnc-browser/image/tint2_startup.sh similarity index 100% rename from vnc-browser/image/tint2_startup.sh rename to novnc-browser/image/tint2_startup.sh diff --git a/vnc-browser/image/x11vnc_startup.sh b/novnc-browser/image/x11vnc_startup.sh similarity index 100% rename from vnc-browser/image/x11vnc_startup.sh rename to novnc-browser/image/x11vnc_startup.sh diff --git a/vnc-browser/image/xvfb_startup.sh b/novnc-browser/image/xvfb_startup.sh similarity index 100% rename from vnc-browser/image/xvfb_startup.sh rename to novnc-browser/image/xvfb_startup.sh diff --git a/vnc-browser/wrapper.sh b/novnc-browser/wrapper.sh similarity index 100% rename from vnc-browser/wrapper.sh rename to novnc-browser/wrapper.sh diff --git a/opentelemetry-collector/README.md b/opentelemetry-collector/README.md index 1c4fcd7b..08107b0f 100644 --- a/opentelemetry-collector/README.md +++ b/opentelemetry-collector/README.md @@ -58,6 +58,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME opentelemetry-collector-bvtnh running since 11mins opentelemetry... 1536 MiB 1 /usr/bin/otelcontribcol --config... 177.62 ms diff --git a/ruby3.2-rails/README.md b/ruby3.2-rails/README.md index a609a539..c37dd9f5 100644 --- a/ruby3.2-rails/README.md +++ b/ruby3.2-rails/README.md @@ -53,6 +53,7 @@ Use `curl` to query the Unikraft Cloud instance of the Python-based HTTP web ser ```bash curl https://aged-waterfall-qraz0s7d.fra.unikraft.app/hello ``` + ```text [...] @@ -68,6 +69,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME ruby32-rails-apa93 aged-waterfall-qraz0s7d.fra.unikraft.app running 2 minutes ago ruby32-rails@sha256:fdd46011408fdee... 1.0 GiB 1 /usr/bin/ruby /app/bin/rails server -b 0.0.0.0 577.34 ms @@ -92,6 +94,7 @@ The `app/` and `config/` directories contain files that are to overwrite generat ```bash tree app/ config/ ``` + ```text app/ |-- controllers/ diff --git a/skipper0.18/README.md b/skipper0.18/README.md index 277d6c51..e3c62d65 100644 --- a/skipper0.18/README.md +++ b/skipper0.18/README.md @@ -6,11 +6,11 @@ To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/skipper/` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/skipper0.18/` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/skipper/ +cd examples/skipper0.18/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -33,20 +33,20 @@ The output shows the instance address and other details: ```ansi [●] Deployed successfully! │ - ├────────── name: skipper-mx4ai + ├────────── name: skipper018-mx4ai ├────────── uuid: 34e3d740-c2b0-4644-b7e1-647350f688dc ├───────── state: running ├─────────── url: https://aged-sea-o7d3c42s.fra.unikraft.app - ├───────── image: skipper@sha256:5483eaf3612cca2116ceaab9be42557686324f1d30337ae15d0495eef63d0386 + ├───────── image: skipper018@sha256:5483eaf3612cca2116ceaab9be42557686324f1d30337ae15d0495eef63d0386 ├───── boot time: 43.71 ms ├──────── memory: 256 MiB ├─────── service: aged-sea-o7d3c42s - ├── private fqdn: skipper-mx4ai.internal + ├── private fqdn: skipper018-mx4ai.internal ├──── private ip: 172.16.6.4 └────────── args: /usr/bin/skipper -address :9090 -routes-file /etc/skipper/example.eskip ``` -In this case, the instance name is `skipper-mx4ai` and the address is `https://aged-sea-o7d3c42s.fra.unikraft.app`. +In this case, the instance name is `skipper018-mx4ai` and the address is `https://aged-sea-o7d3c42s.fra.unikraft.app`. They're different for each run. Use `curl` to query the Unikraft Cloud instance of Skipper. @@ -54,6 +54,7 @@ Use `curl` to query the Unikraft Cloud instance of Skipper. ```bash curl https://aged-sea-o7d3c42s.fra.unikraft.app ``` + ```text Hello, world from Skipper on Unikraft! ``` @@ -63,15 +64,16 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -skipper-mx4ai aged-sea-o7d3c42s.fra.unikraft.app running 1 minute ago skipper@sha256:5483eaf... 256 MiB 1 /usr/bin/skipper -address :9090 -routes-f... 43709us +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +skipper018-mx4ai aged-sea-o7d3c42s.fra.unikraft.app running 1 minute ago skipper018@sha256:5483eaf... 256 MiB 1 /usr/bin/skipper -address :9090 -routes-f... 43709us ``` When done, you can remove the instance: ```bash -kraft cloud instance remove skipper-mx4ai +kraft cloud instance remove skipper018-mx4ai ``` ## Customize your app diff --git a/spin-wagi-http/README.md b/spin-wagi-http/README.md index 9fd6f7eb..ac8d75c0 100644 --- a/spin-wagi-http/README.md +++ b/spin-wagi-http/README.md @@ -72,6 +72,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME spin-wagi-http-is72r damp-bobo-wg43p36e.fra.unikraft.app running 1 minute ago spin-wagi-http@sha2... 4.0 GiB 1 /usr/bin/spin up --from /app/spin.tom... 300064us diff --git a/traefik/README.md b/traefik/README.md index 17afd231..d8ad600a 100644 --- a/traefik/README.md +++ b/traefik/README.md @@ -54,6 +54,7 @@ Use `curl` to query the Unikraft Cloud instance of Traefik. ```bash curl https://holy-cherry-rye39b1x.fra.unikraft.app:8080/dashboard ``` + ```text Traefik ... ``` @@ -69,6 +70,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME traefik-wqe7e holy-cherry-rye39b1x.fra.unikraft.app running 8 minutes ago traefik@sha256:f6dd913a8... 1024 MiB 1 /usr/bin/traefik -configFile /etc/traefik/... 53661us diff --git a/tyk/README.md b/tyk/README.md index 36bf7aef..b52e8c6e 100644 --- a/tyk/README.md +++ b/tyk/README.md @@ -48,6 +48,7 @@ To list information about the instances, use: ```bash kraft cloud compose ps ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME tyk-tyk funky-pond-45usfkxx.fra.unikraft.app running since 45secs tyk-tyk@sha256:06f8ba329fd9d9100skf1721fe... 128 MiB 1 /usr/bin/tyk start --conf /etc/tyk.conf 38.12 ms @@ -64,6 +65,7 @@ Use `curl` to query the Tyk instance on Unikraft Cloud on the available address: ```bash curl https://funky-pond-45usfkxx.fra-test.unikraft.app/hello ``` + ```text {"status":"pass","version":"v5.3.0-dev","description":"Tyk GW","details":{"redis":{"status":"pass","componentType":"datastore","time":"2024-07-12T05:57:44Z"}}} ``` diff --git a/code-server/Dockerfile b/visual-studio-code-server/Dockerfile similarity index 100% rename from code-server/Dockerfile rename to visual-studio-code-server/Dockerfile diff --git a/code-server/Kraftfile b/visual-studio-code-server/Kraftfile similarity index 100% rename from code-server/Kraftfile rename to visual-studio-code-server/Kraftfile diff --git a/code-server/README.md b/visual-studio-code-server/README.md similarity index 76% rename from code-server/README.md rename to visual-studio-code-server/README.md index d1d11a7f..d834f47f 100644 --- a/code-server/README.md +++ b/visual-studio-code-server/README.md @@ -1,6 +1,7 @@ -# Visual Studio Code server +# Visual Studio Code Server -[Visual Studio Code](https://code.visualstudio.com/) is a source-code editor developed by Microsoft. It includes support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. +[Visual Studio Code](https://code.visualstudio.com/) is a source-code editor developed by Microsoft. +It includes support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. It features a [Code server](https://code.visualstudio.com/docs/remote/vscode-server), which allows you to run Visual Studio Code remotely and access it through a web browser or your local Visual Studio Code client. This guide explains how to create and deploy a Visual Studio Code server app. @@ -8,11 +9,11 @@ To run this example, follow these steps: 1. Install the [`kraft` CLI tool](https://unikraft.org/docs/cli/install) and a container runtime engine, for example [Docker](https://docs.docker.com/engine/install/). -2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/code-server` directory: +2. Clone the [`examples` repository](https://github.com/unikraft-cloud/examples) and `cd` into the `examples/visual-studio-code-server` directory: ```bash git clone https://github.com/unikraft-cloud/examples -cd examples/code-server/ +cd examples/visual-studio-code-server/ ``` Make sure to log into Unikraft Cloud by setting your token and a [metro](https://unikraft.com/docs/platform/metros) close to you. @@ -57,7 +58,7 @@ The output shows the instance address and other details: ├────── metro: https://api.fra.unikraft.cloud/v1 ├────── state: starting ├───── domain: https://blue-shape-chmxf1g4.fra.unikraft.app - ├────── image: code-server@sha256:633ec8a8dcb342b093c6f055f84fc056ee1abe40ff56e98bd612c4b9d4ddffcb + ├────── image: visual-studio-code-server@sha256:633ec8a8dcb342b093c6f055f84fc056ee1abe40ff56e98bd612c4b9d4ddffcb ├───── memory: 2048 MiB ├──── service: blue-shape-chmxf1g4 ├─ private ip: 10.0.0.49 @@ -67,7 +68,8 @@ The output shows the instance address and other details: This will create a volume for data persistence, and mount it at `/workspace` inside the VM. In this case, the instance name is `code-server` and the address is `https://blue-shape-chmxf1g4.fra.unikraft.app`. -The name was preset, but the address is different for each run. Enter the provided URL into your browser of choice to access the Code server instance. +The name was preset, but the address is different for each run. +Enter the provided address into your browser of choice to access the Code server instance. You can list information about the volume by running: @@ -75,7 +77,7 @@ You can list information about the volume by running: kraft cloud volume list ``` -```text +```ansi NAME CREATED AT SIZE ATTACHED TO MOUNTED BY STATE PERSISTENT code-workspace 13 minutes ago 1.0 GiB code-server code-server mounted true ``` @@ -87,8 +89,8 @@ kraft cloud instance list ``` ```ansi -NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME -code-server blue-shape-chmxf1g4.fra.unikraft.app standby standby code-server@sha256:633ec8a... 2.0 GiB 1 /app/code-server/bin/code-server... 8.45 ms +NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME +code-server blue-shape-chmxf1g4.fra.unikraft.app standby standby visual-studio-code-server@sha256:633ec8a8dcb342b0... 2.0 GiB 1 /app/code-server/bin/code-server... 8.45 ms ``` When done, you can remove the instance: @@ -97,7 +99,8 @@ When done, you can remove the instance: kraft cloud instance remove code-server ``` -The volume is not removed by default, so you can recreate the instance and still have access to your old data. Remove it using: +The volume isn't removed by default, so you can recreate the instance and still have access to your old data. +Remove it using: ```bash kraft cloud volume remove code-workspace diff --git a/vsftpd/README.md b/vsftpd/README.md index 2cc1f2fc..feb425dc 100644 --- a/vsftpd/README.md +++ b/vsftpd/README.md @@ -65,7 +65,8 @@ This will create a volume for data persistence, and mount it at `/root` inside t In this case, the instance name is `vsftpd` and the address is `https://broken-orangutan-jypu2z53.fra.unikraft.app`. The name was preset, but the address is different for each run. -**Note**: The password for the `root` user is set to `rootpass`. Do not forget to change it inside the `Dockerfile` and update the commands below. +**Note**: The `root` password defaults to `rootpass`. +Don't forget to change it inside the `Dockerfile` and update the commands below. You can access the FTP server using a client like `lftp`: @@ -80,7 +81,7 @@ You can list information about the volume by running: kraft cloud volume list ``` -```text +```ansi NAME CREATED AT SIZE ATTACHED TO MOUNTED BY STATE PERSISTENT vsftpd-workspace 9 minutes ago 1.0 GiB vsftpd vsftpd mounted true ``` @@ -102,7 +103,8 @@ When done, you can remove the instance: kraft cloud instance remove vsftpd ``` -The volume is not removed by default, so you can recreate the instance and still have access to your old data. Remove it using: +The volume isn't removed by default, so you can recreate the instance and still have access to your old data. +Remove it using: ```bash kraft cloud volume remove vsftpd-workspace diff --git a/wazero-import-go/README.md b/wazero-import-go/README.md index f3252bf4..37920935 100644 --- a/wazero-import-go/README.md +++ b/wazero-import-go/README.md @@ -54,6 +54,7 @@ Use `curl` to query the Unikraft Cloud instance of the Go/wazero server: ```bash curl https://cool-morning-camrrhsa.fra.unikraft.app ``` + ```text println >> 24 log_i32 >> 24 @@ -64,6 +65,7 @@ You can list information about the instance by running: ```bash kraft cloud instance list ``` + ```ansi NAME FQDN STATE STATUS IMAGE MEMORY VCPUS ARGS BOOT TIME wazero-import-go-r4dx8 cool-morning-camrrhsa.fra.unikraft.app running 1 minutes ag wazero-import-go@s... 512 MiB 1 /age-calculator 2000 20040us