Accessing Properties from Another Project in Quarkus-Kotlin - kotlin

I'm developing one common library in one of project. I'm currently using gradle and kotlin
I've one projects say notifications it needs to get one dependencies of another project say common-lib
so in notifications project, in application.yaml file if I mention property of any database in this format.
datasource:
url: jdbc:postgresql://localhost:5432/some-test-db
driver: org.postgresql.Driver
username: USERNAME
password: PASSWORD
How will I read this properties in common-lib, also how will I add common-lib dependency in notifications project if I'm working in local. Please help.
datasource:
url: jdbc:postgresql://localhost:5432/some-test-db
driver: org.postgresql.Driver
username: USERNAME
password: PASSWORD

Related

Failed to Load resource: the server responded with status 404 (not Found) during BUILD of a Hana DB Module

I am trying to create synonym in SAP WEB IDE. I created a new multi tenant project and also added a SAP HANA DATABASE MODULE under it. For creating a Synonym, I followed below steps:
1) I have created a user provided service (mydata-grantor).
2) Edited mta.yaml file to add the user provided service name in resources as below:
resources:
- name: hdi_db
parameters:
config:
schema: MYAPPDB
properties:
hdi-container-name: ${service-name}
type: com[![enter image description here][1]][1].sap.xs.hdi-container
- name: mydata-grantor
type: org.cloudfoundry.existing-service
3) Created a .hdbgrants file to grant access and roles.
4) After completing above stpes, when I go to BUILD, I am getting and error that "build of myapp/db failed, check console logs for details.
I am attaching the detailed error screenshot I am getting in console.

how to provide more broker users in bosh-release-rabbitmq

I would like to use CF release of rabbit-mq and provide more BOSH release/deployment defined broker users ( for sake of tracing issues)
Is there a way to provide so ?
Currently i'm using stock release
https://github.com/pivotal-cf/cf-rabbitmq-release
and in deployment i declare single user ?
properties:
rabbitmq-server:
plugins:
- rabbitmq_management
administrators:
broker:
username: foo #user to read and send events
password: bar
Regards
You can see by looking at the spec for the rabbitmq-server that only 2 accounts are identified as valid properties. broker and management
rabbitmq-server.administrators.broker.username:
description: "RabbitMQ admin username for broker"
rabbitmq-server.administrators.broker.password:
description: "RabbitMQ admin password for broker"
rabbitmq-server.administrators.management.username:
description: "RabbitMQ admin username for operator"
rabbitmq-server.administrators.management.password:
description: "RabbitMQ admin password for operator"
https://github.com/pivotal-cf/cf-rabbitmq-release/blob/623a0bfac64ec6820175d3589ba6233435bf912f/jobs/rabbitmq-server/spec#L37
If you know rabbit internals and want to cut your own bosh release you could modify the init-script and create additional administrator users for your use case. The script already uses the same function for operator and broker accounts, and looks like a straightforward pattern to follow. https://github.com/pivotal-cf/cf-rabbitmq-release/blob/623a0bfac64ec6820175d3589ba6233435bf912f/jobs/rabbitmq-server/templates/rabbitmq-server.init.bash#L77
But when you say "tracing issues" I wonder if the operator account is indeed what you're looking for. If so just add that to the job details.
properties:
rabbitmq-server:
plugins:
- rabbitmq_management
administrators:
broker:
username: foo
password: bar
management: #operator account details
username: foo
password: bar

Not sure which Database rails is using

I am working on a rails app, where I have created users with scaffolding and saved some entries through the browser. It seems to be doing everything correctly.
The problem is I am not sure which database the app is using. I have mysql but no changes are happening there. Is rails using sqlite instead? If so, how can I switch to mysql or another database?
You need to configure mysql database in config/database.yml. Refer http://edgeguides.rubyonrails.org/configuring.html#configuring-a-database
Here is a sample from my local settings for reference
development: &default
adapter: mysql2
database: invoice_development
encoding: utf8
min_messages: warning
pool: 5
timeout: 5000
user_name: root
password: root
socket: /var/run/mysqld/mysqld.sock
test:
<<: *default
database: invoice_test
If you are running your application locally, it is most likely using the development database configured in config/database.yml.
To double check, you can check the value of Rails.env when running your application. E.g. (from the console):
2.2.0 :001 > Rails.env
=> "development"

Pentaho BI server report without Log in

