Using VSTS can I install extensions other than those listed in the dropdown? - azure

I would like to install a Web App extension as part of my VSTS build/deployment. The list of options only includes a few options (mostly Python). How/can I install other extensions?

The values in Azure App Service Manage task is static and you just can select them, but you can refer to the source code: AzureAppServiceManage to custom build/release task to include the extensions that you want.
You also could install necessary extensions through kudu API:
SiteExtensions
GET /api/extensionfeed List all extension package infos available on
the online (remote) server. The following query strings are
supported.
- filter: matching string
GET /api/siteextensions List all extension package infos currently
installed. The following query strings are supported.
- filter: matching string
GET /api/extensionfeed/{id} Get a package info with {id} from remote
store.
GET /api/siteextensions/{id} Get a package info with {id} currently
installed.
PUT /api/siteextensions/{id} Install or update the package to local
machine. The payload is the package info returned by List/Get apis
above.
DELETE /api/siteextensions/{id} Uninstall the package with {id}.
An article about Install Azure App Extension With Powershell.
There is a thread to call Kudu API that can help you: Remove files and foldes on Azure before a new deploy from VSTS

You can use powershell\arm templates\rest call to do that. Those are not native steps, so they would require research.
Several examples:
http://wp.sjkp.dk/install-azure-site-extensions-with-arm-template/
https://gist.github.com/sethreidnz/aa996f91339bafdfb5ecb1d4681ba26c/
https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/app-service-web/app-service-web-arm-with-msdeploy-provision.md

Related

How to use self hosted ExtensionBundle

When working locally, how can one direct azure-core-tools to download "Microsoft.Azure.Functions.ExtensionBundle" from a self hosted endpoint instead of "https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json"?
In a enterprise environment, internet proxy often bock access to the internet and artefact have to instead of hosted on the intranet.
Thanks to #DeepDave-MT comment I was able to figure it out.
Upload the extension bundles and index.json somewhere following strict paths:
/Microsoft.Azure.Functions.ExtensionBundle/<version>/Microsoft.Azure.Functions.ExtensionBundle.<version>.zip (can be downloaded from https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/2.13.0/Microsoft.Azure.Functions.ExtensionBundle.2.13.0.zip)
/Microsoft.Azure.Functions.ExtensionBundle/index.json (you use that file https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json)
Set the an environment variable before starting az function core tools FUNCTIONS_EXTENSIONBUNDLE_SOURCE_URI=https://example.net/some/path/
Az core tools will first fetch the index.json, checking the versions listed there and then downloading the zip.

How can I debug on Azure Devops VSO

I have made a task for Azure Devops Server pipeline.
On the local Azure Dev-Ops server, I can upload extensions from the local machine wrapped in VSIX file and examine the agent on the machine itself. The agent has the deployed DLL's from the extension and I always change specific DLL that has Logger inside and it prints to console on the pipeline itself.
How can I check if my task is compatible with the cloud version?
And off course if it is, how can I debug it?
The only possible way I found to insert my task in VSO is through the Microsoft DevOps marketplace, but I cannot upload the whole extension once per each change in code.
Also, didn't find a way to upload personal tasks to the marketplace. The private version is not helping because I can see it from within the server just like my clients.
Any advice or debug experience on that platform is appreciated.
Please follow this devblogs, it described how you can work and debug extension directly inside your IDE without publishing it to the marketplace.
Since this blog is very detailed, just mention the key steps.
Based on debugging purposes, you need create a special manifest, for sample I specify it as vss-extension-debug.json:
{
...
"id": "dev-extension",
"name": "Dev-Extension",
"baseUri": "https://localhost:44362",
...
}
You can customized the id and name by yourself. The most important and magic is baseUri, this will tell the VSTS server to load the extension from localhost where we can run and debug it in IISExpress from Visual Studio.
Note: Since our server need extension served from a secure source, please ensure enable SSL mode to run IISExpress

Can't bind parameter 'log' to type TraceWriter when running Azure function template locally

