-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2083 from bcgov/2082-update-readme
[GWELLS-2082]DOCS** Update README
- Loading branch information
Showing
3 changed files
with
49 additions
and
37 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 |
---|---|---|
|
@@ -15,7 +15,9 @@ The application is being developed as an open source solution. | |
## Table of Contents | ||
|
||
1. [Using the GWELLS API](#Using-the-gwells-api) | ||
1. [DataBC Export](#databc-export) | ||
1. [Developing GWELLS](#Developing-gwells) | ||
* [Setup Prerequisites](#setup-prerequisites) | ||
* [Running the GWELLS application locally](#Running-the-GWELLS-application-locally) | ||
* [Authentication](#Authentication) | ||
* [Running tests](#Running-tests) | ||
|
@@ -59,40 +61,48 @@ If a new field(s) are needed for export, this export_databc.py has raw sql queri | |
|
||
## Developing GWELLS | ||
|
||
### Setup Prerequisites | ||
|
||
**Software Requirements** | ||
* Docker Desktop | ||
* Node | ||
|
||
**Actions to take**: | ||
|
||
- [Connecting to Minio](#connecting-to-minio) | ||
- [CSSO Authentication](#authentication) | ||
- You will need to login to [artifactory](https://artifacts.developer.gov.bc.ca/ui/login/) with your IDIR so a member of Sustainment Team can add you. | ||
|
||
### Connecting to Minio | ||
|
||
For gwells to interact with your local instance of Min.IO add the appropriate settings to your local machines `HOSTS` file: | ||
|
||
``` | ||
127.0.0.1 minio-public | ||
127.0.0.1 minio-private | ||
``` | ||
|
||
### Authentication | ||
|
||
Some GWELLS pages (submitting new well reports, adding or editing aquifers, or adding or editing qualified well drillers to the registry) require authentication. Authentication uses the Province's Single Sign-On system. A GWELLS team member can request access for collaborators if needed. | ||
|
||
|
||
### Running the GWELLS application locally | ||
|
||
[Clone the GWELLS repository](https://help.github.com/en/articles/cloning-a-repository), and build the [Docker](https://store.docker.com/search?type=edition&offering=community) image for the backend: | ||
* If using x86 (e.g. Intel-based Mac): | ||
```sh | ||
cd gwells/openshift/docker/backend | ||
docker build . --tag=gwells/backend | ||
``` | ||
* If using ARM (e.g. Apple Silicon): | ||
```sh | ||
cd gwells/openshift/docker/backend | ||
docker buildx build --platform=linux/amd64 . --tag=gwells/backend | ||
``` | ||
*Note:* you'll have to first enable experimental features in Docker Desktop (**Settings** > **Features in development** > **Experimental features** > **Access experimental features**). | ||
Login to Artifactory for pulling backend image: | ||
- [Clone the GWELLS repository](https://help.github.com/en/articles/cloning-a-repository) | ||
- From the gwells folder run `docker-compose up -d` | ||
|
||
Login to Artifactory for pulling the backend base image: | ||
```sh | ||
docker login -u <svc-usn> -p <svc-pwd> artifacts.developer.gov.bc.ca/g26e-backend-docker-local | ||
``` | ||
Replace svc-usn and svc-pwd with Artifactory service account credentials obtained from Openshift (under ally-tools secrets) | ||
Replace svc-usn and svc-pwd with Artifactory service account credentials obtained from Openshift (under artifacts-default-tulivf secrets) | ||
|
||
Then, run the application with Docker: | ||
```sh | ||
cd gwells | ||
docker-compose up | ||
``` | ||
### Connecting to Minio | ||
For gwells to interact with your local instance of Min.IO add the appropriate settings to your local machines `HOSTS` file: | ||
``` | ||
127.0.0.1 minio-public | ||
127.0.0.1 minio-private | ||
``` | ||
|
||
### Connecting to PGAdmin | ||
|
||
|
@@ -101,28 +111,24 @@ For gwells to interact with your local instance of Min.IO add the appropriate se | |
PG Admin is setup in the `docker-compose up` and requires no additional installations | ||
|
||
Steps: | ||
1. connect to Pgadmin through [localhost](http://localhost:5050) | ||
1. Login using username: `[email protected]`, password: `admin`. | ||
1. Connect to Pgadmin through [localhost](http://localhost:5050) | ||
1. Login using username: `[email protected]`, password: `admin` | ||
1. Right click `Server` -> `Register` -> `Server` | ||
1. Enter any meaningful name in `Name` | ||
1. Under the `Connection` tab supply the following values | ||
|
||
|Field|Value| | ||
| --- | --- | | ||
| Host name / address | `db` | ||
| Port | `5432` | | ||
| Username | `gwells` | | ||
| Password | `test1` | | ||
| Field | Value | | ||
| --- | --- | | ||
| Host name / address | `db` | | ||
| Port | `5432` | | ||
| Username | `gwells` | | ||
| Password | `test1` | | ||
|
||
Visit the following links to browse the API and frontend applications: | ||
|
||
* Django REST API development server: http://localhost:8000/gwells/api/ | ||
* Vue frontend development server: http://localhost:8080/ | ||
|
||
### Authentication | ||
Some GWELLS pages (submitting new well reports, adding or editing aquifers, or adding or editing qualified well drillers to the registry) require authentication. Authentication uses the Province's Single Sign-On system. A GWELLS team member can request access for collaborators if needed. | ||
|
||
### Running tests: | ||
|
||
Django unit tests: | ||
|
@@ -194,3 +200,9 @@ Issues are tracked on the [Water Jira board](https://apps.nrs.gov.bc.ca/int/jira | |
## License | ||
|
||
Code released under the [Apache License, Version 2.0](https://github.com/bcgov/gwells/blob/master/LICENSE). | ||
|
||
## Additional Documentation | ||
More documentation for the repository can be found in the following places | ||
- [Frontend](/app/frontend/README.md) | ||
- [OpenShift](/openshift/README.md) | ||
- [Tests](/tests/api-tests/README.md) |
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