@@ -61,7 +61,7 @@ Traefik2 to the correct _Ringed Service_ based on the service requested and the
6161
6262## Rings & SPK
6363
64- ### Perquisites
64+ ### Prerequisites
6565
6666[ SPK] ( https://github.com/CatalystCode/spk ) is command line tool meant to ease
6767the adoption of [ Bedrock] ( https://github.com/microsoft/bedrock/ ) methodologies
@@ -76,9 +76,28 @@ Creating/adding a Ring is based around a single command:
7676
7777This command adds a new ring to your spk project and tracks it in projects
7878` bedrock.yaml ` file. Subsequently, the command walks through every service in
79- your project and updates their pipeline YAML to monitor the git branch the ring
80- corresponds to. Making every merge into the ring branch trigger a new
81- build/deployment of your ring.
79+ your project and updates their build pipeline YAML to monitor the git branch the
80+ ring corresponds to, so that every merge into the ring branch will trigger a new
81+ build/deployment of your ring for the associated service.
82+
83+ Commiting these changes to the ` master ` branch, or the branch where the
84+ ` hld-lifecycle.yaml ` pipeline triggers off of, will trigger the project
85+ lifecycle pipeline to add the ring to each service defined in the project
86+ ` bedrock.yaml ` in the HLD repository.
87+
88+ A sample HLD repository tree for a sample application repository
89+ (` fabrikam-project ` ) with a service (` fabrikam ` ) and a newly added ring (` dev ` ):
90+
91+ ![ Sample HLD] ( ./images/spk-hld-generated.png )
92+
93+ ** Note:** There should only ever be a single lifecycle pipeline associated with
94+ a project. The single branch on which it triggers, points to the "source of
95+ truth" ` bedrock.yaml ` . This is the branch on which ring creation and deletion
96+ needs to be commited to.
97+
98+ ** Note:** Because ` spk ` will add the branch triggers for each ring added to all
99+ associated service build pipelines within a project, no additional pipelines
100+ should be created when adding a ring.
82101
83102### Deleting/Removing a Ring
84103
@@ -89,6 +108,41 @@ This command removes the ring from your `bedrock.yaml` file and walks through
89108all the services in your project and removing the ring branch from the service
90109pipeline YAML.
91110
111+ ** Note:** The "default" ring cannot be deleted. If you wish to remove the ring
112+ defined under ` bedrock.yaml ` with ` isDefault: true ` , you must first set another
113+ ring to be the default ring via ` spk ring set-default <new-default-ring-name> ` .
114+
115+ ** Note:** Deleting a ` ring ` presently does not remove the service and ` ring `
116+ from a cluster as the project lifecycle pipeline does not yet remove rings or
117+ services from the HLD repository. The work to support the automated removal of
118+ rings and services is being
119+ [ tracked here.] ( https://github.com/microsoft/bedrock/issues/858 ) To manually
120+ remove the ` ring ` from the HLD repository and subsequently, the cluster, follow
121+ the manual steps outlined
122+ [ here.] ( manual-guide-to-rings.md#removing-the-ring-from-the-cluster )
123+
124+ ### Setting the Default Ring
125+
126+ For every bedrock project, there will be a default ring. By default, this is the
127+ ` master ` ring, which corresponds to the master branch of the repository.
128+
129+ For a ` bedrock.yaml ` :
130+
131+ ``` yaml
132+ rings :
133+ master :
134+ isDefault : true
135+ develop :
136+ isDefault : false
137+ services : ...
138+ ` ` `
139+
140+ the property ` isDefault` denotes which `ring` is the default ring.
141+
142+ Currently this property is only being used by the `spk service create-revision`
143+ command. Details can be found
144+ [here.](https://catalystcode.github.io/spk/commands/index.html#service_create-revision)
145+
92146# ## What Services Have What Rings?
93147
94148For each ring defined in your `bedrock.yaml` file, every services
0 commit comments