Giter VIP home page Giter VIP logo

Comments (21)

kobynet avatar kobynet commented on August 11, 2024

We face the same problem, was very helpful if this was out of the box feature.

from azure-webjobs-sdk-samples.

johnkattenhorn avatar johnkattenhorn commented on August 11, 2024

I second that, it would be good to get some guidance on this from the team.

from azure-webjobs-sdk-samples.

demirag avatar demirag commented on August 11, 2024

Same problem here. Also an emulator would be nice to run/test those webjobs locally. Currently, I have to set a windows scheduled tasks and configure its schedule just to run everything correctly on development machine. I hope those features will be added soon.

from azure-webjobs-sdk-samples.

bradygaster-zz avatar bradygaster-zz commented on August 11, 2024

I'm investigating this with the team and will keep this issue updated as we progress. Great feedback, we'll try to accommodate this.

from azure-webjobs-sdk-samples.

johnsone2 avatar johnsone2 commented on August 11, 2024

+1

from azure-webjobs-sdk-samples.

mrstick2000 avatar mrstick2000 commented on August 11, 2024

This would be great for us as we need to use a transform to swap out log4net configuration depending on the environment that we are publishing to.

from azure-webjobs-sdk-samples.

kmaneshk avatar kmaneshk commented on August 11, 2024

+1

from azure-webjobs-sdk-samples.

DannyRyman avatar DannyRyman commented on August 11, 2024

Still no movement on this? This is the problem with MS at the moment: they build some new technologies to the point that they look good in a demo and then move on to the next thing without considering how this is going to be used in an enterprise environment. At the moment, web jobs are unusable for us without being able to transform that config files based on environment. In my opinion, MS approach to config transformation is a mess. Some project types support it out the box (websites), in some scenarios you can get it working using SlowCheetah and some customisation, and some scenarios there is just no solution to this problem. Grrr.

from azure-webjobs-sdk-samples.

geekcubed avatar geekcubed commented on August 11, 2024

I've worked around this by using CloudConfigurationManager ( https://msdn.microsoft.com/en-us/library/microsoft.windowsazure.cloudconfigurationmanager.aspx )

This will take app.settings stored in the container Website in preference to those in a app.config or web.config. This is fully compatible with command line (exe) WebJobs. Just change your code from appsettings to CloudConfigurationManager & set the settings once per website. Job Done.

from azure-webjobs-sdk-samples.

kobynet avatar kobynet commented on August 11, 2024

@geekcubed there are more than just appSettings section in app/web config files (common logging, log4net etc....) which can't be transformed, you can make all this manually by code but do we really want to go in that path?

I agree with @DannyRyman with the fact that this is a big defect in the design and is a big issue for everyone who uses webjobs.

from azure-webjobs-sdk-samples.

DannyRyman avatar DannyRyman commented on August 11, 2024

Indeed. In my current scenario I need a more complex configuration hierarchy. On a separate note, I don't think you need to use CloudConfigurationManager when using .Net 4.5 as the standard ConfigurationManager appears to pick up the settings from the portal.

Date: Thu, 26 Mar 2015 09:29:56 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [azure-webjobs-sdk-samples] WebJobs SDK needs to create and manage app.config transformations (#5)

@geekcubed there are more than just section in app/web config files (common logging, log4net etc....) which can't be transformed, you can make all this manually by code but do we really want to go in that path?

I agree with @DannyRyman with the fact that this is a big defect in the design and is a big issue for everyone who uses webjobs.


Reply to this email directly or view it on GitHub.

from azure-webjobs-sdk-samples.

benfoster avatar benfoster commented on August 11, 2024

+1

from azure-webjobs-sdk-samples.

vidaica avatar vidaica commented on August 11, 2024

+1

from azure-webjobs-sdk-samples.

mauricionr avatar mauricionr commented on August 11, 2024

+1

from azure-webjobs-sdk-samples.

AlanParr avatar AlanParr commented on August 11, 2024

@DannyRyman IIRC CloudConfigurationManager is just for Web Roles on Cloud Services, I don't think it is needed for any .net version on Web Apps.
For what it's worth, I'm using Git deployment for sites and WebJobs, so my solution to this is to put the settings for the jobs in the hosting site's web.config, prefixed with the WebJob's name. It's not ideal but has served me well so far.
I've found it much simpler to avoid config transforms completely, and use Powershell scripts to set the correctly overridden settings on each environment. As the WebJob has access to the hosting site's config, the WebJob will use values that have been overridden in the Azure portal at the site level.

from azure-webjobs-sdk-samples.

abatishchev avatar abatishchev commented on August 11, 2024

+1

from azure-webjobs-sdk-samples.

bspunie avatar bspunie commented on August 11, 2024

+1 I am trying to publish webjob with dummy website but not able to find a way to upload web job config to appear in portal since my config has values specific to web job.

from azure-webjobs-sdk-samples.

abatishchev avatar abatishchev commented on August 11, 2024

Copied to the actual webjobs repo: Azure/azure-webjobs-sdk#587

Please close this one to avoid further confusion.

from azure-webjobs-sdk-samples.

mathewc avatar mathewc commented on August 11, 2024

Closing because the issue has been moved by @abatishchev. Seems like a VS tooling issue, but we'll find the right home for the issue to address the scenarios.

from azure-webjobs-sdk-samples.

mathewc avatar mathewc commented on August 11, 2024

This is a VS tooling issue, and we've looped in the VS team and they've opened an internal tracking item for this. There is also a public VS User Voice issue (link here) that has lots of traction. Since this issue isn't actionable in the SDK, I'm closing the issues in these repos. All further comments should go to the VS user voice issue.

from azure-webjobs-sdk-samples.

brunobertechini avatar brunobertechini commented on August 11, 2024

I have it working including developer machine and VSTS automated build transformation without SlowCheeta.

Im using this extension in my developer machine: https://marketplace.visualstudio.com/items?itemName=GolanAvraham.ConfigurationTransform
This extension even transform when you use other configuration when debugging. It does that by modifying csproj with custom build tasks. After installing and use "Add config transformations" to your App.config (WebJob) you dont need the extension anymore.

I have the following scenario working:

  • One Web Project
  • One WebJob Project (referenced by Web using the json config -- default)

I have a CI build configured in VSTS using the following parameters:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=$(build.stagingDirectory) /p:AutoParameterizationWebConfigConnectionStrings=false

This is generating 02 WebDeploy Packages (Project.Web.zip and Project.WebJob.zip)

I am deploying only Project.Web.zip (as it includes the webjob as well)

In Release manager im using an extension to do config transformations:

  • Extract zip file
  • Execute transformation for all config files
  • Archive folder again
  • Deploy new archived to Azure AppService

This is working fine for quite a while.

If anyone needs any help please let me know

from azure-webjobs-sdk-samples.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.