Add additional links to Learn Chef Rally content (#2477)

* Fix under construction page
Previously, the content was hidden behind the banner. The buttons also
did not contain horizontal spacing.

* Add links to Learn Chef Rally content.
I also corrected a few caplitalization issues and edited a few sentences for clarity.

* ssh => SSH
* Update Slack URL
Was pointing to Habitat by mistake.

Signed-off-by: Thomas Petchel <tpetchel@gmail.com>
This commit is contained in:
Thomas Petchel 2018-03-14 11:01:12 -04:00 committed by Jared Quick
parent f988d52b8d
commit a48aea53c5
7 changed files with 25 additions and 17 deletions

View file

@ -18,7 +18,7 @@ The following InSpec-supported universal matchers are available:
* [`include`](#include) - look for an expected value in a list-valued property
* [`match`](#match) - look for patterns in text using regular expressions
<br>
See [Explore InSpec resources](https://learn.chef.io/modules/explore-inspec-resources#/) on Learn Chef Rally to learn more about InSpec's built-in matchers.
## be

View file

@ -47,3 +47,4 @@ Use InSpec tests from the local file system:
inspec_tests:
- test/integration/default
Check out [Detect and correct with Test Kitchen](https://learn.chef.io/modules/detect-correct-kitchen#/) on Learn Chef Rally for a hands-on look at how to use Test Kitchen to run InSpec profiles.

View file

@ -29,7 +29,9 @@ where:
* `files` is the directory with additional files that a profile can access (optional)
* `README.md` should be used to explain the profile, its scope, and usage
See a complete example profile in the InSpec open source repository: https://github.com/chef/inspec/tree/master/examples/profile
See a complete example profile in the InSpec open source repository: [https://github.com/chef/inspec/tree/master/examples/profile](https://github.com/chef/inspec/tree/master/examples/profile)
Also check out [Explore InSpec resources](https://learn.chef.io/modules/explore-inspec-resources#/) on Learn Chef Rally to learn more about how profiles are structured with hands-on examples.
## inspec.yml
@ -111,6 +113,8 @@ and to target all of these examples in a single `inspec.yml` file:
An InSpec profile can bring in the controls and custom resources from another InSpec profile. Additionally, when inheriting the controls of another profile, a profile can skip or even modify those included controls.
For hands-on examples, check out [Create a custom InSpec profile](https://learn.chef.io/modules/create-a-custom-profile#/) on Learn Chef Rally.
## Defining the Dependencies
Before a profile can use controls from another profile, the to-be-included profile needs to be specified in the including profiles `inspec.yml` file in the `depends` section. For each profile to be included, a location for the profile from where to be fetched and a name for the profile should be included. For example:
@ -298,7 +302,7 @@ See the full example in the InSpec open source repository: https://github.com/ch
# Profile files
An InSpec profile may contain additional files that can be accessed during tests. This covers use-cases where e.g. a list of ports is provided to be tested.
An InSpec profile may contain additional files that can be accessed during tests. A profile file enables you to separate the logic of your tests from the data your tests check for, for example, the list of ports you require to be open.
To access these files, they must be stored in the `files` directory at the root of a profile. They are accessed by their name relative to this folder with `inspec.profile.file(...)`.
@ -332,6 +336,8 @@ The tests in `example.rb` can now access this file:
end
end
For a more complete example that uses a profile file, see [Explore InSpec resources](https://learn.chef.io/modules/explore-inspec-resources#/) on Learn Chef Rally.
# "should" vs. "expect" syntax
Users familiar with the RSpec testing framework may know that there are two ways to write test statements: `should` and `expect`. The RSpec community decided that `expect` is the preferred syntax. However, InSpec recommends the `should` syntax as it tends to read more easily to those users who are not as technical.

View file

@ -139,7 +139,7 @@ Or execute the profile directly via URL:
### images
`images` returns information about Docker image as returned by [docker images](https://docs.docker.com/engine/reference/commandline/images/).
`images` returns information about a Docker image as returned by [docker images](https://docs.docker.com/engine/reference/commandline/images/).
describe docker.images do
its('ids') { should include 'sha:12b5df59...442b' }
@ -183,9 +183,9 @@ Or execute the profile directly via URL:
### image
describe docker_container(name: 'an-echo-server') do
its('image') { should eq 'busybox:latest' }
end
describe docker_container(name: 'an-echo-server') do
its('image') { should eq 'busybox:latest' }
end
### repo

View file

@ -5,7 +5,7 @@ platform: linux
# docker_container
Use the `docker_container` InSpec audit resource to test a docker container.
Use the `docker_container` InSpec audit resource to test a Docker container.
<br>
@ -72,7 +72,7 @@ The `tag` property tests the value of the image tag:
### ports
The `ports` property tests the value the docker ports:
The `ports` property tests the value the Docker ports:
its('ports') { should eq '0.0.0.0:1234->1234/tcp' }
@ -101,4 +101,3 @@ The `command` property tests the value of the container run command:
## Matchers
For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).

View file

@ -5,7 +5,7 @@ platform: linux
# docker_image
Use the `docker_image` InSpec audit resource to verify a docker image.
Use the `docker_image` InSpec audit resource to verify a Docker image.
<br>
@ -70,7 +70,7 @@ The `tag` property tests the value of image tag:
its('tag') { should eq 'latest' }
### Test a docker image
### Test a Docker image
describe docker_image('alpine:latest') do
it { should exist }

View file

@ -6,12 +6,14 @@ title: InSpec Shell
The InSpec interactive shell is a pry based REPL that can be used to
quickly run InSpec controls and tests without having to write it to a
file. Its functionality is similar to `chef shell` - it provides a way
to exercise the InSpec DSL, its resources, tests and plugins without
file. Its functionality is similar to [chef-shell](https://docs.chef.io/chef_shell.html) as it provides a way
to exercise the InSpec DSL, its resources, tests, and plugins without
having to create a profile or write a test file. See
[http://pryrepl.org/](http://pryrepl.org/) for an introduction to what pry is and what it can
do.
See [Explore InSpec resources](https://learn.chef.io/modules/explore-inspec-resources#/) on Learn Chef Rally for a hands-on example that uses InSpec shell.
## Launching the shell
If you are using InSpec from a platform-specific package (rpm, msi,
@ -25,10 +27,10 @@ $ inspec help shell # This will describe inspec shell usage
```
If you wish to connect to a remote machine (called a target within
InSpec), you can use the `-t` flag. We support connecting using ssh,
WinRm and Docker. If no target is provided, we implicitly support the
InSpec), you can use the `-t` flag. We support connecting using SSH,
WinRM and docker. If no target is provided, we implicitly support the
"local" target - i.e. tests running on the current machine running
InSpec. For an ssh connection, use `-i` for specifying ssh key files,
InSpec. For an SSH connection, use `-i` for specifying SSH key files,
and the `--sudo*` commands for requesting a privilege escalation after
logging in. For a WinRM connection, use `--path` to change the login
path, `--ssl` to use SSL for transport layer encryption.