Skip to content

Commit 3ca92db

Browse files
committed
updated docs
1 parent 681cf4f commit 3ca92db

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,17 @@ You may also need to monitor the ExaBGP and renew the commands after restart / s
5555
* [Local database instalation notes](./docs/DB_LOCAL.md)
5656

5757
## Change Log
58+
- 1.0.2 - fixed bug in IPv6 Flowspec messages
5859
- 1.0.1 . minor bug fixes
59-
- 1.0.0 . ExaAPI and Guarda modules moved outside of the project to their own repositories. ExaAPI is now available also as a [pip package exabgp-process](https://pypi.org/project/exabgp-process/). New format of message for ExaAPI - now sends information about user (author of rule) for logging purposes. There are now limits for rules for organization and overall limit for the instalation. Database changed / migration is required.
60+
- 1.0.0 . Major changes
61+
- Limits for nuber of rules in the system introduced. There are now limits for rules for organization and overall limit for the instalation. Database changed / migration is required. Migrating the database to version 1.0.x is a bit more complicated, you need to link existing rules to organizations. [A more detailed description is in a separate document](./docs/DB_MIGRATIONS.md).
62+
- Rules are now tied to organization. If the user belongs to more than one organization, the organization for the session must be selected after login.
63+
- Bulk import for users enabled for admin.
64+
- Introduced Swagger docs for API on the local system. Just open /apidocs url.
65+
- New format of message for ExaAPI - now sends information about author of rule (user) for logging purposes.
66+
- ExaAPI and Guarda modules moved outside of the project.
67+
- ExaAPI is now available as a [pip package exabgp-process](https://pypi.org/project/exabgp-process/), with own [github repostiory](https://github.com/CESNET/exabgp-process).
68+
- Watch of exabgp restart can be still done by guarda service - see docs. Or it can be done by override of the exabgp service settings.
6069
- 0.8.1 application is using Flask-Session stored in DB using SQL Alchemy driver. This can be configured for other drivers, however server side session is required for the application proper function.
6170
- 0.8.0 - API keys update. **Run migration scripts to update your DB**. Keys can now have expiration date and readonly flag. Admin can create special keys for certain machinnes.
6271
- 0.7.3 - New possibility of external auth proxy.

docs/DB_MIGRATIONS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# How to Upgrade the Database
2+
3+
## General Guidelines
4+
Migrations can be inconsistent. To avoid issues, we removed migrations from git repostory. To start the migration on your server, it is recomended reset the migration state on the server and run the migration based on the updated database models when switching application versions via Git.
5+
6+
```bash
7+
rm -rf migrations/
8+
```
9+
10+
```SQL
11+
DROP TABLE alembic_version;
12+
```
13+
14+
```bash
15+
flask db init
16+
flask db migrate -m "Initial migration based on current DB state"
17+
flask db upgrade
18+
```
19+
20+
## Steps for Upgrading to v1.0.x
21+
Limits for number of rules were introduced. Some database engines (Mariadb 10.x for example) have issue to set Non Null foreigin key to 0 and automatic migrations fail. The solution may be in diferent version (Mariadb 11.x works fine), or to set limits in db manually later.
22+
23+
To set the limit to 0 for existing organizations run
24+
25+
```SQL
26+
UPDATE organization
27+
SET limit_flowspec4 = 0, limit_flowspec6 = 0, limit_rtbh = 0
28+
WHERE limit_flowspec4 IS NULL OR limit_flowspec6 IS NULL OR limit_rtbh IS NULL;
29+
```
30+
31+
In all cases we need later assign rules to organizations. There's an admin endpoint for this:
32+
33+
`https://yourexafs.url/admin/set-org-if-zero`
34+
35+
Or you can start with clean database and manually migrate data by SQL dump later. Feel free to contact [email protected] if you need help with the DB migration to 1.0.x.

0 commit comments

Comments
 (0)