Update HA deployment logic
Add specs, tests and docs