Open Closed

What is now the best way to deploy the libs folder on a remote server ? #3197


User avatar
0
FrancoisLabelle created

Hello,

I would like to know what is now the best way to deploy the libs folder to a clean/vanilla server (like a fresh new Web App Service in Azure) since this folder has been added to the list of exclusion in the .gitignore file.

------Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ DONE Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index DONE The exact solution to your question may have been answered before, please use the search on the homepage. Found nothing except to run the CLI command "abp install-libs"

  • ABP Framework version: v5.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • [ERR] An unhandled exception has occurred while executing the request. Volo.Abp.AbpException: Could not find file '/libs/@fortawesome/fontawesome-free/css/all.css' at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.GetFileInfo(IBundlerContext context, String file) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.GetAndMinifyFileContent(IBundlerContext context, String fileName) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.GetFileContentConsideringMinification(IBundlerContext context, String fileName) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.Bundle(IBundlerContext context) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager.<>c__DisplayClass16_0.b__0() at System.Collections.Generic.AbpDictionaryExtensions.<>c__DisplayClass7_0`2.b__0(TKey k) [....]
  • Steps to reproduce the issue:" Publish into Azure app service from a Git Branch... new rpoepo in DevIpsipOps.

Locally, the solution to this problem is to run "abp install-libs" and it does the job. But, remotely, the ABP client is not available...

Then, what is your recommandation for the best way to have the libs folder being restored/deployed with the application ?

  1. Remove the .gitignore exclusion and push the libs folder to my source file repository ? (What was the initial goal of this change, then ?!?!?)
  2. Find a way to deploy the ABP CLI application and launch it remotely ? (That sounds a bit complicated....)
  3. Change some files (package.json or whatever related to this) to have the packages automatically restored ? (That should be good for anyone cloning the solution from the repo also)
  4. Other ?

Thanks


3 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi @FrancoisLabelle

    Your pipeline should restore client libraries too before or after the build and so you can include the libs folder in your docker image too.

    I don't understand what you mean by "clean/vanilla server". As I understand you don't dockerize your application and trying to deploy DLLs only? Like IIS deployment. If yes, you can still restore client libraries in your pipeline. It should be a part of your build step. It should be easy to add a new step to the pipeline in each modern DevOps tool.

    Remove the .gitignore exclusion and push the libs folder to my source file repository ?

    But if you prefer, you can include the libs folder in your git. One of the reasons for removing them is their size. But in a single project, you can choose to keep them in git.

  • User Avatar
    0
    FrancoisLabelle created

    Hi, and thanks for your answer.

    I admit that I'm not yet familiar with the "Docker sttuff". Will it be easier ? Not sure because I think the problem remains the same.

    Actually, I'm using this standard task in Azure to deploy. In the parameters, I just fix to which web app I want to deploy. This web app is "plain", "clean", without any bundle or package installed (well, appart the default standards one provided by Microsoft)

    https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/AzureRmWebAppDeploymentV4/README.md

    That's what I'm calling "deployment on a clean/vanilla server". The deployment is basically an "unzip of the artifact built during the build process"... so everything should be included during the build, I agree.

    Of course, during the build process, there is a sub tasks that launches the "package restore" step. And it's working well with all the NuGet packages. But there is not step (yet) to restore the /libs folder and I don't know how to do this yet because the only way I found to do this is to launch the ABP CLI with the install-libs parameters.

    So, how I can do this properly during the build process ? What is the best way to do this ?

    Should I insert a new "power shell script" that will launch abp.exe CLI (that I would have to include in my repo somewhere) with the parameter "install-libs" ?
    Is abp.exe having dependencies ? Should I provided some environment variables to tell abp.exe where is my licence key ?

    If it's not the way to go... then what should be the right method ?

    P.S. For now, I just removed the exclusion in the .gitignore file, commit and push and everything has been successfully deployed, but I'm looking for the right way of doing this.

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Well, you just run abp install-libs once and it will be generated already. It should run before your build process.

    If you are using the Github repository as the application source to build, you can run abp install-libs locally and commit to the Github repository.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11