Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Updates from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed May 9, 2019
1 parent 0c14e81 commit 5c492c6
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 25 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ cookbooks that provide the desired recipes and meet dependency
constraints, and emits a `Policyfile.lock.json` describing the expanded
run list and locked cookbook set. The `Policyfile.lock.json` can be used
to install the cookbooks on another machine. The policy lock can be
uploaded to a Chef Server (via the `chef push` command) to apply the
uploaded to a Chef Infra Server (via the `chef push` command) to apply the
expanded run list and locked cookbook set to nodes in your
infrastructure. See the POLICYFILE_README.md for further details.

### `chef push`
`chef push POLICY_GROUP` uploads a Policyfile.lock.json along with the cookbooks it
references to a Chef Server. The policy lock is applied to a
references to a Chef Infra Server. The policy lock is applied to a
`POLICY_GROUP`, which is a set of nodes that share the same run list and
cookbook set. This command operates in compatibility mode and has the
same caveats as `chef install`. See the POLICYFILE_README.md for further
Expand All @@ -148,7 +148,7 @@ cause only attributes from the Policyfile.rb to be updated.

### `chef diff`
`chef diff` shows an itemized diff between Policyfile locks. It can
compare Policyfile locks from local disk, git, and/or the Chef Server,
compare Policyfile locks from local disk, git, and/or the Chef Infra Server,
based on the options given.

#### `chef verify`
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/builtin_commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

c.builtin "push-archive", :PushArchive, desc: "Push a policy archive to a policy group on the server"

c.builtin "show-policy", :ShowPolicy, desc: "Show policyfile objects on your Chef Server"
c.builtin "show-policy", :ShowPolicy, desc: "Show policyfile objects on your Chef Infra Server"

c.builtin "diff", :Diff, desc: "Generate an itemized diff of two Policyfile lock documents"

Expand Down
4 changes: 2 additions & 2 deletions lib/chef-dk/chef_server_api_multi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ module ChefDK
# A wrapper for `Chef::ServerAPI` that supports multi-threading by creating a
# `Chef::ServerAPI` object per-thread.
#
# This is intended to be used for downloading cookbooks from the Chef Server,
# where the API of the Chef Server requires each file to be downloaded
# This is intended to be used for downloading cookbooks from the Chef Infa Server,
# where the API of the Chef Infra Server requires each file to be downloaded
# individually.
#
# It also configures `Chef::ServerAPI` to enable keepalives by default. To
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/command/delete_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DeletePolicy < Base
Usage: chef delete-policy POLICY_NAME [options]
`chef delete-policy POLICY_NAME` deletes all revisions of the policy
`POLICY_NAME` on the configured Chef Server. All policy revisions will be
`POLICY_NAME` on the configured Chef Infra Server. All policy revisions will be
backed up locally, allowing you to undo this operation via the `chef undelete`
command.
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/command/delete_policy_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DeletePolicyGroup < Base
Usage: chef delete-policy-group POLICY_GROUP [options]
`chef delete-policy-group POLICY_GROUP` deletes the policy group POLICY_GROUP on
the configured Chef Server. Policy Revisions associated to the policy group are
the configured Chef Infra Server. Policy Revisions associated to the policy group are
not deleted. The state of the policy group will be backed up locally, allowing
you to undo this operation via the `chef undelete` command.
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/command/diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Diff < Base
When no git-specific flag is given, `chef diff` either compares the
current lockfile revision on disk to one on the server or compares two
lockfiles on the server. Lockfiles on the Chef Server are specified by
lockfiles on the server. Lockfiles on the Chef Infra Server are specified by
Policy Group. Examples:
* `chef diff staging`: compares the current lock with the one currently
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/command/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Install < Base
cookbooks for the policy's run_list and caches them locally. It emits a
Policyfile.lock.json describing the locked cookbook set. You can use the
lockfile to install the locked cookbooks on another machine. You can also push
the lockfile to a "policy group" on a Chef Server and apply that exact set of
the lockfile to a "policy group" on a Chef Infra Server and apply that exact set of
cookbooks to nodes in your infrastructure.
See our detailed README for more information:
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/command/push.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Push < Base
banner(<<~E)
Usage: chef push POLICY_GROUP [ POLICY_FILE ] [options]
`chef push` Uploads an existing Policyfile.lock.json to a Chef Server, along
`chef push` Uploads an existing Policyfile.lock.json to a Chef Infra Server, along
with all the cookbooks contained in the policy lock. The policy lock is applied
to a specific POLICY_GROUP, which is a set of nodes that share the same
run_list and cookbooks.
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/command/push_archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PushArchive < Base
banner(<<~E)
Usage: chef push-archive POLICY_GROUP ARCHIVE_FILE [options]
`chef push-archive` publishes a policy archive to a Chef Server. Policy
`chef push-archive` publishes a policy archive to a Chef Infra Server. Policy
archives can be created with `chef export -a`. The policy will be applied to
the given POLICY_GROUP, which is a set of nodes that share the same
run_list and cookbooks.
Expand Down
2 changes: 1 addition & 1 deletion lib/chef-dk/policyfile/cookbook_locks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CookbookLock
attr_accessor :identifier

