Over the past few months we have created many Habitat packages with the intention of fully automating the provisioning and update of Windows and Linux servers. However, our first offering is going to be a hybrid of our legacy processes and our strategic direction.
We would like to leverage as much of the automation we have built with Habitat but still allow for integration with existing processes so that the current support teams can gain confidence in the automation.
Habitat will be used to help provision new servers but there is a strong concern about how these servers will be updated.
Several ideas have surfaced and we are trying to decide what is the best tactic to bridge the gap between our legacy processes and our strategic direction. The following three ideas are being proposed: environment tiered channels, machine based channels and no channels.
Three assumptions are common to all proposed solutions:
-
Offering definitions are stored in common key value store which is used in the provisioning phase
-
Once a Habitat package is ready to be deployed for any offering it is promoted to a stable channel
-
Once a Habitat package is ready to be provisioned for an offering a channel is added (‘offering_name’ for example)
Tiered Channels
Package channels are based on offering and environment. For example: offering_name-dev, offering_name-qa, offering_name-prod
-
The tier (dev/qa/prod) and Habitat packages selected by the user during the provisioning phase are copied to the server in the form of a json config file
-
Provisioning script appends the tier to the channel on a per package basis.
hab svc load origin/package --channel offering_name-dev --strategy at-once -
Deployment team tags proper channel to packages on the build server when ready to deploy
Tiered Concerns
-
Deployment teams may lack flexibility required to update servers in a way consistent with current processes
-
Failing back to legacy update methodology may require unloading Habitat services
Machine Channels
Package channels are specific to each server.
-
Habitat packages selected by the user in the provisioning phase are copied to the newly provisioned server in the form of a json config file
-
Provisioning script:
-
Installs Habitat packages from a channel that relates to the offering:
hab pkg install origin/package --channel offering_name -
Loads each service with a channel that matches the computername:
hab svc load origin/package --channel $env:computername --strategy at-once -
Deployment team can update infrastructure software on dynamically created groups of servers by tagging a package on the build server with channels that map to each server name
Machine Concerns
-
Packages could potentially have thousands of channels
-
Builder gui may be slow or difficult to use
-
Build server could have performance issues
-
Level of granularity imparted is not part of our strategic direction
Scripted Updates
Channels are only used at provision time and updates are handled by scripts.
-
Provisioning script:
-
Installs Habitat packages from a channel that relates to the offering
-
Package service is loaded with an update strategy of ‘none’:
hab svc load origin/package --channel offering_name --strategy none -
Deployment team can update infrastructure Habitat packages executing
hab pkg installandhab svc loadvia scripts
Scripted Concerns
-
Custom scripting must be developed
-
Not using Habitat’s built in deployment mechanisms
-
Iterating on non strategic solutions is not ideal
Any suggestions would be appreciated!