I met an issue when using Azure function.
I create a Azure Functions v1(.Net Framework) Http Trigger template in VS. But when I try to run it directly, exceptions thrown.
I am using latest version of VS(15.6.7) and Azure Functions and Web Job tools(15.0.40502.0).
When I run it first time, no prompt for installation of anything, it runs on 1.0.10 Azure Function CLI. After I restart my VS and try to run it again, VS asks to download 1.0.12.1 Function CLI. The download seems failed as I still see 1.0.10 on the tile of window. The exception remains all the time.
Any idea? It doesn't make sense since I just try to run a template.
The root cause is shown in your screenshot.
Starting Host(...,Version=1.0.11232.0)
It means your function Cli is 1.0.4 other than 1.0.10 actually, here's release note of 1.0.4. After tests, find that old version does cause this exception. This version issue roots in failing to download latest Azure Function Core Tools trough VS.
Update for official solution
Handle downloading problem of Azure Function Core Tools. Try the first option to download using VS again, if it still fails, use the second option, PS scripts.
Below is the original solution, similar to the first and third official option, just ignore it
More Details
Azure Functions and Web Jobs Tools is updated to 15.0.40502.0 recently and mechanism of using local function Cli is also changed. Release Notes.
Tools now consume a feed which keeps templates, build tools, and the runtime up to date whenever there is a change made in the service.
The first time we create an Azure function after this update, we can see the tip on the dialog Making sure all templates are up to date.... It means VS is downloading necessary cli and templates to this folder C:\Users\UserName\AppData\Local\AzureFunctionsTools.
After a while, we can see the tip changes as
If we don't wait the downloading to complete and create project directly, it will prompt that VS is downloading 1.0.12.1 Cli. And everything should work fine after that.
As for your problem, I reproduce it once due to slow network. It fails to download those files and tries to use old version cli downloaded by VS before.
Solution
I recommend you to delete AzureFunctionsTools folder and restart your VS to download it again.
If it still fails to download, you can download it manually.
You can find download link of cli, itemTemplates and projectTemplates in C:\Users\UserName\AppData\Local\AzureFunctionsTools\feed.json.
And the folder structure in C:\Users\UserName\AppData\Local\AzureFunctionsTools\Releases\1.0.12.1 is like this
cli
--func.exe
....
templates
--ItemTemplates.nupkg
--ProjectTemplates.nupkg
manifest.json
Content of manifest.json
{
"ReleaseName": "1.0.12.1",
"CliEntrypointPath":"C:\\Users\\UserName\\AppData\\Local\\AzureFunctionsTools\\Releases\\1.0.12.1\\cli\\func.exe",
"TemplatesDirectory": "C:\\Users\\UserName\\AppData\\Local\\AzureFunctionsTools\\Releases\\1.0.12.1\\templates",
"FunctionsExtensionVersion": "~1",
"SdkPackageVersion": "1.0.13"
}

manageprofiles.sh can't create DEPLOYMENT MANAGER

My goal is to create a Deployment Manager profile in my Websphere on Linux.
Reading tons of documentation pages gives just two methods:
1) using X GUI application WAS_root/bin/ProfileManagement/pmt.sh
In this case, according to manuals, i should choose Management option, click "Next" and choose Deployment Manager server type.
Actually when i run pmt.sh in my WAS installation there is no option to choose Deployment Manager in Management section and only one profile type that i'm able to create is AdminAgent.
2) using manageprofiles.sh script under WAS_root/bin directory.
The manuals say that i can use -serverType DEPLOYMENT_MANAGER option in order to create deployment manager profile.
Actually when i run the script:
./manageprofiles.sh -create -templatePath ../profileTemplates/management/ -ServerType DEPLOYMENT_MANAGER -isDefault -profileName dmgr -adminUserName websphere -adminPassword websphere1
I get the following message:
The following validation errors were present with the command line
arguments:
serverType: The value for this parameter must be within this set of values [ADMIN_AGENT]
That means that i don't have the ability to create Deployment Manager at all.
Please advise what steps i can perform to be able to install Deploy Manager except erase my WAS installation and install it from scratch once again.
Thanks a lot.
You have standalone aka base edition of WebSphere Application Server. To create Deployment Manager you need Network Deployment edition.
Unfortunately you will have to install it from scratch from different installation files (from ND, not base or developers edition).

Where do you deploy your jive addons in node.js?

I am new to Jive development using Node.js and I see that any addons that you create must be running and reachable via a specific address and port that you define in your jiveclientconfiguration.json file. I tried to deploy a tile addon to Azure websites hoping that would work but there is no way to define what port number Azure uses.
Where do you deploy your production Jive addons at and how do you set your configuration file?
Some of Jive documentation could be a bit confusing.
here the main steps I followed:
Sign up for a free account at Nitrous.IO.
Create a new Node.js workspace.
Install the Node SDK within the Nitrous workspace (npm install jive-sdk -g).
Create a new tile, app, or whatever you want to create (e.g. jive-sdk create tile-list).
Update dependencies (npm update).
Get the URI for your new workspace. (You can use the "Preview" menu to get this... e.g. http://fierce-meteor-71-123263.usw1-1.nitrousbox.com/) Update jiveclientconfiguration.json with this URL.
Start your service (node app.js).
Download extension.zip from Nitrous.
AND THEN... upload that extension.zip to the Sandbox and follow the other directions.
I tried this scenario earlier in the week and it worked for me. Let me know if this helps.

Resources