How to synchronize apis to external system - wso2-api-manager

I have deployed WSO2 API manager4.0.0 All-in-one on my vms.
They are working fine.
Now ,there is a external system of my company , wants to get all apis from wso2apimanager, the apis will list in their system, and they want to invoke wso2 apis from their system.
Anyone can guide me?

You can export APIs using the apictl command line tool as in [1]. But these projects are only readonly from the WSO2 API Manager. You can use the Swagger definitions and host them in a 3rd party system.
[1] - https://apim.docs.wso2.com/en/latest/install-and-setup/setup/api-controller/ci-cd-with-wso2-api-management/

Related

Develop the openstack manage website like the original dashboard

I installed the HA OpenStack on 3 host machines, and them works perfect.
As you know, the HA OpenStack has a original dashboard, I can access from browser: http://44.118.44.1xx/dashboard, now I want to write a new website to do the dashboard's functions.
and I want to develop the site on my Mac, how to do with that?
I don't know how to connect with the original HA openstack's database(there are mariadb cluster).
because in the website, I will register the user(tenant), I will put the tenant information to the mariadb.
In Openstack you are not advised to connect to DB directly. Each services in Openstack exposes API(primarily it shall be REST API). Assuming you are trying to build website from scratch, you can use javascript or similar to call REST APIs. here is quick start guide for using REST APIs. You can fine complete list of services and its REST APIs description Here.

How to deploy Azure Web Apps using Azure Resource Manager-Based PowerShell?

I want to deploy my Azure web apps using PowerShell. Here is my expected workflow:
Create Package using MSBuild
Deploy the package to Azure
I tried with the approach described in the below link:
https://github.com/gregpakes/DoIHaveGPS/blob/master/PublishScripts/Publish-WebApplication.ps1
I modified the script to use an existing web app instead of creating. So I call something like Get-AzureWebsite -Name $Config.name..
But it never finds the existing app service (web app) due to the subscription issue. I tried so many times to switch the subscription but it's not working. Get-AzureWebsite always keep searching on the old subscription which I don't use anymore.
If I call Get-AzureRmSubscription from powershell I get two subscriptions but if I call Get-AzureSubscription I get only one.
How can I deploy my application packages using powershell using resource manager based powershell?
The cmdlets used by the script you linked to are using the "old" service management interface. If Get-AzureSubscription doesn't return a subscription that means it's only available to use via AzureRM. The AzureRM web app cmdlets don't have a simple "publish" command as the old ones did... So if you wanted to replicate that in PowerShell you could do something like this:
$deploycmd = "$env:ProgramFiles\IIS\Microsoft Web Deploy V3\msdeploy.exe"
$packageLocation = Resolve-Path -Path "C:\users\bjm\downloads\package.zip"
$webAppName = 'myazuresite'
$user = '$myazuresite'
$pass = 'jSjku1lWBdZNgGjyZWYfDhFn4DFfZlAqTq1RjPu5Fnv3yYe9l2Fl5xz5RK0x'
$setParam = "-setParam:name=""IIS Web Application Name"",value=$webAppName"
$dest = "-dest:auto,ComputerName='https://$webAppName.scm.azurewebsites.net:443/msdeploy.axd?site=$webAppName',UserName='$user',Password='$pass',AuthType=Basic"
& $deploycmd "-verb:sync", "-source:package=$packageLocation", $setParam, $dest
I actually prefer juvchan's approach but if you've already got the rest in place via PS this might be easier.
After you've created the web deploy package for your application, you need to create a Azure Resource Manager (ARM) template which allows you to deploy to a Azure web app using the web deploy package.
Then you can use the Azure PowerShell cmdlet below to deploy your ARM template above to achieve what you require.
New-AzureRmResourceGroupDeployment -Name <deployment-name> -ResourceGroupName <resource-group-name> -TemplateUri <ArmTemplateJsonUri>
Useful references:
Deploy a web app with MSDeploy, custom hostname and SSL certificate
Deploy your app to Azure App Service
https://github.com/Microsoft/azure-docs/blob/master/articles/azure-resource-manager/resource-group-template-deploy-cli.md
https://github.com/Microsoft/azure-docs/blob/master/articles/azure-resource-manager/resource-group-template-deploy-cli.md
This topic shows how to use the Azure portal with Azure Resource Manager to deploy your Azure resources. To learn about managing your resources, see Manage Azure resources through portal. Currently, not every service supports the portal or Resource Manager. For those services, you need to use the classic portal. For the status of each service, see Azure portal availability chart.
1. To create an empty resource group, select New > Management > Resource Group.
2. Give it a name and location, and, if necessary, select a subscription. You need to provide a location for the

WSO2 API Manager UserInformationRecoveryService is not listed in admin services

I am trying to setup WSO2 API Manager version 2.
I wanted to send an email for user activation. After going through documentation and blogs I came to know that I need UserInformationRecoveryService.
But when I start my WSO2 API Manager with OSGI console flag to run listAdminServices command, in the list I could not get the name ad url for UserInformationRecoveryService.
Can someone guide me on how to install this service in WSO2 API Manager version 2?
Thanks in advance.
Yes, UserInformationRecoveryService is not included by default in API Manager. You need to install that feature. Please refer this article [1].

Logging to Google Cloud Logging from log4net

I have an asp.net web application that emit logs via log4net. I need to get the log messages over to Google Cloud Logging. What is the best way to do this?
Based on fluentd documentation and Google Cloud documentation, the best I can come up with now is:
On the Windows machine where the web app is runnning, have log4net log to local files.
On the same machine, run nxlog and have it ship the log files to a Linux machine.
Have google-fluentd, running on the Linux machine, transmit the logs to Google Cloud Logging API.
An easier solution path than the one I started with is to use the Google Cloud Logging API Client Library for .NET.
Currently at v1 beta 3 it's based on the Google Cloud Logging API and has a nuget package.

How to enable OS-KSADM Admin Extension in openstack?

I am new to openstack and I am working on tenant management in openstack icehouse though restful api, and realized I need to enable OS-KSADM extension.
If I invoke my local openstack instance by the url: http://xx.x.x.x:5000/v2.0/extensions
I will get response of the list of the extensions including "OpenStack Federation APIs","OS-FEDERATION","OS-KSCRUD", "OS-EC2"....etc, but no OS-KSADM . I have googled around about it and could not find an example or detail config instruction.
What is the config change needed to enable this extension?
Thanks in advance
By default you have the Identity v3 API enabled, and the OS-KSADM extension is for Identity v2.0.
There are a couple of blog posts about enabling the v2 API:
http://www.symantec.com/connect/blogs/how-switch-keystone-v20-v3
https://www.mirantis.com/blog/manage-openstack-projects-using-domains-havana/

Resources