WSO2 API Manager + Analytics All-in-one single node : sharing MySQL databases - wso2

As a POC (proof of concept), I'm trying to setup "WSO2 API Manager + Analytics" in an "all-in-one" way on a single node. It should be production-ready for a small scale, so I'm trying to replace H2 databases with MySQL databases.
So far, following the documentation, I've created these databases :
For WSO2 API Manager :
| wso2_apimgtdb | wso2am-2.0.0/dbscripts/apimgt/mysql5.7.sql
| wso2_mbstoredb | wso2am-2.0.0/dbscripts/mb-store/mysql-mb.sql
| wso2_metricsdb | wso2am-2.0.0/dbscripts/metrics/mysql.sql
| wso2_regdb | wso2am-2.0.0/dbscripts/mysql5.7.sql
| wso2_statsdb | (tables are build dynamically in this db)
For WSO2 API Manager Analytics :
| wso2_anal_eventstoredb | (tables are build dynamically in this db)
| wso2_anal_processeddatastoredb | (tables are build dynamically in this db)
From that point, I've configured datasources in WSO2AM to point to these db :
<name>WSO2_CARBON_DB</name> --> wso2_regdb
<name>WSO2AM_DB</name> --> wso2_apimgtdb
<name>WSO2AM_STATS_DB</name> --> wso2_statsdb
<name>WSO2_MB_STORE_DB</name> --> wso2_mbstoredb
<name>WSO2_METRICS_DB</name> --> wso2_metricsdb
Now, the question is : which db should be mutualized with Analytics and which db has to be created once for API Manager and once for Analytics ?
Here are the datasources to be configured in wso2am-analytics/repository/conf/datasources/ :
analytics-datasources.xml : <name>WSO2_ANALYTICS_EVENT_STORE_DB</name>
analytics-datasources.xml : <name>WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB</name>
master-datasources.xml : <name>WSO2_CARBON_DB</name>
metrics-datasources.xml : <name>WSO2_METRICS_DB</name>
stats-datasources.xml: <name>WSO2AM_STATS_DB</name>
As stated above, I've created empty databases corresponding to WSO2_ANALYTICS_EVENT_STORE_DB and WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB, but I don't know what to do with WSO2_CARBON_DB, WSO2_METRICS_DB and WSO2AM_STATS_DB. Should I point to existing databases or create new ones ?

You can have separate databases for WSO2_CARBON_DB and WSO2_METRICS_DB. But WSO2AM_STATS_DB must be shared.

Related

How do I consume json logs inside Fargate using CDK?

I have a docker container running in Fargate that emits json logs to the console using log4j-layout-template.
The logs emitted look like this:
{"#timestamp":"2022-03-22T09:08:16.838Z","ecs.version":"1.2.0","log.level":"INFO","message":"Server version name: Apache Tomcat/8.5.76","process.thread.name":"main","log.logger":"org.apache.catalina.startup.VersionLoggerListener"}
{"#timestamp":"2022-03-22T09:08:16.838Z","ecs.version":"1.2.0","log.level":"INFO","message":"Server built: Feb 23 2022 17:59:11 UTC","process.thread.name":"main","log.logger":"org.apache.catalina.startup.VersionLoggerListener"}
I configure my CDK with the following:
var def = ingestGatewayTaskDefinition.addContainer(
id + "Container",
ContainerDefinitionOptions
.builder()
.image(fromEcrRepository(ecrRepository))
.memoryLimitMiB(memory)
.cpu(cpu)
.environment(environment)
.secrets(secrets)
.logging(
LogDriver.awsLogs(
AwsLogDriverProps
.builder()
.logGroup(
LogGroup.Builder
.create(this, props.getServiceName())
.logGroupName("dev/" + props.getServiceName())
.retention(RetentionDays.ONE_DAY)
.build()
)
.streamPrefix("dev/" + props.getServiceName())
//.datetimeFormat("%Y-%m-%dT%H:%M:%SZ") //??
.build()
)
)
.build()
);
But in Cloud Watch the message portion is the json and is not parsed but should be discoverable.
How do I parse these fields?
This is what is ends up looking like:
What I am looking for in Cloud Watch is this:
#timestamp
ecs.version
log.level
message
log.logger
2022-03-22T09:08:16.838Z
1.2.0
INFO
Server version name:...
org.apache...
2022-03-22T09:08:16.838Z
1.2.0
INFO
"Server built:...
org.apache...
There's nothing wrong with the parsing, your events are being parsed correctly.
The following query should work correctly:
fields #timestamp, #message
| filter log.level="INFO"
| sort #timestamp desc
The Log Stream UI does not show the inferred nested structure, but it's still available for querying.

