Skip to content

Commit 2d558d8

Browse files
authored
Merge pull request #2076 from oracle-devrel/open_source_bp_10
Adding Geoserver example OCI PostgreSQL + cleaning files
2 parents a6594cf + 7cb51f2 commit 2d558d8

File tree

11 files changed

+198
-2
lines changed

11 files changed

+198
-2
lines changed

data-platform/open-source-data-platforms/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Open Source Data Platforms continue to extend the Oracle Data Platform with Key
66
- OCI PostgreSQL
77
- OCI Cache (Redis, Valkey)
88
- OCI Data Flow (Apache Spark)
9-
- OCI Streaming (Kafka)
9+
- OCI Streaming
10+
- OCI Streaming with Apache Kafka
1011
- OCI OpenSearch
1112
- OCI NoSQL
1213

data-platform/open-source-data-platforms/oci-postgresql/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ When you are looking to establish an OCI PostgreSQL instance, connect to it, and
3737
- [Send notifications based on pg_stat_activity in OCI PostgreSQL](https://github.com/andreumdorokhinum/oci_pg_stat_activity)
3838
- [GitLab & Standalone Managed PostgreSQL on OCI](https://github.com/andreumdorokhinum/oci_pg_with_gitlab)
3939
- [Use CRON as scheduler for OCI PostgreSQL](https://github.com/andreumdorokhinum/oci_pg_with_unix_cron)
40+
- [Integrate Geoserver and PostGIS using OCI Database with PostgreSQL](https://github.com/oracle-devrel/technology-engineering/tree/main/data-platform/open-source-data-platforms/oci-postgresql/code-examples/postgis-geoserver)
4041

4142
# License
4243

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2025 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Connect OCI PostgreSQL to Oracle Analytics Cloud
2+
3+
Reviewed: 30.09.2025
4+
5+
# When to use this asset?
6+
7+
Developers aiming to use PostGIS as an extension on OCI Database with PostgreSQL, and connecting, loading the spatial data into Geoserver.
8+
9+
# How to use this asset?
10+
11+
Open the postgis-geoserver.md file and follow the steps carefully.
12+
13+
# Pre-requisites:
14+
15+
- Create a VCN with public and private subnet
16+
- Create an OCI PostgreSQL database instance in the private subnet, enable PostGIS extension in the configuration.
17+
- Create a Linux instance in public subnet, same VCN
18+
- Add port 5432 and 8080 to the private subnet security list
19+
20+
# License
21+
22+
Copyright (c) 2025 Oracle and/or its affiliates.
23+
24+
Licensed under the Universal Permissive License (UPL), Version 1.0.
25+
26+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE) for more details.
46.9 KB
Loading
81.1 KB
Loading
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Integrate Geoserver and PostGIS using OCI Database with PostgreSQL
2+
3+
# Prerequisites
4+
- Oracle Linux 9 in public subnet, same VCN as the PostgreSQL database
5+
- OCI Database with PostgreSQL and PostGIS extensions enabled in private subnet
6+
- Open ports for PostgreSQL and Geoserver (8080)
7+
8+
9+
# Install docker
10+
```
11+
sudo yum install -y yum-utils
12+
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
13+
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
14+
```
15+
16+
# Open ports
17+
```
18+
sudo firewall-cmd --permanent --add-port=8080/tcp
19+
sudo firewall-cmd --reload
20+
```
21+
22+
# Pull and Run Docker
23+
```
24+
sudo systemctl start docker
25+
sudo docker pull docker.osgeo.org/geoserver:2.28.x
26+
sudo docker run -it -p8080:8080 docker.osgeo.org/geoserver:2.28.x
27+
```
28+
# Open Geoserver
29+
Open GeoServer using the below public IP/port. Log in. GeoServer's default username and password: Username: admin. Password: geoserver
30+
```
31+
http://[YOUR PUBLIC IP]:8080/geoserver/
32+
```
33+
34+
# Optional. Install Geoserver without docker.
35+
Link: https://freegistutorial.com/how-to-install-geoserver-in-oracle-linux-9/
36+
37+
# Load data into OCI Database with PostgreSQL
38+
These steps describe an example of loading NYC spatial data into OCI Database with PostgreSQL. The steps use PgAdmin as tool.
39+
40+
1. Download and install PgAdmin on your local machine. [Download here](https://www.pgadmin.org/).
41+
2. Connect to OCI Database with PostgreSQL using a jumphost (VM in public subnet). [See steps here](https://docs.oracle.com/en/learn/postgresql-pgadmin4-connection/index.html).
42+
3. Once connected using PgAdmin, [follow the steps here](https://postgis.net/workshops/postgis-intro/loading_data.html) to load example NYC data
43+
44+
# Add a new Store in Geoserver
45+
- Database = Name of database which includes the PostGIS extension and spatial tables, like 'nyc'.
46+
- Schema = public
47+
- Host: the private IP of the OCI Database with PostgreSQL instance
48+
- Port: 5432
49+
- Username/password: add your username and password when you created the OCI Database with PostgreSQL
50+
- SSL MODE = Require
51+
- Mark the "Enabled" button to enable the store once you save/apply the connection
52+
53+
![image](images/img_2_geo.png)
54+
55+
# Add a new Layer and review preview
56+
- Once the connection is established, click on "Layers" and following "add a new layer"
57+
- Choose your just added store, like "ne:postgis_bp"
58+
59+
![image](images/img_1_geo.png)
60+
61+
- The spatial tables should appear. Click on Publish.
62+
- Click on Layer Preview and search for the Layer your just published. Click on on any of the formats or on "OpenLayers" to preview.

data-platform/open-source-data-platforms/oci-streaming-with-apache-kafka/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ Reviewed: 18.09.2025
1919
# Reusable Assets
2020

2121
- [Kafka UI & Kafka Connect Setup with OCI OpenSearch](https://github.com/oracle-devrel/technology-engineering/tree/main/data-platform/open-source-data-platforms/oci-streaming-with-apache-kafka/code-examples/kafka-ui-connect-setup-with-oci-opensearch)
22+
- [OCI GoldenGate connection to OCI Streaming with Apache Kafka](https://github.com/oracle-devrel/technology-engineering/tree/main/data-platform/open-source-data-platforms/oci-streaming-with-apache-kafka/code-examples/goldengate_oci_streaming-with-apache-kafka)
2223

2324
# License
2425

2526
Copyright (c) 2025 Oracle and/or its affiliates.
2627

2728
Licensed under the Universal Permissive License (UPL), Version 1.0.
2829

29-
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE.txt) for more details.
30+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE.txt) for more details.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2025 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.

0 commit comments

Comments
 (0)