Skip to content

Commit

Permalink
Added migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mmabrouk committed Jan 18, 2024
1 parent 828b3b2 commit 28b17b5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"group": "Self-host agenta",
"pages": [
"self-host/host-locally",
"self-host/migration",
{
"group": "Deploy Remotely",
"pages": [
Expand Down
50 changes: 50 additions & 0 deletions docs/self-host/migration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Migration
description: 'This is a step-by-step guide for upgrading to the latest version of Agenta'
---

## Upgrading to the Latest Version

To upgrade to the latest version of Agenta, execute the following command:

```
docker compose -f docker-compose.gh.yml up -d --pull always
```

This command instructs Docker to fetch and use the latest version of the Agenta image.

## Database Migration with Beanie

This guide offers detailed steps for performing database migrations in the Agenta backend system, using Beanie, a MongoDB ODM (Object Document Mapper) for Python. You can learn more about Beanie [here](https://github.com/roman-right/beanie).

### Setting Up Beanie

To install a custom version of Beanie:

```
git clone <https://github.com/mmabrouk/beanie>
cd beanie
pip install .
```

### Migrating from Version 0.7 to 0.8

1. **Accessing the Migration Directory**: First, navigate to the migration directory:

```
cd agenta_backend/migrations/17_01_24_pydantic_and_evaluations
```

2. **Executing the Beanie Migration**: Run the migration script as follows:

```
beanie migrate --no-use-transaction -uri 'mongodb://username:password@localhost' -db 'agenta_v2' -p .
```

<Warning>
Make sure to replace `username`, `password`, and other relevant placeholders with your actual credentials, unless you're using default settings.
</Warning>

0 comments on commit 28b17b5

Please sign in to comment.