Repository navigation
add installation and configuration script. - #682
Conversation
490c4c6 to
d9c641e
Compare
d9c641e to
d4df5c7
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds an installation and configuration wizard for MemMachine that automates Neo4j setup and creates configuration files. The wizard supports Windows, macOS, and Linux platforms, handling platform-specific installation procedures for Neo4j and guiding users through interactive configuration of language models, embedders, and server settings.
Key Changes
- New interactive configuration wizard (
memmachine-configureCLI command) that prompts users for provider selection (OpenAI/Bedrock/Ollama) and generates YAML configuration files - Platform-specific Neo4j installation logic for Windows (downloads JDK and Neo4j), macOS (uses Homebrew), and Linux (uses system package managers apt/dnf/yum)
- Enhanced configuration classes with YAML serialization support via
YamlSerializableMixinto enable writing configurations back to files
Reviewed changes
Copilot reviewed 38 out of 39 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/memmachine/installation/memmachine_configure.py | Main installer implementation with platform-specific Neo4j installation and setup logic |
| src/memmachine/installation/configuration_wizard.py | Interactive wizard for gathering user input and generating configuration files |
| src/memmachine/installation/utilities.py | Shared constants, enums, and utility functions for installation scripts |
| src/memmachine/common/configuration/mixin_confs.py | New mixin classes for YAML serialization and metrics factory management |
| src/memmachine/common/configuration/init.py | Added ServerConf class and to_yaml() method to Configuration |
| src/memmachine/server/app.py | Updated to load configuration from standard location and use ServerConf |
| pyproject.toml | Added psutil dependency and memmachine-configure CLI entry point |
| .github/workflows/installation-test.yml | New CI workflow to test installation across platforms |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
26136d6 to
4fdc892
Compare
1f401f8 to
f5eb6bf
Compare
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
As a future todo i'd like the CI to run this on all OSs. I can work on it.
| - name: Wait for server to be ready | ||
| shell: bash | ||
| run: | | ||
| set -eo pipefail | ||
|
|
||
| SERVER_URL="http://127.0.0.1:8080/api/v2/projects/list" | ||
|
|
||
| echo "Waiting for server to be ready..." | ||
| max_attempts=12 # 12 × 10 sec = 120 sec | ||
| attempt=1 | ||
|
|
||
| while true; do | ||
| echo "Attempt $attempt/$max_attempts — checking server..." | ||
|
|
||
| # Capture HTTP body and code separately (portable!) | ||
| http_code=$(curl -X POST -s -o curl_body.tmp -w "%{http_code}" "$SERVER_URL" || true) | ||
| body=$( [ -f curl_body.tmp ] && cat curl_body.tmp || echo "empty body" ) | ||
| rm -f curl_body.tmp | ||
|
|
||
| if [ "$http_code" = "200" ]; then | ||
| echo "Server is ready!" | ||
| echo "===== Server Response =====" | ||
| echo "$body" | ||
| break | ||
| fi | ||
|
|
||
| if [ "$attempt" -ge "$max_attempts" ]; then | ||
| echo "Server did not become ready after 2 minutes." | ||
| echo "===== Last HTTP Response =====" | ||
| echo "HTTP $http_code" | ||
| echo "$body" | ||
| echo "" | ||
| echo "===== Server Logs =====" | ||
| cat server.log 2>/dev/null || echo "(No server.log found)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| attempt=$((attempt+1)) | ||
| sleep 10 | ||
| done |
There was a problem hiding this comment.
It might be nice to create a simple tool to wait for server ready that can be reused through the CI instead of duplicating code.
Maybe for QA.
There was a problem hiding this comment.
It would be the best if QA have some smoke test. Or maybe we don't need this install test at all. It should be a part of the smoke test.
d980db9 to
46dbebe
Compare
Adds an installation and configuration wizard for MemMachine that automates Neo4j setup and creates configuration files. The wizard supports Windows, macOS, and Linux platforms, handling platform-specific installation steps for Neo4j and guiding users through interactive configuration of language models, embedders, and server settings. Key Changes - Add new interactive configuration wizard (`memmachine-configure` CLI) that prompts users for provider selection (OpenAI/Bedrock/Ollama) and generates YAML configuration files - Implement platform-specific Neo4j installation logic for Windows (downloads JDK and Neo4j), macOS (Homebrew), and Linux (apt/dnf/yum) - Enhance configuration classes with YAML serialization via `YamlSerializableMixin` to enable writing configurations back to files
46dbebe to
8125688
Compare
| "aws_secret_access_key": aws_secret_access_key, | ||
| "aws_session_token": aws_session_token, | ||
| "aws_region": aws_region, | ||
| "model": "openai.gpt-oss-20b-1:0", |
Add installation and configuration wizard Adds an installation and configuration wizard for MemMachine that automates Neo4j setup and creates configuration files. The wizard supports Windows, macOS, and Linux platforms, handling platform-specific installation steps for Neo4j and guiding users through interactive configuration of language models, embedders, and server settings. Key Changes - Add new interactive configuration wizard (`memmachine-configure` CLI) that prompts users for provider selection (OpenAI/Bedrock/Ollama) and generates YAML configuration files - Implement platform-specific Neo4j installation logic for Windows (downloads JDK and Neo4j), macOS (Homebrew), and Linux (apt/dnf/yum) - Enhance configuration classes with YAML serialization via `YamlSerializableMixin` to enable writing configurations back to files
Purpose of the change
Add a script to help the user install memmachine, neo4j and create the configuration file.
Type of change
How Has This Been Tested?
Checklist
Maintainer Checklist