Can't schedule azure webjob - azure-webjobs

I'm not being able to publish a scheduled WebJob to Azure App Service. I'm using Visual Studio 2017.
With this settings all works fine:
{
"$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
"webJobName": "WebJobName",
"runMode": "OnDemand"
}
But when I set this settings:
{
"$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
"webJobName": "WebJobName",
"startTime": "2017-03-17T07:00:00+00:00",
"endTime": "2027-03-17T07:00:00+00:00",
"jobRecurrenceFrequency": "Day",
"interval": 1,
"runMode": "Scheduled"
}
Visual Studio 2017 crashes at the "Creating the scheduler job" step.
I can't find how to schedule this job, I'm using the package Microsoft.Web.WebJobs.Publish 1.0.13
Can anyone help me?
Thanks

The feature where VS configures the Azure Scheduler has many issues, and is on the way to deprecation. Instead, the suggested approach is to rely on the CRON feature described here.
As an aside, if you want to get the scheduler working and not move to CRON, one thing you should do is upgrade to the latest version on the WebJobs NuGet package, which should solve this particular issue.

Related

Is there a way to let CloudFormer (beta) keep user data in launch configuration

I tried out CloudFormer(beta), the AWS tool that generates a CloudFormation template from selected existing infrastructure. CloudFormer is run as a separate stack, which creates an instance. You create the stack using the CloudFormer template and then log in on that instance using credentials you filled in when creating the stack. As described in https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-using-cloudformer.html.
This all worked smoothly. I got into the CloudFormer wizard and was able to easily click through and select all my resources, which consisted of a VPC, with an autoscaling group that runs a simple web app that's connected to S3, RDS and DynamoDB. The excercise is based on Ryan Lewis' excellent Pluralsight course for AWS (source code). When I ran the resulting CloudFormation template, I ran into just one issue: I had to change single occurence of AWS::RDS::DBSecurityGroup to AWS::EC2::SecurityGroup, because the former doesn't seem to be accepted. Then my stack was created successfully.
However, the app was not running. A quick inspection showed that the user data was missing from the launch configuration. So it seems that CloudFormer just skips that when creating the template for the launch config. That's slightly strange to me, as the user data is what makes launch configs useful. Did you experience the same issue and is there maybe a workaround?
For completeness sake, here is the relevant part of the CloudFormation template that was generated:
"lcpizzalauncherdyn4": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"AssociatePublicIpAddress": true,
"ImageId": "ami-0661a53fb3b1e117a",
"InstanceType": "t2.micro",
"KeyName": "pizza-keys",
"IamInstanceProfile": "pizza-ec2-role",
"SecurityGroups": [
{
"Ref": "sgpizzaec2sg"
}
],
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"SnapshotId": "snap-0cad60faa1e33e22b",
"VolumeSize": 8
}
}
]
}
},
See the full file on gitHub
Seems sad if the CloudFormer tool is not usable for creating a fully working template because of a little omission like this. Now I do get that it is a beta, so I tried finding a place to report an issue. Do you know what is the preferred way to let the AWS team know?
CloudFormer has been in beta since 2011. It does not appear to have been maintained much lately, so it might be deprecated in future.
So, it looks like you'll need to add the User Data section manually.

Continuous deployment between TFS and AWS

I'm working for a company where we're using on-prem TFS for dev and continuous build, however our environments are hosted on AWS. We need to setup a continuous deployment pipeline from our build servers to AWS.
Any recommendation for an enterprise continuous deployment tool for such an environment? We've already done a POC with Octopus Deploy. Is it possible to set up a continues deployment pipeline using just Microsoft tools? Any pointers and documentation with examples would be highly appreciated.
Octopus Deploy is indeed a good choice. Octopus Deploy and TFS/VSO can work together to make automated, continuous delivery easy. For more information, see the Octopus Deploy documentation at http://docs.octopusdeploy.com/display/OD/Team+Foundation+Server
It's also possible to set up a continues deployment pipeline using just Microsoft tools. You need to use Microsoft Release Managerment.It can Run automations to deploy your app to each environment.
If you are working on vNext build, just like James mentioned, this is only support for Team Foundation Server 2015 (update 2 and above) and Visual Studio Team Services. Detail features you can refer this link:Release Management vNext
If you are working on XAML build, here is a good documentation about Continuous Integration, Continuous Deployment with Team Foundation Server 2013 & VS 2013
You can easily integrate the new Release Management tools from Microsoft with TFS.
!!Release Management tools in TFS 2015 Update 2
The easy way would be to install the TFS 2015 Update 2 RC. It's fully supported by MS and works great.
http://nkdagility.com/the-high-of-release/
!!Release Management in VSTS with TFS
An alternative until Update 2 is to use VSTS Release Management Online to do the deployments from your local TFS.
https://blogs.msdn.microsoft.com/visualstudioalm/2015/11/28/deploy-artifacts-from-onprem-tfs-server-with-release-management-service/
I would recommend that you use one of the two above methods or move your TFS server to VSTS in it's entirety.
!!Release Management Server for TFS
For now the released version of RM is available for download and install. It's not as good as the new one, but also works fine.
http://nkdagility.com/create-release-management-pipeline-professional-developers/
You can do it without octopus. All you need is an EC2 based build agent with (PAT) authentication and you can deploy almost any artifact. How to do this is given in following tutorials.
How to Build a CI/CD Pipeline Using AWS CodeDeploy and Microsoft Team Foundation Server (TFS)
(For hybrid/complex deployments, you can use this. You can deploy IIS websites, MSI packages, services, exe). The beauty of this is that with a single deployment you can deploy to both on premises and cloud environment.
https://www.youtube.com/watch?v=MIE0P3m9eEY
How to Integrate AWS Elastic Beanstalk with Microsoft Team Foundation Server (TFS) or (VSTS)
(for IIS websites/batch jobs you can use this)
https://www.youtube.com/watch?v=nRLZZefLDqU
How to Integrate AWS Cloudformation with Microsoft Team Foundation Server (TFS)
(fully infrastructure automation and manage infrastructure as code)
https://www.youtube.com/watch?v=WU93NJT0_3s

