docs: publish bilingual manual standalone installation guides
This commit is contained in:
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
# Check the host prerequisites for the manual standalone installation path.
|
||||
set -euo pipefail
|
||||
|
||||
fail() {
|
||||
echo "check-standalone-prerequisites.sh: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
require_command() {
|
||||
command -v "$1" >/dev/null 2>&1 || fail "required command is missing: $1"
|
||||
}
|
||||
|
||||
require_command git
|
||||
require_command docker
|
||||
require_command bash
|
||||
require_command curl
|
||||
require_command openssl
|
||||
require_command shasum
|
||||
|
||||
docker info >/dev/null 2>&1 || fail "Docker Engine is not reachable; start Docker Desktop or the Docker service"
|
||||
|
||||
compose_version=$(docker compose version --short 2>/dev/null) || {
|
||||
fail "Docker Compose v2 is not available as 'docker compose'"
|
||||
}
|
||||
[[ -n "$compose_version" ]] || fail "Docker Compose returned no version"
|
||||
|
||||
server_arch=$(docker version --format '{{.Server.Arch}}' 2>/dev/null) || {
|
||||
fail "could not determine the Docker server architecture"
|
||||
}
|
||||
server_arch_lower=$(printf '%s' "$server_arch" | tr '[:upper:]' '[:lower:]')
|
||||
case "$server_arch_lower" in
|
||||
amd64|x86_64|arm64|aarch64) ;;
|
||||
*) fail "unsupported Docker server architecture: $server_arch (expected amd64 or arm64)" ;;
|
||||
esac
|
||||
|
||||
printf 'Manual standalone prerequisites passed.\n'
|
||||
printf ' Docker Compose: %s\n' "$compose_version"
|
||||
printf ' Docker architecture: %s\n' "$server_arch"
|
||||
printf ' Host shell: %s\n' "$(uname -s)/$(uname -m)"
|
||||
|
||||
if command -v tht >/dev/null 2>&1; then
|
||||
printf ' tht: %s\n' "$(command -v tht)"
|
||||
else
|
||||
printf ' tht: not installed yet (run bash scripts/install-tht.sh next)\n'
|
||||
fi
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify an already configured and running manual standalone installation.
|
||||
set -euo pipefail
|
||||
|
||||
fail() {
|
||||
echo "verify-standalone-install.sh: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
[[ $# -eq 1 ]] || fail "usage: $0 /absolute/path/to/thothii-installation.yaml"
|
||||
installation=$1
|
||||
[[ "$installation" = /* ]] || fail "installation path must be absolute"
|
||||
[[ -f "$installation" ]] || fail "installation descriptor not found: $installation"
|
||||
|
||||
command -v tht >/dev/null 2>&1 || fail "tht is not on PATH; run bash scripts/install-tht.sh first"
|
||||
|
||||
printf '%s\n' 'Running read-only installation doctor...'
|
||||
tht --installation "$installation" doctor --json
|
||||
printf '%s\n' 'Installation status:'
|
||||
tht --installation "$installation" status
|
||||
printf '%s\n' 'Manual standalone installation verification passed.'
|
||||
@@ -59,6 +59,8 @@ verify_navigation() {
|
||||
local path
|
||||
for path in \
|
||||
install/first-start.md \
|
||||
install/standalone-manual-it.md \
|
||||
install/standalone-manual-en.md \
|
||||
operations/workspaces.md \
|
||||
operations/database-management.md \
|
||||
guida-utente.md \
|
||||
@@ -70,6 +72,26 @@ verify_navigation() {
|
||||
echo "Current documentation navigation contract passed"
|
||||
}
|
||||
|
||||
verify_standalone_installation_guides() {
|
||||
for guide in docs/install/standalone-manual-it.md docs/install/standalone-manual-en.md; do
|
||||
require_file "$guide"
|
||||
for text in \
|
||||
'git clone https://git.tylconsulting.it/mptyl/ThothII.git' \
|
||||
'scripts/check-standalone-prerequisites.sh' \
|
||||
'scripts/install-tht.sh' \
|
||||
'tht setup --profile local --shell-mode full --shell-default-locale en' \
|
||||
'scripts/verify-standalone-install.sh' \
|
||||
'Docker Hub' \
|
||||
'Gate A' \
|
||||
'Gate B'; do
|
||||
require_text "$guide" "$text"
|
||||
done
|
||||
done
|
||||
require_file scripts/check-standalone-prerequisites.sh
|
||||
require_file scripts/verify-standalone-install.sh
|
||||
echo "Manual standalone installation guides contract passed"
|
||||
}
|
||||
|
||||
verify_install_and_workspace_guides() {
|
||||
local install='docs/install/first-start.md'
|
||||
local workspace='docs/operations/workspaces.md'
|
||||
@@ -134,6 +156,7 @@ PY
|
||||
verify_all() {
|
||||
verify_compose_topology
|
||||
verify_navigation
|
||||
verify_standalone_installation_guides
|
||||
verify_install_and_workspace_guides
|
||||
verify_examples
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user