Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OECC demo #3

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions examples/OECC/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# OpenEdge Command Center #

edselg marked this conversation as resolved.
Show resolved Hide resolved
Demo scripts to setup an OpenEdge Command Center environment with support for OpenTelemetry metrics.

The scripts can be run on a virtual machine running Ubuntu Linux 22.04.
The VM could be created on AWS, Azure or other virtualization environment.
Scripts run commands to detect the IP address of the machine.

### Requirements
* Ubuntu Linux 22.04
* user with sudo access
* OpenEdge media:
* PROGRESS_OE_12.8.3_LNX_64.tar.gz
* PROGRESS_OECC_SERVER_1.3.0_LNX_64.tar.gz
edselg marked this conversation as resolved.
Show resolved Hide resolved
* PROGRESS_OECC_AGENT_1.3.0_LNX_64.bin
* Reponse file for OpenEdge installation:
* response_12.8.3.ini
* Products:
* OE Adv. Ent. RDBMS
* 4GL Development System
* Progress ProdAS for OE

**Notes:**
* You can use the OpenEdge-Samples/examples/OECC/config/response_12.8.3.ini file as a template and specify the control codes in the file.
edselg marked this conversation as resolved.
Show resolved Hide resolved

### Components
The infrastructure uses multiple components. To simplify the deployment, it uses a single virtual machine with some components running at the OS level and others running as a container using Docker.

* Ubuntu Virtual Machine
* OpenEdge Database
edselg marked this conversation as resolved.
Show resolved Hide resolved
* PAS for OpenEdge
* OpenEdge Command Center agent
* Docker
edselg marked this conversation as resolved.
Show resolved Hide resolved
* OpenEdge Command Center server
* MongoDB
* Prometheus
* Grafana

![Components](./images/diagram.png)

### Steps

#### Preparing the installation with the preequisites
edselg marked this conversation as resolved.
Show resolved Hide resolved
1. Create /install directory used for the installation files.
~~~
sudo mkdir -p /install
sudo chown $USER /install
~~~

2. Copy the OpenEdge media files and the response file to /install.

#### Setting up the environment

1. Clone the OpenEdge-Samples repo:
~~~
cd
git clone https://github.com/progress/OpenEdge-Samples.git
~~~

2. Run 'setup.sh' in the OECC/scripts directory. Script uses "sudo" to perform administrator tasks.
~~~
cd ~/OpenEdge-Samples/examples/OECC
./scripts/setup.sh
~~~

#### Testing the environment

1. Test the configuration.
~~~
./scripts/test.sh
~~~

2. Access OpenEdge Command Center via a web browser:
* http://<host-machine>:8000
* Use admin/admin to login

3. Access the PAS for OpenEdge instance via a web browser:
* http://<host-machine>:8810
* http://<host-machine>:8810/web/customer.p

4. Access Prometheus via a web browser:
* http://<host-machine>:9090
* Use DB_ in the Expression field to query for metrics for the OpenEdge database
* Use PASOE_ in the Expression field to query for metrics for PAS for OpenEdge

5. Access Grafana via a web browser:
* http://<host-machine>:3000
* Use admin/admin to login

**Notes:**
* The setup script, adds /etc/rc.local to start the configuration on startup of the machine. You can also use "./scripts/start.sh" and "./scripts/stop.sh" to manually start and stop the configuration.
edselg marked this conversation as resolved.
Show resolved Hide resolved

### Creating a Dasboard in Grafana
edselg marked this conversation as resolved.
Show resolved Hide resolved

**Steps**

1. Click on DATA SOURCES then on Prometheus to create a data source with the following values:
* Prometheus server URL: http://prometheus:9090
* Prometheus is a reference to a service in the docker-compose.yaml file and can be used as a hostname.
* Scroll down and click on Save & Test

2. Click on Home then on DASHBOARDS to create a dashboard.
3. Click on Add visualization to add a visualization for an OpenEdge database metric.
* Select Prometheus as the data source.
* Click on "Select metric" and click on Open.

