-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |