How to deploy chatbot (NodeJS) In Azure without Bitbucket connection - node.js

I want to display a chatbot on Microsoft Azure. I've looked at the different alternatives and I can't find a way to do what I want. It's the first time I've ever used Azure and it's probably simple.
The code for this bot is in an organization's Bitbucket repository. I mean, I can't use the continuous deployment that Azure offers because I can't access the organization's Bitbucket. Is there an API I can call or a method for displaying my code without Azure needing to connect to my repository? Well, publishing the bot in a Bitbucket on the Internet (outside the organization) is restricted.
The bot is in NodeJS and I have seen the npm run azure-publish command which may be the way.
Thank you very much for your time.
PS1: Ideally, we should push, not Azure pull.

Finally I have solved my problem by using the command:
npm run azure-publish
Which internally makes a node of a publish.js file in which I specify the necessary parameters for the connection, the path to the ZIP, etc.
What I can't do is a callback to let me know if the deployment was successful, but that's already a straightforward question and I'm with it.
I hope I can be of help to other people. Any additional questions, do not hesitate to ask.

Related

Client permissions on serverless Azure Web PubSub

I've successfully followed the Tutorial - Create a serverless chat using the Azure Web PubSub service.
Now I require giving the clients different permissions based on their ID. Also, add them to different groups.
The documentation on this matter is using a NodeJs server, but it says nothing about how to accomplish this using serverless Functions.
Is there a piece of documentation I am missing? Do you have any lead or example to share on how to manipulate permission on the negotiate function?
After a lot of digging around, I finally found this repository with examples on what I wanted to accomplish:
https://github.com/Azure/azure-webpubsub/blob/main/samples/functions/js/simplechat-wpscontext/connected/index.js

How to Automate Deployment of Azure Database for PostgreSQL using Azure DevOps

Can someone pls help me to automate build and release pipelines in Azure DevOps for Azure DB for PostgreSQL database (Single Server) so that I can create a Database and run different scripts in that database for creating/altering tables, functions, indexes etc. ?
I googled and found nothing in Microsoft documentation for this purpose but I did find it can be done using Zapier
As per organizational policies I can not use Zapier or any third-party tools/sites.
Is it doable only using Microsoft build and release tasks in Azure DevOps, can someone pls guide me with any steps for this purpose ?
Database DevOps is difficult because you have to manipulate existing objects, not simply replace them like you do for application deployments. To do this, you have to add a tool that manages your Data Definition Language queries. Or you can build one. We did that a long time ago. I don't recommend it. Tons of work, lots of issues.
For PostgreSQL, I'd suggest you start testing Flyway. It works really well with Azure DevOps. I have a short video you can use to see it in action. Flyway is open source, so getting started with it is license free. You can install the software, but it also runs through containers, so it makes it really simple to implement through the Azure DevOps agents. The concept is pretty simple. It acts as a marshalling tool to run your DDL in the correct order, like a manifest. Then, it marks the database so it knows which scripts it has already run. You go from there.

Azure Repo Git Integration With Atlassian Jira

At work we are using Azure repositories as version control and Jira for our project management needs and issue management. We wanted to integrate both of these platform, so I sucsseffully installed Azure Pipeline For Jira and tested it out with a demo repo on Github with Github for Jira and it worked, it integrated my git actions on issue pannels. But somehow it does not support the Azure repos (at least there is no free version).
Let me know if any one has a work around for this. (Obviously not paid)
My main Question is, now I am trying to use Azure webhooks to receive information regarding my git activity on Jira issue pannel. In order to receive this information I am trying to create a web trigger URL in Jira's Forge App but couldn't really make it work. Maybe the URL generated by Jira is too big or something it gives 424 error when GET request is sent to the URL. Can anyone help in this regard?

How to publish a SAFE template application to a website/hosting service

I have made a website in the safe template using F# and I am currently attempting to publish it to a hosting service/domain.
I have already uploaded all the project files to the index_html folder using the built in FTP provided by the hosting service. And I am unsure about the next step.
Any help would be most appreciated.
This question is a little wide but as rmunn infers, it's possible your hosting service is designed for a static site.
If I'm making no sense here, I'd head to the Safe Stack docs on Github, read the pages about registering with Azure, then follow the steps to Deploy to App Service. This will give you a much better feel for the sort of hosting arrangement you'll need when deploying the app, and obviously you're not confined to using Azure in the long run. Easiest to start a new template from dotnet new SAFE --deploy azure and get the deployment process working, then retrofit it to your app afterwards I reckon.
Of course if you only need a static website and don't actually have any requirement for an API / DB etc., fable-elmish could work...

Web-Based Initiation of Creation of IaaS in Azure

I want to create an automation demo for customers, where I have a single page web app with a couple of input text fields, and the inputs get used as parameters in the creation of an Azure Resource Group and VNETs/VMs/etc within the Resource Group.
I can do all of the above with Azure CLI (v2.0) on my laptop, and also from CLI using a Azure CLI in a bash script on a Linux server, but I wanted something web-based. I considered standing up a web page on the Linux server to call the bash script, but that seems a bit painful (especially with permissions etc). I also thought maybe Azure Functions could provide a solution to host the single web page app and call the Azure CLI commands, but I've never used Functions before so not sure if Functions can do this; the description of Functions' capabilities aren't clear to me.
What is the best way to achieve what I'm after, quickly?
Note I'm not a developer, I'm a network engineer, so whilst I can hack around in a few languages from Notepad and vi, I'm not looking to build something in a full SDK, or have something with enterprise-level reliability, version control, etc. This is really all about proof of concept and web-based demo of something I already have in Azure CLI / bash script.
Thanks in advance :-)
For a quick and relatively dirty way, you could create an Azure Runbook (using the scripts created from the Azure Portal) and invoke using the Automation API This could use the scripts (or close to) what you already have.
When you roll out a new service in Azure you get the option now to download the Automation Script, you can then follow this article to deploy the generated script via a runbook
To follow on from Jamie's idea.
You can code your Azure Cli script (or Powershell) into an Azure Automation Runbook, you can have variables etc to access it with.
You can then attach a webhook to that runbook, and call it from a standard HTTP Post request.
Meaning you could create a HTML form, that would pass whatever variables are required and build whatever is needed.
The downside of this would be that you will be creating it on your infrastructure.
You can have a solution that will deploy to someone else's infrastructure with a deploy to Azure button
This lets you host it in Github etc, it takes a bit more knowledge to make it work but saves your account dollars!

Resources