In my previous blog post I wrote about the importance of having a convention for grouping and naming resources in Azure. In this article I will explain how to setup conventions for your project. Writing a convention is easy. Making sure it is followed is much harder.
Purpose of Conventions
We write conventions for our projects of the following two reasons
- If everyone do things their own way we’ll have a mess. Messes are hard to maintain.
- Jotting it down saves a lot of time when we introduce new developers to the team.
Don’t write a lot of conventions up front, but also don’t wait until the absence of conventions turn into a mess.
The Art of Writing Conventions
Writing conventions is the easy part. Here is a sample of how I do it.
Don’t feel obliged to add all the bells and whistles if you don’t need them. Here is what I do
- Versioning, makes governance much easier. A simple document version table at the top will do.
- Each statement is short and precise. Don’t give room for interpretations.
- I use RFC2119 to make it clear what’s a rule (MUST), an injunction (SHOULD) or a suggestion (MAY).
- One statement per line makes it easier to skim through.
- Numbering each statement will make it easier to reference individual statements. Anchor links are nice.
- Link to external resources for further reading.
- You don’t need to justify a statement. Leave it for team discussion.
Keeping it Alive
Conventions that aren’t followed are useless.
Include project conventions in your peer review process.
Take 15 minutes each week (after daily on Fridays) with the team to discuss each convention. Update the convention during the meeting. This will make the whole team aware of the convention and the conventions will be kept updated. If you have 26 conventions you will go through them all every 6 months.
I find these sessions very valuable for the team, and if you replace people often in your team they are a necessity.
Moving on From Here
I’ve posted my conventions from Bring Order to your Azure Account publicly with Creative Commons license. Go ahead and steal those conventions for your own project wiki and update them to fit your team.
- Azure: Naming Resources
- Azure: Grouping Resources
- Azure: Tagging Resources