Is it possible to use Web Deploy from Visual Studio Online?

I would like to build in Visual Studio Online and then Web Publish to Amazon.
Is this possible? Or does it only publish to Azure?
It publishes to wherever you like.
Use the PowerShell, Batch, or ShellScript task to deploy to whatever system you like in whatever way that you want.
Better yet, create a professional release pipeline with release management and deploy to many environments.
I ran MSBuild with the following parameters added...
/P:DeployOnBuild=True
/P:DeployTarget=MSDeployPublish
/P:DeployIISAppPath=MyWebsite
/P:AllowUntrustedCertificate=True
/P:MSDeployPublishMethod=WMSvc
/P:CreatePackageOnPublish=True
/P:MsDeployServiceUrl=https://DOMAIN/MsDeploy.axd
/P:UserName=User1
/P:Password=******

C++ in the cloud. Casablanca REST Service on Microsoft Azure

Hello fellow Azure users. I have created quite an extensive C++ REST service using the CasaBlanca REST SDK. When I began working on this project I as lead to believe that I could run it in the Cloud (Azure) . Please explain how best I can get this service to run on Microsoft Azure. I can't afford to re-program the entire project in another language like C# or Java. Thanks in advance!
If you're wondering why I believed CasaBlanca was meant for the Cloud:
http://channel9.msdn.com/Events/TechEd/Australia/2012/AZR331
-Seth
Looking at the TechEd video I can see that they are using the SpeechService demo which you can find the source of here: https://hg.codeplex.com/microsoftcasablanca so you can understand how they performed the deployment to Azure.
Looking at the code I can see the solution is designed to be deployed to a Cloud Service Worker Role and includes a "Cloud Service" project in the Visual Studio solution - this is the project type which gives the "Deploy To Cloud" option which you see in the video.
Given that the demo is from 2012 there will have been many Azure SDK releases since then so the demo code may require an update, but the deployment method from Visual Studio 2012 and 2013 remains essentially unchanged.
Regardless how you're using casablanca, c++ applications can be run on Virtual Machines, web/worker role (stateless) VMs in cloud services, probably websites... Choosing between these is a matter of opinion (or at least dependent on the app you're building), and there's no single right answer.

Looking for a .NET BuildServer SaaS

I've a question regarding Build Servers for .NET Projects. Currently I'm using TeamBuild in conjunction w/ TFS 2010 to do automated builds in the .NET world. Some older projects are built using plain old MSBuild scripts.
To get rid of the administrative effort I'm currently moving my sources to github. Github offers, as many other sites service hooks to trigger build servers for doing automated builds such as CI or nightly builds.
Sure I could use TeamCity OnPremise and dynamically create Build Agents in Windows Azure using VMRole and Virtual Disks, but I think this hybrid solution is a little bit moronic.
So what are your thoughts about the following architectural idea?
Let's say you're using github as source control platform. When commiting sources to your repository an Azure WebRole hosting a WCF Service will be triggered.
The WebRole itself will just use the Azure API to fire up a new instance of a custom Azure VMRole.
The Azure VMRole itself will use some kind of buildscript such as Rake or MSBuild to have as few developer tools installed on the build agent as needed. After building the entire project the artifacts will be published to Azure BlobStorage and the WebRole hosting the WCF service will be called again, but right now the Azure WebRole is going to terminate the BuildAgent.
While using such a setup you could minimize the costs for the build agent and build nearly any kind of project as far as you're able to install the required element for the build by using PowerShell.
So in bottom line: what are your thoughts on this architecture? Other Ideas? Is there an existing service offering such a solution?
Thorsten
have you looked at https://appharbor.com ? I know a number of people who are using it to do exactly what you are doing.
Check out Team Foundation Service as it can do the following:
Continuous Delivery to Azure
Deploy to production on Windows Azure with two clicks from Visual Studio, or automatically as part of your build process.
Just found this one http://www.appveyor.com/ AppVeyor is also free for OpenSource projects.