Skip to content

Commit

Permalink
Merge branch 'environment_check' of https://github.com/jperry/knife-s…
Browse files Browse the repository at this point in the history
…pork into 1.3.3
  • Loading branch information
Jon Cowie committed May 22, 2014
2 parents 5922e33 + 859e622 commit faa91f9
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------

Expand Down

0 comments on commit faa91f9

Please sign in to comment.