I need to integrate my Pentaho Community dashboard report in a DotNet application. Now I am facing a problem.
I want the report to open on single click without the Pentaho server asking for authentication or log in. I tried to find out a solution and found that if I use userid and password in the url, it will work. So I did this
http://192.168.2.122:8085/pentaho/api/repos/:home:Time%20Sheet%20Reports:Project%20Effort%20Analysis%20Dashboard.wcdf/generatedContent&userid=admin&password=password
But this is not working for me and the browser is still asking for login credentials. I don't understand what went wrong.
Any help with the same will be most appreciated.
Thanks in advance.
Regards,
Ritesh.
You need the following user to be created under the Manage Users & Roles Perspective:
anonymousUser (notice the uppercase U)
You can give this user any password; this is only to make sure this user maps the user used in the configuration files inside pentaho-solutions/system
Make sure the Anonymous role has at least the Read Permission.
The Anonymous role should exist already in the BA Server (this is by default a system role in the Manage Users and Roles Perspective)
Under Public create a folder: in my case "OpenReports"
Select the "OpenReports" folder click properties > click Share > Uncheck > Inherits folder permissions
Make sure to add anonymousUser and role anonymous to it and they at least the Read permission
Click OK
Copy an Analyzer report to the new OpenReports folder
Verify the permissions for anonymousUser and Anonymous role were inherited; if not add them accordingly.
Stop BA Server
Locate the following file:
\pentaho\server\biserver-ee\pentaho-solutions\system\applicationContext-spring-security.xml
Add the following lines:
\A/i18n.*\Z=Anonymous,Authenticated
\A/js/utils.js\Z=Anonymous,Authenticated
\A/api/.*require-js-cfg.js\Z=Anonymous,Authenticated
\A/api/.*\Z=Anonymous,Authenticated
\A/api/repos.*\Z=Anonymous,Authenticated
\A/api/common-ui/resources/.*\Z=Anonymous,Authenticated
\A/api/common-ui/util/.*\Z=Anonymous,Authenticated
The following lines open the anonymous access to the OpenReports folder and its contents
\A/api/repos.*public.*openreports.*\Z=Anonymous,Authenticated
\A/api/repos.*public.*openreports.*/viewer/.*\Z=Anonymous,Authenticated
\A/api/repos.*public.*openreports.*/common-ui/.*\Z=Anonymous,Authenticated
\A/api/repos.*public.*openreports.*/common-ui/util/.*\Z=Anonymous,Authenticated
after:
\A/js/require-cfg.js\Z=Anonymous,Authenticated
and before:
\A/content/data-access/resources/gwt/.*css\Z=Anonymous,Authenticated
Add the following lines: (these open the URL access to the Analyzer plugin)
\A/content/pentaho-cdf/.*\Z=Anonymous,Authenticated
\A/content/common-ui/.*\Z=Anonymous,Authenticated
\A/content/analyzer/.*\Z=Anonymous,Authenticated
\A/content/analyzer/scripts/.*\Z=Anonymous,Authenticated
Make sure to add these lines:
After:
\A/content/data-access/resources/gwt/.*css\Z=Anonymous,Authenticated
and before:
\A/webcontext.js.*\Z=Anonymous,Authenticated
Locate the following
Change the following lines from:
\A/api/.*\Z=Authenticated
\A/plugin/.*\Z=Authenticated
to:
\A/api/.*\Z=Anonymous,Authenticated
\A/plugin/.*\Z=Anonymous,Authenticated
Save the file
Restart your BA Server
You should be able to successfully call the report by URL without having to authenticate through the login page; here is a sample URL:
http://192.168.2.122:8085/pentaho/api/repos/:public:OpenReports:Leading%20Product%20Lines%20(pivot%20table).xanalyzer/editor
Here the simplest way to bypass the log in :
http://pedroalves-bi.blogspot.pt/2015/02/useful-tips-easy-authentication-in.html
it's work for me, i'm using pentaho 5.4
don't forget to create anonymousUser and in "system Roles" check only "Read Content".
if you use admin user and then you try to access http://localhost:8080/pentaho/Home
it will automaticly login because the browser still have session login.
sorry for my bad english,

Drools Workbench accessing Repository via SSH

We installed KIE WB 6.1.0 on a Tomcat 7 server on Windows 2012 and created some users. Those users can log in to the Workbench and work on and in the repository.
If I try to clone that repository from another computer, I only get authentication errors:
mb-itmsan01:temp ds$ git clone ssh://admin#192.168.150.34:8001/TestRep
Cloning into 'TestRep'...
Password authentication
Password:
Password authentication
Password:
Password authentication
Password:
admin#192.168.150.34's password:
Permission denied, please try again.
admin#192.168.150.34's password:
Permission denied, please try again.
admin#192.168.150.34's password:
Permission denied (password,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I am sure that the user and password combination is correct ...
Am I missing something, e.g. a role for the user or some configuration? I added all roles which are described in the manual for that user, still no success.
I found out how to fix this problem:
It has been fixed in 6.2.x (currently only available in Beta status). If you want to fix the problem in Drools WB 6.1.x on Tomcat 7, just replace the content in the file WEB-INF/classes/login.config with the following content:
ApplicationRealm {
org.apache.catalina.realm.JAASMemoryLoginModule REQUIRED debug=true;
};
The respective commit on github is:
https://github.com/droolsjbpm/kie-wb-distributions/commit/e53c0c36686822fc17ad5e8aceab39f1de4fb844
After that one can access the Git repository via SSH with the credentials defined in tomcat-users.xml.