Skip to content

Commit

Permalink
Merge pull request #171 from raphaelrpl/b-1.0
Browse files Browse the repository at this point in the history
📚 Fix docs steps to generate minimal db instance
  • Loading branch information
raphaelrpl authored Sep 1, 2022
2 parents 553a7bd + f2607c9 commit c27326d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
9 changes: 8 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ Changes
=======


Version 1.0.0-alpha2 (2022-09-01)
---------------------------------

- Fix documentation RUNNING.rst
- Fix migration conflict with LCCS-DB instance `#169 <https://github.com/brazil-data-cube/bdc-catalog/issues/169>`_.


Version 1.0.0-alpha1 (2022-07-21)
--------------------------
---------------------------------

- Add authorization control to items `#78 <https://github.com/brazil-data-cube/bdc-catalog/issues/78>`_.
- Review JSONSchemas for collection metadata - instrument key `#68 <https://github.com/brazil-data-cube/bdc-catalog/issues/68>`_.
Expand Down
30 changes: 27 additions & 3 deletions RUNNING.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
..
This file is part of BDC-Catalog.
Copyright (C) 2019-2020 INPE.
Copyright (C) 2019-2022 INPE.
BDC-Catalog is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -9,21 +9,45 @@
Running BDC-Catalog in the Command Line
=======================================

The Brazil Data Cube Catalog system uses the `Alembic Environment <https://alembic.sqlalchemy.org/en/latest/>`_
to upgrade/downgrade versions. If you would like to use it as experimental environments (dev only), you may consider to follow
`Development Mode`.

For production environment, we strongly recommend you to adopt alembic migration way to be able to support improvements.


Development Mode
----------------

**This step is not recommended for production environments. It will not generate alembic migration tree.**

For development purposes, we have prepared a command line `bdc-db db create-schema` to create all definitions for BDC-Catalog::

export SQLALCHEMY_DATABASE_URI="postgresql://postgres:password@localhost:5432/bdcdb"
bdc-db db init
bdc-db db create-namespaces
bdc-db db create-extension-postgis
lccs-db db create-extension-hstore
bdc-db db create-schema


Creating database definition
----------------------------

**1.** Create a PostgreSQL database and enable the PostGIS extension::
**1.** Create a PostgreSQL database and enable the required extensions (`postgis`, `hstore`)::

SQLALCHEMY_DATABASE_URI="postgresql://postgres:password@localhost:5432/bdcdb" \
bdc-db db init

SQLALCHEMY_DATABASE_URI="postgresql://postgres:password@localhost:5432/bdcdb" \
bdc-db db create-namespace
bdc-db db create-namespaces

SQLALCHEMY_DATABASE_URI="postgresql://postgres:password@localhost:5432/bdcdb" \
bdc-db db create-extension-postgis

SQLALCHEMY_DATABASE_URI="postgresql://postgres:password@localhost:5432/bdcdb" \
lccs-db db create-extension-hstore


**2.** After that, run ``BDC-DB`` command to prepare the Brazil Data Cube data model::

Expand Down
2 changes: 1 addition & 1 deletion bdc_catalog/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"""Version information for BDC-Catalog."""


__version__ = '1.0.0-alpha1'
__version__ = '1.0.0-alpha2'

0 comments on commit c27326d

Please sign in to comment.