# A string in "X.Y.Z" version number format that uniquely identifies the
# cookbook version. This is for compatibility with Chef Server 11.x,
# cookbook version. This is for compatibility with Chef Infra Server 11.x,
# where cookbooks are stored by x.y.z version numbers.
attr_accessor :dotted_decimal_identifier

Expand Down
4 changes: 2 additions & 2 deletions lib/chef-dk/policyfile_services/export_repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module PolicyfileServices

class ExportRepo

# Policy groups provide namespaces for policies so that a Chef Server can
# Policy groups provide namespaces for policies so that a Chef Infra Server can
# have multiple active iterations of a policy at once, but we don't need
# this when serving a single exported policy via Chef Zero, so hardcode
# it to a "well known" value:
Expand Down Expand Up @@ -294,7 +294,7 @@ def create_readme_md
### policy_groups/
Policy groups are used by Chef Server to manage multiple revisions of the same
Policy groups are used by Chef Infra Server to manage multiple revisions of the same
policy. However, exported policies contain only a single policy revision, so
this policy group name is hardcoded to "local" and should not be changed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ This repository contains several directories, and each directory contains a READ

# Configuration

The config file, `.chef/config.rb` is a repository specific configuration file for the knife command line tool. If you're using the Hosted Chef platform, you can download one for your organization from the management console. You can also generate a new config.rb by running `knife configure`. For more information about configuring Knife, see the Knife documentation.

<https://docs.chef.io/knife.html>
The config file, `.chef/config.rb` is a repository-specific configuration file for the knife command line tool. If you're using the Hosted Chef platform, you can download one for your organization from the management console. You can also generate a new config.rb by running `knife configure`. For more information about configuring Knife, see the Knife documentation at https://docs.chef.io/knife.html

# Next Steps

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a Chef Infra Clientt recipe file. It can be used to specify resources
# This is a Chef Infra Client recipe file. It can be used to specify resources
# which will apply configuration to a server.

log "Welcome to Chef Infra Client, #{node['example']['name']}!" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains directories of the various data bags you create for your infrastructure. Each subdirectory corresponds to a data bag on the Chef Infra Server, and contains JSON files of the items that go in the bag.

For example, in this directory you'll find an example data bag directory called `example`, which contains an item definition called `example_item.json`
For example, in this directory, you'll find an example data bag directory called `example`, which contains an item definition called `example_item.json`

Before uploading this item to the server, we must first create the data bag on the Chef Infra Server.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Create environments here, in either the Role Ruby DSL (.rb) or JSON (.json) files. To install environments on the Chef Infra Server, use the knife command.

For example, in this directory you'll find an example environment file called `example.json` which can be uploaded to the Chef Infra Server:
For example, in this directory, you'll find an example environment file called `example.json` which can be uploaded to the Chef Infra Server:

knife environment from file environments/example.json

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Create roles here, in either the Role Ruby DSL (.rb) or JSON (.json) files. To install roles on the server, use knife.

For example, in this directory you'll find an example role file called `example.json` which can be uploaded to the Chef Infra Server:
For example, in this directory, you'll find an example role file called `example.json` which can be uploaded to the Chef Infra Server:

knife role from file roles/example.json

Expand Down
4 changes: 2 additions & 2 deletions spec/unit/command/generator_commands/repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def generator_context
<<~README
Create roles here, in either the Role Ruby DSL (.rb) or JSON (.json) files. To install roles on the server, use knife.
For example, in this directory you'll find an example role file called `example.json` which can be uploaded to the Chef Infra Server:
For example, in this directory, you'll find an example role file called `example.json` which can be uploaded to the Chef Infra Server:
knife role from file roles/example.json
Expand All @@ -351,7 +351,7 @@ def generator_context
<<~README
Create environments here, in either the Role Ruby DSL (.rb) or JSON (.json) files. To install environments on the Chef Infra Server, use the knife command.
For example, in this directory you'll find an example environment file called `example.json` which can be uploaded to the Chef Infra Server:
For example, in this directory, you'll find an example environment file called `example.json` which can be uploaded to the Chef Infra Server:
knife environment from file environments/example.json
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/service_exception_inspectors/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

end

context "with a JSON response body in the standard Chef Server format" do
context "with a JSON response body in the standard Chef Infra Server format" do

let(:response_body) { %q[{"error":["Field 'name' invalid"]}] }

Expand Down

0 comments on commit 5c492c6

Please sign in to comment.