How to deploy an angular2 application as a webapp in azure - azure

Can someone help me deploy an angular2 application as a webapp in azure. I have a github enterprise setup. On my Jenkins server, I would like to do a no build. On successful completion of the build, I'd like to push it to a webapp.
Every deployment I attempted, failed on npm of one form or other. I don't want to create a VM and deploy a server.
I'd appreciate any help on this.

Deployment of all supported web applications to azure web app service ( PaaS and not IaaS VM as per your requirement) is possible by the following options
from git CLI you can publish the code from your local repository to azure.
linking an online repository like bitbucket, gitlabs to azure
Powershell - publish code from your local repository to azure
Azure CLI - publish code from your local repository to azure
FTP option is available as well.
Check out this post to see how you can publish using git commandline https://learn.microsoft.com/en-us/azure/app-service-web/app-service-deploy-local-git

Related

Develop on Azure DevOps and deploy to another cloud service

We have been developing an Angular application on Azure DevOps. My company wants to have the app running on another cloud service. Can anyone tell me: Can we create a pipeline that will deploy the production version of our application from build in Azure to this other cloud service? What are the pitfalls or potential obstacles? Is anyone doing it already that could speak to it from your experience? Thanks in advance.
If you want to deploy Angular application on Azure DevOps to Azure App Service via Azure Pipelines, you could follow below steps.
Create a build pipeline, add a npm task to install the npm packages required by the Angular application
use npm task to build the application and produce the assets to be published on the web server
Add a Publish Build Artifact task that generates the artifacts which will be provided later on as an input to release definition
The last step is to add a CD pipeline which will deploy the artifacts created by the build to the Azure Web App by using this Azure App Service Deploy task. See this tutorial for details.
If want to deploy to other cloud service, this doc provides the system-defined tasks, you could review it to find if there are existing available tasks. If not, you may need to develop a custom pipelines task extension or find if there are existing extensions in the Azure DevOps Marketplace.

How to Deploy a React App(code present on github) to Azure WebApp using jenkins and TerraForm

I basically want to deploy(CICD) a React App(simple create-react-app) present in GitHub to Azure Webapp using Jenkins and TerraForm. I am in search of step by step process to do this.
I can't use the Azure DevOps platform since it is restricted in the organization I work.
Here is a tutorial for Deploy to Azure App Service with Jenkins and the Azure CLI might help.
But considering your React App already present in GitHub, there is a easier choice to deploy, which is using Git Action.
Create an App Service on portal.
Navigate to Deployment Center, better to use the Preview version.
Configure the CI/CD:
Go to your GitHub and see the Action logs, which is more clear than portal:

How to deploy to azure app service from VSTS?

I have nodejs app. Can I deploy it to azure app service without VS or other big IDE?
So, I want an easy way to select branch what I need push it to azure and run default command for nodejs.
I'm stuck with it, because all of solution it is use VS.
You can deploy to azure app service by using Azure App Service Deployment step/task. For example:
Create a build definition
Add related step/task to build your project
Add Azure App Service Deployment step/task (Can publish using Web Deploy or upload files directly)
Select Triggers tab and enable Continuous Integration
Specify repository and branch filters
After that, the build will be triggered if you push changes to target branch.
Related article: Define a continuous integration build for your Node.js app
Regarding run command for nodejs, you can refer to this thread by using kudu API: Include node modules in azure deployment via VSTS.
This can be done. Take a look at the build and release functionality in Visual Studio Team Services.
With VSTS Build, you can trigger a build and push to an Azure Web App automatically on a Git check-in for a particular branch, or you can manually trigger the build and push.
Take a look at the Azure App Service Deploy task in VSTS build.
Note that since VSTS is pulling from your Git repo, it doesn't matter what IDE you use to actually develop your app with.
Also, VSTS is free for small teams and a single deployment pipeline.

How to Deploy Static html/js App using VSTS Continuous Integration and Azure

I'm trying to deploy an Angular app to Azure Web App using VSTS Continuous Integration.
My repository doesn't contain any .sln .pdb, it's just a static web site.
I have define my build to run npm, gulp, but I don't know how to create an artifact without building the the vs solution.
I would also need to create a release task to publish the web site to azure.
Does anybody has a build definition that would work for this deployment?
Thanks
You can add "Copy and Publish Build Artifacts" task to copy and publish the deployment files to artifact folder that can be used in "Release Management".
And then you can enable "FTP Deployment" for your Azure Web App and use "FTP Uploader" task to publish the files to Azure.
I've solved this a few ways:
Use azure git deploy. https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/ I bake the git credentials into a script, and force commit and publish the site to the azure url.
Use Publish-WebApplicationWebsite.ps1 from the Azure SDK https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-publish-webapplicationwebsite-windows-powershell-script/ I recall handing it a folder, but it appears the current version takes in an MSDeploy package.

Automatically upload local changes into windows azure / amazon s3 cloud server

I have to create a Visual Studio project with the following functionality,
Once the project is created, the service should automatically upload the project files in to cloud storage (using windows azure or amazon s3 server).
If any changes in the project files, instead of uploading the whole project, only the modified files has to be uploaded. ( like SVN commit).
Could anyone please let me know if you have any ideas on this?
What you describe is more-or-less what "git deployment" is about - deploying changes to a web site or application by pushing the changes from a local git repository to a remote one. The deployment triggers a service or script on the remote repository that updates your site.
Azure supports this for Azure Web Sites. See for example Continuous deployment using GIT in Azure App Service for a step-by-step guid on how to create a new site, deploy and update it using Git.
The engine that automates git deployments in Azure is available as an open source project, Project Kudu which can be hosted outside Azure, eg on your own web server.
Amazon doesn't offer all of this out of the box. Its Elastic Beanstalk offering allows you to publish an ASP.NET MVC project to a specific configuration (VMs, settings etc) right from Visual Studio but it's a manual process and doesn't deploy only changes. Check How to Deploy an Application Using Elastic Beanstalk for a step-by-step guide.
You can use Project Kudu on an Amazon VM to use git deployment. This won't set up the VMs as Beanstalk does, but it will deploy only the changes to your site.

Resources