-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'environment_check' of https://github.com/jperry/knife-s…
…pork into 1.3.3
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -373,6 +373,59 @@ Saving changes to development.json | |
Promotion complete. Don't forget to upload your changed development.json to Chef Server | ||
``` | ||
|
||
Spork Environnent Check | ||
------------- | ||
Environment check provides the ability to validate a local chef environment file is locked to versions that actually exist on the chef server. Running this check prior to uploading your environment files is recommended as it can prevent your chef server from becoming unresponsive due to a version constraint that will never be valid. | ||
|
||
If you run environment check with no options it will collect all invalid cookbook versions before reporting a failure. | ||
|
||
Alternatively, you can specify any of the following options: | ||
|
||
```-f, --fatal```: Quit on first invalid constraint located | ||
|
||
#### Usage | ||
|
||
```bash | ||
knife spork environment check ENVIRONMENT (options) | ||
``` | ||
|
||
#### Example of a passing chef environment check with no options | ||
|
||
```text | ||
$ knife spork environment check production | ||
Checking constraints for environment: production | ||
Environment production looks good | ||
``` | ||
|
||
#### Example of multiple invalid cookbooks with no options | ||
|
||
```text | ||
$ knife spork environment check production | ||
Checking constraints for environment: production | ||
ERROR: [email protected] does not exist on Chef Server! Upload the cookbook first by running: | ||
knife spork upload mysql | ||
ERROR: [email protected] does not exist on Chef Server! Upload the cookbook first by running: | ||
knife spork upload rbenv | ||
FATAL: Environment production has constraints that point to non existent cookbook versions. | ||
``` | ||
|
||
#### Example of running with the --fatal flag with the same invalid cookbooks from previous example | ||
|
||
```text | ||
$ knife spork environment check production | ||
Checking constraints for environment: production | ||
FATAL: [email protected] does not exist on Chef Server! Upload the cookbook first by running: | ||
knife spork upload mysql | ||
``` | ||
|
||
Spork Node / Role / Databag Commands | ||
------------- | ||
|
||
|