Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Commit

Permalink
Doc updates (#38)
Browse files Browse the repository at this point in the history
* update docs for 0.6
  • Loading branch information
Joe Linoff authored Aug 27, 2021
1 parent 54562e6 commit df5c0f2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ $ pipenv run grape create -v -g 4600 -n example
This will create two docker containers: `examplegr` which is the
grafana server and `examplepg` which is the postgresql server.

If the docker containers were previously killed because of something
like a system crash, `grape create` will restart them in the same
state. The grafana dashboards and postgresql database contents will
not be lost. Beware that the `grape delete` operation _will_ destroy the
state data.

It will also create and map the local `example/pg/mnt/pgdata` directory
to the database container to save database results and
`example/gr/mnt/grdata` to the grafana container to save the grafana
Expand Down
2 changes: 1 addition & 1 deletion grape/__version__
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.6.1
28 changes: 23 additions & 5 deletions grape/create.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
'''
Creates a docker containers for grafana and a docker container for
postgres.
It then sets the datasource in the grafana server and creates a local
directory to save the postgres state.
Creates a docker container for grafana, a docker container for
postgresql and connects them so that the postgresql container
database becomes a datasource in the grafana container.
The container names have a pg and gr suffix to denote which
service they are running.
It also creates a local directory to save the
postgres database state and the grafana dashboard state
and creates startup scripts for each dashboard in the local
directory.
If the docker containers were previously killed because of something
like a system crash, `grape create` will restart them in the same
state. The grafana dashboards and postgresql database contents will
not be lost. Beware that the `grape delete` operation will destroy the
state data.
The local directory has the same name as the name of the project. It
container two subdirectories: gr for grafana dashboard data and pg for
postgresql data. There is a `start.sh` script in each of them for their
respective containers. There are also other directories that are
specific to the storage systems for grafana and postgresql.
'''
import argparse
import os
Expand Down
3 changes: 2 additions & 1 deletion grape/delete.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'''
The delete operation deletes all artifacts created by the create
operation.
operation. All grafana dashboard and postgresql database data is
deleted.
'''
import argparse
import os
Expand Down

0 comments on commit df5c0f2

Please sign in to comment.