I'm using a stock image "Default Image EBS x86_64 (windows)" to attempt to build my database project file.
As part of my build plan, I am attempting to install an MSI package (in this case, a SQL Server Native Client) that is a dependency of my MsBuild project file.
To try and accomplish this, I'm calling the following command in my pre-build target:
msiexec /package http://go.microsoft.com/fwlink/?LinkID=239647 IACCEPTSQLNCLILICENSETERMS=YES /quiet
This should silently install the package so that my build will work. However what I'm getting instead is the following error:
The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
Any ideas why this might be happening?
It may be a permissions issue - the agent runs as Bamboo user. You can rewire it to other user. This will probably be helpful: https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image+-+Windows . The linked page describes the process used to set up the image you're running.
That makes sense, although I was hoping to just use the default image. To give you a bit of context, I am writing a blog post on setting up SQL Server database builds with Bamboo and I was hoping to keep the barrier to entry low (read = minimal lead time/number of steps).
Are there any alternatives to creating a custom image? If not I might have a crack at sourcing the dependencies through NuGet rather than installing them onto the EBS instance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, maybe you could use an instance setup script (check your image configuration page in Bamboo) and run the command via runas ? You'd still need to run runas with /savecred first and save the image (make sure you run prepareInstanceForSaving.bat first) - but at least that does not sound overly complicated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That could work. Actually after playing with this some more I've realised there's a couple more things I'd like on the image which can take a while to install. So I've decided against installing things during build and my latest thought is to create a public AMI with the dependencies pre-installed. Is this something you would recommend?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, that sounds like a valid case where you'd want a custom image.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tested it outside Bamboo? Does the user running the agent have the rights to use the installer?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I should have mentioned, yes I tried it outside of Bamboo and it worked. So as you say it seems like an access rights issue, however I don't know what the agent runs as (I presume it's SYSTEM however I can't see a Bamboo agent service listed on the instance).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've only installed Bamboo once on a Windows box, and we created a user for it to run as, so we knew that permissions were down to "what that user could do".
I don't remember it running as "system", but I'm really not sure. It's definitely worth working it out. Even if you can't see "bamboo", have a look through the users for anyone running java.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.