How To Install Batch File In Service Fabric - azure

I have created one sample demo windows service which is sending email after regular interval and one service fabric application with Guest executable where I am using this windows service (. exe ) as guest executable. I am using the batch file to install the service on node after service is launched & I have given path of batch file in set up entry point section i.e (Start up section) of service manifest file. After deployment of application , I am receiving error as "Unhealthy deployed application". My final aim is to install the guest executable (Windows service) on node of local service fabric cluster when service is launched or run.I do not understand how to do this as I think set up entry point executes the batch file before service code is launched.
Please kindly help me to resolve this.
Please refer attached screen shot for help.
Thanks

I don't think this is a good use case for Service Fabric as I understand it. If your goal is to install a Windows Service on a set of machines, that's not what Service Fabric is for. Windows Services and Service Fabric services work differently and serve different purposes.
Service Fabric launches and manages your EXE across a set of machines. It is for distributed applications.
A Windows Service runs and manages your EXE on a single machine. It is for running a background process on Windows.

Related

How to create startup tasks (or install dependencies) in Azure Web App?

There is a Cloud Service in Azure classic deployment model. In the Cloud Service you can add web role and set up a startup tasks. If your application has any dependencies that require installation on the destination VM or controll over IIS-related settings, you can use a startup tasks to provide an unattended deployment for this configuration. For example, if you need installed software on the backend side, you can run MSI in startup task to install it.
Unfortunately, I can't find this functionality in new Azure Resource Manager model. My Web App need some installed software on backend side, but I can't figure out how to install it. Could you help me with this?
You can't. Web App (or App Service) doesn't give you control over the underlying OS. You should consider containerizing your app and run it through using e. g. ACI or AKS.
A Cloud Service was nothing more than a VM with extended support in Visual Studio. Cloud Services are deprecated but you can still create a VM in Azure and install your dependencies.

How to install a .exe in the app service of Microsoft Azure?

I published a web application in a app service of Microsoft Azure, but my application needs a driver to connect with a IBM database, that driver is installed in the machine where I developed the application but now I need to install the ".exe" file that contains that driver in the app service of Microsoft Azure in order to get my application running correctly.
How can I install a .exe file in app service of Microsoft Azure?
You can't install 3rd party software in App Service. You should look at deploying your app in a Virtual Machine instead. You'll be able to remote desktop to it and install your database driver.
Azure App Service doesn't allow installing any software to it.
You can include some executable (and its files) in your code tree, but writing to the filesystem or registry is denied.
I confirm that you can't.
If the executable does not require complex dependencies you can store it in the assembly resources and write into a temp directory (check this).
Another option is to have it deployed directly with your project tree.
Than you can invoke it with System.Diagnostics APIs.
But be aware if you're running a Linux App Service you need to set the file to executable.
I suggest to invoke directy the shell command: /bin/chmod +x your_cmd.

Troubleshooting Azure Service Fabric: "The ServiceType was not registered within the configured timeout."

I have deployed a Web API written with .net Core to a local dev Azure Service Fabric cluster on my machine. I have plenty of disk space, memory, etc, and the app gets deployed there. However, success is intermittent. Sometimes it doesn't deploy to all the nodes, and now I have it deployed to all the nodes, but within the Azure Service Fabric Manager page, I see each application in each node has an Error status with the message: "The ServiceType was not registered within the configured timeout." I don't THINK I should have to remove and redeploy everything. Is there some way I can force it to 're-register' the installed service type? Microsoft docs are really really thin on troubleshooting these clusters.
Is there some way I can force it to 're-register' the installed service type?
On your local machine you can set the deployment to always remove the application when you're done debugging. However, if it's not completing in the first place I'm not sure if this workflow would still work.
Since we're on the topic, in the cloud I think you'd just have to use the Powershell scripts to first compare the existing app types and version and remove them before "updating". Since the orchestration of this is complicated I like to use tools to manage it.
In VSTS for instance there is an overwrite SameAppTypeAndVersion option.
And finally, if you're just tired of using the Service Fabric UI to remove the Application over and over while you troubleshoot it might be faster to use the icon in the system tray to reset the cluster to a fresh state.

Azure: Deploying a Ruby on Rails app in the Cloud

I've just completed an automation script that:
downloads a project build to local storage (worker role)
installs ruby, apache, and other dependencies
configures apache and the RoR application to serve requests via port 81
This is all working locally. I'm working with visual studio; running the application successfully pulls the local machine from "blank slate" to "serving requests".
I'm now trying to push this up to Azure - no longer using the local machine, but an actual worker role.
I've packaged the project and uploaded it to a production environment via my Azure subscription portal, but navigating to the site URL doesn't give me anything (site not found).
I'm a bit new to Azure. What steps do I need to take to ensure that this application will work up in the cloud? I feel like I've forgotten to configure something, like the endpoint port (81). Any advice or recommended reading would be super helpful; thank you so much for your time!
If you need some real assistance to troubleshoot the problem, tt would be best to see the following 3 things:
Your automation script (Startup Task)
Your worker role OnStart() function
Your ServiceDefinition and ServieConfiguration
Are you using ProgramEntryPoint to luanch your RoR app or you are doing all of this in Startup task? Based on above info, it is easy to understand the application architecture and some suggestions can be made.
However, the best way to troubleshoot this problem is to enabled RDP access to your Azure Worker Role VM and then Log into your Azure VM to understand what is going on. RDP access to Azure VM will validate that your install script ran correctly and all the modules were started.
As your are new to Windows Azure there could be several things could be missing and if you provide more info you will get accurate help instead of some guess work.

Test Azure application in Dev Fabric

I have a created a sample web role application using cloud service. Before hosting my application in cloud, i want to test the application in Dev Fabric. I am sure that when we run the application from VS, it creates an environment that simulates the cloud.
But, if I want to give my application for testing to QA, do I still need to give my source to them and run the application from VS under Dev Fabric or is there any other ways in running my deployed package under Dev Fabric.
In a line, my question is: How do i run my packaged Azure application under Dev Fabric before hosting in Cloud?
Can anyone having an idea, please share me some information?
Thanks for your quick response. CSRun command helped in accoomplishing my requirement. But i can see that it is taking an IP Address, http://127.0.0.1:80/ by default.
Also i am trying to find it out that, is there a way we can change this to a proper name instead of using like an IP?
for ex: http://localhost/ or
with deployed machine name like http://applicationserver/webrole1/ - so that we can access this from any machine in the netwrok.
I went through the Dev Fabric UI, where we can see the curent instances running, but i didnt find any options for these.
Please share me some information on this.
When you run your application locally, a different kind of package gets created (actually a directory) with a .csx extension.
As long as you have that .csx directory and your configuration file (.cscfg), you can run the package by using the "csrun" command. (So no, you don't need Visual Studio.)
You can use this blog post to access azure services running in DevFabric (DF) from other boxes -
http://blog.ehuna.org/2009/10/an_easier_way_to_access_the_wi.html

Resources