WINDOWS SERVICE BUILD DEPLOY PIPELINE TO A VIRTUAL MACHINE - Using Deployment Groups in Azure DevOps

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ค. 2020
  • Hey Friends, In this video let's look at how to set up a Build/Deploy pipeline for a Windows Service running on a Virtual Machine (VM). I am using a Azure hosted VM in the demo, however this works same for a VM on your own infrastructure as well. The Windows Service is built using TopShelf, but the way you set up the pipeline is applicable to any windows service or executable you need to run on a VM.
    I walk through setting up the VM deployment group, registering it as an Agent and configuring the release pipeline to use this deployment group. The application also contains environment-specific variables which is replaced using DevOps Release variables. With the build/deploy pipeline we can continuously deploy the windows service to a Virtual Machine any time a change is pushed through the source repository.
    TopShelf - docs.topshelf-project.com/en/l...
    Additional Watching:
    Azure DevOps: Release Variables - • Azure DevOps: Release ...
    Come say hi! ✋
    Blog - rahulpnath.com/
    Twitter - / rahulpnath
    Instagram - / rahulpnath
    My TH-cam Recording Setup - www.rahulpnath.com/blog/youtu...
    Make sure to SUBSCRIBE to the channel. THANK YOU for helping me grow this channel !!
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 166

  • @RahulNath
    @RahulNath  4 ปีที่แล้ว +1

    Check out the Source code and the build release pipeline links here
    Source Code - rahulpnath.visualstudio.com/TH-cam%20Samples/_git/WindowsService)
    Build Pipeline - rahulpnath.visualstudio.com/TH-cam%20Samples/_build?definitionId=14&_a=summary
    Release Pipeline - rahulpnath.visualstudio.com/TH-cam%20Samples/_release?_a=releases&view=mine&definitionId=3
    Thanks for watching - Don't forget to like and subscribe!

  • @edufur
    @edufur 3 หลายเดือนก่อน

    Very well done! You covered more material in 13 minutes than many would do in an hour. Very clear cut and to the point. Bravo!

    • @RahulNath
      @RahulNath  3 หลายเดือนก่อน

      Very happy to hear that and Glad it was helpful Eric!

  • @dwainbrowne
    @dwainbrowne 4 ปีที่แล้ว +12

    You deserve a lot more credit and a lot more views!!! Your videos are very clear and informative. I've been through many documentation, none as clear as your videos. Please keep up the great job!!

    • @RahulNath
      @RahulNath  4 ปีที่แล้ว

      Thanks for watching and the nice comment! Glad you like it!
      Do let know in case there are any specific videos you are looking for!

  • @sergeysorokin9133
    @sergeysorokin9133 3 ปีที่แล้ว +2

    Finally someone created simple and very important video! Well done!

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you and glad you found it useful!

  • @edwang4810
    @edwang4810 3 ปีที่แล้ว +1

    I'm new to azure devops, this tutorial is the only one I found which is amazingly helpful of deploying a worker service project! Already subscribed!

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Great to hear! Thank you Ed.

  • @atabayilker
    @atabayilker ปีที่แล้ว

    I was missing the Archive Files step, which had me looking for answers for days! Thank you for this simple yet explanatory video.

    • @RahulNath
      @RahulNath  ปีที่แล้ว

      Great to hear!

  • @amritjain8688
    @amritjain8688 3 ปีที่แล้ว +1

    This is very useful short and simple... Thanks!!

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว +1

      Happy that it helped Amrit. Do check out my other videos in this series which covers different deployment scenarios. th-cam.com/play/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U.html

  • @chriscousens1057
    @chriscousens1057 2 ปีที่แล้ว

    AMAZNIG VIDEO!!! One of the best, most helpful and to the point on TH-cam!!

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      Glad you think so Chris!

  • @TheRealEnergyy
    @TheRealEnergyy 3 ปีที่แล้ว +2

    Very helpful, gave me exactly what I was missing

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Happy to hear that!

  • @nishankagnihotri382
    @nishankagnihotri382 2 ปีที่แล้ว

    Thanks Rahul, for sharing such precise and valuable informative video; really helped a lot for day-to-day DevOps implementation/troubleshooting. Cheers!

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      Glad to hear that Nishank!

  • @klausahlbaumer2475
    @klausahlbaumer2475 3 ปีที่แล้ว

    You saved my day! I have to configure a build pipeline for the first time in Azure DevOps. Before I'm using on premise TFS. So there I used the "Windows Machine File Copy" specifying a FQDN with credentials in our network. In Azure DevOp this won't run anymore. So I installed deployment agents. But here the same as before, it will not work. My mistake was to think to complicated. With the deployment agents it is easy as it can be, simply specify directories as if we are working on the local maschine (and not \\servername\share\...).
    With your fantastic Heartbeat-Video I now understand what to do (and I searched and tried a lot before). And an additional benefit, I've never heard from Topshelf before. This tool makes it very easy to install my artifacts as services. Awesome and very helpful. Congratulations, you made a good job.

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you Klaus for the comment. Made my day!
      Do check out the other videos in the series if you run into issues with Azure DevOps pipelines - th-cam.com/play/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U.html

  • @RameshP-ds4xt
    @RameshP-ds4xt 3 ปีที่แล้ว +1

    Very clear info. thanks a lot

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      You are welcome Ramesh!

  • @mobeenanwar
    @mobeenanwar 2 ปีที่แล้ว

    Great video, good job. Yours is a very underrated channel.

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      Thank you Mobeen. Happy you like it!

  • @KhorshedAlam11
    @KhorshedAlam11 3 ปีที่แล้ว

    Simply wonderful!

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Many thanks Khorshed!

  • @leighhydes
    @leighhydes 3 ปีที่แล้ว +1

    Thanks Rahul this was a great help!!

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Awesome. 😀

  • @attilajakab4915
    @attilajakab4915 2 ปีที่แล้ว +1

    Thanks, this was very helpful!

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      Glad it was helpful Attila!

  • @srinimorapaka
    @srinimorapaka 3 ปีที่แล้ว +1

    Hey Rahul, Your videos really good, I appreciate your effort

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you so much Srinivasulu for letting me know 😀

  • @TellaTrix
    @TellaTrix 3 ปีที่แล้ว

    Rahul you are awesome guy to explain in very details.

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you 😀

  • @mangeshkadam1084
    @mangeshkadam1084 ปีที่แล้ว +1

    Nice demo 👌🏻

    • @RahulNath
      @RahulNath  ปีที่แล้ว

      Glad you liked it

  • @thekuma1027
    @thekuma1027 ปีที่แล้ว +1

    Thanks Rahul for this video

    • @RahulNath
      @RahulNath  ปีที่แล้ว

      Thank you Mandeep !

  • @ArunKumar-eb2uq
    @ArunKumar-eb2uq ปีที่แล้ว

    Nice Explanation, Thanks :)

    • @RahulNath
      @RahulNath  ปีที่แล้ว

      You're welcome! Arun

  • @subbareddy7416
    @subbareddy7416 11 หลายเดือนก่อน

    You are doing great Job

    • @RahulNath
      @RahulNath  11 หลายเดือนก่อน

      Glad you are liking the videos!

  • @balajid5461
    @balajid5461 3 ปีที่แล้ว

    Awesome...This is really helpful

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Glad to hear that Balaji!

  • @shubhamnagrare1534
    @shubhamnagrare1534 3 ปีที่แล้ว

    Wonderfull Explaination !!! :)

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you! 😃

  • @RasmusFjord
    @RasmusFjord 3 ปีที่แล้ว +1

    really helpful, two thumbs up from me! :D

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Glad to hear! Thank you

  • @kunalpanchal272
    @kunalpanchal272 4 ปีที่แล้ว +1

    Video is really good, straight forward and very easy to understand. Great Job!!!

    • @RahulNath
      @RahulNath  4 ปีที่แล้ว

      Thank you and happy it helped 😀

  • @steveaustin6608
    @steveaustin6608 2 ปีที่แล้ว +1

    thank you so much

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      You're welcome Steve!

  • @AdrianoRodrigues
    @AdrianoRodrigues 2 ปีที่แล้ว +1

    Really awesome. Rahul I have a question, why is it needed to use deployment group instead of normal agent? The normal agent even have the option to connect to a virtual machine

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว +1

      This was more of an example to show how to use deployment groups - yes if all you need tis to use the normal agent you could do that too. Hope that helps

  • @sahasrayeshu-vlogs
    @sahasrayeshu-vlogs 11 หลายเดือนก่อน +1

    TQ

    • @RahulNath
      @RahulNath  11 หลายเดือนก่อน

      Welcome

  • @AjishPrabhakar
    @AjishPrabhakar 2 ปีที่แล้ว

    Could you please help me to understand how to do a patching automation with azure devops ? For instance, I have a windows / webapplication already hosted in a machine. Now I just need some selected files in the publishing artifact. Is that possible ?

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      I haven't done this myself Ajish, so unfortunately can't help. These days most of the apps I build are PAAS where the cloud provider manages all this. (Web Apps, Functions etc)

  • @parinitajha9416
    @parinitajha9416 2 ปีที่แล้ว +1

    Thank you

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      You're welcome 🙂

    • @parinitajha9416
      @parinitajha9416 2 ปีที่แล้ว

      @@RahulNath can you plz make a video on web application deploy pipeline . I did try. But getting some issues.can you please help me.

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      @@parinitajha9416 I already have in my devops series th-cam.com/play/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U.html

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      @@parinitajha9416 here is one for SPA th-cam.com/video/SYhufaLn51w/w-d-xo.html. There are a few others including the YAML release pipeline

  • @sid0000009
    @sid0000009 3 ปีที่แล้ว +1

    hello Rahul, If we deploy an Infra example an App Service Plan in the Release pipeline before deploying the code. My question is every time a new version of the code gets pushed will the infra also gets re-created everytime. How does that work out in real life examples. thank you

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Hi Chaisen, When using infrastructure as code, mostly I tend to stick with the flow where the infrastructure is deployed if it does not already exists. So if it's already created then it skips that resource. I cover some of this in my ARM template video here th-cam.com/video/3IRwtbGlshk/w-d-xo.html
      Let know if that answers your question.

  • @vvijayar
    @vvijayar 3 ปีที่แล้ว +1

    Thanks for sharing this Rahul , I am doing something similar and everything works except variable substitution.
    I am trying to override serilog path of appsettings.json but its not working.
    In the initialize job I could see
    [SERILOG_WRITETO_ARGS_PATH] --> [F:\\Services\\Logs\\ICEFTPWorkerService.txt]
    In File Transform
    I could see
    2020-12-07T03:29:29.1095014Z Applying JSON variable substitution for E:\Apps\ICEFTPWorker\appsettings.json
    but its not getting applied to actual file , any thoughts?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Hard to tell without actually seeing it in action. Couple of things to check
      - Is the variable replacement happening at the right step. Is it the transformed file that is getting deployed
      - Is the name matching correctly and the scopes for variable specified correctly.

  • @avnic1
    @avnic1 3 ปีที่แล้ว

    Yessssssssss!!!

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Hope it was helpful 😀

  • @biswajit4631
    @biswajit4631 2 ปีที่แล้ว

    Hi Rahul, could you please help me blue green deployment with same virtual machine

  • @manpreetsrmcem
    @manpreetsrmcem ปีที่แล้ว

    That IF NOT EXIST script is giving error in my deployment target...

  • @mekarthikktk75
    @mekarthikktk75 2 ปีที่แล้ว

    Hi Rahul ,your video was so gud ! Can i use the same approach to Deploy the windows service in the Onprem applicaton server ? In that case Is it mandatory to create the Deployement Group ? That is the usecase for Deployment group here

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      The demo deploys it on my development laptop, so you should be able to do it onprem machine. What issues are you facing?

    • @mekarthikktk75
      @mekarthikktk75 2 ปีที่แล้ว +1

      @@RahulNath issue now got resolved , Thanks

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      @@mekarthikktk75 Great to hear that!

  • @kieranpatel2192
    @kieranpatel2192 3 ปีที่แล้ว +1

    Rahul i like your approach however why not build a pipeline then choose a windows template ?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you, Kieran. Sure do use it if it does the job. Intend was more to break it down into pieces and show from scratch how to build up one. Helps understanding I believe.

  • @shaikhussain_ece
    @shaikhussain_ece ปีที่แล้ว

    Hey i need some help after running the power shell script it got stuck not moving forward for azure pipeline image

    • @RahulNath
      @RahulNath  ปีที่แล้ว

      Very hard to assist without more details Hussain. What is it stuck on, what is the error?

    • @shaikhussain_ece
      @shaikhussain_ece ปีที่แล้ว +1

      Hey thanks for replying to me now issue has been fixed after restarting the system

    • @RahulNath
      @RahulNath  ปีที่แล้ว

      @@shaikhussain_ece Awesome glad it sorted out itself!

  • @dfwnorthwest
    @dfwnorthwest 3 ปีที่แล้ว

    Where can I see the yaml file and how did you know to use those paths in the vsbuild task?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว +1

      Here is the build pipeline that I used for this video - rahulpnath.visualstudio.com/TH-cam%20Samples/_build?definitionId=14&_a=summary
      (It is there as a pinned comment on this video as well)
      Which paths are you referring to in the vsbuild task?

    • @dfwnorthwest
      @dfwnorthwest 3 ปีที่แล้ว

      @@RahulNath That works. Ive used azure build before briefly, but not with yaml.
      I have a solution with 3 projects.
      1 web app
      1 windows service
      3 shared class libraries.
      The question I was asking about paths, are the various $build paths, which I suppose are predefined variables, correct?
      Im trying to make sense of the docs
      Basically, I need to publish my windows service and web app, which both use the same shared libraries.
      Have the on-prem agent already setup for the deployment group.
      Questions:
      When I run a build with that yaml file, how are multiple projects handled? Each have their own /bin /obj folders
      So this part of the VSBuild@1 task:
      msbuildArgs: '/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)"'
      Im not sure I understand why this was required. If this wasn't included, where would the next task (ArchiveFiles@2) use as its starting path? Thanks

    • @dfwnorthwest
      @dfwnorthwest 3 ปีที่แล้ว

      ​@@RahulNath Also, when the build runs, I have a zip file in the drop folder and opening it, I see a folder "_PublishedWebsites" and then all the files for my service, but seems like there are many more than just the service files. Seems like I would want two sub folders under the drop location? One each for the web app and one for the windows service?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว +1

      I have specified the OutputPath so that by default the msbuild artifacts are placed into that directory. In that example I have used the build task on the solution file. You can also specify project files to that as the parameter. So in your case if you want to create multiple deployable packages with the same build, you can use that task or the msbuild task on each of the projects (web app and windows service) and specify appropriate Output paths (e.g '$(Build.BinariesDirectory)\$(Build.BuildId)\WebApp"). So you will have two such tasks to do it. Alternatively, you can also build the solution once and copy over the appropriate binary directories into respective folders like above, using the copy task.
      Let know if that helps.

  • @colliermallory418
    @colliermallory418 3 ปีที่แล้ว +1

    Sounds like good information. Unfortunately, I couldn't see some of the things you clicked on due to the video of you in the lower right hand screen covering part of the web site.

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว +1

      Sorry about that Collier - Let know if you have any specific questions and happy to answer. I have fixed this problem in my newer videos. Thank you for the feedback

    • @colliermallory418
      @colliermallory418 3 ปีที่แล้ว +1

      @@RahulNath Do you have a video like this for .net 5 apps?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      @@colliermallory418 Nothing yet. Are you facing any particular issues with it? I believe high level it should still be the same?

  • @subbareddykola1643
    @subbareddykola1643 3 ปีที่แล้ว +2

    Thank you good videos for devops learners. Can you Please guide me.....how to copy the Build artifacts from Private Agent (custom agent) to target another windows server ? Thank you

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว +1

      Thank you and happy that you are finding the videos useful.
      Are you looking to move the artifacts from on server to another? Does using the FTP Task work for you? docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops

    • @subbareddykola1643
      @subbareddykola1643 3 ปีที่แล้ว

      @@RahulNath Thank you for your response.. Rahul
      here am using the azure default agents when triggering the code build and my artifacts are copying with in azure pipeline location (D:/a/1/a), how can i route the artifacts to another target windows server. Thank you.

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      @@subbareddykola1643 The FTP task should still here I guess to copy the artifacts over to a remote server. Did you give that a try? Are you facing any issues?

  • @balajid5461
    @balajid5461 3 ปีที่แล้ว +1

    Hello brother, do you have anything related to implementing CI/CD using Azure devops.

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว +1

      Yes a full series - th-cam.com/play/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U.html
      What are you particularly after ?

    • @balajid5461
      @balajid5461 3 ปีที่แล้ว

      @@RahulNath I wanted to build my C# code (Currently we are using CI/CD jenkins job). but here i wanted to use Azure devops. and finally i wanted to move my code to the VMs like (DEV, QA and Prod) environments.

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      @@balajid5461 depending on type of app and how’s its deployed the pipeline changes . I have a lot of common scenarios in the series. Most of them are .NET apps (web,exe etc)

    • @balajid5461
      @balajid5461 3 ปีที่แล้ว

      @@RahulNath yeah, mine also .NET application.

    • @balajid5461
      @balajid5461 3 ปีที่แล้ว

      @Rahul Nath, Is this (th-cam.com/play/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U.html) to follow reach my target?

  • @prasiddhi15
    @prasiddhi15 2 ปีที่แล้ว +1

    Can we automate azcopy using windows service?

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      You should be able to run it on a schedule yes.

    • @prasiddhi15
      @prasiddhi15 2 ปีที่แล้ว

      @@RahulNath Thanks, can you suggest me any forum or knowledge base link for this?

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      @@prasiddhi15 lots of different ways to run scheduler - if you want to run on .net check out scheduler libraries like Quartz

  • @aronichakraborty5192
    @aronichakraborty5192 2 ปีที่แล้ว

    I am getting error after I paste the script in PowerShell inside VM. Please help me.

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      Hard to tell without seeing the error.

  • @MaheshVelusamy
    @MaheshVelusamy 2 ปีที่แล้ว

    @rahul Nath thanks for the useful video, does it also work for VMs without public IP?

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว

      It should - in this example I installed it in my development laptop. Are you facing any issues?

    • @MaheshVelusamy
      @MaheshVelusamy 2 ปีที่แล้ว +1

      @@RahulNath yes, I thought so too.. some network connectivity issues at the moment, yet to test out.. will keep you posted.. thanks..

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว +1

      @@MaheshVelusamy Great let me know how it goes Mahesh!

    • @MaheshVelusamy
      @MaheshVelusamy 2 ปีที่แล้ว +1

      Hey @@RahulNath tested it on VMs with only private IPs and it worked straightaway, just to had to have the ssh ports opened in the VMs, thats about it.. cheers!

    • @RahulNath
      @RahulNath  2 ปีที่แล้ว +1

      @@MaheshVelusamy Great to hear that Mahesh!

  • @p-tech1295
    @p-tech1295 3 ปีที่แล้ว

    How can we push the windows service code into the DevOps repository, Can you share the link

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Here is the source code and pipeline details.
      Source Code - rahulpnath.visualstudio.com/TH-cam%20Samples/_git/WindowsService)
      Build Pipeline - rahulpnath.visualstudio.com/TH-cam%20Samples/_build?definitionId=14&_a=summary
      Release Pipeline - rahulpnath.visualstudio.com/TH-cam%20Samples/_release?_a=releases&view=mine&definitionId=3
      If you are new to DevOps and looking to push code into the repository, check out my Introduction to Azure DevOps video here th-cam.com/video/prqW7DVVxLM/w-d-xo.html
      Let know if you have any additional questions.

    • @p-tech1295
      @p-tech1295 3 ปีที่แล้ว

      @@RahulNath Thanks Rahul

  • @venkatesanelumalai2148
    @venkatesanelumalai2148 3 ปีที่แล้ว

    Hi Rahul, how to exclude multiple config files in IIS Web app deploy release?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      What are the multiple config files? More context please - When packaging you can remove the unnecessary files using a custom script or Delete File Task

    • @venkatesanelumalai2148
      @venkatesanelumalai2148 3 ปีที่แล้ว

      @@RahulNath web.config, connectionStrings.config and appsettings.config files, Can you please explain me how to do that?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Venkatesan Elumalai Please provide more details, what you are trying to achieve and what the exact problem you are facing.

    • @venkatesanelumalai2148
      @venkatesanelumalai2148 3 ปีที่แล้ว

      ​ @Rahul Nath i have created a ASP.NET pipeline build (CI) and also created a continuous delivery release pipeline (CD) "IIS Web App deploy" and it works without any error.
      but the CI pipeline build (Artifacts zip )is created along with the appsettings, connectionstrings and web.config files and i do not want these source config files overwrite in the destination folder of the IIS website during the continuous deployment
      I would like know is there any task to exclude these config files and any folder in the CI pipeline itself or in the CD pipeline "IIS Web App deploy"deployment" task. can you help me out

    • @venkatesanelumalai2148
      @venkatesanelumalai2148 3 ปีที่แล้ว

      i am new to Azure devops

  • @padmavathitummala8690
    @padmavathitummala8690 3 ปีที่แล้ว

    Hey Rahul, Nice video.. but i keep getting this error on archive files "[error]Error: ENOENT: no such file or directory, stat 'D:\a\1\b\2235'
    ". Any idea ?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you and happy you liked it. It looks like you have got a wrong path in there. Can you confirm if you have used the correct path? Double check with the one in the video or the pipeline that I have shared. Let know if that helps

    • @padmavathitummala8690
      @padmavathitummala8690 3 ปีที่แล้ว

      @@RahulNath I checked it and i am pasting below as well. The issue seems to be the build not building/creating the folder with Build.BuildId and when Archive tries it - it throws an error No directory exists. Also, This is a topshelf proj which i am trying to install as a windows service, but the sln has other projs (Api, Business, models etc ). how can we change to build the sln but only copy/Archive the contents of services.csproj\bin\Release .
      task: VSBuild@1
      inputs:
      solution: '$(solution)'
      msbuildArgs: '/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)\\" /t:restore'
      platform: '$(buildPlatform)'
      configuration: '$(buildConfiguration)'
      - task: ArchiveFiles@2
      inputs:
      rootFolderOrFile: '$(Build.BinariesDirectory)\$(Build.BuildId)'
      includeRootFolder: false
      archiveType: 'zip'
      archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
      replaceExistingArchive: true
      - task: PublishBuildArtifacts@1
      inputs:
      PathtoPublish: '$(Build.ArtifactStagingDirectory)'
      ArtifactName: 'drop'
      publishLocation: 'Container'

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Why is there an extra slash in msbuildArgs ($(Build.BuildId)\\). Don't think that will be a problem though.
      Did you check the full log files to see where the msbuild is outputting the build items? Like the link here in my pipeline.
      rahulpnath.visualstudio.com/TH-cam%20Samples/_build/results?buildId=162&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=86dd5fa6-f51e-57a1-6dd4-575fd75fc7ef&l=25
      If you can set up a public build I can take a look.

    • @padmavathitummala8690
      @padmavathitummala8690 3 ปีที่แล้ว +1

      @@RahulNath Thanks for your help it seems i missed build from msbuild args- msbuildArgs: like this =='/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)\\" /t:restore,build' --You doing great job inspiring Dev's

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      @@padmavathitummala8690 Awesome - Glad you were able to sort it out!

  • @ukkalamsaisreevathsav7463
    @ukkalamsaisreevathsav7463 4 ปีที่แล้ว

    How to create a windows service and assign a task to it

    • @RahulNath
      @RahulNath  4 ปีที่แล้ว

      Did you get a chance to check the source code? rahulpnath.visualstudio.com/TH-cam%20Samples/_git/WindowsService
      Also, checkout TopShelf which is a great way to create windows service - You can run it as a console app while developing and deploy it as a windows service -topshelf-project.com/
      Let know if that helps or if you have any specific questions.

  • @davidjackson148
    @davidjackson148 3 ปีที่แล้ว +1

    Nice one, but how to I deploy to a non-azure ftp site? is this even possible?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      yes you can run the agent on any VM and get to work with DevOps. I used Azure VM since that was easy to provision. Let know if you have additional questions.

    • @davidjackson148
      @davidjackson148 3 ปีที่แล้ว

      @@RahulNath I am not deploying to a VM. I am deploying to a non-azure FTP site. I can publish the files and copy them manually but I want the pipeline to do that as I want to integrate some Unit testing as well. Is that possible ?

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      You could use the FTP Task - docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops&WT.mc_id=AZ-MVP-5003875
      Let know if you have additional questions.

    • @davidjackson148
      @davidjackson148 3 ปีที่แล้ว

      @@RahulNath Well, I'm still digging, like wading through treacle. I've got the ftp task working, my problem now is to get the pipeline to build and publish and then get the ftp task to use the content of the publish directory.

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      It should be very similar to the pipeline set up in this video. In the release pipeline you will need to use the FTP task. What kind of application are you trying to deploy? I have a variety of cases covered in the DevOps playlist th-cam.com/play/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U.html
      Let know if you need any additional help

  • @kalyankalapala8940
    @kalyankalapala8940 3 ปีที่แล้ว

    ##[error]Error: Failed cp: cp: copyFileSync: could not write to dest file (code=EACCES):/var/www/angular/Jenkinsfile ---------------> when I was trying to copy to the linux vm in the deployment group

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Not sure . Have you checked if you have appropriate permissions etc to write the file.

    • @kalyankalapala8940
      @kalyankalapala8940 3 ปีที่แล้ว +1

      @@RahulNath Yeah the folder that I tried to access is of root permissions and I changed them to the user permissions. Then everything worked well....

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      @@kalyankalapala8940 Glad you sorted it out.

    • @kalyankalapala8940
      @kalyankalapala8940 3 ปีที่แล้ว

      @@RahulNath But how to give the existing user to perform these tasks as a root user without changing the permissions prior copying the files to that particular folder? Any suggessions??

    • @kalyankalapala8940
      @kalyankalapala8940 3 ปีที่แล้ว +1

      @@RahulNath Haha it took me half a day to realize that I need to resolve the issue by changing the user access of the folder. Sadly there aren't much solutions available when I browsed from the error perspective...

  • @prem9543
    @prem9543 3 ปีที่แล้ว

    The plural sight has 2 courses to cover the same thing, he did it for free in one video without the fuss 🥺, they are having a lot of theory explained first nowadays with less practical videos like this

    • @RahulNath
      @RahulNath  3 ปีที่แล้ว

      Thank you Prem, glad it helped.