{"_id":"57acceed71d2991900b9a630","category":{"_id":"57acceed71d2991900b9a62c","version":"57acceed71d2991900b9a62b","project":"570086efa565e20e001573b3","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-04-03T02:58:55.770Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"project":"570086efa565e20e001573b3","version":{"_id":"57acceed71d2991900b9a62b","project":"570086efa565e20e001573b3","__v":1,"createdAt":"2016-08-11T19:15:57.383Z","releaseDate":"2016-08-11T19:15:57.383Z","categories":["57acceed71d2991900b9a62c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0.0"},"user":"569d7767ec29360d00f667c7","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-18T21:43:13.315Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Spread versions your software environment (i.e. a Kubernetes cluster) like Git versions source code. Because Spread is built on top of libgit2, it takes advantage of Git's interface and functionality. This means after you deploy a Kubernetes object to a cluster, you can version the object by staging, committing, and pushing it to a Spread repository. \n\nTo get started, initialize Spread and set up a local Spread repository:\n\n`spread init`\n\nHere is our suggested workflow for versioning with Spread:\n\n1. Create or edit your Kubernetes objects\n2. Deploy your objects to a local or remote Kubernetes cluster (make sure you've [set up your directory](https://github.com/redspread/spread/tree/versioning#faq) correctly): `spread deploy .`\n3. Stage an object: `spread add <objectType>/<objectName>`\n4. Repeat until all objects have been staged\n5. Commit your objects with a message: `spread commit -m \"commit message\"`\n6. Set up your remote repository: `spread remote (add <name> <url> | remove <name> | set-url <name> <url>)`\n7. Push your objects to your remote repository: `spread push <remote> <refSpec>`\n8. Go ahead and try out the [other commands](https://redspread.readme.io/docs/spread-commands) - anything not documented can be accessed using `spread git ...`\n\nIf you find any bugs or have any feature requests for Spread versioning, please file an issue!","excerpt":"","slug":"spread-versioning","type":"basic","title":"Spread Versioning"}
Spread versions your software environment (i.e. a Kubernetes cluster) like Git versions source code. Because Spread is built on top of libgit2, it takes advantage of Git's interface and functionality. This means after you deploy a Kubernetes object to a cluster, you can version the object by staging, committing, and pushing it to a Spread repository. To get started, initialize Spread and set up a local Spread repository: `spread init` Here is our suggested workflow for versioning with Spread: 1. Create or edit your Kubernetes objects 2. Deploy your objects to a local or remote Kubernetes cluster (make sure you've [set up your directory](https://github.com/redspread/spread/tree/versioning#faq) correctly): `spread deploy .` 3. Stage an object: `spread add <objectType>/<objectName>` 4. Repeat until all objects have been staged 5. Commit your objects with a message: `spread commit -m "commit message"` 6. Set up your remote repository: `spread remote (add <name> <url> | remove <name> | set-url <name> <url>)` 7. Push your objects to your remote repository: `spread push <remote> <refSpec>` 8. Go ahead and try out the [other commands](https://redspread.readme.io/docs/spread-commands) - anything not documented can be accessed using `spread git ...` If you find any bugs or have any feature requests for Spread versioning, please file an issue!