![Selecting a Metric #1](./images/selecting_a_metric1.png)

* Search for "DB_" and select the BufferHits metric from the list.

![Selecting a Metric #2](./images/selecting_a_metric2.png)

* Click on Run queries.
* Click on Time series to change the visualization to use a Gauge.
* Change the Panel Title to "Buffer Hits"
* Scroll down and change the Unit in "Standard options" to Misc / Pecent (0-100).
* Scroll down and click on the Red dot for the Threshold to use Green.
* Click on the Green dot for Base to use Orange.
* Click on Apply.

![Visualization](./images/bufferhits_visualization.png)

4. Click on Add / Visualization (on toolbar) to add a visualization for a PASOE metric.
* Click on "Select metric" and click on Open.
* Search for "getrequests" and select the getRequests metric from the list.
* Click on Run queries.
* Change the Panel Title to "Get Requests".
* Click on Apply.
5. Click on the "Save dashboard" button (floppy disk icon on toolbar) to save the dashboard.

![Dashboard](./images/openedge_dashboard.png)

Notes:
* Examples of Grafana dashboards can be found at https://grafana.com/grafana/dashboards/
33 changes: 33 additions & 0 deletions examples/OECC/config/customer.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
USING Progress.Json.ObjectModel.JsonObject.
edselg marked this conversation as resolved.
Show resolved Hide resolved

CREATE WIDGET-POOL.

{src/web2/wrap-cgi.i}

DEFINE TEMP-TABLE ttCustomer LIKE Customer.
DEFINE DATASET dsCustomer FOR ttCustomer.

RUN process-web-request.

PROCEDURE outputHeader :
output-content-type ("application/json":U).
END PROCEDURE.

PROCEDURE process-web-request :
DEFINE VARIABLE oJsonObject AS Progress.Json.ObjectModel.JsonObject NO-UNDO.
DEFINE VARIABLE lChar AS LONGCHAR NO-UNDO.
RUN outputHeader.

EMPTY TEMP-TABLE ttCustomer.
FOR EACH Customer WHERE Customer.CustNum < 3110 NO-LOCK:
CREATE ttCustomer.
BUFFER-COPY Customer TO ttCustomer.
END.

oJsonObject = NEW JsonObject().
oJsonObject:READ(DATASET dsCustomer:HANDLE).

lChar = oJsonObject:GetJsonText().
{&OUT-LONG} lChar.

END PROCEDURE.
6 changes: 6 additions & 0 deletions examples/OECC/config/oepas1.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[AppServer.SessMgr]
agentStartupParam=-T "${catalina.base}/temp" -db sports2020 -S 20000

[oepas1.ROOT.WEB]
adapterEnabled=1
defaultHandler=OpenEdge.Web.CompatibilityHandler
19 changes: 19 additions & 0 deletions examples/OECC/config/otagentoedb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
exporter:
name: "otlp"
endpoint: "http://192.168.56.215:4317"
protocol: "grpc"
connectionretry: 20
timeout: 10


oedbInstances:
- dbname: sports2020
host: localhost
port: 20000
user: dba
password: dba
metricsregex:
otherdbconnparams:
dbconnectionretry: 5
dbschedule: 30
dbduration: seconds
13 changes: 13 additions & 0 deletions examples/OECC/config/otagentpasoe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
exporter:
name: "otlp"
endpoint: "http://192.168.56.215:4317"
protocol: "grpc"
connectionretry: 20
timeout: 10

pasInstances:
- pasdir: "/psc/wrk/oepas1"
passchedule: 30
pasconnectionretry: 5
pasduration: seconds
metricsregex:
13 changes: 13 additions & 0 deletions examples/OECC/config/rc.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh -e
edselg marked this conversation as resolved.
Show resolved Hide resolved
#

export DLC=/psc/dlc
edselg marked this conversation as resolved.
Show resolved Hide resolved
export PATH=$DLC/bin:$PATH

cd /psc/wrk
proserve sports2020 -S 20000 -n 30

cd /psc/wrk/oepas1
edselg marked this conversation as resolved.
Show resolved Hide resolved
/psc/wrk/oepas1/bin/tcman.sh start

exit 0
171 changes: 171 additions & 0 deletions examples/OECC/config/response_12.8.3.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
;
; DESCRIPTION of Configuration Count
;
; NumberofConfigurations - the number of products being installed.
;

[Install Method]
ApplyAsServicePack=0

[Configuration Count]
NumberofConfigurations=3

[Product Configuration 1]
name=DEMO
serial=<OEDB_SERIAL_NUMBER>
version=12.8
control=<OEDB_CONTROL_CODES>
prodname=OE Adv. Ent. RDBMS

[Product Configuration 2]
name=DEMO
serial=<4GL_DEV_SERIAL_NUMBER>
version=12.8
control=<4GL_DEV_CONTROL_CODES>
prodname=4GL Development System

[Product Configuration 3]
name=DEMO
serial=<PRODAS_SERIAL_NUMBER>
version=12.8
control=<PRODAS_CONTROL_CODES>
prodname=Progress ProdAS for OE

;
; DESCRIPTION of OpenEdge Explorer
;
; enable - indicates whether or not you want to enable the OpenEdge Explorer functionality.
; - a value of false indicates you do NOT want to enable the OpenEdge Explorer functionality.
; - a value of true indicates you want to enable the OpenEdge Explorer functionality.
;

[OpenEdge Explorer]
enable=true

;
; DESCRIPTION of Java
;
; JavaHome - the root directory where the JRE is installed
;

[Java]
JavaHome=/usr/lib/jvm/jdk

;
; DESCRIPTION of Type and Destination
;
; type - identifies the type of installation. Valid values are COMPLETE and CUSTOM.
; path - identifies the directory in which you install your OpenEdge product software.
; workpath - identifies the directory in which your applications, databases, and log files will reside.
; oem_path - identifies the directory in which you install your Management product software.
; oem_workpath - identifies the directory in which your Management applications, databases, and log files will reside.
;

[Type and Destination]
type=COMPLETE
path=/psc/dlc
workpath=/psc/wrk
oem_path=/psc/oemgmt
oem_workpath=/psc/wrk_oemgmt

;
; DESCRIPTION of Server Engine
;
; UseSqlServerEngine - valid values are 0 and 1.
; 0 - indicates that the SQL Database Engine is to not be installed.
; 1 - indicates that the SQL Database Engine is to be installed.
;

[Server Engine]
UseSqlServerEngine=1

;
; DESCRIPTION of Language Default
;
; DefaultLanguage - identifies the language in which PROMSGS appears by default.
; -Valid values are:
; Czech
; Dutch
; English - American
; English - International
; French
; German
; Italian
; Polish
; Portuguese
; Portuguese - Brazilian
; Spanish
; Spanish - Latin
; Swedish
;

[Language Default]
DefaultLanguage=English - American

;
; DESCRIPTION of Language Choice
;
; lang1, lang2, lang3 ... - Identifies all the PROMSGS languages installed during installation including the default language.
;

[Language Choice]
lang1=English - American

;
; DESCRIPTION of International Settings
;
; NOTE: For specific information please refer to the intlsets.txt file located at the root level of the cdrom from which this information is derived.
; cpinternal - identifies the -cpinternal and -cpstream values included in the startup.pf file.
; cpcollation - identifies the -cpcoll value included in the startup.pf file.
; cpcase - identifies the -cpcase value included in the startup.pf file.
; dateformat - identifies the -d value included in the startup.pf file.
; numsep - identifies the -numsep value included in the startup.pf file.
; numdec - identifies the -numdec value included in the startup.pf file.
;
; The following is a table of the numbers and the separators they represent:
; 32 - space
; 36 - dollar
; 39 - apostrophe
; 44 - comma
; 46 - period
;

[International Settings]
cpinternal=ISO8859-1
cpcollation=Basic
cpcase=Basic
dateformat=mdy
numsep=44
numdec=46
;
; DESCRIPTION of PacificAppServerPortDetails
;
; nPortHttp - A port for HTTP connections.
; nPortHttps - A port for HTTPS connections.
; nPortShutdown - Port on which the shutdown process will run.
;

[PacificAppServerPortDetails]
nPortHttp=8810
nPortHttps=8811
nPortShutdown=8812
;
; DESCRIPTION of STS Key Plugin Dialog
;
; EnableAuthGatewaySTSClient - Enable Authentication Gateway. Enable = 1, Disable = 0
; OEAuthGatewayURL - Gateway URL.
; ServerKeyPassword - Password
; STSKeystorePath- Path for storing keys.
; NoHostVerify - Enable = 1, Disable = 0
; EnableAdminSrvSTSKeyPlugin - Enable = 1, Disable = 0
; PollingInterVal - Polling interval (in minutes).
;

[STS Key Plugin Dialog]
EnableAuthGatewaySTSClient=0
OEAuthGatewayURL=
ServerKeyPassword=
STSKeystorePath=
NoHostVerify=0
EnableAdminSrvSTSKeyPlugin=0
PollingInterVal=
Loading