Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: Ib243572c2395c9e122af3bff24d1fd8b89300166
Issue-ID: POLICY-357
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
This work is needed for consolidating the amsterdam templates used
both for junits and the official one from the archetype into one,
so junits can run in the official one.
This work revisits the functionality of when a drools controller
cannot be found to check state before delivering a message from
the drools application, it will use a standalone enconder
(previously configured to do so).
This was intended to work like this originally, but never tested
nor used as all deliveries are send through the controllers so
locked/alive state is checked (but there may ocassions where we
want to take this default action).
Change-Id: Ie23e4e13323f3ab9fd207f8a396c1af6564b7edf
Issue-ID: POLICY-101
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
This enables PDP-D to have knowledge of any installation
property or else configured via OS environment variable
or as an environment file.
This allows the user to query or set via REST API of programmatically
through PolicyEngine any environment variable.
It also provides a means to make data globally available to all
drools applications.
For example:
http://localhost:9696/policy/pdp/engine/environment> get
HTTP/1.1 200 OK
Content-Length: 749
Content-Type: application/json
Date: Wed, 06 Sep 2017 23:53:57 GMT
Server: Jetty(9.3.14.v20161028)
{
"DCAE_SERVERS": "",
"DCAE_TOPIC": "",
"DMAAP_SERVERS": "",
"ENGINE_MANAGEMENT_HOST": "0.0.0.0",
"ENGINE_MANAGEMENT_PASSWORD": "",
"ENGINE_MANAGEMENT_PORT": "9696",
"ENGINE_MANAGEMENT_USER": "",
"HEALTHCHECK_PASSWORD": "",
"HEALTHCHECK_USER": "",
"JAVA_HOME": "/usr/lib/jvm/java-8-oracle",
"M2_HOME": "/usr/share/maven",
"PAP_HOST": "",
"PAP_PASSWORD": "",
"PAP_USERNAME": "",
"PDPD_CONFIGURATION_API_KEY": "",
"PDPD_CONFIGURATION_API_SECRET": "",
"PDPD_CONFIGURATION_CONSUMER_GROUP": "",
"PDPD_CONFIGURATION_CONSUMER_INSTANCE": "",
"PDPD_CONFIGURATION_PARTITION_KEY": "",
"PDPD_CONFIGURATION_SERVERS": "",
"PDPD_CONFIGURATION_TOPIC": "PDPD-CONFIGURATION",
"PDP_HOST": "",
"PDP_PASSWORD": "",
"PDP_USERNAME": "",
"POLICY_HOME": "/home/policy/snapshot",
"SQL_HOST": "",
"SQL_PASSWORD": "",
"SQL_USER": ""
}
policy@newton:~/snapshot/config$ echo -n "http://one.com/aai" | http --verbose PUT :9696/policy/pdp/engine/environment/AAI_URL Content-Type:text/plain Accept:text/plain
PUT /policy/pdp/engine/environment/AAI_URL HTTP/1.1
Accept: text/plain
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 18
Content-Type: text/plain
Host: localhost:9696
User-Agent: HTTPie/0.9.2
http://one.com/aai
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: text/plain
Date: Thu, 07 Sep 2017 00:05:05 GMT
Server: Jetty(9.3.14.v20161028)
policy@newton:~/snapshot/config$ echo -n "http://one.com/aai2" | http --verbose PUT :9696/policy/pdp/engine/environment/AAI_URL Content-Type:text/plain Accept:text/plain
PUT /policy/pdp/engine/environment/AAI_URL HTTP/1.1
Accept: text/plain
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 19
Content-Type: text/plain
Host: localhost:9696
User-Agent: HTTPie/0.9.2
http://one.com/aai2
HTTP/1.1 200 OK
Content-Length: 18
Content-Type: text/plain
Date: Thu, 07 Sep 2017 00:05:45 GMT
Server: Jetty(9.3.14.v20161028)
http://one.com/aai
policy@newton:~/snapshot/config$ http :9696/policy/pdp/engine/environment/AAI_URL
HTTP/1.1 200 OK
Content-Length: 19
Content-Type: application/json
Date: Thu, 07 Sep 2017 05:14:57 GMT
Server: Jetty(9.3.14.v20161028)
http://one.com/aai2
Change-Id: I1fcd610938af751977bb2db925b57b4e5b3f7ba4
Issue-ID: POLICY-162
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
to make db-enabled features to not worry about their
packaging in the copy-dependencies plugin in the
pom.xml
Change-Id: Ie20a61978f75d4dbe82ac7aba5f6d259fb412f22
Issue-ID: POLICY-96
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Isolation and data migration support overall and on a per
feature basis.
policy@drools:/opt/app/policy$ policy.sh status
[drools-pdp-controllers]
L []: Policy Management (no pidfile) is NOT running
1 cron jobs installed.
[features]
name version status
---- ------- ------
eelf 1.1.0 disabled
healthcheck 1.1.0 disabled
session-persistence 1.1.0 enabled
[migration]
session-persistence: upgrade out-of-sync: 0 -> 201702
policy@drools:/opt/app/policy$ features enable session-persistence
session-persistence: upgrade out-of-sync: 0 -> 201702
name version status
---- ------- ------
eelf 1.1.0 disabled
healthcheck 1.1.0 disabled
session-persistence 1.1.0 enabled
policy@drools:/opt/app/policy$ db-migrator -s session-persistence -o upgrade
upgrade: 0 -> 201702
> upgrade 201701-blah.upgrade.sql
--------------
create table blah (a varchar(15), b varchar(20))
--------------
> upgrade 201702-blah2.upgrade.sql
--------------
create table blah2 (a varchar(15), b varchar(20))
--------------
session-persistence: OK: upgrade (201702)
policy@drools:/opt/app/policy$ db-migrator -s ALL -o report
+---------------------+---------+
| name | version |
+---------------------+---------+
| session-persistence | 201702 |
+---------------------+---------+
+--------------------------+-----------+---------+---------------------+
| script | operation | success | atTime |
+--------------------------+-----------+---------+---------------------+
| 201701-blah.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 |
| 201702-blah2.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 |
+--------------------------+-----------+---------+---------------------+
policy@drools:/opt/app/policy$ features disable session-persistence
name version status
---- ------- ------
eelf 1.1.0 disabled
healthcheck 1.1.0 disabled
session-persistence 1.1.0 disabled
policy@drools:/opt/app/policy$ db-migrator -s ALL -o downgrade
downgrade: 201702 -> 0
> downgrade 201702-blah2.downgrade.sql
--------------
drop table if exists blah2
--------------
> downgrade 201701-blah.downgrade.sql
--------------
drop table if exists blah
--------------
session-persistence: OK: downgrade (0)
policy@drools:/opt/app/policy$ db-migrator -s ALL -o report
+---------------------+---------+
| name | version |
+---------------------+---------+
| session-persistence | 0 |
+---------------------+---------+
+----------------------------+-----------+---------+---------------------+
| script | operation | success | atTime |
+----------------------------+-----------+---------+---------------------+
| 201701-blah.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 |
| 201702-blah2.upgrade.sql | upgrade | 1 | 2017-08-14 16:01:32 |
| 201701-blah.downgrade.sql | downgrade | 1 | 2017-08-14 16:13:49 |
| 201702-blah2.downgrade.sql | downgrade | 1 | 2017-08-14 16:13:49 |
+----------------------------+-----------+---------+---------------------+
session-persistence: OK @ 0
Change-Id: Ie185f5d7a8463cb349ac452d8c2b4b05928b3e56
Issue-ID: POLICY-96
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Note that the 'install' option looks for a 'base.conf' script in the
current directory, as well as the '${POLICY_HOME}/config' directory.
The assumption is 'base.conf' is saved here when the initial DroolsPDP
install is complete.
Issue-ID: POLICY-163
Change-Id: I995c685ca8ff896f3d8a027324e30673075e0c1f
Signed-off-by: Ralph Straubs <rs8887@att.com>
|
|
This commit only takes care of enabling disabling global visibility
of sql files on a per database basis, when a feature is enabled/disabled.
Performing the actual databases upgrade operations will be provided
in a subsequent commit.
Issue-ID: POLICY-66
Change-Id: Ia82e5ccb3a9f02e9d937ce4791fdca4204b8f9e8
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Change-Id: I8aa8e32d3ba10f7c655b50e97aaf6865514d4777
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
|
|
consolidate scripting convention by all adopting not .sh for
bash scripts. Location is under policy-management/src/main/server-gen/bin/
so they are inherited by lab installations that don't use the
packages directory.
Change-Id: Ibcbd4bffad38e87cb3b644deb768120b1a6b2cbb
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
installation/enable/disable of self contained package features:
Feature 3rd party dependencies, configuration files, and
custom installation scripts do not need to be packaged within the policy
core base to be used.
Change-Id: I35a472e63bd0f9f7aa6cd0c112d41d2b4604a892
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
for backwards compatibility purposes or if desired to
use EELF and common-framework (from policy-common) for
logging purposes in miscellaneous environments. It supports
EELF/Common Framework style logging at the same time than
traditional logging.
This functionality is an optional loadable module.
policy-docker changes need to be made to optionally
unpack to make it active (in a different submission).
started marking feature projects with feature prefix in
project name to give a clear picture to the community which
modules are features vs. code base.
Change-Id: I5076c462409f03415ce54f0c9b5f50b78abb18f9
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Change-Id: I984ec36d3022cb498f99aa3b1a23e8729b0624d8
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Change-Id: I0072ccab6f40ed32da39667f9f8523b6d6dad2e2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|