Automate deployment of XMLA / documentation on Microsoft.AnalysisServices.Xmla - powershell

I'm looking to automate the deployment of XMLA scripts. I've come across an article that gives a small demo, but I'm hoping to find more info.
Specifically, where is the documentation for Microsoft.AnalysisServices.Xmla.XmlaClient and what is the best approach for overridding the database and connection values that are embedded in the XMLA script?

I assume you are just trying to deploy the analysis service cube. This utility has commandline switches and can suport configuration for different targets
Analysis Services Deployment Wizard
If you need to add further customizations, you can always process the resulting xml files with either xslt, powershell, or .net
ascmd.exe can also run xmla scripts:
ascmd.exe commandlline utility

Apparently Microsoft.AnalysisServices.Xmla.XmlaClient is an undocumented library that is actually part of Management Studio and is not re-distributable. I think that using one of Jason's suggestions or the AMO library are your only approaches.

Related

on Azure in repo's script of CI/CD for the best practices which code to use?

on Azure in repo's script of CI/CD for the best practices which code to use: JSON or PowerShell or CLI ?
which code from above is the best and professional way to use ?
Thank you.
As for the best practices of script of CI/CD, each of them has their own features and could be used in it.
For example, when you would like to create the script to build VMs, you could select the JSON one because through the JSON script, you could see all information of the VMs more directly than other kinds of scripts. You could see the example through https://learn.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-build-deploy-azure-pipelines?tabs=java-script .
As for building AKS, you could use Power shell to create the script as it needs fewer related properties to be defined while comparing with other scripts. You could see some examples in the following document https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-powershell
To be concluded, each kind of way to create the script is available for CI/CD and you could select which you are used to using or according to the advantages of each script.

How should I trigger ARM deployments

We are trying to establish a continuous deployment environment. Conflicted how to do ARM deployments. Deploying all the resources as a group is much better them handling them individually.
ARM has a nice declarative syntax. We are telling what we intend to create" without having to write the sequence of programming commands to create it. Which is great but how should we run them ?
Two options come up to my mind
I.I could download the templates and use power shell.
II. Trigger using Azure automation
III. x
What is the best practice ?
Reference
Octopus integration from source code
If you're doing this as part of your CI/CD chain, you probably want to check in the templates and deployment scripts with your source code. That way, the definition of the infrastructure is kept with the code that's intended to run on it.
If this is part of some other workflow, it really depends on the workflow :)
I would suggest using powershell\cli and just invoke the template from the uri, that is the easiest way of doing that (instead of downloading it). This can be run with anything that is capable of running a custom script task, or specific CI\CD systems that have steps to deploy ARM Template (VSTS\Octopus\probably something else)
I would advice against Azure Automation for that cause.
Also, I do suggest separate code from arm templates

Visual Studio Online / Azure stopping and starting web applications using Powershell

I'm using Visual Studio Online's build tools to deploy web applications from a single solution. I've occasionally been running into file locking issues.
Error: Web Deploy cannot modify the file 'Microsoft.CodeAnalysis.CSharp.dll' on the destination because it is locked by an external process.
After some Googling, I believe the "fix" is to stop the web applications before deployment on Azure and start it back up after. Sounds legit.
However, there does not seem to be a straight forward way to do this directly on VSO's build definitions. I've created an "Azure Powershell" build task, but it wants a PS1 file from the repository. It doesn't seem to let me just run Azure Powershell commands (e.g. Stop-AzureWebsite) from here. My team has created a work-around where we have a "run.ps1" that just executes the command you pass as a parameter, but none of us are satisfied by that.
What are we missing? There has got to be an easier way to do this without having a PS1 script checked into source control.
I solved this by installing Azure App Services - Start and Stop extension from Visual Studio Marketplace.
When installed, it will allow you to wrap the Deploy Website to Azure task in your Release definition with Azure AppServices Stop and Azure AppServices Start tasks, effectively eliminating the lock issues.
Check if you are using "/" on the "Web Deploy Package" path for folder separators instead of "\".
i.e. change
$(System.DefaultWorkingDirectory)/My Project/drop/MyFolder/MyFile.zip
for
$(System.DefaultWorkingDirectory)\My Project\drop\MyFolder\MyFile.zip
I noticed that was the only difference between the one I was getting the error and the others (the Restart step I added was not helping). Once I modified the path, I got it working.
Sounds crappy, but fixed my issue.
Did you use the Build Deployment Template that sets the correct msbuild parameters for you for your package? You can see how here. I would create a build using that template and see if you have the same issues. If so ping me on Twitter #DonovanBrown and I will see if I can figure what is going on.
As a rule it is good practice to have any scripts or commands required to deploy your software to be checked into source control as part of your build. They can then be easily run repeatedly with little configuration at the build level. This provides consistency and transparency.
Even better is to have deployment scripts output as part of the build and use a Release Management tool to control the actual deployment.
Regardless having configuration as code is a mantra that all Dev and Ops teams should live by.

