Skip to content

Commit

Permalink
Merge pull request #2083 from bcgov/2082-update-readme
Browse files Browse the repository at this point in the history
[GWELLS-2082]DOCS** Update README
  • Loading branch information
LocalNewsTV authored Dec 15, 2023
2 parents 04e4a52 + bce6aae commit 1c01e63
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- [ ] The title of the PR is accurate
- [ ] The title includes the type of change [`HOTFIX`, `FEATURE`, `etc`]
- [ ] The PR title includes the ticket number in format of `[GWELLS-###]`
- [ ] Documentation is updated to reflect change
- [ ] Documentation is updated to reflect change [`README`, `functions`, `team documents`]

# Description

Expand Down
82 changes: 47 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion app/database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ The administrator account details are recorded as an OpenShift Secret (i.e. PROD
Currently, these values are used as part of the automatic step to create the admin account:
`python manage.py post-deploy`

This is currently in the ./scripts/gwells-deploy.sh script and called in the mid-lifecycle hook; this will be moved into the Pipeline, at the approate Stage.
This is currently in the ./scripts/gwells-deploy.sh script and called in the mid-lifecycle hook; this will be moved into the Pipeline, at the appropriate Stage.

0 comments on commit 1c01e63

Please sign in to comment.