Is there a way to specify logging driver for deployed functions - openfaas

Is there a way to specify logging driver for the functions deployed with OpenFaas.
I have setup fluentd logging driver and would like to configure it for the functions using openfaas yaml file

Related

How to connect my website with DB2 on Cloud?

I have a site and there is register system that introduce data into RDBMS via php. I had PostgreSql on localhost and now I wanna connect my website with "DB2 on Cloud" from cloud.ibm.com How can I do it and what I must use?
I used to connect with postgres via .php, but with db2 must I use JDBC,ODBC or other APIs? or with other things for RDBMS.
You can use IBM's php_ibm_db2 module to connect a PHP website to a remote database on Db2-on-cloud. This module uses an ODBC (also known as CLI in Db2) connection to the database, and it requires a CLI driver for the database connectivity, and such a driver is freely downloadable from IBM by following the instrucuctions).
You can use a classic interface or a PDO style interface, both are supported in php_ibm_db2.
You will have a learning curve, so careful study of all the documentation is necessary.
Depending on your platform, you may need to compile that module, but some precompiled modules are available.
See https://github.com/php/pecl-database-ibm_db2
See also https://www.ibm.com/docs/en/db2oc?topic=programmatically-php

Hawtio remote connect configuration parameters not correct for monitoring remote machine

My goal is to confirm that one can use a Hawtio instance to monitor an instance running on a different machine.
I am using this example https://github.com/hawtio/hawtio-camel-wiki .
right now i have it running on my local machine in OSX and on a remote Ubuntu 18 machine. I try to connect them however i cant seem to monitor the instance on the other machine.
I then tried to just use the hawtIO jar to connect to that example running on the remote machine.
I first set my hawtio.proxyWhitelist or hawtio.proxyAllowList (i also tried using the hawtio JAR on my local machine) to whitelist the endpoints. (2.10 uses the former)
java -Dhawtio.proxyAllowlist=* -jar hawtio-app.jar
My issue is i am not sure what to put in the connection tabs. I have been trying port 61613 and the path as /api/jolokia but i cant seem to figure out where its running to connect to it.
hawtio-camel-wiki is an outdated project which was archived quite a while ago and is not relevant any longer. As to what info you need to put in the Connection tab, it depends on what remote JVMs you'd like to connect to. Generally speaking, they should provide a Jolokia endpoint with a specific port (e.g. 8080) and path (e.g. /jolokia) which you should input to the connection info.
For how to incorporate a Jolokia endpoint into your application, you can check https://jolokia.org/reference/html/agents.html. If you already have something to run, the JVM agent should be the easiest option.
You can also check some Spring Boot examples here:
https://github.com/hawtio/hawtio/tree/hawtio-2.10.1/examples

ODBC in Excel with SSO/external authentication (OSX)

I have successfully set up and tested an ODBC connection on OSX to a Snowflake instance, using external SSO authentication. Testing was done using iODBC.
However, when I attempt to use the driver in MS Excel for OSX, at the authentication via external web browser stage, I am getting an 'Operation Not Permitted' error. Is it possible to use ODBC with external browser authentication within Excel?
I've seen this error with Excel on Mac as well. Last I heard, Microsoft Support determined that this functionality is not, and will not be supported in Excel for Mac. Feel free to open a ticket with Microsoft if you'd like to see this supported.

JUnit to connect to Oracle DB from Jenkins

I would like to connect to the actual physical database from JUnit, while it runs from Jenkins during maven build/test. I am using JBoss for writing JUnit. I don't want to store the DB connection string within the JUnit code/git/svn. I will rather externalize it either via a datasource and connect using JNDI in runtime or any other mechanism. Is there a way, I can use the datasource setup in Jenkins to connect to DB or Is there a better approach to achieve this? Basically, I want to hide the connection id/pwd for the developers as well, so they don't know/see.
You can use environment variables or system properties to provide configuration from Jenkins to a JUnit test. Read them in your test and use it to establish a connection to the DB.
But those will be readable ad the developers have access to the Jenkins job configuration.

Windows app and Oracle database access issue

I am trying to do a Windows app and connect to an Oracle database. For now, this is all I am trying to do. When I test this from development server (Windows 2003 Server) it works fine. I copy the content of "output" folder (where the .exe file is in) to my local machine (Windows 7) and try to run the same app and get errors. Same thing happens when I copy the code to another server running Windows 2003. The error I get is:
"Could not load file or assembly 'Oracle.DataAccess, Version 2.112.3.0, culture=neutral, Public Key Token=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Since there is no Oracle.DataAccess.DLL file on either my local machine or on the server where the test failed, I thought maybe I can copy the DLL to Windows application's output folder, add a reference to this DLL and compile. But that was not the solution.
Is there any way I can fix this without expecting every machine this application (eventually, a Windows Service) is running from to have Oracle.DataAccess.DLL in GAC? Do I have to install ODAC on all the machines this application will running from (something like couple of hundred servers)?
If you can get away with the System.Data.OracleClient connection, than you don't have to do anything special on the servers.
If you want to use the ODAC connector, you will need to install the client on each of the servers and include the TNS names. It is a bad design on Oracle's part.
Both System.Data.OracleClient and Oracle.DataAccess require you to install Oracle client software on to each server. As such, their portability leaves a lot to be desired.
A more portable way to deploy your Oracle software would be to use the managed Oracle library, Oracle.ManagedDataAccess, which is available via Nuget. It does not require an Oracle client installation.
Be aware that, since Oracle.ManagedDataAccess does not rely on the oracle client software, that you will have to adjust some configurations. You can either include the tnsnames.ora along with your deployed application, write the connection string as you would an entry in tnsnames.ora, or you can specify the exact hostname/port/oracle sid.
If you insist on using an unmanaged Oracle Client, consider the following:
System.Data.OracleClient (and System.Data.OleDb) are easier to deploy than Oracle.DataAccess since they are part of the .NET framework and are written for any CPU. However, they both have the same functionality and same limitations; System.Data.OracleClient is also a deprecated library.
On the other hand, Oracle.DataAccess offers more functionality but comes in both x64 and x86 flavours, which can make deployment a lot trickier (especially on IIS-hosted web applications).

Resources