One click deployment using scripts

I want to deploy a web solution for local server using one click deployment using powershell or any other scripts.
Can any one share any ideas
Powershell can be use in conjunction with Psake which is a DSL that allows you to script up deployments (or basically anything really) with a dependency chain. It also abstracts MSDeploy to some extent, making it easier to roll out installs to IIS. Note that MSDeploy can also be used completely independently for relatively simple deployments (such as web sites without any reliance on messaging queues, databases, supporting services, etc.)
Other automated approaches include the likes of Octopus Deploy which works by having a central management node push out installations to 'agents' installed on target machines.
Both approaches require you to write your app in a reasonably deployable manner (e.g. having suitably transformable configurations files)
Does that help? There are a number of other options out there but these should help to point you in the right direction.
Also check http://psappdeploytoolkit.codeplex.com/ (seems to be what you want)
and maybe https://github.com/mislav/git-deploy or https://github.com/p-blomberg/Web-app-deploy-script
Try this approach... this is not the compete but will help you in moving one click direction..
http://ravisoftltd.wordpress.com/2014/04/08/one-click-deployment-with-sharepoint/
If you are trying to deploy from MSBUILD-files (so something like asp or MVC), I would like to point you to Package-Web.
It still has some minor flaws (which can be worked around pretty easily), but works pretty good.
Only downside that I know of: you have to prepare your project by installing a nuget-package (or get those files into your build process some other way)
You can do it using a powershell script with something like
[string] $package = "solution.wsp"
stsadm -o addsolution -filename $package
stsadm -o deploysolution -name $package -immediate -allowGacDeployment

vb6 xcopy deployment

Can any one tell me how to convert an legacy application which is vb6 ( COM dll's ocx and exes) to use Regfree COM .
I tried opening the dlls in visual studio and created manifest file, but some of the dlls it is giving error.
Is there any tools out there which will help me to do this process?
I tried a tool from codeproject which is called regsvr42, which is not creating the manifest fully.
I used tools like PE explorer where I get all the typelib information , but converting them into manifest files is too difficult.
We have started migrating that to .NET, for some months we have to deploy it, it will easier if it is xcopy based deployment.
To create manifest files you can try to use Make My Manifest from http://mmm4vb6.atom5.com/.
EDIT The MMM website is down. I see here that the author was having trouble with their hosting and has provided another location to get Make My Manifest - download it here.
If you can control creation of objects you can use DirectCOM from http://www.thecommon.net/10.html
Keep in mind that if one of used DLLs or OCXs is creating other COM objects dynamically with CreateObject calls, that reference will not be stored in vbp project file and you won't get full manifest file. Probably you will have to catch object creations while the application is running. Depends.exe application can profile running application and report all used dlls. I don't know if there is tool that can find additional COM related information.
There is an excellent walkthrough of what to do in this article on MSDN: Registration-Free Activation of COM Components: A Walkthrough.
Make My Manifest can accomodate late binding as well as early binding. You simply have to add the references to the late-bound dependencies manually, by file location or by ProgId.
You might look at http://mmm4vb6.atom5.com/mmm-demo-1248.html for additional help in using the utility.
MakeMyManifest is well spoken of as an automatic tool for creating manifests for VB6 projects, haven't tried it myself.
DirectCOM also has fans, again I haven't tried it.
EDIT The MMM website is down. I see here that the author was having trouble with their hosting and has provided another location to get Make My Manifest - download it here.
There is a semi-automatic technique. You can create the manifests with Visual Studio 2008 (you can use a free version like Visual Basic Express Edition). Then make a couple of edits by hand to make the manifests suitable for use from VB6. See this section of this MSDN article for step-by-step instructions - ignore the rest of the article which is about ClickOnce.