i have one application which requires lot of setting to run the worker role
i have concern on the when we redeploy the worker role will it change the VM...?
if it change the VM then all the VM related setting file are need to be re-installed and reconfigured. I am trying to install the FFMPEG on the VM where the worker role will be installed
Worker roles in Windows Azure are essentially Stateless Virtual Machines. What that means is that any changes you make after the VM is deployed will be lost when new code is deployed (this would include installing software by connecting to the the VM via RDP) or the VM is recycled.
I would recommend doing the installation of the software you need in the worker role using Start Up Tasks. This way the software you wish to install are part of your deployment package and Windows Azure will install the software (and other tasks defined in start up tasks) before the role starts.
You should always assume that your worker role's VM will change unexpectedly. Any OS configurations you depend on should be part of your worker role's installation process via startup scripts and never be done manually.
Why?
When you upgrade, the VM may change depending on how you upgrade.
The physical hardware that your VM runs on may experience a failure (or upgrade) and can go down at any moment. In many of these cases, Azure will provision a new VM and install your worker role to it and bring it up.
Operating Systems routinely have updates installed on them and these may trigger the above-mentioned scenario.
Related
We have source code with combination of .net 4.0 and C++ (CLI C++). To build this code we use visual studio 2015 and visual studio 2010 both at the same time. To build the C++ source code we using VS 2010. Now as we are migrating to azure devops we need create build pipelines. One way to achieve this is to create a self hosted windows agent and install vs 2015 and vs 2010 on it.
Is there a way to make this containerized? Can we create a custom container image with vs 2015 and vs2010 already installed?
You can use docker inside virtual machine for containerization, You can set up a self-hosted agent in Azure Pipelines to run inside a Windows Server Core (for Windows hosts), or Ubuntu container (for Linux hosts) with Docker. This is useful when you want to run agents with outer orchestration, such as Azure Container Instances.
Both Windows and Linux are supported as container hosts. Windows containers should run on a Windows vmImage. To run your agent in Docker, you'll pass a few environment variables to docker run, which configures the agent to connect to Azure Pipelines or Azure DevOps Server. Finally, you customize the container to suit your needs. Tasks and scripts might depend on specific tools being available on the container's PATH, and it's your responsibility to ensure that these tools are available.
Here is the reference doc https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops
As per my knowledge number of container we run inside the VM is completely depends on the VM size( hardware configuration)we choose. we do have different VM size available in azure.
if you want to run more containers, I would recommend to go with AKS,Azure Kubernetes Service (AKS) simplifies deploying a managed Kubernetes cluster in Azure by offloading the operational overhead to Azure. As a hosted Kubernetes service, Azure handles critical tasks, like health monitoring and maintenance. Since Kubernetes masters are managed by Azure, you only manage and maintain the agent nodes. Thus, AKS is free; you only pay for the agent nodes within your clusters, not for the masters.
I have a Worker Role that need complex environment settings (install a couple of softwares, setup some directories and etc) so I want to deploy it to VM ( instead of Cloud Service that specialize in more simple environment without pre configure settings).
The problem that I can only publish to Cloud Service (from VS 2013), am I missing something ?
I tried to find some article and relevant materiel about deploy a Worker Role to a VM and the only things I found is related to the Cloud Service.
How can I do it ?
(or provide me a general guidelines)
Simply put, you can't deploy a Worker Role as is into an Azure Virtual Machine (IaaS) without doing code changes.
Things you could do:
Isolate your business logic into a separate DLL and then create a separate Windows Service project which consumes this DLL. Then you could deploy that Windows Service into a VM. Do note that your business logic DLL should not have references to any libraries which will only run in Cloud Services kind of environment (e.g. Diagnostics, ServiceRuntime etc.)
Do take a look at Startup Tasks for Cloud Services. They do provide a mechanism to perform additional tasks like installing software when your Cloud Service is deployed.
I have an existing VM with a configured Sharepoint environment. I would like to use this machine as a base for creating multiple azure VM instances for several developers to work on. Is such scenario possible? Is running 'sysprep' (will ruin my sharepoint) unevitable?
I would also be able to upgrade the 'image' (e.g. install windows updates) and create VM's from it afterwards.
How can I achieve this? I know cloudshare offers similar solution, so I suppose it also can be done in azure.
You certainly can make an image from a Virtual Machine. The entire process is described here. Also look at my other SO answer about a caveat when running sysprep (regarding not letting the VM image shut down after sysprep runs).
Once you have your image, it will be available in your Virtual Machine gallery, where you can choose it as your baseline for new VMs (either via portal or PowerShell / CLI).
If, in the future, you do updates on your master image, you'd need to re-create an image for future deployments. Or... you'd need to install the updates on each deployed VM instance.
Note: With web/worker role instances (which doesn't help for SharePoint but could help with other workloads you have), the Windows Server OS image is maintained by Microsoft. Should there be an OS update, these are taken care of for you.
I have a little OS that I'd like to start and use in Azure and thought about running a VM inside a WorkerRole. I know it is possible to use Azure VM roles for that but my exercise is to run it from inside a Worker/WebRole. Is that possible?
I tried installing VirtualBox and running that in a WorkerRole but when running the OS my WorkerRole just reboots.
Any help appreciated.
You cannot run a VM inside a VM in Azure. A Worker Role (or instances of a Worker Role) are already Windows Server 2008 / 2012 VMs. As #Robert pointed out, Azure has support for Virtual Machines, whether Linux or Windows, where you have complete control of its contents.
Regarding I have a little OS that I'd like to start: You can only run supported OS's that are listed in the Virtual Machine gallery: Ubuntu, CentOS, Windows Server, SUSE currently. More info on Linux VMs here, Windows Server here.
What you are trying to do is not technically supported by Microsoft and is not recommended (even if you could easily) since Azure is constantly taking down and bringing back up your Web/Worker role instances in a deployment.
This means that any manual changes made to your WorkerRole will be undone any time Azure bounces your deployment (i.e. data center issues, migrations, etc.) This happens much more often than you'd think.
You should check out Azure's VM support which may have what you need.
I would like to upgrade the "OS Family" of my Azure Cloud Service (Web Role) from "Windows Server 2008 R2" to "Windows Server 2012", so that I have .Net 4.5 available. There is a dropdown in the Azure Portal to make this change, but I am concerned with what kind of outage this may result in... will my deployed website still be active and functional during/after this change?
This is the best documentation I have been able to find and it doesn't mention what behavior I can expect:
http://msdn.microsoft.com/en-us/library/windowsazure/gg456324.aspx
So it is understood how Web Roles function, when you upload your application with configurations, Azure saves the uploaded data separate from any virtual machines. A subsequent deployment of the uploaded application includes creating a brand new virtual machine of your choice (e.g., small, medium,....). There are separate virtual machines for different Operating Systems. Once a predefined type virtual machine is provisioned, your app is loaded on the provisioned virtual machine and virtual machine is then started (it is possible that the deployment takes place after starting the VM). So now, going to back your question, if you change the settings from OS 2008 to OS 2012, it is obvious that the old VM would be de-provisioned and a new VM with OS 2012 is provisioned, your app deployed, etc. Hence, there will be a downtime. My experience is that it takes about 5 minutes or so to make this transition.
If you change the OS family all the roles and the instances will experience the downtime. This is because OSFamily is part of Services Configuration which is the setting for overall application. If you have only Web Role or Worker Role or both in your Azure application changing this setting will applies to all roles and there instances.
Once the configuration changes are applied to the application, the whole services gets updated. Think like this way, if you have multiple instance to a Role, you don't want to run half instance with new configuration and half older configuration, as this may create big problem. So updating application configuration required does required downtime. There is already staging and production slot based deployment available to reduce downtime.
If you want to avoid down time you can do the following:
While your production application already running, deploy your new application with OSFamily=3 (Windows Server 2012) to staging slot
Test staging application as needed
Once your staging application works as expected do "VIP SWAP" at the portal.
VIP swap will push your staging deployment to production and within less then second you will have application running with Windows Server 2012.