Unable to login ECR web page and show error message

Could you check why user kcizek is not able to login to either hub.tess.io nor ecr? This is first time login but it should work with corp and PIN + Yubi. Login works for me just fine.
I am unable to access https://ecr.vip.ebayc3.com/repository/
When I log in, I am faced with this. The ‘contact us’ link doesn’t have any contact information, so I’m trying here. Any ideas? Thanks.
Potentially relevant background: this is my first time attempting to get access.
enter image description here
It's found the email info is absent in user account.
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | default |
| email | |
| enabled | True |
| id | e69fe5b9d9384b338b3c397c7c84e33f |
| name | kcizek |
+-----------+----------------------------------+
Solution is to contact Tess oncall to add email info.
Related Command
openstack user set kcizek --email kcizek#ebay.com

amplify configuration not showing anything

I'm trying to setup my mobile app with amplify, after the first time i run amplify configuration it prompt me that I have missing plugins.
The following official plugins are missing or inactive:
awscloudformation: provider | amplify-provider-awscloudformation#4.33.0
analytics: category | amplify-category-analytics#2.19.1
api: category | amplify-category-api#2.27.0
auth: category | amplify-category-auth#2.25.0
function: category | amplify-category-function#2.26.3
hosting: category | amplify-category-hosting#undefined
hosting: category | amplify-console-hosting#undefined
interactions: category | amplify-category-interactions#2.6.1
notifications: category | amplify-category-notifications#2.17.1
predictions: category | amplify-category-predictions#2.6.1
storage: category | amplify-category-storage#2.10.3
xr: category | amplify-category-xr#2.6.1
codegen: util | amplify-codegen#2.19.0
flutter: frontend | amplify-frontend-flutter#0.2.0
android: frontend | amplify-frontend-android#2.14.2
ios: frontend | amplify-frontend-ios#2.16.0
javascript: frontend | amplify-frontend-javascript#2.19.0
mock: util | amplify-util-mock#3.27.0
Then it asked me to select my backend provider, but there is nothing for me to choose.
I think it is cause by the missing plugin, how do I install those plugin?
Try to re-install amplify with this command npm install -g #aws-amplify/cli --unsafe-perm=true.

Switching Django App Back to PostgreSQL, No Relations Found

I switched to my database engine to PostGIS and now I'm switching back to PostgreSQL (so I can continue to use Heroku for free). I changed my settings.py file back to:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'chishenma',
'HOST': 'localhost',
}
}
and commented out the installed app so now it shows:
# 'django.contrib.gis',
First I made sure that Postgres.app is running. Then I deleted my migrations, ran python manage.py syncdb, and did the South migrations again, all without errors. When I go into the psql shell and type \l, I can see my database, "chishenma," in the list:
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------------------+-----------------+----------+-------------+-------------+----------------------
chishenma | michelleglauser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
However, when I type \d, I get "No relations found." I tried to re-create the database, but I get "ERROR: Database chishenma already exists."
I looked at this and this Stack Overflow thread and determined that my access privileges (I've got the "=UC/postgres" part) and search_path are correct. I get:
List of schemas
Name | Owner | Access privileges | Description
--------+-----------------+------------------------------------+------------------------
public | michelleglauser | michelleglauser=UC/michelleglauser+| standard public schema
| | =UC/michelleglauser
and:
List of roles
Role name | Attributes | Member of
-----------------+------------------------------------------------+-----------
michelleglauser | Superuser, Create role, Create DB, Replication | {}
What am I missing? How do I make the relations findable?

CloudFoundry - Application 'controlealunos' does not exist

I think that i'm suffering a bug problem. I created a application on Cloud Foundry with the name "controle*A*lunos" with the upper case letter A.
When i execute the command
cf-apps
i get this result:
+----------------+----+---------+---------------------------------+---------------+
| Application | # | Health | URLs | Services |
+----------------+----+---------+---------------------------------+---------------+
| controleAlunos | 1 | RUNNING | controlealunos.cloudfoundry.com | mysql-86d568b |
+----------------+----+---------+---------------------------------+---------------+
But when i try to update my project whit the command :
prod cf-update controleAlunos controleAlunos-0.1.war
i receive an error
Error Application 'controlealunos' does not exist.
I think that it should be the name of my application. I put it with one Upper Case letter controle*A*lunos and i'm receving the error with no upper case letter controlealunos.
I tried to rename it, but i still get the error.
Any Sugests ?
I guess the project name you created is "controlealunos" which resulted in the app.name property in application.properties is a lower case name, while the name used to push onto CF is "controleAlunos". You can try change the value in the properties file and update again.