Skip to content

add installation and configuration script. - #682

Merged
jealous merged 1 commit into
mainfrom
feature/installScript
Dec 6, 2025
Merged

jealous merged 1 commit into
mainfrom
feature/installScript

Conversation

@jealous

@jealous jealous commented Dec 4, 2025 •

Copy link
Copy Markdown
Contributor

Purpose of the change

Add a script to help the user install memmachine, neo4j and create the configuration file.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g., code style improvements, linting)
  • Documentation update
  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)
  • Security (improves security without changing functionality)

How Has This Been Tested?

  • Unit Test
  • Integration Test
  • End-to-end Test
  • Test Script (please provide)
  • Manual verification (list step-by-step instructions)

Checklist

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

@jealous jealous self-assigned this Dec 4, 2025
@jealous
jealous marked this pull request as draft December 4, 2025 07:15
Comment thread .github/workflows/build-python.yml Fixed
@jealous
jealous force-pushed the feature/installScript branch from 490c4c6 to d9c641e Compare December 4, 2025 07:18
Comment thread .github/workflows/build-python.yml Fixed
@jealous
jealous force-pushed the feature/installScript branch from d9c641e to d4df5c7 Compare December 4, 2025 07:19
@jealous
jealous requested a review from Copilot December 4, 2025 07:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-configure CLI 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 YamlSerializableMixin to 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.

@jealous
jealous force-pushed the feature/installScript branch 22 times, most recently from 26136d6 to 4fdc892 Compare December 4, 2025 21:31
@jealous
jealous force-pushed the feature/installScript branch 8 times, most recently from 1f401f8 to f5eb6bf Compare December 5, 2025 01:35

jobs:
build:
runs-on: ubuntu-latest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a future todo i'd like the CI to run this on all OSs. I can work on it.

Comment on lines +181 to +220
- 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

@o-love o-love Dec 5, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jealous
jealous marked this pull request as ready for review December 5, 2025 02:17
@tianAndrew tianAndrew mentioned this pull request Dec 5, 2025
8 of 26 tasks
@jealous
jealous force-pushed the feature/installScript branch 8 times, most recently from d980db9 to 46dbebe Compare December 5, 2025 21:52
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
@jealous
jealous force-pushed the feature/installScript branch from 46dbebe to 8125688 Compare December 5, 2025 21:53
@jealous
jealous merged commit 4dda88b into main Dec 6, 2025
40 checks passed
"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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be here. See 23aced4

@o-love
o-love deleted the feature/installScript branch December 8, 2025 18:19
o-love pushed a commit that referenced this pull request Jan 23, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants