Ask A Question

View Question

So, I am looking again at the API, all the while wishing there was an Otter PowerShell Module to manage servers, roles, environments, all the good stuff..... :D

So for the roles, how do I add a role as a dependency to another role? I looked in the json server import/export, and I couldn't even tell where roles list out dependencies for other roles are?

I am doing this as I have not had good luck doing the Orchestration in Otter, and most of my jobs have failed. Plus, I do not want to modify the working code I have in a role and start supporting two different collections of code that do the same thing. So instead, I am adding the servers that I want to change with an empty nesting role that is set to auto remediate. I want to schedule the job in orchestrator to add the role that actually gets the work done at the start of our change window. Maybe Servers should have a change window added to them so they can be auto remediate during the change window, and go back to ReportOnly when they are outside the change window. This way, I don't have to write a psexec script that is just one more thing to manage and troubleshoot. Plus the variables don't seem to work in Orchestrator Jobs, so I end up hard coding all of the variables anyway. Does this make sense?

"Dear Santa, I have been a good engineer and almost always close out my change tasks on time. For Christmas, I would love a shiny new PowerShell Module for Otter, a New York Style Cheesecake, and the bestest Chocolate Chip Cookies"

Also, for anyone having performance issues in Otter, upgrade to 2.12 as soon as possible. Many of my performance issues were improved dramatically, as well has getting an executions tab for each server! Thanks Inedo support people for their great work!

Product: Otter
Version: 2.1.2

:)

I've added OT-282, which will add the ability to specify role dependencies using the API.

Have you tried to schedule configuration jobs? I don't know how long your window is, but you can do a recurring configuration job such that it remediates overnight. This will only happen once, however; so if it's like a 4-hour window, and you're making changes in the middle of it, it won't work in that manner.

So, any thoughts on a PowerShell Module for Otter? I would like to do something like:

Get-OtterServer | Where-object {$_.variables.vcpu -eq 4}

where I have a variable for servers called vcpu. I want to be able to just ask otter for information quickly. If the API is as quick or quicker, or easier, then what would be a good example of this? I am being asked to provide data to managers, and I need to be able to provide them that. Thanks!

Definitely on our roadmap, and we'd like to Open-source it and make it a community item.

The hardest part, to be honest, is determining the input/outputs of these CmdLets. If you'd be willing to help us think these out, we'd love your help in designing it and making this a reality :)

I would be more than happy to help! Let me know what and I can start coming up with something.

So I think to start off with querying information about the servers:

“Get-OtterServer” by default should return all servers, with their drift status, communication status, environments, roles, variables, configuration plans, packages, executions, and details. So with this, I should be able to run something like this:

$server1 = Get-OtterServer –Server server1.acme.domain
And save all of the information as a variable. The server parameter should of course take multiple values as well as pipeline input that matches parameter name. I can then run things like $server1.ConfigurationDrift to show if it is report only or automatically remediate. Or do $server1 | where-object {$_.variables –like “CPU”} to show the value of any variables that have CPU in the name. Virtually anything. This way the variables can be used for each server like a cmdb system.
The Add-OtterServer, Remove-OtterServer and Modify-OtterServer would serve roughly the same functions. This would be powerful to add, remove, or modify servers based on criteria. The ability to add servers into otter based if they are active in active directory would be very powerful itself, and clean up after x amount of days as well.
If you are coding it in PowerShell 6.1, the “Test-JSON” cmdlet can be used to validate bulk json adds like variables and such.

Roles and Environments would share the same pattern.
Should also add a few commands for the Otter server itself, like to restart service, web server service, and maybe some extension updates and such. Eventually add all of the things that are in Advanced menu, and go from there.

Adding for ideas:

Will need cmdlets to create, edit, delete, start and stop configuration and orchestration work. Allow to accept pipeline input. That way I can schedule at that time, to run an orchestration job, pick the servers based on the results of the orchestration, and run a job at that time for those servers, environments, or roles that fit the criteria.

Answer Question