SWDIST
by
jack
—
last modified
2008-12-22 16:17
Entropy must be stopped somewhere.
Design Assumptions
- Object orientation, reusable objects
- It’s an installer, not a packager
The Process
- Define the objects you’ll need. Because this is an object-oriented environment instead of a procedural one, you'll have to build objects before you can use them.
- The package is the first one we'll build. What files are necessary to install it? What accounts will it install as? If it doesn't advertise itself with the OS, how do we detect that it's already there?
- There is a catch though... where did this package come from, and how does it act? Sometimes, the vendor package is fine; other times, it should be repackaged, or at least wrapped in the poor man's packager... .bat, .vbs, or AutoIt.
- Next, the method. Is this a push or a pull or both? Go fast, go slow? Give feedback or be silent? Recur or run once?
- Most importantly, the query... while you can skip this step and just drag in targets, that's often a recipe for disaster. Write a query, and consider using it as the Package-level prerequisite filter too.
-
- Combine the three elements in a task and you're done.
The scheduled task is the interface that brings all the objects together
- What? How? To Whom? When? How Often?
Software Distribution Koans
- What is a policy?
- A job which the agent initiates.
- Where is state stored?
- On the agent, in Registry, SQLite, or plist. It’s communicated to the core if the core was available when the policy was implemented.
- What is done with error codes?
- The agent tries to interpret them.
- What does recurrence really mean?
- Method Recurrence: run repeatedly on the same client
- Task Recurrence: retarget and restart the task on the core
- How many of your objects can you reuse?
- Within a core, packages are single purpose.
- Deployment methods are heavily reused.
- Jobs are inherently single purpose.
- Queries are moderately reused.
Gotchas --It’s best not to reinvent the wheel… unless transporting it to the second site requires inventing a third wheel.
- Cross-core transfers of queries are easy
- Packages and Methods are difficult (export everything, edit XML manually, and import).
- Jobs are not transferable at all.