diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f37d8fdf..b6929a52 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,6 +11,15 @@ on: - main - staging - release/* + workflow_dispatch: + inputs: + nussknacker_version: + description: "Nussknacker version" + required: false + type: string + +env: + INPUT_NUSSKNACKER_VERSION: ${{ inputs.nussknacker_version }} jobs: @@ -29,7 +38,10 @@ jobs: - name: Test Quickstart start timeout-minutes: 10 run: | - ./start.sh || (docker-compose logs && exit 1) + if [[ -n "$INPUT_NUSSKNACKER_VERSION" ]]; then + echo "NUSSKNACKER_VERSION=$INPUT_NUSSKNACKER_VERSION" > .env + fi + ./start.sh || (docker compose logs && exit 1) - name: Clean up Quickstart run: | ./stop-and-clean.sh diff --git a/designer/application-customizations.conf b/designer/application-customizations.conf index 9efe87bb..1ab22be0 100644 --- a/designer/application-customizations.conf +++ b/designer/application-customizations.conf @@ -1,16 +1,13 @@ -## To customize Nu Designer configuration see https://nussknacker.io/documentation/docs/installation_configuration_guide/Common/ +## To customize Nu Designer configuration see https://nussknacker.io/documentation/docs/configuration/Common/#configuration-file scenarioTypes { "streaming" { # customize Flink streaming scenario type - # see: https://nussknacker.io/documentation/docs/next/installation_configuration_guide/Common/#configuration-file } "streaming-lite-embedded" { # customize Lite streaming scenario type - # see: https://nussknacker.io/documentation/docs/next/installation_configuration_guide/Common/#configuration-file } "request-response-embedded": { # customize Lite request-response scenario type - # see: https://nussknacker.io/documentation/docs/next/installation_configuration_guide/Common/#configuration-file } } diff --git a/docker-compose.yml b/docker-compose.yml index e815c6bf..39a4c022 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -260,7 +260,7 @@ services: deploy: resources: limits: - memory: 128M + memory: 256M volumes: nussknacker_designer_data: diff --git a/download-and-start.bat b/download-and-start.bat new file mode 100644 index 00000000..fd05e9ea --- /dev/null +++ b/download-and-start.bat @@ -0,0 +1,22 @@ +@echo off +chcp 65001 >nul +setlocal enabledelayedexpansion + +set "BRANCH_NAME=%~1" +if "%BRANCH_NAME%"=="" set "BRANCH_NAME=main" + +set "NU_QUICKSTART_DIR=nussknacker-quickstart-%BRANCH_NAME%" + +powershell -Command "Invoke-WebRequest -Uri 'https://github.com/TouK/nussknacker-quickstart/archive/refs/heads/%BRANCH_NAME%.zip' -OutFile '%NU_QUICKSTART_DIR%.zip'" + +if exist "%NU_QUICKSTART_DIR%" ( + rd /s /q "%NU_QUICKSTART_DIR%" +) + +powershell -Command "Expand-Archive -Path '%NU_QUICKSTART_DIR%.zip' -DestinationPath ." + +cd "%NU_QUICKSTART_DIR%" + +call start.bat + +endlocal diff --git a/start.bat b/start.bat new file mode 100644 index 00000000..0265b47d --- /dev/null +++ b/start.bat @@ -0,0 +1,30 @@ +@echo off +chcp 65001 >nul +setlocal enabledelayedexpansion + +echo Running Nussknacker Quickstart ... +echo. + +docker --version >nul 2>&1 +if errorlevel 1 ( + echo No Docker found. Docker is required to run this Quickstart. See https://docs.docker.com/engine/install/ + exit /b 1 +) + +docker compose version >nul 2>&1 +if errorlevel 1 ( + echo No docker compose found. It seems you have to upgrade your Docker installation. See https://docs.docker.com/engine/install/ + exit /b 2 +) + +docker compose config >nul 2>&1 +if errorlevel 1 ( + echo Cannot validate docker compose configuration. It seems you have to upgrade your Docker installation. See https://docs.docker.com/engine/install/ + exit /b 3 +) + +docker compose up -d --build --wait + +echo. +echo Nussknacker and its dependencies are up and running. +echo Open http://localhost:8080 and log in as admin:admin ... diff --git a/stop-and-clean.bat b/stop-and-clean.bat new file mode 100644 index 00000000..9fb2e1f0 --- /dev/null +++ b/stop-and-clean.bat @@ -0,0 +1,30 @@ +@echo off +setlocal enabledelayedexpansion + +cd /d "%~dp0" + +echo Running Nussknacker Quickstart clean up ... +echo. + +docker --version >nul 2>&1 +if errorlevel 1 ( + echo No Docker found. Docker is required to run this Quickstart. See https://docs.docker.com/engine/install/ + exit /b 1 +) + +docker compose version >nul 2>&1 +if errorlevel 1 ( + echo No docker compose found. It seems you have to upgrade your Docker installation. See https://docs.docker.com/engine/install/ + exit /b 2 +) + +docker compose config >nul 2>&1 +if errorlevel 1 ( + echo Cannot validate docker compose configuration. It seems you have to upgrade your Docker installation. See https://docs.docker.com/engine/install/ + exit /b 3 +) + +docker compose down -v + +echo All is cleaned. Goodbye +