# Lifecycle for servers and accounts

## The problem

Most environments have a way in but no way out. Servers, virtual machines and accounts are requested all the time –
but almost nothing is decommissioned. Nobody says that a machine is no longer needed, so it stays.

It costs in three ways:

- **Capacity:** memory and disk run out, and the next purchase is made for machines nobody uses.
- **Security:** every forgotten machine and every account nobody logs in with is something to patch and monitor,
  and something that can be misused – without anyone noticing.
- **Accountability:** when something breaks, there is nobody to ask.

It isn't a technical problem. It is a process problem: the process has no end.

<figure class="fig"><svg viewBox="0 0 720 295" role="img" aria-labelledby="tpl-life-en"><title id="tpl-life-en">A lifecycle with an end</title>
<rect class="box" x="20" y="60" width="190" height="80" rx="6"/>
<text class="h" x="115" y="90" text-anchor="middle">Request</text>
<text class="sm" x="115" y="113" text-anchor="middle">owner · purpose</text>
<text class="sm" x="115" y="130" text-anchor="middle">end date</text>
<rect class="box" x="250" y="60" width="150" height="80" rx="6"/>
<text class="h" x="325" y="90" text-anchor="middle">In use</text>
<text class="sm mut" x="325" y="115" text-anchor="middle">owner responsible</text>
<rect class="box-acc" x="440" y="60" width="260" height="80" rx="6"/>
<text class="h" x="570" y="90" text-anchor="middle">Quarterly review</text>
<text class="sm mut" x="570" y="115" text-anchor="middle">logons · owner · end date</text>
<path class="ln" d="M210 100 H250"/>
<path class="ln" d="M244 95 L250 100 L244 105"/>
<path class="ln" d="M400 100 H440"/>
<path class="ln" d="M434 95 L440 100 L434 105"/>
<path class="acc" d="M520 60 C 520 22, 325 22, 325 60"/>
<path class="acc" d="M320 54 L325 60 L330 54"/>
<text class="sm at" x="422" y="30" text-anchor="middle">still needed – extend</text>
<path class="ln" d="M570 140 V190"/>
<path class="ln" d="M565 184 L570 190 L575 184"/>
<text class="sm mut" x="582" y="170">not needed</text>
<rect class="box" x="440" y="190" width="260" height="85" rx="6"/>
<text class="h" x="570" y="220" text-anchor="middle">Decommission</text>
<text class="sm" x="570" y="244" text-anchor="middle">shut down → wait 30 days</text>
<text class="sm" x="570" y="262" text-anchor="middle">→ clean up → delete</text>
<text class="sm at" x="20" y="232">No owner and end date –</text>
<text class="sm at" x="20" y="250">nothing gets created.</text>
</svg><figcaption>The lifecycle has an end: the quarterly review leads either back to use or to decommissioning.</figcaption></figure>

## Rule 1: nothing is created without an owner and an end date

A request for a server, a virtual machine or an account doesn't move on until three fields are filled in:

1. **Owner** – a named person, not a team or a department
2. **Purpose** – one sentence on what it is for
3. **End date or review date** – when it goes, or gets looked at again

The end date can be moved. The point is that someone has to decide, instead of everything living forever.

## Rule 2: rightsize before you buy

Before buying more capacity, look at what is already there.

- Which machines have more memory and CPUs than they use? Shrink them.
- Which machines aren't used at all? Shut them down first (see rule 3).
- Buy only once what you have is the right size.

## Rule 3: quarterly review

Once a quarter, a list is produced and sent to every owner:

| What | Criterion (example) | Action |
|---|---|---|
| Machines without logons | No interactive logon for 90 days | Owner confirms or decommissions |
| Machines without an owner | Owner field empty, or the person has left | Find a new owner or decommission |
| Past end date | End date before today | Extend with a reason, or decommission |
| Accounts never used | Created more than 180 days ago, never logged on | Disable |
| Inactive accounts | No logon for 180 days | Disable, delete after a further period |
| Admin accounts | No logon for 180 days | Remove the rights first |

Two caveats: logon data doesn't cover every way of using a system, and service accounts don't log on like people.
So the list goes to the owner, who decides – it is never used to delete things automatically.

## Rule 4: decommissioning has its own template

Decommissioning is as much work as creating, and whatever is forgotten stays behind as clutter.

1. **The owner confirms** in writing in the ticket.
2. **Shut down – don't delete.** Leave the machine switched off for a period (30 days, for example) so that whatever
   still needs it has time to complain.
3. **Take a final backup** if data must be kept, and note where it is.
4. **Clean up the dependencies:** DNS, firewall rules, directory objects (computer and groups), monitoring, backup
   jobs, remote access, licences and documentation.
5. **Delete** the machine and close the ticket with a list of what was removed.

## Rule 5: someone owns the process – and owners get reminded

- **A process owner** makes sure the quarterly review happens and the lists are followed up.
- **The owner of the machine is responsible for the machine.** Operations can remind, but can't know what is needed.
- **Remind regularly** – at least every quarter, ideally every month – and raise it in the meetings the owners
  already attend, instead of creating new ones.

## How to introduce it

- **Start with rule 1** on everything new. It costs almost nothing and stops the problem growing.
- **Run a first review** of what already exists and send the list to the owners.
- **Measure two things:** created versus decommissioned per quarter, and the share of machines and accounts with an
  owner. If both curves move the right way, it works.
