Deployment synchronization Issue - API Manager 1.8 - deployment

I have clusted the WSO2 API Manager 1.8 and implemented deployment synchronization according to this guide which is given in the WSO2 documentaion. Everything happens to work find except one thing.
Let's assume that we have below 2 instances running API Manager.
192.168.X.123 - API Manager 1
192.168.X.124 - API Manager 2
The problem is once I create and publish an API on API Manager 1 it does appear on API Manager 2 in the publisher. But the particular API does not appear on the API Manager 2 Store.
Also note that I'm using a shared MySQL database for the API Manager cluster(API Manager 1 and 2). I checked the logs but does not contains any error.
How can I fix this?

Please look at WSO2 Clustering and Deployment Guide. Please check the docs on Clustering API Manager and SVN-based Deployment Synchronizer
If all configurations are correct, your API should be displayed in Store once you have "Published" the API. It might take some time (may be few minutes) to appear in Store due to indexing etc.

In our situation, we defined 2 different servers with extra CPU and
memory, on these servers we have installed the full WSO2 API Manager
and defined the cluster configuration. Everything provisioned via
Puppet.
Just a straightforward install, all data-source pointing to one schema
in an Oracle database.
And...it is working; Our Developers happy, Operations happy, Architect
department happy
From WSO2 API Manager Clustering configuration

Related

Can I get the Swagger interface to appear on a deployed Azure web API?

When one creates an ASP.NET Core Web API in Visual Studio 2022, and tests it locally, one gets a convenient Swagger page built upon an OpenAPI definition, to test all HTTP endpoints.
However, when deployed and trying to access {path-to-api}/swagger, it returns a 404 Not Found error, even while on localhost, when both the API and the database is sitting on my own machine. Even if the database is in the Azure cloud, for that matter, it also works, if I put the Azure SQL Database connection string into appsettings.json.
So is there a way to achieve this, preferably without too much hassle? Or am I wrong in wanting this, do developers mostly test their APIs locally? Because I want the Swagger API online only for testing.
The problem is getting and using the swagger functionality into the cloud. Is it possible and good practice?
If you look at the startup, you will notice that the swagger is only loaded during a development session via an if check. Commenting that out, or expanding it based on evironment, will allow a published version to generate the page on the target host.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
I generally do that for first publishes or to Dev/Test environments to see it running. Once it is not needed, I un-comment it back in.
Also it may be actually viable (turned on) in Dev or UAT server because one is also publishing the open api it to APIM (Azure api manager), which takes the api and generates its own development environment; away from an initial publish.
Also once published, it is not the default page, one still has to path to it such as .../swagger/index.html.
I'm aborting this mission to deploy the Swagger interface to Azure along with my API. It's bad security practice to make the HTTP request methods so visually available to all. So the answer to my question do developers mostly test their APIs locally, is apparently yes.
I wondered if I should remove the question, but I would like to make it still stand, in case anyone else is contemplating about doing the same thing - exposing an API online with the Swagger UI.

Service Fabric .NET Framework services and ApplicationInsights.config endpoints for Azure gov

I have a service fabric application that hosts api’s with app insights enabled. The api services are .Net framework 4.8 webapi projects and they are native fabric stateless and stateful services. I don’t use the app insights service fabric specific packages, but do have the standard app insights for webapi packages. I have always been in Azure commercial and logs have worked just fine there.
Now that we are in azure gov, the only way to point a .Net Framework app to the gov app insights endpoints is by modifying the ApplicationInsights.config file.
So I’ve modified the file as per msdn, verified it is deployed with the fabric deploy package and its there next to the rest of the dlls on the vms. Yet my services still won’t log to azure gov app insight instances. Nothing is coming through. We set the instrumentation key programmatically, not in applicationinsights.config, could that be an issue? I noticed some of the msdn examples showed instrumentationkey being included in the config file, but would think that is optional.
Had anyone had experience pointing .net 4.8 fabric services to gov app insights?
When using a government cloud, you need to use a connection string instead of an instrumentation key.
Important
Sovereign clouds, such as Azure Government, require the use of the
Application Insights connection string
(APPLICATIONINSIGHTS_CONNECTION_STRING) instead of the instrumentation
key. To learn more, see the APPLICATIONINSIGHTS_CONNECTION_STRING
reference.
More info here and here.
This ended up being an issue with my gov configuration file. The MSDN document wasn't very clear on where the new config sections go. It made it look like they are all nested under the top level node of the config file. Turns out the TelementyChannel override has to go inside the default TelemenySinks node. I contacted microsoft on github about clarifying this in their docs.
Link to the unclear documentation
https://learn.microsoft.com/en-us/azure/azure-monitor/app/custom-endpoints?tabs=net
Link to github issue to get it fixed
https://github.com/MicrosoftDocs/azure-docs/issues/80066

REST endpoint registration and bootstrap(Creating range-index) using U Deploy

I have my code in Git repository. I am using UDeploy to deploy my code into MarkLogic environment. I can able to move all my modules successfully but facing two problems
1. Creating New indexes
2. REST endpoint creation
Please let me know if there is anyway to implement these two
For creating indexes, I have tried to do it using API functions(admin:database-range-element-index()) and I have successful in that part. But is there any way to do it from UDeploy or DevOps.
For register REST endpoint I couldn't able to find anyway to try.
Have you looked at MarkLogic's REST Management APIs - https://docs.marklogic.com/REST/management. In particular, see if https://docs.marklogic.com/REST/POST/manage/v2/databases will help you create indexes via REST management APIs.
The most common way to deploy MarkLogic code & configuration is ml-gradle, a plugin to the widely used gradle tool. ml-gradle uses MarkLogic's Management API, mentioned by Ganesh, and is scriptable.

How can I configure the perf counters in a Service Fabric Stateless service?

I have looked at the options in the portal and also the resource group templates, but could not find a way to customize this list.
Also, is it possible to add custom perf counters (assuming the code already creates them) for monitoring in the service fabric application?
There is no integrated way to do this today, but there are three ways to do this:
Use Application Insights to monitor your application. There are some
details of how to do this with Application Insights that are not Service
Fabric specific here. There is also a project on GitHub that shows
how to integrate Azure Service Fabric with Application Insights.
Collect performance counters using Azure Diagnostics. Service Fabric is running on VMs, configuring diagnostics to collection from
an Azure VM can be found here.
Use Operations Management Suite which can also collect standard and custom performance counters. See links in the post below (I'm not allowed to post more than 2 links)
You could also try this approach: Setting up Application Insights for your Service Fabric application

How to integrate NewRelic App Monitoring tool with Cloudify?

I am looking to forward integrate NewRelic Agent with Existing Cloudify 2.7 Environment.
Since Cloudify apps are running in individual paths and each deployment takes to apps running on different paths, it's not possible to assign the app server to newrelic. How can I over come this?
It's not entirely clear what you are trying to accomplish.
You recipe can install the NewRelic agent and configure it to connect to NewRelic.
Alternatively, if the NewRelic agent has an API or CLI, you can add a
monitors{
}
section to your recipe. This section will collect the required stats from the local agent and publish them to the Cloudify Manager.
More information is available here: http://getcloudify.org/guide/2.7/plugins_and_probes/probes.html
The collected monitors are then available using the Manager REST API. You can then use a separate process to poll the metrics from the manager API and send them to NewRelic. Look at: http://getcloudify.org/guide/2.7/restapi/restdoclet.html
and the API at
/{version}/deployments/{appName}/service/{serviceName}/instances/{instanceId}/metrics