I'm noticing some performance issues on my build server lately, in the process monitor I see that there are hundreds of powershell and conhost sessiosn open by the BuildMasterService (which is the user BuilMaster service runs as) is this normal or is something not closing processes as it should?
This is just one screen with around 50 processes, but there are a few more so I estimate about 300 processes running...
Posts made by Justinvolved
-
Lots of Powershell and Conhost processes
-
Error on IIS actions
Hi,
I'm seeing this error quite regulary. At this point I'm running most deployments manually, when I re-execute the job succeeds, but I'm planning to move to more automatic deployment and then this will be an issue. Anything I can do about it?
-
RE: Possible to set Preload Enabled to true in IIS:EnSureSite?
@Justinvolved said in Possible to set Preload Enabled to true in IIS:EnSureSite?:
Preload Enabled
Hey Alana,
I will definitly give it a go. From what I can see in the Microsoft.Web.Administration docs it should be possbile.
To prevent me creating a fully untested PR, could you help me get started with setting up a dev environment for this? Then I can at least run a couple of tests in my own environment before submitting, but I'm not sure where to start...
Thanks,
Justin
-
Examples of configuring PowerShell on a fresh server (win 2019 or 2022)
Hi,
I'm looking to use Otter to setup a fresh server and make sure PowerShell in general, and some specific modules I'm using are installed.
Do you by any chance have basic example of such a task? For example how to check if PSGallery is trusted so I don't get:
I would probalby also need to set the Set-ExecutionPolicy, and I guess I might forget a lot of stuff here as well :-)
Thanks,
Justin -
RE: Error when checking for Az powershell module
Hey Alana,
Turns out the error is already in the Collection step. When I set the variable to use PowerShell core the error is not there:
I do have powershell 5.1 installed on the server, and when I run a Get-Module -ListAvailable I get a valid result (this is the part where the Collect step errors...) When I run Get-Module -ListAvailable with a Module name that is not installed yet I get an empty line. Is the code somehow choking on the empty line? because it seems "Expected to start with a valid JSON token" does not expect an empty string..
Thanks,
Justin
-
Error when checking for Az powershell module
Hi,
I'm trying to make sure the Azure powershell module is installed on certain server roles.
In the desired configuration OtterScript I have:
Ensure-PsModule ( Module: Az, Exists: true, Repository: PSGallery );
This correctly detects the server as drifted:
When I then try to remediate the drift I get an error:
I'm not very experienced in remediating drift with otter in this way yet, so I might be missing something obvious?
Thanks,
Justin -
Possible to set Preload Enabled to true in IIS:EnSureSite?
Hi,
Is there any way I can make sure the setting "Preload Enabled" is set to true when I IIS::Ensure-Site
I would like my iis apps to be preloaded and stay up always...
Thanks,
Justin -
RE: Error message shows otter service not available, but jobs do execute
Hey Alana,
Thanks, I opted to download the Service Security Settings tool for a bit more userfriendly setup of service permissions :-)
The Otter AppPool runs under Network Service, which I have now given full control of the Otter Service, but the error is still shown.
Anything else you think I could try?Trying to add a screenshot, but I get an error :-(
Cheers,
Justin -
Error message shows otter service not available, but jobs do execute
Hi,
In installed Otter and soon found out I forgot to set the correct right for the Service user to the database. I fixed that and everything seems to work fine now, but when I execute a job, the screen shows:
The job does finish succesfully, so it might be a simple flag that is not reset?
Cheers,
Justin
-
RE: Multiple builds as part of an application
Hi Dean,
Thanks for your reply.
My current setup is that I have one application, with one repo connected.
For a next version of the application I need to add a build from another repo to that same application.
My first thought was to add this repo to the same application, and then build both during the build step, as you describe in the last sentence indeed it will then always build/deploy from both repo's at the same time...Right now I'm just using Git::Checkout-Code without any parameters, but when there ismore than 1 repo I think I need to specify which repo/branch/commit I would like to build from?
For now if I could just take the latest commit of the main branch of each repo I would be ok.Also the same might apply later on in the deployment scripts, because there I use Deploy-Artifact();. But when there is more than 1 build, I think I need to make sure to get the right artifact connected to a build from a specifc repo.
I'm not sure if I'm on the right path with this to be honest, because I realize now I could probably also add the addtional repo as a seperate application, and then reference a latest build from that application in my current application. Any comments on what might be a better/easier setup I would appreciate very much :-)
Thanks.
Justin
-
Multiple builds as part of an application
Hello,
Bit of a noob question I'm afraid, but I just want to make sure I start on the right path. I need to setup an application that builds from 2 repositories, and in the release pipeline always takes the latest builds from both repo's for deployment. I have actually alrady been able to connect both repo's and create the builds, but how do I reference the latest builds in the deployment scripts?
I have so far only setup a pipeline for a single component, and there the connection to the build and artifact is implicit, but I guess for this scenario I need to define something more explicit?Thanks,
Justin -
RE: Using IIS::Ensure-Site without removing bindings?
Hi @atripp,
I'm using %(IPAddress: *, Port: 80, HostName: test.domain.local, Protocol: http) as a binding indeed.
I just noticed that this way of adding bindings is actually consideren legacy. So I will switch to using IIS::Ensure Site Binding instead, and wil just make sure all the bindings are there.
It might be an idea to add to the documentation the behaviour you described, for me it wasn't clear the operation would also remove bindings (I had Transfer Files in mind where a delete operation is explicitly set by parameter), but since it is a legacy feature that might be moot :-)
Thanks,
Justin
-
Using IIS::Ensure-Site without removing bindings?
Hello,
I'm using IIS::Ensure-Site to create an IIS site for an applicaiton if it does not exist. When creating the site I would like to add only a http binding on port 80. I'm using WinACME which wil scan all IIS sites and add https 443 binding accordingly.
The problem I have now is that when re-running the deployment IIS::Ensure-Site will remove all bindings other than the one I have specified in IIS::Ensure-Site.
Is it possible to specify that IIS::Ensure-Site should check if the site exists with that binding, but then leaves additional bindings intact?
Thanks,
Justin -
BuildMaster Service logon account
Hi,
I have a pipeline running that needs to be able to manage IIS sites. With the default service account setup running as NetworkService the IIS actions fail.
As a test I managed to get this working by using an Administrator account to run the BuildMaster service. Now I'm configuring a new Account the BuildMaster Service should run as, but I'm having some trouble getting the service to startup on that, with a 500.30 error.
Is there any documentation on the rights needed for the service account besides: https://docs.inedo.com/docs/buildmaster-administration-service ?Seems I'm missing a basic security setting for the acount somewhere that will allow the service tp start properly...
Thanks,
Justin -
RE: FTP Extension
Hey Steve,
Seems something was stuck somewhere, I re-created the resource and reset the service and now I can connect.
Cheers,
Justin -
FTP Extension
Hi,
Im trying to deploy an artifact to a server, first I want to deploy the App_offline.htm file.
I have created a global resource and credentials, but my deploy script complains no FTP server is specified, the ftp server address/port and username/pwd are in the resources/credentials what could I be doing wrong? -
Multiple apps based on the same git repo
Apologies, this is a bit of a newbie question.
I have several instances of an application running for different customers. The codebase is the same, and the app is made specific for a customer through config files and database settings.
I now have 2 applications defined, but notice I have to start duplicating scripts and pipelines.Is there a way I can setup buildmaster to share the buildpipelines and scripts, but keep the applications seperate so I can deploy specific config files?
Thanks,
Justin
-
Buildmaster keeps notifying it needs to be restarted
Hi,
My buildmaster instance says the service and webapplication must be restarted, these message won't disappear, even after several restarts and a restart of the entire server
What triggers these messages?
Thanks,
Justin
-
RE: Cannot connect to Git in build
Hi @atripp
The problem was gone after restarting the buildmaster service, thanks for your quick response!
Justin
-
RE: Cannot connect to Git in build
Hi @atripp,
Yes, the git error is during a build process. There is not much more of the log that share that I can see, this is what I get:
Yes the repository is browsable from the WebUI and shows the latest commit and all files as I would expect.
Thanks,
Justin -
RE: Cannot connect to Git in build
Update:
I tried to inspect the script that is checking out the code from git, and there is an error there, when I switch to visual editor:
and in the log:
at System.Collections.Generic.Dictionary
2.FindValue(TKey key) at System.Collections.Generic.Dictionary
2.ContainsKey(TKey key)
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveStatementDyanmic(ActionStatement statement)
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveStatement(Statement statement)
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.<>c.<BuildOsveScript>b__0_1(Statement s)
at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection) at System.Linq.Enumerable.ConcatIterator
1.ToList()
at Inedo.BuildMaster.Web.WebApplication.Pages.OtterScriptEditor.OSVE.BuildOsveScript(ScriptProcessorOutput output)As well as:
This is the script that is causing the visual editor to crash:
set $NpmPath = C:\Program Files\nodejs\npm.cmd; Git::Checkout-Code ( From: "..........reponame...." ); # Install Dependencies npm Exec ( FileName: $NpmPath, Arguments: install, WorkingDirectory: ~\, ErrorOutputLogLevel: Warning ); # Build webpack Exec ( FileName: $NpmPath, Arguments: run build:webpack, WorkingDirectory: ~\, ErrorOutputLogLevel: Warning ); Create-Artifact ( From: Swift/Files );
-
Cannot connect to Git in build
Hello,
In my buildmaster application I have a connection to a Git repository, and the build worked fine before yesterday. Now when I try to build, the process says:
The repository named "......." could not be loaded.
I have the debug log checked and no additional information is logged.
I have tried to reconnect the Git repository and that works fine, so it does not seem to be caused by wrong git credentials.The only thing that has changed is that I have changed the IIS binding to access builmaster (form the default 6262 port to a 443 binding)
What could be the cause of this?
Thanks,
Justin
-
Trigger build by NuGet release
Apologies if the answer to this question is very obvious, but after reading documentation I'm not quite sure how to achieve the following:
I want to be able to automatically trigger a build and deployment to Integration whenever a new version of a certain NuGet package is released. But I can seem tofind where I could setup the trigger that looks at the version of the NuGet package.
Thanks for any pointers!
Justin
-
RE: Files not copied during deployment
Hi @atripp,
Thanks that helped me solve it pretty quickly, just a typo somewhere in the script variables.
Very happy to have learned about the verbose setting :-)Justin
-
Files not copied during deployment
Hello,
My deployment says it has run succesfully, but I still find that files are not copied over. I use the transfer command to copy files from the working directory to the application folder. According to the log all is well:
But I can see a version marker file is not copied, here is the file in the artifact:
And the file in the application folder is still showing the old file:
Also the Modified date of all other files in the folder are not changed, so it looks like nothing is actually copied over.
Any help figuring out why this is would be much appreciated...
Thanks,
Justin
-
Otter functions for interacting with REST API's?
Hi,
After deployment of my application I need to call some (in the near future probably even a lot) REST API's to finish configuration of the app.
My idea is to set this up with configuration files, which serve as input parameters for the API calls.-
Are their any functions native to OtterSript for calling the API's or would I need to use for example PowerShell to make the actual calls? (And if it must be powershell, how would I access the config files from there?)
-
In this scenario, I forsee to en up with hundreds of configuration files, would that cause issues?
Thanks,
Justin
-
-
RE: Build fails in release pipeline
Hey Greg,
Thanks, changing to C:\Temp solved the issue indeed, so I guess the path was too long.
I'm experimenting with the Inedo Agent to make sure I can scale up and not have everything tied to Localhost, seems that was a good call given these subtle differences :-)Cheers,
Justin -
Build fails in release pipeline
Hello,
I have a build Script that succeeds when executed as just the script, but it fails as part of the release pipeline build step.
When I execute just the script the log is:
As part of the Build step in the release pipeline the log is:
The difference is that the execute script uses the LocalAgent, and in the pipeline I have set the Agent to be an Inedo Agent installed on the local server.
Do I need some additional configuration for the Agent?Thanks,
Justin
-
RE: Addressing Configuration files in Build vs Release
Hi @atripp
Sorry for the delayed response.
Yes, so I created a build, and during the creation of the build you are asked to select a pipeline.After that the build was successful, but deployment failed. So then I created a release, based on the same build #1, and that does succeed. Where the issue is in the build #1 case the nullreference occurs on the config files.
My overview now shows the deploy from the build failed, but in the release it succeeded:
I could setup buildmaster to be accesible by you, please let me know if that helps.
Justin
-
Addressing Configuration files in Build vs Release
Hi,
I think I am misunderstanding something around build vs release and their relation to the Configuration Files.
I have an application with some configuration files, and a pipeline When I go through "Create New Build", with the pipeline selected, the deployment to test fails with:
I created a release based on the same build, and this is succesfully deployed including the configuration files:
Both are connected to the same release pipeline, but there must be a difference in the context and the way I can address variables maybe? In OtteScript I use $PipelineStageName to get the correct configuration file...
Thanks,
Justin
-
RE: Discrepency in Stage name pipeline vs Configuration Files
Hi @rhessinger,
My point was actually that I think you might want to rename the second stage in the template for the "Main/Release Branch Pipeline" so this also is "Testing" That way ootb both already match up.
The error message was actually pretty ok, but since I used all defaults I was suprised about the naming difference.Justin
-
Discrepency in Stage name pipeline vs Configuration Files
Hi,
I have noticed when I create a Cofiguration Files, there are stages Integration, Testing, Production that can be associated.
When I create a Pipeline based on the Main/Release Branch template the second stage is named "Test" instead of "Testing", which gave me some trouble understanding why during deployment the configuration file could not be found :-)Cheers,
Justin -
RE: Deploy artifact without touching a certain subfolder?
Hi @atripp,
Thanks, that does sound like a good plan.
Altough the script now executes without error, something is wrong, because the log seems to say the artifact was deployed correctly to the working dorectory. but it contains 0 files.
However when I browse the Artifact I can see it does contain files. I must have something wrong still:
Thanks,
Justin -
Deploy artifact without touching a certain subfolder?
Hi,
I have been working on deployment of a web frontend that is managed by a CMS. In my build artifact I have all the files needed to redeploy, except for a folder "Images" that should be untouched during deployment. The images folder is managed by end users in the CMS.
I'm looking for a solution where I deploy the artifact, but leave the Images folder untouched. I have been trying to first copy the folder out to another folder, and then copy it back after the artifact has been deployed, but this is generating a variety of access denied messages at seemingly random points, which give me the feeling this is not a reliable solution.
Any other approaches that could be applied here?
Best regards,
Justin
-
npm install
Hello,
I'm working to get my first Build up and running. My GitHub repository is succesfully syncing, for a frontend project containing just Razor views (which will be deployed to a CMS).
The csproj file is pretty much just a container, because this project does not need to msbuild. I just need it to "npm install" and "npm run build:webpack" to build the frontend.Am I right in concluding I should just do this with a PowerShell script or Cmd, working on the $WorkingDirectory, and this is not something I can handle with ProGet::Scan. I do have a ProGet feed setup which should have access to public npm packages, but I think I understand ProGet::Scan is not able to handle this kind of frontend build scenario?
Thanks for any help getting me started :-)
Justin