How to create project by GCP deployment manager API - google-cloud-platform

I can follow the tutorial to create project by gcloud deployment-manager command and template files.
My question is how to use deployment manager API to do the same thing. I found the insert method API in the document, but when I use this API to create project, I meet the error: Error 404: Failed to find project test-site-301, notFound"
How do I specify the project ID before the project has been created? Or I should use other API for project creation?
Thanks
Update. 2018.01.15
I think I found the answer. When creating a new project by deployment manager API, the project parameter should be the project which manages the deployment (i.e. host project) NOT the project which will be created.

For project creation you should use Resource Manager API with projects.create method.
Review documentation here where different ways of creating project are described.

Related

How do I deploy bot created with Microsoft Bot Composer to AWS?

I've played with Microsoft Bot Composer and have checked the extensibility points but it looks like it is not possible to deploy the bot to other clouds.
Please confirm my assumption.
My goal is to achieve deploying without additional development if possible.
Deploying a Composer bot is somewhat more complicated than deploying an ordinary Bot Framework bot because the Composer bot is not stored anywhere in a deployable state. Composer must bundle your specific Composer project files together with the centralized Composer runtime in order to create a deployable package.
However, Composer does come with a way to convert your Composer project into an ordinary bot project that can be deployed just like any web app. This is called exporting (or ejecting) the runtime. You can find out how to do that here.
To export your bot runtime:
Navigate to the Project Settings page of your Composer and find the Custom runtime section.
From the Custom runtime section, toggle Use custom runtime then select Get a new copy of the runtime code.
In the pop-up window select C# and select Okay. A copy of your bot's runtime will be added to the bot's project folder and can
be accessed in the following directory: C:\Users\UserName\Documents\Composer\bot\runtime.

File nesting option missing in Service Fabric Stateless Service project type

In my Service Fabric API project I can access the file nesting option:
However it's not available in my Azure Service Fabric Stateless Service project:
I saw that the API project has a file called .filenesting.json in the solution folder, so I tried adding this file to the Stateless Service solution folder, and restarted VS, however the option still was not there.
Here's the content of the .filenesting.json file:
{
"help":"https://go.microsoft.com/fwlink/?linkid=866610"
}
I'm using Visual Studio Enterprise 2017 Version 15.9.5.
How can I get file nesting to work in a Stateless Service project?
I did some testing around.
Depending on the type of SF Project you create file nesting will be available or not.
For example, using .NET CORE stateless service and stateful services do not support file nesting
But selecting Stateless or Stateful ASP.NET core app does support it

Adding Functions and packages to Device managemnt Core and common

I created a package and org.wso2.carbon.device.mgt.core.log.mgt created some functions in it.
Added my new Build of Carbon Device core as a project dependency to
WSO2 MDM - Mobile Device Management Admin Services
precisely the Operations Class
Build the project and Deployed it.
On loading it failed with Error being
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
Any Help will be greatly apreciated. My Goal
Create functions in Carbon device Core and Common following your Design. Call the functions in my webservice
Please follow the instruction given in the below webinar and the tutorial in order to create your feature as an OSJI bundle(Carbon component) and add it to the EMM server. This is the correct and advisable approach for include new functionalities to WSO2 products.
http://wso2.com/premium/webinars/creating-your-own-wso2-carbon-components http://wso2.com/library/tutorials/2014/03/how-to-write-a-wso2-carbon-component/
First of all you need to create the carbon component(in here your newly created package).
Then Create the feature accordingly.
Then need to add created feature to the pom.xml file of the
product-emm p2-profile-gen.
then makes it packs in the project target by adding a entry to the bin.xml of the product-emm
following attached tutorials gave you a better guidance and clear idea about how to create your own carbon component.
tutorial
http://wso2.com/library/tutorials/2014/03/how-to-write-a-wso2-carbon-component/

Azure Resource Template for new api app resource

I want to create an Azure Resource Group template which includes the new api app resource. I say new since api apps have changed: App Service API Apps - What's changed
.
I tried this Create a Logic App plus API app using a template . Note: I don't want to create a logic app but this example also includes an api app. When I run this example I get a message: There is a new version of API Apps. Click here to learn more. So this is not the correct example. I can't find a better example.
Note: when I simply add "kind: apiapp" to the "Microsoft.Web/sites" resource, no apiapp is deployed, I also don't get an error.
So my question is how to create a new api with Azure Resource Templates.
I contacted MS for this, they helped me and now it's fixed. Their answer:
Have you installed the new Azure SDK version 2.8.2.1? In that release (actually in 2.8.1 and beyond) we added “Export ARM Template” capability to the provisioning UI. So when you go to publish, then click the New button, you can export your ARM template. That way you’d be able to see exactly the right syntax for creating an API App.
So in VS create a web application, publish it to app service, check api app and then click the export button and you get the correct json.
See also:
https://feedback.azure.com/forums/223579-azure-portal/suggestions/7163577-ability-to-export-a-resource-group-as-a-template

Deploy Rule Service WSO2 Business Rule Server

I was trying to deploy a rule service with WSO2 Business Rule Server
I exactly followed this link
http://docs.wso2.org/wiki/display/BRS200/Creating+and+Deploying+the+Rule+Service#CreatingandDeployingtheRuleService-RuleServiceWizard
I also made the jar file from 3 different class files:
OrderAccept.class OrderReject.class and PlaceOrder.class
I am trying to deploy the server with wizard in the end I got this error
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask. runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: Class Not found : samples.userguide
.PlaceOrder
at org.apache.axis2.deployment.DeploymentClassLoader.findClass(Deploymen
tClassLoader.java:92)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.apache.axis2.deployment.DeploymentClassLoader.loadClass(Deploymen
tClassLoader.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.wso2.carbon.rule.common.config.HelperUtil.processFactDefaultValue
s(HelperUtil.java:43)
Anyone could help me where I might make mistakes?
It seems your jar files are not properly picked. One reason I can think of it, your axis2 archive has wrong folder structure. I am talking about the rule service upload mechanism. You may see there is a folder structure recommended in the documentation. After creating the .aar file, extract it and see whether you have the same folder structure. If it differs from the recommended one, your jar files will not get picked.
I've tried the same example and it's also giving me the same error(both methods, Rule service Upload and Rule Service Wizard). The folder structure that #Amila was suggesting seems to be ok according to the documentation. What I recently found is this link http://wso2.com/library/articles/2013/05/eclipse-plugin-wso2-business-rules-server from which I quote "Previously WSO2 BRS artifacts (aar/car) were created using the web UI rule wizard or creating the artifact by combining several artifacts. With the new WSO2 Developer Studio plug-in for rule services, one can easily create a complete deployable BRS artifact using the Eclipse IDE. Developers can easily create WSO2 BRS artifacts using this tool, and deploy it in the WSO2 Business Rules Server." What I'm guessing is that this new method/tool would substitute the "old" methods(upload and wizard). Give it a try.