Add setup wizard and smoke tests for SE-LTD installation
- Implemented SetupSmokeTests.cs to validate installation prerequisites and configurations. - Created SetupWizard.cs for user interaction during the setup process, including folder selection and variable input. - Added build.ps1 script to automate the build process and run smoke tests. - Introduced compose.override.template.yml for Docker configuration management. - Defined setup.config.json to manage repository settings, prerequisites, and installation variables.
This commit is contained in:
1 parent
f6f3c402cc
commit
c19c77334f
7 files changed
+1139
No files matched your search
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"repository": {
|
||||
"url": "https://git.portal.se-cloud.de/Hannes/SE-LTD.git",
|
||||
"branch": "main",
|
||||
"folder": "%LOCALAPPDATA%\\SE-LTD"
|
||||
},
|
||||
"prerequisites": [
|
||||
{ "id": "code", "label": "Visual Studio Code", "executable": "Code.exe", "paths": ["%LOCALAPPDATA%\\Programs\\Microsoft VS Code\\Code.exe", "%ProgramFiles%\\Microsoft VS Code\\Code.exe", "%ProgramFiles(x86)%\\Microsoft VS Code\\Code.exe"], "help": "https://code.visualstudio.com/download" },
|
||||
{ "id": "wsl", "label": "Windows-Subsystem für Linux (WSL)", "executable": "wsl.exe", "probe": ["--version"], "help": "https://learn.microsoft.com/windows/wsl/install" },
|
||||
{ "id": "desktop", "label": "Docker Desktop", "executable": "Docker Desktop.exe", "paths": ["%ProgramFiles%\\Docker\\Docker\\Docker Desktop.exe", "%LOCALAPPDATA%\\Programs\\DockerDesktop\\Docker Desktop.exe"], "help": "https://docs.docker.com/desktop/setup/install/windows-install/" },
|
||||
{ "id": "docker", "label": "Docker Compose (Teil von Docker Desktop)", "executable": "docker.exe", "paths": ["%ProgramFiles%\\Docker\\Docker\\resources\\bin\\docker.exe", "%LOCALAPPDATA%\\Programs\\DockerDesktop\\resources\\bin\\docker.exe"], "probe": ["compose", "version"], "help": "https://docs.docker.com/desktop/setup/install/windows-install/" },
|
||||
{ "id": "git", "label": "Git für Windows", "executable": "git.exe", "paths": ["%ProgramFiles%\\Git\\cmd\\git.exe", "%LOCALAPPDATA%\\Programs\\Git\\cmd\\git.exe"], "probe": ["--version"], "help": "https://git-scm.com/install/windows" }
|
||||
],
|
||||
"variables": [
|
||||
{ "name": "JWT_SECRET", "label": "Schlüssel für Anmeldesitzungen", "type": "secret", "description": "Dieser Schlüssel schützt die Anmeldung. Der Assistent erzeugt ihn für dich." },
|
||||
{ "name": "ADMIN_USERNAME", "label": "Benutzername für die Anmeldung", "type": "template", "description": "Der Standard aus der Vorlage wird beibehalten." },
|
||||
{ "name": "ADMIN_EMAIL", "label": "E-Mail-Adresse des Administrators", "type": "email", "description": "Optional. Wenn du keine eigene Adresse eintragen möchtest, lass den Standard stehen." },
|
||||
{ "name": "ADMIN_PASSWORD", "label": "Passwort für die Weboberfläche", "type": "secret", "description": "Mit diesem Passwort meldest du dich später an. Übernimm den Vorschlag oder vergib ein eigenes Passwort." },
|
||||
{ "name": "ADMIN_NAME", "label": "Anzeigename des Administrators", "type": "template", "description": "Der Standard aus der Vorlage wird beibehalten." },
|
||||
{ "name": "MARIADB_ROOT_PASSWORD", "label": "Internes Datenbankpasswort", "type": "secret", "description": "SE-LTD verwendet dieses Passwort für den Zugriff auf die Datenbank. Übernimm im Normalfall den erzeugten Vorschlag." },
|
||||
{ "name": "MARIADB_PASSWORD", "label": "Ist das eine Bestandsanlage mit vorhandenen Controllern?", "type": "legacyPassword", "legacyValue": "3112", "description": "Wähle Ja, wenn vorhandene Controller weiterhin mit ihrem bisherigen Zugang schreiben müssen. Der Datenbank-Port wird dann im Netzwerk freigegeben. Bei einer neuen Anlage bleibt er lokal." },
|
||||
{ "name": "DB_PASSWORD_FALLBACK", "label": "Ersatzpasswort der Datenbank", "type": "sameAs", "source": "MARIADB_ROOT_PASSWORD", "description": "Der Assistent übernimmt automatisch das interne Datenbankpasswort, damit kein schwaches Ersatzpasswort stehen bleibt." },
|
||||
{ "name": "REDIS_PASSWORD", "label": "Passwort für den internen Zwischenspeicher", "type": "secret", "description": "Das Passwort wird nur von SE-LTD verwendet. Übernimm im Normalfall den erzeugten Vorschlag." },
|
||||
{ "name": "LEGACY_TREND_TIME_ZONE", "label": "Zeitzone der Bestands-Trenddaten", "type": "text", "description": "Für Anlagen in Deutschland lass Europe/Berlin stehen. Andernfalls trage die passende IANA-Zeitzone ein, z. B. Europe/Vienna." },
|
||||
{ "name": "VITE_API_PORT", "label": "Port der API", "type": "port", "description": "Lass den Port auf 18080, sofern er nicht von einem anderen Programm belegt ist." },
|
||||
{ "name": "CORS_ORIGIN", "label": "Soll SE-LTD von einem anderen Rechner erreichbar sein?", "type": "remoteAccess", "description": "Nein beschränkt die Weboberfläche und ihre APIs auf diesen Rechner. Ja veröffentlicht sie im Netzwerk und erlaubt Browserzugriffe aus allen Origins. Nutze das nur in einem vertrauenswürdigen Netz." }
|
||||
],
|
||||
"prepare": [
|
||||
{ "action": "checkout", "label": "Projekt von Git holen oder mit Git Pull aktualisieren" },
|
||||
{ "action": "template", "label": "Vorlage .env.example einlesen" }
|
||||
],
|
||||
"install": [
|
||||
{ "action": "dockerReady", "label": "Docker Desktop starten und Verbindung prüfen", "timeout": 180 },
|
||||
{ "action": "writeSetup", "label": "Lokale Installationseinstellungen schreiben" },
|
||||
{ "action": "command", "label": "Docker-Konfiguration prüfen", "tool": "docker", "arguments": ["compose", "--env-file", ".env", "config", "--quiet"], "timeout": 60 },
|
||||
{ "action": "command", "label": "Alle SE-LTD-Dienste bauen und starten", "tool": "docker", "arguments": ["compose", "--env-file", ".env", "up", "-d", "--build", "--wait", "--wait-timeout", "240"], "timeout": 2400 },
|
||||
{ "action": "http", "label": "Weboberfläche prüfen", "url": "http://127.0.0.1:{{WEB_PORT}}/", "timeout": 45 },
|
||||
{ "action": "http", "label": "API prüfen", "url": "http://127.0.0.1:{{API_PORT}}/api/health", "timeout": 45 },
|
||||
{ "action": "http", "label": "Collector prüfen", "url": "http://127.0.0.1:18110/health", "timeout": 45 }
|
||||
],
|
||||
"dockerContext": "desktop-linux",
|
||||
"webPort": 81,
|
||||
"composeTemplate": "compose.override.template.yml",
|
||||
"mariaDbInitDirectory": "docker/mariadb/init",
|
||||
"legacySqlPrefixes": [
|
||||
"CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY",
|
||||
"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'",
|
||||
"CREATE USER IF NOT EXISTS 'wago'@'%' IDENTIFIED BY",
|
||||
"GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX ON * . * TO 'wago'@'%' IDENTIFIED BY"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user